New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-button-actions

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-button-actions - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

dist/index.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactButtonActions=e(require("react")):t.ReactButtonActions=e(t.react)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=52)}([function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(40),r=n(17);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(1),r=n(0),o=n(36),s=n(5),a=function(t,e,n){var u,c,l,h=t&a.F,f=t&a.G,p=t&a.S,d=t&a.P,v=t&a.B,y=t&a.W,m=f?r:r[e]||(r[e]={}),g=m.prototype,b=f?i:p?i[e]:(i[e]||{}).prototype;f&&(n=e);for(u in n)(c=!h&&b&&void 0!==b[u])&&u in m||(l=c?b[u]:n[u],m[u]=f&&"function"!=typeof b[u]?n[u]:v&&c?o(l,i):y&&b[u]==l?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[u]=l,t&a.R&&g&&!g[u]&&s(g,u,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(6),r=n(13);t.exports=n(7)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(11),r=n(37),o=n(16),s=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(39),r=n(21);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){var i=n(20)("wks"),r=n(14),o=n(1).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){var i=n(12);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(12);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(20)("keys"),r=n(14);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(1),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(17);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(6).f,r=n(2),o=n(10)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){e.f=n(10)},function(t,e,n){var i=n(1),r=n(0),o=n(27),s=n(25),a=n(6).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e){t.exports=!0},function(t,e,n){var i=n(11),r=n(67),o=n(21),s=n(19)("IE_PROTO"),a=function(){},u=function(){var t,e=n(38)("iframe"),i=o.length;for(e.style.display="none",n(68).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;i--;)delete u.prototype[o[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=i(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:r(n,e)}},function(t,e,n){"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";e.__esModule=!0;var i=n(49),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e){t.exports={}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(87),o=i(r),s=n(91),a=i(s),u=n(49),c=i(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 "+(void 0===e?"undefined":(0,c.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(e,n){e.exports=t},function(t,e,n){t.exports=n(94)()},function(t,e,n){"use strict";e.__esModule=!0;var i=n(53),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}},function(t,e,n){var i=n(56);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(38)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(12),r=n(1).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(2),r=n(3),o=n(58)(!1),s=n(19)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(41);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(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,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(61),o=i(r),s=n(47),a=i(s);e.default=function(){var t="function"==typeof a.default&&o.default&&(0,o.default)("react.element")||60103;return function(e,n,i,r){var o=e&&e.defaultProps,s=arguments.length-3;if(n||0===s||(n={}),n&&o)for(var a in o)void 0===n[a]&&(n[a]=o[a]);else n||(n=o||{});if(1===s)n.children=r;else if(s>1){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:t,type:e,key:void 0===i?null:""+i,ref:null,props:n,_owner:null}}}()},function(t,e,n){"use strict";var i=n(1),r=n(2),o=n(7),s=n(4),a=n(44),u=n(63).KEY,c=n(8),l=n(20),h=n(24),f=n(14),p=n(10),d=n(25),v=n(26),y=n(64),m=n(65),g=n(66),b=n(11),E=n(3),T=n(16),S=n(13),O=n(28),_=n(69),w=n(46),x=n(6),C=n(9),P=w.f,R=x.f,I=_.f,M=i.Symbol,B=i.JSON,j=B&&B.stringify,k=p("_hidden"),A=p("toPrimitive"),L={}.propertyIsEnumerable,z=l("symbol-registry"),D=l("symbols"),W=l("op-symbols"),N=Object.prototype,V="function"==typeof M,F=i.QObject,H=!F||!F.prototype||!F.prototype.findChild,X=o&&c(function(){return 7!=O(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=P(N,e);i&&delete N[e],R(t,e,n),i&&t!==N&&R(N,e,i)}:R,Y=function(t){var e=D[t]=O(M.prototype);return e._k=t,e},q=V&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},U=function(t,e,n){return t===N&&U(W,e,n),b(t),e=T(e,!0),b(n),r(D,e)?(n.enumerable?(r(t,k)&&t[k][e]&&(t[k][e]=!1),n=O(n,{enumerable:S(0,!1)})):(r(t,k)||R(t,k,S(1,{})),t[k][e]=!0),X(t,e,n)):R(t,e,n)},G=function(t,e){b(t);for(var n,i=m(e=E(e)),r=0,o=i.length;o>r;)U(t,n=i[r++],e[n]);return t},K=function(t,e){return void 0===e?O(t):G(O(t),e)},J=function(t){var e=L.call(this,t=T(t,!0));return!(this===N&&r(D,t)&&!r(W,t))&&(!(e||!r(this,t)||!r(D,t)||r(this,k)&&this[k][t])||e)},Z=function(t,e){if(t=E(t),e=T(e,!0),t!==N||!r(D,e)||r(W,e)){var n=P(t,e);return!n||!r(D,e)||r(t,k)&&t[k][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(E(t)),i=[],o=0;n.length>o;)r(D,e=n[o++])||e==k||e==u||i.push(e);return i},Q=function(t){for(var e,n=t===N,i=I(n?W:E(t)),o=[],s=0;i.length>s;)!r(D,e=i[s++])||n&&!r(N,e)||o.push(D[e]);return o};V||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===N&&e.call(W,n),r(this,k)&&r(this[k],t)&&(this[k][t]=!1),X(this,t,S(1,n))};return o&&H&&X(N,t,{configurable:!0,set:e}),Y(t)},a(M.prototype,"toString",function(){return this._k}),w.f=Z,x.f=U,n(45).f=_.f=$,n(15).f=J,n(22).f=Q,o&&!n(27)&&a(N,"propertyIsEnumerable",J,!0),d.f=function(t){return Y(p(t))}),s(s.G+s.W+s.F*!V,{Symbol:M});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)p(tt[et++]);for(var tt=C(p.store),et=0;tt.length>et;)v(tt[et++]);s(s.S+s.F*!V,"Symbol",{for:function(t){return r(z,t+="")?z[t]:z[t]=M(t)},keyFor:function(t){if(q(t))return y(z,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!V,"Object",{create:K,defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:Q}),B&&s(s.S+s.F*(!V||c(function(){var t=M();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],"function"==typeof e&&(n=e),!n&&g(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!q(e))return e}),i[1]=e,j.apply(B,i)}}}),M.prototype[A]||n(5)(M.prototype,A,M.prototype.valueOf),h(M,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){t.exports=n(5)},function(t,e,n){var i=n(39),r=n(21).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){var i=n(15),r=n(13),o=n(3),s=n(16),a=n(2),u=n(37),c=Object.getOwnPropertyDescriptor;e.f=n(7)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){t.exports={default:n(70),__esModule:!0}},function(t,e,n){t.exports={default:n(74),__esModule:!0}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(77),o=i(r),s=n(47),a=i(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 void 0===t?"undefined":u(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":void 0===t?"undefined":u(t)}},function(t,e,n){"use strict";var i=n(27),r=n(4),o=n(44),s=n(5),a=n(2),u=n(31),c=n(81),l=n(24),h=n(82),f=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,y,m,g){c(n,e,v);var b,E,T,S=function(t){if(!p&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",_="values"==y,w=!1,x=t.prototype,C=x[f]||x["@@iterator"]||y&&x[y],P=C||S(y),R=y?_?S("entries"):P:void 0,I="Array"==e?x.entries||C:C;if(I&&(T=h(I.call(new t)))!==Object.prototype&&(l(T,O,!0),i||a(T,f)||s(T,f,d)),_&&C&&"values"!==C.name&&(w=!0,P=function(){return C.call(this)}),i&&!g||!p&&!w&&x[f]||s(x,f,P),u[e]=P,u[O]=d,y)if(b={values:_?P:S("values"),keys:m?P:S("keys"),entries:R},g)for(E in b)E in x||o(x,E,b[E]);else r(r.P+r.F*(p||w),e,b);return b}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={SwipeStyles:{overlayStyles:{width:"100%",zIndex:2,transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)"},baseSwipeContainerStyles:{overflow:"hidden",position:"relative"},buttonsContainerStyles:{zIndex:1,height:"100%",width:"100%"},rightContainerStyles:{transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)",height:"100%",alignItems:"center",bottom:"0",display:"flex",position:"absolute",right:"0",transform:"scale3d(0, 1, 1)",transformOrigin:"right"},leftContainerStyles:{transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)",height:"100%",transform:"scale3d(0, 1, 1)",alignItems:"center",bottom:"0",display:"flex",position:"absolute",left:"0",transformOrigin:"left"}},ButtonStyles:{container:{cursor:"pointer",flex:"1",display:"flex",height:"100%",alignItems:"center",textAlign:"center"},content:{flex:1}}};e.default=i,e.SwipeStyles=i.SwipeStyles,e.ButtonStyles=i.ButtonStyles},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r,o,s=n(42),a=i(s),u=n(48),c=i(u),l=n(29),h=i(l),f=n(30),p=i(f),d=n(32),v=i(d),y=n(33),m=i(y),g=n(34),b=i(g),E=n(98),T=i(E),S=n(99),O=i(S),_=n(100),w=i(_),x=n(51),C=i(x),P=function(t,e){return Math.min(t/e,1)},R=function(t,e){return Math.max(1-t/e,0)},I=(o=r=function(t){function e(n){(0,h.default)(this,e);var i=(0,p.default)(this,t.call(this,n));return i.deinitialize=function(){i.unRegisterSwipe(i.swipeId),i.resetEvents()},i.onVerticalPanStart=function(t){!1===i.deactivateVertical&&!1===i.deactivateHorizontal&&(i.deactivateHorizontal=!0)},i.onVerticalPanEnd=function(t){!0===i.deactivateHorizontal&&(i.deactivateHorizontal=!1)},i.close=function(){i.resetOverlay()},i.resetButtons=function(){i.translateOverlay(0),i.transformLeftButton(0),i.transformRightButton(0)},i.isOverlayTransformed=function(){return"translate3d(0px, 0px, 0px)"!==i.overlay.style.transform},i.initBindedEvents2=function(){!1===i.bindedEventsVert&&(i.bindedEventsVert={})},i.initVerticalBlocker=function(){i.registerEvent("pandown",!0),i.registerEvent("panup",!0),i.hammerVertical.on("panstart",i.onVerticalPanStart),i.hammerVertical.on("panend",i.onVerticalPanEnd)},i.computeDomNodeWidths=function(){if(!i.container||i.container.offsetWidth!==i.overlayWidth){i.overlayWidth=i.container.offsetWidth;var t=i.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength;i.btnsLeftWidth=i.isFullWidth&&e?i.overlayWidth:i.overlayWidth/4.5*e,i.btnsRightWidth=i.isFullWidth&&n?i.overlayWidth:i.overlayWidth/4.5*n,i.threshold=Math.round(i.overlayWidth/4.5)}},i.applySizesOnce=function(){if(!i.sizeInitialized){var t=i.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength;i.btnsLeftWidthCss=i.isFullWidth&&e?100:23*e,i.btnsRightWidthCss=i.isFullWidth&&n?100:23*n,i.rightBtnContainer&&(i.rightBtnContainer.style.width=i.btnsRightWidthCss+"%"),i.leftBtnContainer&&(i.leftBtnContainer.style.width=i.btnsLeftWidthCss+"%"),i.sizeInitialized=!0}},i.initSizes=function(){i.container?(i.computeDomNodeWidths(),i.applySizesOnce()):requestAnimationFrame(i.initSizes)},i.initialize=function(){i.hasEvents()&&i.constraintsAreValid()&&(i.initTouchEvents(),i.initSizes(),i.isLinkedToOthers&&i.registerSwipe(i.swipeId,i.resetOverlay))},i.bindLeftBtnContainer=function(t){i.leftBtnContainer=t},i.bindRightBtnContainer=function(t){i.rightBtnContainer=t},i.bindOverlayRef=function(t){i.overlay=t},i.bindContainerRef=function(t){i.container=t},i.styles=C.default.SwipeStyles,i.swipeId=Math.floor(1e3*Math.random()),i.deactivateHorizontal=!1,i.state={forceRender:!1},i.deactivateVertical=!1,i.sizeInitialized=!1,i.btnsLeftWidthCss=100,i.btnsRightWidthCss=100,i.btnsLeftWidth=0,i.btnsRightWidth=0,i.bindedEvents={},i.bindedEventsVert=!1,i.childrenProps={},i.shouldShowRight=!1,i.shouldShowLeft=!1,i.leftIsVisible=!1,i.rightIsVisible=!1,i.currentRightDistance=!1,i.currentLeftDistance=!1,i.shouldCloseAutomatically=!1!==n.autoclose,i.isLinkedToOthers=!1!==n.linked,i.isFullWidth=!0===n.fullwidth,i.initBindings(),i.threshold=0,i}return(0,v.default)(e,t),e.prototype.initBindings=function(){this.resetOverlay=this.resetOverlay.bind(this),this.handleBtnClick=this.handleBtnClick.bind(this),this.showRightMenu=this.showRightMenu.bind(this),this.showLeftMenu=this.showLeftMenu.bind(this),this.onHorizontalPanStart=this.onHorizontalPanStart.bind(this),this.onHorizontalPanEnd=this.onHorizontalPanEnd.bind(this),this.initSizes=this.initSizes.bind(this),this.onLeftPan=this.onLeftPan.bind(this),this.onRightPan=this.onRightPan.bind(this),this.initTouchEvents=this.initTouchEvents.bind(this),this.resetEvents=this.resetEvents.bind(this),this.handleContainerClick=this.handleContainerClick.bind(this)},e.prototype.componentWillUnmount=function(){this.deinitialize()},e.prototype.onHorizontalPanStart=function(t){!1===this.deactivateHorizontal&&(this.deactivateVertical=!0,this.panStartDelta=t.deltaX)},e.prototype.resetOverlay=function(){((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.leftIsVisible||this.rightIsVisible)&&this.onClose(),this.currentLeftDistance=!1,this.currentRightDistance=!1,this.leftIsVisible=!1,this.rightIsVisible=!1,this.isOverlayTransformed()&&this.resetButtons()},e.prototype.showRightMenu=function(){this.onClose(),this.translateOverlay(-this.btnsRightWidth),this.transformLeftButton(0),this.transformRightButton(1),this.leftIsVisible=!1,this.rightIsVisible=!0,this.onOpen()},e.prototype.showLeftMenu=function(){this.onClose(),this.translateOverlay(this.btnsLeftWidth),this.transformLeftButton(1),this.transformRightButton(0),this.leftIsVisible=!0,this.rightIsVisible=!1,this.onOpen()},e.prototype.onHorizontalPanEnd=function(t){if(!1===this.deactivateHorizontal){if(this.deactivateVertical=!1,this.shouldShowRight=!1===this.leftIsVisible&&this.rightBtnContainer&&t.deltaX<0&&t.distance>this.threshold,this.shouldShowLeft=!1===this.rightIsVisible&&this.leftBtnContainer&&t.deltaX>0&&t.distance>this.threshold,!this.shouldShowRight&&!this.shouldShowLeft)return this.resetOverlay();if(this.shouldShowRight)return this.showRightMenu();if(this.shouldShowLeft)return this.showLeftMenu()}},e.prototype.transformButtons=function(t){var e=t>0,n=e?t:-1*t,i=e?P:R,r=e?R:P,o=i(n,this.btnsLeftWidth),s=r(n,this.btnsRightWidth);this.transformLeftButton(o),this.transformRightButton(s)},e.prototype.transformLeftButton=function(t){this.leftBtnContainer&&(this.leftBtnContainer.style.transform="scale3d("+t+", 1, 1)")},e.prototype.transformRightButton=function(t){this.rightBtnContainer&&(this.rightBtnContainer.style.transform="scale3d("+t+", 1, 1)")},e.prototype.translateOverlay=function(t){this.overlay&&(this.overlay.style.transform="translate3d("+t+"px,0px,0px)")},e.prototype.onLeftPan=function(t){if(!1===this.deactivateHorizontal){var e=this.getMovement(t.deltaX,t.velocityX),n=Math.max(e,-1*this.btnsRightWidth);if(!1!==this.currentRightDistance){var i=this.leftIsVisible?Math.max(n,0):Math.min(n,this.currentRightDistance);this.currentLeftDistance=i,this.translateOverlay(i),this.transformButtons(i)}else this.currentLeftDistance=n,this.translateOverlay(n),this.transformButtons(n)}},e.prototype.onOpen=function(){this.props.onOpen&&this.props.onOpen.call(),this.isLinkedToOthers&&this.closeSwipes(this.swipeId)},e.prototype.onClose=function(){var t=this.rightIsVisible||this.leftIsVisible;if(this.props.onClose&&t){var e=this.rightIsVisible?this.props.right:this.props.left;return this.props.onClose.call(null,e)}},e.prototype.getMovement=function(t,e){return Math.round(t-this.panStartDelta*(1+e))},e.prototype.onRightPan=function(t){if(!1===this.deactivateHorizontal){var e=this.getMovement(t.deltaX,t.velocityX),n=Math.min(e,this.btnsLeftWidth);if(!1!==this.currentLeftDistance){var i=Math.max(n,this.currentLeftDistance);this.currentRightDistance=i,this.translateOverlay(i),this.transformButtons(i)}else this.currentRightDistance=n,this.translateOverlay(n),this.transformButtons(n)}},e.prototype.getEvents=function(){var t=this.props;return{left:t.left,right:t.right,onOpen:t.onOpen,onClose:t.onClose}},e.prototype.getNbButtonsBySide=function(){var t=this.getEvents(),e=t.left,n=t.right;return{leftLength:e&&e.length?e.length:0,rightLength:n&&n.length?n.length:0}},e.prototype.hasEvents=function(){var t=this.getEvents(),e=t.left,n=t.right;return t.onOpen,t.onClose,!!e||!!n},e.prototype.resetSwipeEvents=function(){var t=(0,c.default)(this.bindedEvents).join(" ");if(this.hammer.off(t),this.hammer.destroy(),this.bindedEvents={},this.bindedEventsVert){var e=(0,c.default)(this.bindedEventsVert).join(" ");this.hammerVertical.off(e),this.hammerVertical.destroy(),this.bindedEventsVert=!1}},e.prototype.resetTapEvents=function(){this.containerHammer.off("tap"),this.containerHammer.destroy()},e.prototype.resetEvents=function(){this.resetTapEvents(),this.resetSwipeEvents()},e.prototype.registerEvent=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.initBindedEvents2(),this.bindedEventsVert[t]=!0),this.bindedEvents[t]=!0},e.prototype.initEventsFromProps=function(){var t=this.getEvents();(t.left||t.right)&&(this.initVerticalBlocker(),this.registerEvent("panstart"),this.hammer.on("panstart",this.onHorizontalPanStart),this.registerEvent("panend"),this.hammer.on("panend",this.onHorizontalPanEnd),this.registerEvent("panleft"),this.hammer.on("panleft",this.onLeftPan),this.registerEvent("panright"),this.hammer.on("panright",this.onRightPan))},e.prototype.initTouchEvents=function(){this.containerHammer=new T.default(this.container),this.containerHammer.add(new T.default.Tap),this.containerHammer.on("tap",this.handleContainerClick),this.hammer=new T.default(this.overlay),this.hammerVertical=new T.default(this.overlay),this.hammer.get("pan").set({direction:T.default.DIRECTION_HORIZONTAL,threshold:20}),this.hammerVertical.get("pan").set({direction:T.default.DIRECTION_VERTICAL,threshold:2}),this.initEventsFromProps()},e.prototype.checkFullWidthConstraints=function(){if(!1===this.isFullWidth)return!0;var t=this.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength;if(e>1||n>1)throw new Error("^^^^^^ react-action-buttons : Can't make a fullWidth swipe with more than 1 item");return!0},e.prototype.constraintsAreValid=function(){return this.checkFullWidthConstraints()},e.prototype.componentDidMount=function(){this.initialize()},e.prototype.handleBtnClick=function(t){this.shouldCloseAutomatically&&this.resetOverlay()},e.prototype.renderLeftButtons=function(){var t=this;return this.props.left&&this.props.left.length?m.default.createElement("div",{className:"leftBtnContainer",key:"leftBtnContainer",style:this.styles.leftContainerStyles,ref:this.bindLeftBtnContainer},this.props.left.map(function(e,n){return(0,a.default)(w.default,{onClickCallback:t.handleBtnClick,action:e},n)})):""},e.prototype.renderRightButtons=function(){var t=this;return this.props.right&&this.props.right.length?m.default.createElement("div",{className:"rightBtnContainer",key:"rightBtnContainer",ref:this.bindRightBtnContainer,style:this.styles.rightContainerStyles},this.props.right.map(function(e,n){return(0,a.default)(w.default,{action:e,onClickCallback:t.handleBtnClick},n)})):""},e.prototype.renderButtons=function(){return this.hasEvents()?(0,a.default)("div",{className:"buttonsContainer",style:this.styles.buttonsContainerStyles},void 0,this.renderLeftButtons(),this.renderRightButtons()):""},e.prototype.handleContainerClick=function(){this.props.onPress&&this.props.onPress.call(),this.shouldCloseAutomatically&&this.resetOverlay()},e.prototype.update=function(){this.initSizes(),this.resetOverlay(!1)},e.prototype.componentDidUpdate=function(){this.update()},e.prototype.forceRerender=function(){this.setState(function(t){return{forceRender:!t.forceRender}})},e.prototype.shouldComponentUpdate=function(t,e){return e.forceRender!==this.state.forceRender||!(!this.props.updateKey||t.updateKey===this.props.updateKey)||!0!==this.props.doNotReRender},e.prototype.render=function(){return m.default.createElement("div",{ref:this.bindContainerRef,className:"swipeContainer",style:this.styles.baseSwipeContainerStyles},this.renderButtons(),m.default.createElement("div",{style:this.styles.overlayStyles,className:"swipeOverlay",ref:this.bindOverlayRef},this.props.children))},e}(O.default),r.propTypes={onPress:b.default.func,autoclose:b.default.bool,style:b.default.object,linked:b.default.bool,fullwidth:b.default.bool,updateKey:b.default.oneOfType([b.default.string,b.default.number,b.default.bool]),left:b.default.array,right:b.default.array,onOpen:b.default.func,onClose:b.default.func},o);e.default=I},function(t,e,n){t.exports={default:n(54),__esModule:!0}},function(t,e,n){n(55),t.exports=n(0).Object.assign},function(t,e,n){var i=n(4);i(i.S+i.F,"Object",{assign:n(57)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var i=n(9),r=n(22),o=n(15),s=n(23),a=n(40),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=i})?function(t,e){for(var n=s(t),u=arguments.length,c=1,l=r.f,h=o.f;u>c;)for(var f,p=a(arguments[c++]),d=l?i(p).concat(l(p)):i(p),v=d.length,y=0;v>y;)h.call(p,f=d[y++])&&(n[f]=p[f]);return n}:u},function(t,e,n){var i=n(3),r=n(59),o=n(60);t.exports=function(t){return function(e,n,s){var a,u=i(e),c=r(u.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(18),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(18),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){t.exports={default:n(62),__esModule:!0}},function(t,e,n){n(43),t.exports=n(0).Symbol.for},function(t,e,n){var i=n(14)("meta"),r=n(12),o=n(2),s=n(6).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},h=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[i].i},f=function(t,e){if(!o(t,i)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[i].w},p=function(t){return c&&d.NEED&&u(t)&&!o(t,i)&&l(t),t},d=t.exports={KEY:i,NEED:!1,fastKey:h,getWeak:f,onFreeze:p}},function(t,e,n){var i=n(9),r=n(3);t.exports=function(t,e){for(var n,o=r(t),s=i(o),a=s.length,u=0;a>u;)if(o[n=s[u++]]===e)return n}},function(t,e,n){var i=n(9),r=n(22),o=n(15);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var i=n(41);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(6),r=n(11),o=n(9);t.exports=n(7)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var i=n(3),r=n(45).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):r(i(t))}},function(t,e,n){n(43),n(71),n(72),n(73),t.exports=n(0).Symbol},function(t,e){},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){n(75),t.exports=n(0).Object.keys},function(t,e,n){var i=n(23),r=n(9);n(76)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(4),r=n(0),o=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){t.exports={default:n(78),__esModule:!0}},function(t,e,n){n(79),n(83),t.exports=n(25).f("iterator")},function(t,e,n){"use strict";var i=n(80)(!0);n(50)(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=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var i=n(18),r=n(17);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),u=i(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){"use strict";var i=n(28),r=n(13),o=n(24),s={};n(5)(s,n(10)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(2),r=n(23),o=n(19)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){n(84);for(var i=n(1),r=n(5),o=n(31),s=n(10)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=i[c],h=l&&l.prototype;h&&!h[s]&&r(h,s,c),o[c]=o.Array}},function(t,e,n){"use strict";var i=n(85),r=n(86),o=n(31),s=n(3);t.exports=n(50)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(88),__esModule:!0}},function(t,e,n){n(89),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var i=n(4);i(i.S,"Object",{setPrototypeOf:n(90).set})},function(t,e,n){var i=n(12),r=n(11),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(36)(Function.call,n(46).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){t.exports={default:n(92),__esModule:!0}},function(t,e,n){n(93);var i=n(0).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){var i=n(4);i(i.S,"Object",{create:n(28)})},function(t,e,n){"use strict";var i=n(95),r=n(96),o=n(97);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){"use strict";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";function i(t,e,n,i,o,s,a,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,s,a,u],h=0;c=new Error(e.replace(/%s/g,function(){return l[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(t){};t.exports=i},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){var i;!function(r,o,s,a){"use strict";function u(t,e,n){return setTimeout(p(t,n),e)}function c(t,e,n){return!!Array.isArray(t)&&(l(t,n[e],n),!0)}function l(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function h(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}function f(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,n&&dt(i,n)}function p(t,e){return function(){return t.apply(e,arguments)}}function d(t,e){return typeof t==mt?t.apply(e?e[0]||a:a,e):t}function v(t,e){return t===a?e:t}function y(t,e,n){l(E(e),function(e){t.addEventListener(e,n,!1)})}function m(t,e,n){l(E(e),function(e){t.removeEventListener(e,n,!1)})}function g(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function E(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function S(t){return Array.prototype.slice.call(t,0)}function O(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];T(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function _(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<vt.length;){if(n=vt[o],(i=n?n+r:e)in t)return i;o++}return a}function w(){return Ot++}function x(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}function C(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){d(t.options.enable,[t])&&n.handler(e)},this.init()}function P(t){return new(t.options.inputClass||(xt?F:Ct?Y:wt?U:V))(t,R)}function R(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&Rt&&i-r==0,s=e&(Mt|Bt)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,I(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function I(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=j(e)),r>1&&!n.firstMultiple?n.firstMultiple=j(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,u=e.center=k(i);e.timeStamp=Et(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=D(a,u),e.distance=z(a,u),M(n,e),e.offsetDirection=L(e.deltaX,e.deltaY);var c=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=bt(c.x)>bt(c.y)?c.x:c.y,e.scale=s?N(s.pointers,i):1,e.rotation=s?W(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,B(n,e);var l=t.element;g(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function M(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Rt&&o.eventType!==Mt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}function B(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(u>Pt||s.velocity===a)){var c=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,h=A(u,c,l);i=h.x,r=h.y,n=bt(h.x)>bt(h.y)?h.x:h.y,o=L(c,l),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}function j(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:gt(t.pointers[n].clientX),clientY:gt(t.pointers[n].clientY)},n++;return{timeStamp:Et(),pointers:e,center:k(e),deltaX:t.deltaX,deltaY:t.deltaY}}function k(t){var e=t.length;if(1===e)return{x:gt(t[0].clientX),y:gt(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:gt(n/e),y:gt(i/e)}}function A(t,e,n){return{x:e/t||0,y:n/t||0}}function L(t,e){return t===e?jt:bt(t)>=bt(e)?t<0?kt:At:e<0?Lt:zt}function z(t,e,n){n||(n=Vt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function D(t,e,n){n||(n=Vt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function W(t,e){return D(e[1],e[0],Ft)+D(t[1],t[0],Ft)}function N(t,e){return z(e[0],e[1],Ft)/z(t[0],t[1],Ft)}function V(){this.evEl=Xt,this.evWin=Yt,this.pressed=!1,C.apply(this,arguments)}function F(){this.evEl=Gt,this.evWin=Kt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function H(){this.evTarget=Zt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function X(t,e){var n=S(t.touches),i=S(t.changedTouches);return e&(Mt|Bt)&&(n=O(n.concat(i),"identifier",!0)),[n,i]}function Y(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function q(t,e){var n=S(t.touches),i=this.targetIds;if(e&(Rt|It)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=S(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return g(t.target,u)}),e===Rt)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(Mt|Bt)&&delete i[s[r].identifier],r++;return a.length?[O(o.concat(a),"identifier",!0),a]:void 0}function U(){C.apply(this,arguments);var t=p(this.handler,this);this.touch=new Y(this.manager,t),this.mouse=new V(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function G(t,e){t&Rt?(this.primaryTouch=e.changedPointers[0].identifier,K.call(this,e)):t&(Mt|Bt)&&K.call(this,e)}function K(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,ee)}}function J(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=ne&&s<=ne)return!0}return!1}function Z(t,e){this.manager=t,this.set(e)}function $(t){if(b(t,ae))return ae;var e=b(t,ue),n=b(t,ce);return e&&n?ae:e||n?e?ue:ce:b(t,se)?se:oe}function Q(t){this.options=dt({},this.defaults,t||{}),this.id=w(),this.manager=null,this.options.enable=v(this.options.enable,!0),this.state=he,this.simultaneous={},this.requireFail=[]}function tt(t){return t&ye?"cancel":t&de?"end":t&pe?"move":t&fe?"start":""}function et(t){return t==zt?"down":t==Lt?"up":t==kt?"left":t==At?"right":""}function nt(t,e){var n=e.manager;return n?n.get(t):t}function it(){Q.apply(this,arguments)}function rt(){it.apply(this,arguments),this.pX=null,this.pY=null}function ot(){it.apply(this,arguments)}function st(){Q.apply(this,arguments),this._timer=null,this._input=null}function at(){it.apply(this,arguments)}function ut(){it.apply(this,arguments)}function ct(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function lt(t,e){return e=e||{},e.recognizers=v(e.recognizers,lt.defaults.preset),new ht(t,e)}function ht(t,e){this.options=dt({},lt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=P(this),this.touchAction=new Z(this,this.options.touchAction),ft(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function ft(t,e){var n=t.element;if(n.style){var i;l(t.options.cssProps,function(r,o){i=_(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function pt(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var dt,vt=["","webkit","Moz","MS","ms","o"],yt=o.createElement("div"),mt="function",gt=Math.round,bt=Math.abs,Et=Date.now;dt="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var Tt=h(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),St=h(function(t,e){return Tt(t,e,!0)},"merge","Use `assign`."),Ot=1,_t=/mobile|tablet|ip(ad|hone|od)|android/i,wt="ontouchstart"in r,xt=_(r,"PointerEvent")!==a,Ct=wt&&_t.test(navigator.userAgent),Pt=25,Rt=1,It=2,Mt=4,Bt=8,jt=1,kt=2,At=4,Lt=8,zt=16,Dt=kt|At,Wt=Lt|zt,Nt=Dt|Wt,Vt=["x","y"],Ft=["clientX","clientY"];C.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(x(this.element),this.evWin,this.domHandler)}};var Ht={mousedown:Rt,mousemove:It,mouseup:Mt},Xt="mousedown",Yt="mousemove mouseup";f(V,C,{handler:function(t){var e=Ht[t.type];e&Rt&&0===t.button&&(this.pressed=!0),e&It&&1!==t.which&&(e=Mt),this.pressed&&(e&Mt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var qt={pointerdown:Rt,pointermove:It,pointerup:Mt,pointercancel:Bt,pointerout:Bt},Ut={2:"touch",3:"pen",4:"mouse",5:"kinect"},Gt="pointerdown",Kt="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Gt="MSPointerDown",Kt="MSPointerMove MSPointerUp MSPointerCancel"),f(F,C,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=qt[i],o=Ut[t.pointerType]||t.pointerType,s="touch"==o,a=T(e,t.pointerId,"pointerId");r&Rt&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(Mt|Bt)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var Jt={touchstart:Rt,touchmove:It,touchend:Mt,touchcancel:Bt},Zt="touchstart",$t="touchstart touchmove touchend touchcancel";f(H,C,{handler:function(t){var e=Jt[t.type];if(e===Rt&&(this.started=!0),this.started){var n=X.call(this,t,e);e&(Mt|Bt)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var Qt={touchstart:Rt,touchmove:It,touchend:Mt,touchcancel:Bt},te="touchstart touchmove touchend touchcancel";f(Y,C,{handler:function(t){var e=Qt[t.type],n=q.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var ee=2500,ne=25;f(U,C,{handler:function(t,e,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)G.call(this,e,n);else if(r&&J.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=_(yt.style,"touchAction"),re=ie!==a,oe="auto",se="manipulation",ae="none",ue="pan-x",ce="pan-y",le=function(){if(!re)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();Z.prototype={set:function(t){"compute"==t&&(t=this.compute()),re&&this.manager.element.style&&le[t]&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){d(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),$(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=b(i,ae)&&!le[ae],o=b(i,ce)&&!le[ce],s=b(i,ue)&&!le[ue];if(r){var a=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(a&&u&&c)return}return s&&o?void 0:r||o&&n&Dt||s&&n&Wt?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var he=1,fe=2,pe=4,de=8,ve=de,ye=16;Q.prototype={defaults:{},set:function(t){return dt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(c(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=nt(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return c(t,"dropRecognizeWith",this)?this:(t=nt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(c(t,"requireFailure",this))return this;var e=this.requireFail;return t=nt(t,this),-1===T(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(c(t,"dropRequireFailure",this))return this;t=nt(t,this);var e=T(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,i=this.state;i<de&&e(n.options.event+tt(i)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),i>=de&&e(n.options.event+tt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|he)))return!1;t++}return!0},recognize:function(t){var e=dt({},t);if(!d(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(ve|ye|32)&&(this.state=he),this.state=this.process(e),this.state&(fe|pe|de|ye)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},f(it,Q,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(fe|pe),r=this.attrTest(t);return i&&(n&Bt||!r)?e|ye:i||r?n&Mt?e|de:e&fe?e|pe:fe:32}}),f(rt,it,{defaults:{event:"pan",threshold:10,pointers:1,direction:Nt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Dt&&e.push(ce),t&Wt&&e.push(ue),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&Dt?(r=0===o?jt:o<0?kt:At,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?jt:s<0?Lt:zt,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return it.prototype.attrTest.call(this,t)&&(this.state&fe||!(this.state&fe)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),f(ot,it,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&fe)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),f(st,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(Mt|Bt)&&!r)this.reset();else if(t.eventType&Rt)this.reset(),this._timer=u(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&Mt)return ve;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&Mt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Et(),this.manager.emit(this.options.event,this._input)))}}),f(at,it,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&fe)}}),f(ut,it,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Dt|Wt,pointers:1},getTouchAction:function(){return rt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Dt|Wt)?e=t.overallVelocity:n&Dt?e=t.overallVelocityX:n&Wt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Mt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),f(ct,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[se]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&Rt&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=Mt)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ve,this.tryEmit()},e.interval,this),fe):ve}return 32},failTimeout:function(){return this._timer=u(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),lt.VERSION="2.0.7",lt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[at,{enable:!1}],[ot,{enable:!1},["rotate"]],[ut,{direction:Dt}],[rt,{direction:Dt},["swipe"]],[ct],[ct,{event:"doubletap",taps:2},["tap"]],[st]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ht.prototype={set:function(t){return dt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ve)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(fe|pe|de)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Q)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(c(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(c(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=T(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return l(E(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return l(E(t),function(t){e?n[t]&&n[t].splice(T(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&pt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&ft(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},dt(lt,{INPUT_START:Rt,INPUT_MOVE:It,INPUT_END:Mt,INPUT_CANCEL:Bt,STATE_POSSIBLE:he,STATE_BEGAN:fe,STATE_CHANGED:pe,STATE_ENDED:de,STATE_RECOGNIZED:ve,STATE_CANCELLED:ye,STATE_FAILED:32,DIRECTION_NONE:jt,DIRECTION_LEFT:kt,DIRECTION_RIGHT:At,DIRECTION_UP:Lt,DIRECTION_DOWN:zt,DIRECTION_HORIZONTAL:Dt,DIRECTION_VERTICAL:Wt,DIRECTION_ALL:Nt,Manager:ht,Input:C,TouchAction:Z,TouchInput:Y,MouseInput:V,PointerEventInput:F,TouchMouseInput:U,SingleTouchInput:H,Recognizer:Q,AttrRecognizer:it,Tap:ct,Pan:rt,Swipe:ut,Pinch:ot,Rotate:at,Press:st,on:y,off:m,each:l,merge:St,extend:Tt,assign:dt,inherit:f,bindFn:p,prefixed:_}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=lt,(i=function(){return lt}.call(e,n,e,t))!==a&&(t.exports=i)}(window,document)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(48),o=i(r),s=n(29),a=i(s),u=n(30),c=i(u),l=n(32),h=i(l),f=n(33),p=(i(f),n(34)),d=(i(p),{}),v=function(t){function e(n){return(0,a.default)(this,e),(0,c.default)(this,t.call(this,n))}return(0,h.default)(e,t),e.prototype.closeSwipes=function(t){(0,o.default)(d).filter(function(e){return e!==""+t}).forEach(function(t){return d[t].call()})},e.prototype.registerSwipe=function(t,e){d[t]=e},e.prototype.unRegisterSwipe=function(t){delete d[t]},e}(f.Component);e.default=v},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(42),o=i(r),s=n(35),a=i(s),u=n(29),c=i(u),l=n(30),h=i(l),f=n(32),p=i(f),d=n(33),v=(i(d),n(34)),y=(i(v),n(51)),m=i(y),g=function(t){function e(n){(0,c.default)(this,e);var i=(0,h.default)(this,t.call(this,n));return i.handleBtnClick=i.handleBtnClick.bind(i),i.initStyles(),i}return(0,p.default)(e,t),e.prototype.initStyles=function(){this.styles=m.default.ButtonStyles,this.containerStyles=(0,a.default)({},this.styles.container,this.props.action.style)},e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.handleBtnClick=function(){this.props.action.onPress&&this.props.action.onPress.call(),this.props.onClickCallback(this.props.action)},e.prototype.render=function(){return(0,o.default)("div",{onClick:this.handleBtnClick,style:this.containerStyles},void 0,(0,o.default)("div",{style:this.styles.content},void 0,this.props.action.text))},e}(d.Component);e.default=g}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactButtonActions=e(require("react")):t.ReactButtonActions=e(t.react)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=52)}([function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(40),r=n(17);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(1),r=n(0),o=n(36),s=n(5),a=function(t,e,n){var u,c,l,f=t&a.F,h=t&a.G,p=t&a.S,d=t&a.P,v=t&a.B,y=t&a.W,m=h?r:r[e]||(r[e]={}),g=m.prototype,b=h?i:p?i[e]:(i[e]||{}).prototype;h&&(n=e);for(u in n)(c=!f&&b&&void 0!==b[u])&&u in m||(l=c?b[u]:n[u],m[u]=h&&"function"!=typeof b[u]?n[u]:v&&c?o(l,i):y&&b[u]==l?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[u]=l,t&a.R&&g&&!g[u]&&s(g,u,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var i=n(6),r=n(13);t.exports=n(7)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(11),r=n(37),o=n(16),s=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(39),r=n(21);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){var i=n(20)("wks"),r=n(14),o=n(1).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e,n){var i=n(12);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(12);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(20)("keys"),r=n(14);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(1),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(17);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(6).f,r=n(2),o=n(10)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){e.f=n(10)},function(t,e,n){var i=n(1),r=n(0),o=n(27),s=n(25),a=n(6).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e){t.exports=!0},function(t,e,n){var i=n(11),r=n(67),o=n(21),s=n(19)("IE_PROTO"),a=function(){},u=function(){var t,e=n(38)("iframe"),i=o.length;for(e.style.display="none",n(68).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;i--;)delete u.prototype[o[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=i(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:r(n,e)}},function(t,e,n){"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";e.__esModule=!0;var i=n(49),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e){t.exports={}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(87),o=i(r),s=n(91),a=i(s),u=n(49),c=i(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 "+(void 0===e?"undefined":(0,c.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(e,n){e.exports=t},function(t,e,n){t.exports=n(94)()},function(t,e,n){"use strict";e.__esModule=!0;var i=n(53),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}},function(t,e,n){var i=n(56);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(38)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(12),r=n(1).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(2),r=n(3),o=n(58)(!1),s=n(19)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(41);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(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,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(61),o=i(r),s=n(47),a=i(s);e.default=function(){var t="function"==typeof a.default&&o.default&&(0,o.default)("react.element")||60103;return function(e,n,i,r){var o=e&&e.defaultProps,s=arguments.length-3;if(n||0===s||(n={}),n&&o)for(var a in o)void 0===n[a]&&(n[a]=o[a]);else n||(n=o||{});if(1===s)n.children=r;else if(s>1){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:t,type:e,key:void 0===i?null:""+i,ref:null,props:n,_owner:null}}}()},function(t,e,n){"use strict";var i=n(1),r=n(2),o=n(7),s=n(4),a=n(44),u=n(63).KEY,c=n(8),l=n(20),f=n(24),h=n(14),p=n(10),d=n(25),v=n(26),y=n(64),m=n(65),g=n(66),b=n(11),E=n(3),S=n(16),T=n(13),O=n(28),_=n(69),w=n(46),x=n(6),C=n(9),P=w.f,R=x.f,I=_.f,M=i.Symbol,B=i.JSON,j=B&&B.stringify,A=p("_hidden"),k=p("toPrimitive"),L={}.propertyIsEnumerable,D=l("symbol-registry"),z=l("symbols"),N=l("op-symbols"),W=Object.prototype,V="function"==typeof M,F=i.QObject,H=!F||!F.prototype||!F.prototype.findChild,X=o&&c(function(){return 7!=O(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=P(W,e);i&&delete W[e],R(t,e,n),i&&t!==W&&R(W,e,i)}:R,Y=function(t){var e=z[t]=O(M.prototype);return e._k=t,e},q=V&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},U=function(t,e,n){return t===W&&U(N,e,n),b(t),e=S(e,!0),b(n),r(z,e)?(n.enumerable?(r(t,A)&&t[A][e]&&(t[A][e]=!1),n=O(n,{enumerable:T(0,!1)})):(r(t,A)||R(t,A,T(1,{})),t[A][e]=!0),X(t,e,n)):R(t,e,n)},G=function(t,e){b(t);for(var n,i=m(e=E(e)),r=0,o=i.length;o>r;)U(t,n=i[r++],e[n]);return t},K=function(t,e){return void 0===e?O(t):G(O(t),e)},J=function(t){var e=L.call(this,t=S(t,!0));return!(this===W&&r(z,t)&&!r(N,t))&&(!(e||!r(this,t)||!r(z,t)||r(this,A)&&this[A][t])||e)},Z=function(t,e){if(t=E(t),e=S(e,!0),t!==W||!r(z,e)||r(N,e)){var n=P(t,e);return!n||!r(z,e)||r(t,A)&&t[A][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=I(E(t)),i=[],o=0;n.length>o;)r(z,e=n[o++])||e==A||e==u||i.push(e);return i},Q=function(t){for(var e,n=t===W,i=I(n?N:E(t)),o=[],s=0;i.length>s;)!r(z,e=i[s++])||n&&!r(W,e)||o.push(z[e]);return o};V||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(N,n),r(this,A)&&r(this[A],t)&&(this[A][t]=!1),X(this,t,T(1,n))};return o&&H&&X(W,t,{configurable:!0,set:e}),Y(t)},a(M.prototype,"toString",function(){return this._k}),w.f=Z,x.f=U,n(45).f=_.f=$,n(15).f=J,n(22).f=Q,o&&!n(27)&&a(W,"propertyIsEnumerable",J,!0),d.f=function(t){return Y(p(t))}),s(s.G+s.W+s.F*!V,{Symbol:M});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)p(tt[et++]);for(var tt=C(p.store),et=0;tt.length>et;)v(tt[et++]);s(s.S+s.F*!V,"Symbol",{for:function(t){return r(D,t+="")?D[t]:D[t]=M(t)},keyFor:function(t){if(q(t))return y(D,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!V,"Object",{create:K,defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:Q}),B&&s(s.S+s.F*(!V||c(function(){var t=M();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],"function"==typeof e&&(n=e),!n&&g(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!q(e))return e}),i[1]=e,j.apply(B,i)}}}),M.prototype[k]||n(5)(M.prototype,k,M.prototype.valueOf),f(M,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){t.exports=n(5)},function(t,e,n){var i=n(39),r=n(21).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){var i=n(15),r=n(13),o=n(3),s=n(16),a=n(2),u=n(37),c=Object.getOwnPropertyDescriptor;e.f=n(7)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){t.exports={default:n(70),__esModule:!0}},function(t,e,n){t.exports={default:n(74),__esModule:!0}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(77),o=i(r),s=n(47),a=i(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 void 0===t?"undefined":u(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":void 0===t?"undefined":u(t)}},function(t,e,n){"use strict";var i=n(27),r=n(4),o=n(44),s=n(5),a=n(2),u=n(31),c=n(81),l=n(24),f=n(82),h=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,v,y,m,g){c(n,e,v);var b,E,S,T=function(t){if(!p&&t in x)return x[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",_="values"==y,w=!1,x=t.prototype,C=x[h]||x["@@iterator"]||y&&x[y],P=C||T(y),R=y?_?T("entries"):P:void 0,I="Array"==e?x.entries||C:C;if(I&&(S=f(I.call(new t)))!==Object.prototype&&(l(S,O,!0),i||a(S,h)||s(S,h,d)),_&&C&&"values"!==C.name&&(w=!0,P=function(){return C.call(this)}),i&&!g||!p&&!w&&x[h]||s(x,h,P),u[e]=P,u[O]=d,y)if(b={values:_?P:T("values"),keys:m?P:T("keys"),entries:R},g)for(E in b)E in x||o(x,E,b[E]);else r(r.P+r.F*(p||w),e,b);return b}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={SwipeStyles:{overlayStyles:{width:"100%",zIndex:2,transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)"},baseSwipeContainerStyles:{overflow:"hidden",position:"relative"},buttonsContainerStyles:{zIndex:1,height:"100%",width:"100%"},rightContainerStyles:{transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)",height:"100%",alignItems:"center",bottom:"0",display:"flex",position:"absolute",right:"0",transform:"scale3d(0, 1, 1)",transformOrigin:"right"},leftContainerStyles:{transition:"transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1)",height:"100%",transform:"scale3d(0, 1, 1)",alignItems:"center",bottom:"0",display:"flex",position:"absolute",left:"0",transformOrigin:"left"}},ButtonStyles:{container:{cursor:"pointer",flex:"1",display:"flex",height:"100%",alignItems:"center",textAlign:"center"},content:{flex:1}}};e.default=i,e.SwipeStyles=i.SwipeStyles,e.ButtonStyles=i.ButtonStyles},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r,o,s=n(48),a=i(s),u=n(42),c=i(u),l=n(35),f=i(l),h=n(29),p=i(h),d=n(30),v=i(d),y=n(32),m=i(y),g=n(33),b=i(g),E=n(34),S=i(E),T=n(98),O=i(T),_=n(99),w=i(_),x=n(100),C=i(x),P=n(51),R=function(t,e){return Math.min(t/e,1)},I=function(t,e){return Math.max(1-t/e,0)},M=(o=r=function(t){function e(n){(0,p.default)(this,e);var i=(0,v.default)(this,t.call(this,n));return i.deinitialize=function(){i.unRegisterSwipe(i.swipeId),i.hasCached=void 0,i.resetEvents()},i.onVerticalPanStart=function(t){!1===i.deactivateVertical&&!1===i.deactivateHorizontal&&(i.deactivateHorizontal=!0)},i.onVerticalPanEnd=function(t){!0===i.deactivateHorizontal&&(i.deactivateHorizontal=!1)},i.onHorizontalPanStart=function(t){!1===i.deactivateHorizontal&&(i.deactivateVertical=!0,i.panStartDelta=t.deltaX)},i.close=function(){i.resetOverlay()},i.resetButtons=function(){i.translateOverlay(0),i.transformLeftButton(0),i.transformRightButton(0)},i.isOverlayTransformed=function(){return"translate3d(0px, 0px, 0px)"!==i.overlay.style.transform},i.resetOverlay=function(){((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&i.leftIsVisible||i.rightIsVisible)&&i.onClose(),i.currentLeftDistance=!1,i.currentRightDistance=!1,i.leftIsVisible=!1,i.rightIsVisible=!1,i.isOverlayTransformed()&&i.resetButtons()},i.showRightMenu=function(){i.onClose(),i.translateOverlay(-i.btnsRightWidth),i.transformLeftButton(0),i.transformRightButton(1),i.leftIsVisible=!1,i.rightIsVisible=!0,i.onOpen()},i.showLeftMenu=function(){i.onClose(),i.translateOverlay(i.btnsLeftWidth),i.transformLeftButton(1),i.transformRightButton(0),i.leftIsVisible=!0,i.rightIsVisible=!1,i.onOpen()},i.onHorizontalPanEnd=function(t){if(!1===i.deactivateHorizontal){if(i.deactivateVertical=!1,i.shouldShowRight=!1===i.leftIsVisible&&i.rightBtnContainer&&t.deltaX<0&&t.distance>i.threshold,i.shouldShowLeft=!1===i.rightIsVisible&&i.leftBtnContainer&&t.deltaX>0&&t.distance>i.threshold,!i.shouldShowRight&&!i.shouldShowLeft)return i.resetOverlay();if(i.shouldShowRight)return i.showRightMenu();if(i.shouldShowLeft)return i.showLeftMenu()}},i.onLeftPan=function(t){if(!1===i.deactivateHorizontal){var e=i.getMovement(t.deltaX,t.velocityX),n=Math.max(e,-1*i.btnsRightWidth);if(!1!==i.currentRightDistance){var r=i.leftIsVisible?Math.max(n,0):Math.min(n,i.currentRightDistance);i.currentLeftDistance=r,i.translateOverlay(r),i.transformButtons(r)}else i.currentLeftDistance=n,i.translateOverlay(n),i.transformButtons(n)}},i.onRightPan=function(t){if(!1===i.deactivateHorizontal){var e=i.getMovement(t.deltaX,t.velocityX),n=Math.min(e,i.btnsLeftWidth);if(!1!==i.currentLeftDistance){var r=Math.max(n,i.currentLeftDistance);i.currentRightDistance=r,i.translateOverlay(r),i.transformButtons(r)}else i.currentRightDistance=n,i.translateOverlay(n),i.transformButtons(n)}},i.resetEvents=function(){i.resetTapEvents(),i.resetSwipeEvents()},i.initBindedEvents2=function(){!1===i.bindedEventsVert&&(i.bindedEventsVert={})},i.initVerticalBlocker=function(){i.registerEvent("pandown",!0),i.registerEvent("panup",!0),i.hammerVertical.on("panstart",i.onVerticalPanStart),i.hammerVertical.on("panend",i.onVerticalPanEnd)},i.initTouchEvents=function(){i.containerHammer=new O.default(i.container),i.containerHammer.add(new O.default.Tap),i.containerHammer.on("tap",i.handleContainerClick),i.hammer=new O.default(i.overlay),i.hammerVertical=new O.default(i.overlay),i.hammer.get("pan").set({direction:O.default.DIRECTION_HORIZONTAL,threshold:20}),i.hammerVertical.get("pan").set({direction:O.default.DIRECTION_VERTICAL,threshold:2}),i.initEventsFromProps()},i.computeDomNodeWidths=function(){if(!i.container||i.container.offsetWidth!==i.overlayWidth){i.overlayWidth=i.container.offsetWidth;var t=i.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength;i.btnsLeftWidth=i.isFullWidth&&e?i.overlayWidth:i.overlayWidth/4.5*e,i.btnsRightWidth=i.isFullWidth&&n?i.overlayWidth:i.overlayWidth/4.5*n,i.threshold=Math.round(i.overlayWidth/4.5)}},i.computeCssSizes=function(){var t=i.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength,r=i.isFullWidth&&e?100:23*e,o=i.isFullWidth&&n?100:23*n;i.leftContainerStyles=(0,f.default)({},P.SwipeStyles.leftContainerStyles,{width:r+"%"}),i.rightContainerStyles=(0,f.default)({},P.SwipeStyles.rightContainerStyles,{width:o+"%"})},i.initSizes=function(){i.container&&requestAnimationFrame(i.computeDomNodeWidths)},i.initialize=function(){i.hasEvents()&&i.constraintsAreValid()&&(i.initTouchEvents(),i.initSizes(),i.isLinkedToOthers&&i.registerSwipe(i.swipeId,i.resetOverlay))},i.handleBtnClick=function(t){i.shouldCloseAutomatically&&i.resetOverlay()},i.bindLeftBtnContainer=function(t){i.leftBtnContainer=t},i.generateLeftBtnsOnce=function(){if(i.hasCached.leftBtns)return i.hasCached.leftBtns;var t=b.default.createElement("div",{className:"leftBtnContainer",key:"leftBtnContainer",style:i.leftContainerStyles,ref:i.bindLeftBtnContainer},i.props.left.map(function(t,e){return(0,c.default)(C.default,{onClickCallback:i.handleBtnClick,styles:P.ButtonStyles,action:t},e)}));return i.hasCached.leftBtns=t,t},i.bindRightBtnContainer=function(t){i.rightBtnContainer=t},i.generateRightBtnsOnce=function(){if(i.hasCached.rightBtns)return i.hasCached.rightBtns;var t=b.default.createElement("div",{className:"rightBtnContainer",key:"rightBtnContainer",ref:i.bindRightBtnContainer,style:i.rightContainerStyles},i.props.right.map(function(t,e){return(0,c.default)(C.default,{action:t,styles:P.ButtonStyles,onClickCallback:i.handleBtnClick},e)}));return i.hasCached.rightBtns=t,t},i.handleContainerClick=function(){i.props.onPress&&i.props.onPress.call(),i.shouldCloseAutomatically&&i.resetOverlay()},i.bindOverlayRef=function(t){i.overlay=t},i.bindContainerRef=function(t){i.container=t},i.hasCached={},i.swipeId=Math.floor(1e3*Math.random()),i.deactivateHorizontal=!1,i.state={forceRender:!1},i.deactivateVertical=!1,i.sizeInitialized=!1,i.btnsLeftWidth=0,i.btnsRightWidth=0,i.bindedEvents={},i.bindedEventsVert=!1,i.childrenProps={},i.shouldShowRight=!1,i.shouldShowLeft=!1,i.leftIsVisible=!1,i.rightIsVisible=!1,i.currentRightDistance=!1,i.currentLeftDistance=!1,i.shouldCloseAutomatically=!1!==n.autoclose,i.isLinkedToOthers=!1!==n.linked,i.isFullWidth=!0===n.fullwidth,i.threshold=0,i.computeCssSizes(),i}return(0,m.default)(e,t),e.prototype.componentWillUnmount=function(){this.deinitialize()},e.prototype.transformButtons=function(t){var e=t>0,n=e?t:-1*t,i=e?R:I,r=e?I:R,o=i(n,this.btnsLeftWidth),s=r(n,this.btnsRightWidth);this.transformLeftButton(o),this.transformRightButton(s)},e.prototype.transformLeftButton=function(t){this.leftBtnContainer&&(this.leftBtnContainer.style.transform="scale3d("+t+", 1, 1)")},e.prototype.transformRightButton=function(t){this.rightBtnContainer&&(this.rightBtnContainer.style.transform="scale3d("+t+", 1, 1)")},e.prototype.translateOverlay=function(t){this.overlay&&(this.overlay.style.transform="translate3d("+t+"px,0px,0px)")},e.prototype.onOpen=function(){this.props.onOpen&&this.props.onOpen.call(),this.isLinkedToOthers&&this.closeSwipes(this.swipeId)},e.prototype.onClose=function(){var t=this.rightIsVisible||this.leftIsVisible;if(this.props.onClose&&t){var e=this.rightIsVisible?this.props.right:this.props.left;return this.props.onClose.call(null,e)}},e.prototype.getMovement=function(t,e){return Math.round(t-this.panStartDelta*(1+e))},e.prototype.getEvents=function(){var t=this.props;return{left:t.left,right:t.right,onOpen:t.onOpen,onClose:t.onClose}},e.prototype.getNbButtonsBySide=function(){var t=this.getEvents(),e=t.left,n=t.right;return{leftLength:e&&e.length?e.length:0,rightLength:n&&n.length?n.length:0}},e.prototype.hasEvents=function(){var t=this.getEvents(),e=t.left,n=t.right;return t.onOpen,t.onClose,!!e||!!n},e.prototype.resetSwipeEvents=function(){var t=(0,a.default)(this.bindedEvents).join(" ");if(this.hammer.off(t),this.hammer.destroy(),this.bindedEvents={},this.bindedEventsVert){var e=(0,a.default)(this.bindedEventsVert).join(" ");this.hammerVertical.off(e),this.hammerVertical.destroy(),this.bindedEventsVert=!1}},e.prototype.resetTapEvents=function(){this.containerHammer.off("tap"),this.containerHammer.destroy()},e.prototype.registerEvent=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.initBindedEvents2(),this.bindedEventsVert[t]=!0),this.bindedEvents[t]=!0},e.prototype.initEventsFromProps=function(){var t=this.getEvents();(t.left||t.right)&&(this.initVerticalBlocker(),this.registerEvent("panstart"),this.hammer.on("panstart",this.onHorizontalPanStart),this.registerEvent("panend"),this.hammer.on("panend",this.onHorizontalPanEnd),this.registerEvent("panleft"),this.hammer.on("panleft",this.onLeftPan),this.registerEvent("panright"),this.hammer.on("panright",this.onRightPan))},e.prototype.checkFullWidthConstraints=function(){if(!1===this.isFullWidth)return!0;var t=this.getNbButtonsBySide(),e=t.leftLength,n=t.rightLength;if(e>1||n>1)throw new Error("^^^^^^ react-action-buttons : Can't make a fullWidth swipe with more than 1 item");return!0},e.prototype.constraintsAreValid=function(){return this.checkFullWidthConstraints()},e.prototype.componentDidMount=function(){this.update()},e.prototype.componentDidMount=function(){this.initialize()},e.prototype.renderLeftButtons=function(){return this.props.left&&this.props.left.length?this.generateLeftBtnsOnce():null},e.prototype.renderRightButtons=function(){return this.props.right&&this.props.right.length?this.generateRightBtnsOnce():null},e.prototype.renderButtons=function(){return this.hasEvents()?(0,c.default)("div",{className:"buttonsContainer"},void 0,this.renderLeftButtons(),this.renderRightButtons()):""},e.prototype.update=function(){this.initSizes(),this.resetOverlay(!1)},e.prototype.forceRerender=function(){this.setState(function(t){return{forceRender:!t.forceRender}})},e.prototype.shouldComponentUpdate=function(t,e){return e.forceRender!==this.state.forceRender||!(!this.props.updateKey||t.updateKey===this.props.updateKey)||!0!==this.props.doNotReRender},e.prototype.computeStyles=function(){var t=P.SwipeStyles.baseSwipeContainerStyles;return this.props.style?this.initStyles?this.initStyles:(this.initStyles=(0,f.default)({},t,this.props.style),this.initStyles):t},e.prototype.render=function(){var t=this.computeStyles();return b.default.createElement("div",{ref:this.bindContainerRef,className:"swipeContainer",style:t},this.renderButtons(),b.default.createElement("div",{style:P.SwipeStyles.overlayStyles,className:"swipeOverlay",ref:this.bindOverlayRef},this.props.children))},e}(w.default),r.propTypes={onPress:S.default.func,autoclose:S.default.bool,style:S.default.object,linked:S.default.bool,fullwidth:S.default.bool,updateKey:S.default.oneOfType([S.default.string,S.default.number,S.default.bool]),left:S.default.array,right:S.default.array,onOpen:S.default.func,onClose:S.default.func},o);e.default=M},function(t,e,n){t.exports={default:n(54),__esModule:!0}},function(t,e,n){n(55),t.exports=n(0).Object.assign},function(t,e,n){var i=n(4);i(i.S+i.F,"Object",{assign:n(57)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var i=n(9),r=n(22),o=n(15),s=n(23),a=n(40),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=i})?function(t,e){for(var n=s(t),u=arguments.length,c=1,l=r.f,f=o.f;u>c;)for(var h,p=a(arguments[c++]),d=l?i(p).concat(l(p)):i(p),v=d.length,y=0;v>y;)f.call(p,h=d[y++])&&(n[h]=p[h]);return n}:u},function(t,e,n){var i=n(3),r=n(59),o=n(60);t.exports=function(t){return function(e,n,s){var a,u=i(e),c=r(u.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(18),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(18),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){t.exports={default:n(62),__esModule:!0}},function(t,e,n){n(43),t.exports=n(0).Symbol.for},function(t,e,n){var i=n(14)("meta"),r=n(12),o=n(2),s=n(6).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},f=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[i].i},h=function(t,e){if(!o(t,i)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[i].w},p=function(t){return c&&d.NEED&&u(t)&&!o(t,i)&&l(t),t},d=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:h,onFreeze:p}},function(t,e,n){var i=n(9),r=n(3);t.exports=function(t,e){for(var n,o=r(t),s=i(o),a=s.length,u=0;a>u;)if(o[n=s[u++]]===e)return n}},function(t,e,n){var i=n(9),r=n(22),o=n(15);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var i=n(41);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(6),r=n(11),o=n(9);t.exports=n(7)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var i=n(3),r=n(45).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):r(i(t))}},function(t,e,n){n(43),n(71),n(72),n(73),t.exports=n(0).Symbol},function(t,e){},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){n(75),t.exports=n(0).Object.keys},function(t,e,n){var i=n(23),r=n(9);n(76)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(4),r=n(0),o=n(8);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){t.exports={default:n(78),__esModule:!0}},function(t,e,n){n(79),n(83),t.exports=n(25).f("iterator")},function(t,e,n){"use strict";var i=n(80)(!0);n(50)(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=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var i=n(18),r=n(17);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),u=i(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){"use strict";var i=n(28),r=n(13),o=n(24),s={};n(5)(s,n(10)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(2),r=n(23),o=n(19)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){n(84);for(var i=n(1),r=n(5),o=n(31),s=n(10)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=i[c],f=l&&l.prototype;f&&!f[s]&&r(f,s,c),o[c]=o.Array}},function(t,e,n){"use strict";var i=n(85),r=n(86),o=n(31),s=n(3);t.exports=n(50)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(88),__esModule:!0}},function(t,e,n){n(89),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var i=n(4);i(i.S,"Object",{setPrototypeOf:n(90).set})},function(t,e,n){var i=n(12),r=n(11),o=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(36)(Function.call,n(46).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){t.exports={default:n(92),__esModule:!0}},function(t,e,n){n(93);var i=n(0).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){var i=n(4);i(i.S,"Object",{create:n(28)})},function(t,e,n){"use strict";var i=n(95),r=n(96),o=n(97);t.exports=function(){function t(t,e,n,i,s,a){a!==o&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){"use strict";function i(t){return function(){return t}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";function i(t,e,n,i,o,s,a,u){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,o,s,a,u],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(t){};t.exports=i},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){var i;!function(r,o,s,a){"use strict";function u(t,e,n){return setTimeout(p(t,n),e)}function c(t,e,n){return!!Array.isArray(t)&&(l(t,n[e],n),!0)}function l(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function f(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}function h(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,n&&dt(i,n)}function p(t,e){return function(){return t.apply(e,arguments)}}function d(t,e){return typeof t==mt?t.apply(e?e[0]||a:a,e):t}function v(t,e){return t===a?e:t}function y(t,e,n){l(E(e),function(e){t.addEventListener(e,n,!1)})}function m(t,e,n){l(E(e),function(e){t.removeEventListener(e,n,!1)})}function g(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function E(t){return t.trim().split(/\s+/g)}function S(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function T(t){return Array.prototype.slice.call(t,0)}function O(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];S(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function _(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<vt.length;){if(n=vt[o],(i=n?n+r:e)in t)return i;o++}return a}function w(){return Ot++}function x(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}function C(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){d(t.options.enable,[t])&&n.handler(e)},this.init()}function P(t){return new(t.options.inputClass||(xt?F:Ct?Y:wt?U:V))(t,R)}function R(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&Rt&&i-r==0,s=e&(Mt|Bt)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,I(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function I(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=j(e)),r>1&&!n.firstMultiple?n.firstMultiple=j(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,u=e.center=A(i);e.timeStamp=Et(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=z(a,u),e.distance=D(a,u),M(n,e),e.offsetDirection=L(e.deltaX,e.deltaY);var c=k(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=bt(c.x)>bt(c.y)?c.x:c.y,e.scale=s?W(s.pointers,i):1,e.rotation=s?N(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,B(n,e);var l=t.element;g(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function M(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Rt&&o.eventType!==Mt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}function B(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(u>Pt||s.velocity===a)){var c=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,f=k(u,c,l);i=f.x,r=f.y,n=bt(f.x)>bt(f.y)?f.x:f.y,o=L(c,l),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}function j(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:gt(t.pointers[n].clientX),clientY:gt(t.pointers[n].clientY)},n++;return{timeStamp:Et(),pointers:e,center:A(e),deltaX:t.deltaX,deltaY:t.deltaY}}function A(t){var e=t.length;if(1===e)return{x:gt(t[0].clientX),y:gt(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:gt(n/e),y:gt(i/e)}}function k(t,e,n){return{x:e/t||0,y:n/t||0}}function L(t,e){return t===e?jt:bt(t)>=bt(e)?t<0?At:kt:e<0?Lt:Dt}function D(t,e,n){n||(n=Vt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function z(t,e,n){n||(n=Vt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function N(t,e){return z(e[1],e[0],Ft)+z(t[1],t[0],Ft)}function W(t,e){return D(e[0],e[1],Ft)/D(t[0],t[1],Ft)}function V(){this.evEl=Xt,this.evWin=Yt,this.pressed=!1,C.apply(this,arguments)}function F(){this.evEl=Gt,this.evWin=Kt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function H(){this.evTarget=Zt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function X(t,e){var n=T(t.touches),i=T(t.changedTouches);return e&(Mt|Bt)&&(n=O(n.concat(i),"identifier",!0)),[n,i]}function Y(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function q(t,e){var n=T(t.touches),i=this.targetIds;if(e&(Rt|It)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=T(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return g(t.target,u)}),e===Rt)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(Mt|Bt)&&delete i[s[r].identifier],r++;return a.length?[O(o.concat(a),"identifier",!0),a]:void 0}function U(){C.apply(this,arguments);var t=p(this.handler,this);this.touch=new Y(this.manager,t),this.mouse=new V(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function G(t,e){t&Rt?(this.primaryTouch=e.changedPointers[0].identifier,K.call(this,e)):t&(Mt|Bt)&&K.call(this,e)}function K(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,ee)}}function J(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=ne&&s<=ne)return!0}return!1}function Z(t,e){this.manager=t,this.set(e)}function $(t){if(b(t,ae))return ae;var e=b(t,ue),n=b(t,ce);return e&&n?ae:e||n?e?ue:ce:b(t,se)?se:oe}function Q(t){this.options=dt({},this.defaults,t||{}),this.id=w(),this.manager=null,this.options.enable=v(this.options.enable,!0),this.state=fe,this.simultaneous={},this.requireFail=[]}function tt(t){return t&ye?"cancel":t&de?"end":t&pe?"move":t&he?"start":""}function et(t){return t==Dt?"down":t==Lt?"up":t==At?"left":t==kt?"right":""}function nt(t,e){var n=e.manager;return n?n.get(t):t}function it(){Q.apply(this,arguments)}function rt(){it.apply(this,arguments),this.pX=null,this.pY=null}function ot(){it.apply(this,arguments)}function st(){Q.apply(this,arguments),this._timer=null,this._input=null}function at(){it.apply(this,arguments)}function ut(){it.apply(this,arguments)}function ct(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function lt(t,e){return e=e||{},e.recognizers=v(e.recognizers,lt.defaults.preset),new ft(t,e)}function ft(t,e){this.options=dt({},lt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=P(this),this.touchAction=new Z(this,this.options.touchAction),ht(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function ht(t,e){var n=t.element;if(n.style){var i;l(t.options.cssProps,function(r,o){i=_(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function pt(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var dt,vt=["","webkit","Moz","MS","ms","o"],yt=o.createElement("div"),mt="function",gt=Math.round,bt=Math.abs,Et=Date.now;dt="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var St=f(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),Tt=f(function(t,e){return St(t,e,!0)},"merge","Use `assign`."),Ot=1,_t=/mobile|tablet|ip(ad|hone|od)|android/i,wt="ontouchstart"in r,xt=_(r,"PointerEvent")!==a,Ct=wt&&_t.test(navigator.userAgent),Pt=25,Rt=1,It=2,Mt=4,Bt=8,jt=1,At=2,kt=4,Lt=8,Dt=16,zt=At|kt,Nt=Lt|Dt,Wt=zt|Nt,Vt=["x","y"],Ft=["clientX","clientY"];C.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(x(this.element),this.evWin,this.domHandler)}};var Ht={mousedown:Rt,mousemove:It,mouseup:Mt},Xt="mousedown",Yt="mousemove mouseup";h(V,C,{handler:function(t){var e=Ht[t.type];e&Rt&&0===t.button&&(this.pressed=!0),e&It&&1!==t.which&&(e=Mt),this.pressed&&(e&Mt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var qt={pointerdown:Rt,pointermove:It,pointerup:Mt,pointercancel:Bt,pointerout:Bt},Ut={2:"touch",3:"pen",4:"mouse",5:"kinect"},Gt="pointerdown",Kt="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Gt="MSPointerDown",Kt="MSPointerMove MSPointerUp MSPointerCancel"),h(F,C,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=qt[i],o=Ut[t.pointerType]||t.pointerType,s="touch"==o,a=S(e,t.pointerId,"pointerId");r&Rt&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(Mt|Bt)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var Jt={touchstart:Rt,touchmove:It,touchend:Mt,touchcancel:Bt},Zt="touchstart",$t="touchstart touchmove touchend touchcancel";h(H,C,{handler:function(t){var e=Jt[t.type];if(e===Rt&&(this.started=!0),this.started){var n=X.call(this,t,e);e&(Mt|Bt)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var Qt={touchstart:Rt,touchmove:It,touchend:Mt,touchcancel:Bt},te="touchstart touchmove touchend touchcancel";h(Y,C,{handler:function(t){var e=Qt[t.type],n=q.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var ee=2500,ne=25;h(U,C,{handler:function(t,e,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)G.call(this,e,n);else if(r&&J.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=_(yt.style,"touchAction"),re=ie!==a,oe="auto",se="manipulation",ae="none",ue="pan-x",ce="pan-y",le=function(){if(!re)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();Z.prototype={set:function(t){"compute"==t&&(t=this.compute()),re&&this.manager.element.style&&le[t]&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){d(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),$(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=b(i,ae)&&!le[ae],o=b(i,ce)&&!le[ce],s=b(i,ue)&&!le[ue];if(r){var a=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(a&&u&&c)return}return s&&o?void 0:r||o&&n&zt||s&&n&Nt?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var fe=1,he=2,pe=4,de=8,ve=de,ye=16;Q.prototype={defaults:{},set:function(t){return dt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(c(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=nt(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return c(t,"dropRecognizeWith",this)?this:(t=nt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(c(t,"requireFailure",this))return this;var e=this.requireFail;return t=nt(t,this),-1===S(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(c(t,"dropRequireFailure",this))return this;t=nt(t,this);var e=S(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,i=this.state;i<de&&e(n.options.event+tt(i)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),i>=de&&e(n.options.event+tt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|fe)))return!1;t++}return!0},recognize:function(t){var e=dt({},t);if(!d(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(ve|ye|32)&&(this.state=fe),this.state=this.process(e),this.state&(he|pe|de|ye)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},h(it,Q,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(he|pe),r=this.attrTest(t);return i&&(n&Bt||!r)?e|ye:i||r?n&Mt?e|de:e&he?e|pe:he:32}}),h(rt,it,{defaults:{event:"pan",threshold:10,pointers:1,direction:Wt},getTouchAction:function(){var t=this.options.direction,e=[];return t&zt&&e.push(ce),t&Nt&&e.push(ue),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&zt?(r=0===o?jt:o<0?At:kt,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?jt:s<0?Lt:Dt,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return it.prototype.attrTest.call(this,t)&&(this.state&he||!(this.state&he)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(ot,it,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&he)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(st,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(Mt|Bt)&&!r)this.reset();else if(t.eventType&Rt)this.reset(),this._timer=u(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&Mt)return ve;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&Mt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Et(),this.manager.emit(this.options.event,this._input)))}}),h(at,it,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&he)}}),h(ut,it,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:zt|Nt,pointers:1},getTouchAction:function(){return rt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(zt|Nt)?e=t.overallVelocity:n&zt?e=t.overallVelocityX:n&Nt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Mt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ct,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[se]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&Rt&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=Mt)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=u(function(){this.state=ve,this.tryEmit()},e.interval,this),he):ve}return 32},failTimeout:function(){return this._timer=u(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),lt.VERSION="2.0.7",lt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[at,{enable:!1}],[ot,{enable:!1},["rotate"]],[ut,{direction:zt}],[rt,{direction:zt},["swipe"]],[ct],[ct,{event:"doubletap",taps:2},["tap"]],[st]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ft.prototype={set:function(t){return dt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ve)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(he|pe|de)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Q)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(c(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(c(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=S(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return l(E(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return l(E(t),function(t){e?n[t]&&n[t].splice(S(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&pt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&ht(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},dt(lt,{INPUT_START:Rt,INPUT_MOVE:It,INPUT_END:Mt,INPUT_CANCEL:Bt,STATE_POSSIBLE:fe,STATE_BEGAN:he,STATE_CHANGED:pe,STATE_ENDED:de,STATE_RECOGNIZED:ve,STATE_CANCELLED:ye,STATE_FAILED:32,DIRECTION_NONE:jt,DIRECTION_LEFT:At,DIRECTION_RIGHT:kt,DIRECTION_UP:Lt,DIRECTION_DOWN:Dt,DIRECTION_HORIZONTAL:zt,DIRECTION_VERTICAL:Nt,DIRECTION_ALL:Wt,Manager:ft,Input:C,TouchAction:Z,TouchInput:Y,MouseInput:V,PointerEventInput:F,TouchMouseInput:U,SingleTouchInput:H,Recognizer:Q,AttrRecognizer:it,Tap:ct,Pan:rt,Swipe:ut,Pinch:ot,Rotate:at,Press:st,on:y,off:m,each:l,merge:Tt,extend:St,assign:dt,inherit:h,bindFn:p,prefixed:_}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=lt,(i=function(){return lt}.call(e,n,e,t))!==a&&(t.exports=i)}(window,document)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(48),o=i(r),s=n(29),a=i(s),u=n(30),c=i(u),l=n(32),f=i(l),h=n(33),p=(i(h),n(34)),d=(i(p),{}),v=function(t){function e(n){return(0,a.default)(this,e),(0,c.default)(this,t.call(this,n))}return(0,f.default)(e,t),e.prototype.closeSwipes=function(t){(0,o.default)(d).filter(function(e){return e!==""+t}).forEach(function(t){return d[t].call()})},e.prototype.registerSwipe=function(t,e){d[t]=e},e.prototype.unRegisterSwipe=function(t){delete d[t]},e}(h.Component);e.default=v},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(42),o=i(r),s=n(35),a=i(s),u=n(29),c=i(u),l=n(30),f=i(l),h=n(32),p=i(h),d=n(33),v=(i(d),n(34)),y=(i(v),function(t){function e(){var n,i,r;(0,c.default)(this,e);for(var o=arguments.length,s=Array(o),a=0;a<o;a++)s[a]=arguments[a];return n=i=(0,f.default)(this,t.call.apply(t,[this].concat(s))),i.handleBtnClick=function(){i.props.action.onPress&&i.props.action.onPress.call(),i.props.onClickCallback(i.props.action)},r=n,(0,f.default)(i,r)}return(0,p.default)(e,t),e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.render=function(){var t=(0,a.default)({},this.props.styles.container,this.props.action.style);return(0,o.default)("div",{onClick:this.handleBtnClick,style:t},void 0,(0,o.default)("div",{style:this.props.styles.content},void 0,this.props.action.text))},e}(d.Component));e.default=y}])});
//# sourceMappingURL=index.js.map
{
"name": "react-button-actions",
"version": "1.0.5",
"version": "1.0.6",
"description": "Performant HoC designed to make buttons appear on swipe and others actions on some element.",

@@ -5,0 +5,0 @@ "main": "dist/index",

import React from 'react';
import PropTypes from 'prop-types';
import Hammer from 'hammerjs';
import CoreSwipe from './CoreSwipe';
import SlidingButton from './SlidingButton';
import Styles from './Styles';
import { SwipeStyles, ButtonStyles } from './Styles';

@@ -33,3 +32,3 @@ const computeShowAnimationCssValue = (distance, maxWidth) => Math.min(distance / maxWidth, 1);

super(props);
this.styles = Styles.SwipeStyles;
this.hasCached = {};
this.swipeId = Math.floor(Math.random() * 1000);

@@ -42,4 +41,3 @@ this.deactivateHorizontal = false;

this.sizeInitialized = false;
this.btnsLeftWidthCss = 100;
this.btnsRightWidthCss = 100;
this.btnsLeftWidth = 0;

@@ -64,19 +62,5 @@ this.btnsRightWidth = 0;

this.initBindings();
this.threshold = 0;
}
this.computeCssSizes();
initBindings() {
this.resetOverlay = this.resetOverlay.bind(this);
this.handleBtnClick = this.handleBtnClick.bind(this);
this.showRightMenu = this.showRightMenu.bind(this);
this.showLeftMenu = this.showLeftMenu.bind(this);
this.onHorizontalPanStart = this.onHorizontalPanStart.bind(this);
this.onHorizontalPanEnd = this.onHorizontalPanEnd.bind(this);
this.initSizes = this.initSizes.bind(this);
this.onLeftPan = this.onLeftPan.bind(this);
this.onRightPan = this.onRightPan.bind(this);
this.initTouchEvents = this.initTouchEvents.bind(this);
this.resetEvents = this.resetEvents.bind(this);
this.handleContainerClick = this.handleContainerClick.bind(this);
}

@@ -86,2 +70,3 @@

this.unRegisterSwipe(this.swipeId);
this.hasCached = undefined;
this.resetEvents();

@@ -106,3 +91,3 @@ }

onHorizontalPanStart(evt) {
onHorizontalPanStart = (evt) => {
if (this.deactivateHorizontal === false) {

@@ -130,3 +115,3 @@ this.deactivateVertical = true;

resetOverlay(withDispatch = true) {
resetOverlay = (withDispatch = true) => {
if (withDispatch && this.leftIsVisible || this.rightIsVisible) {

@@ -143,3 +128,3 @@ this.onClose();

showRightMenu() {
showRightMenu = () => {
this.onClose();

@@ -154,3 +139,3 @@ this.translateOverlay(-this.btnsRightWidth);

showLeftMenu() {
showLeftMenu = () => {
this.onClose();

@@ -165,3 +150,3 @@ this.translateOverlay(this.btnsLeftWidth);

onHorizontalPanEnd(evt) {
onHorizontalPanEnd = (evt) => {
if (this.deactivateHorizontal === false) {

@@ -213,3 +198,3 @@ this.deactivateVertical = false;

onLeftPan(evt) {
onLeftPan = (evt) => {
if (this.deactivateHorizontal === false) {

@@ -253,3 +238,3 @@ // left: dist < 0

onRightPan(evt) {
onRightPan = (evt) => {
if (this.deactivateHorizontal === false) {

@@ -315,3 +300,3 @@ const dist = this.getMovement(evt.deltaX, evt.velocityX);

resetEvents() {
resetEvents = () => {
this.resetTapEvents();

@@ -359,3 +344,3 @@ this.resetSwipeEvents();

initTouchEvents() {
initTouchEvents = () => {
this.containerHammer = new Hammer(this.container);

@@ -386,17 +371,10 @@ this.containerHammer.add(new Hammer.Tap());

applySizesOnce = () => {
if (this.sizeInitialized) return;
computeCssSizes = () => {
const { leftLength, rightLength } = this.getNbButtonsBySide();
this.btnsLeftWidthCss = (this.isFullWidth && leftLength) ? 100 : 23 * leftLength;
this.btnsRightWidthCss = (this.isFullWidth && rightLength) ? 100 : 23 * rightLength;
if (this.rightBtnContainer) {
this.rightBtnContainer.style.width = `${this.btnsRightWidthCss}%`;
}
const btnsLeftWidthCss = (this.isFullWidth && leftLength) ? 100 : 23 * leftLength;
const btnsRightWidthCss = (this.isFullWidth && rightLength) ? 100 : 23 * rightLength;
if (this.leftBtnContainer) {
this.leftBtnContainer.style.width = `${this.btnsLeftWidthCss}%`;
}
this.sizeInitialized = true;
this.leftContainerStyles = { ...SwipeStyles.leftContainerStyles, ...{ width: `${btnsLeftWidthCss}%` }};
this.rightContainerStyles = { ...SwipeStyles.rightContainerStyles, ...{ width: `${btnsRightWidthCss}%`}};
}

@@ -406,7 +384,7 @@

if (this.container) {
this.computeDomNodeWidths();
this.applySizesOnce();
} else {
requestAnimationFrame(this.initSizes);
requestAnimationFrame(this.computeDomNodeWidths);
}
// else {
// requestAnimationFrame(this.initSizes);
// }
}

@@ -440,6 +418,9 @@

componentDidMount() {
this.update();
}
componentDidMount() {
this.initialize();
}
handleBtnClick(action) {
handleBtnClick = (action) => {
// console.log('action clicked : ', action);

@@ -451,21 +432,38 @@ if (this.shouldCloseAutomatically) this.resetOverlay();

}
renderLeftButtons() {
return (this.props.left && this.props.left.length) ? (
<div className="leftBtnContainer" key="leftBtnContainer" style={this.styles.leftContainerStyles} ref={this.bindLeftBtnContainer} >
{ this.props.left.map((action, index) =>
generateLeftBtnsOnce = () => {
if (this.hasCached['leftBtns']) return this.hasCached['leftBtns'];
const myData = (
<div
className="leftBtnContainer"
key="leftBtnContainer"
style={this.leftContainerStyles}
ref={this.bindLeftBtnContainer}
>
{
this.props.left.map((action, index) =>
<SlidingButton
key={index}
onClickCallback={this.handleBtnClick}
styles={ButtonStyles}
action={action} />
)}
)
}
</div>
)
: '';
);
this.hasCached['leftBtns'] = myData;
return myData;
}
renderLeftButtons() {
return (this.props.left && this.props.left.length)
? this.generateLeftBtnsOnce()
: null;
}
bindRightBtnContainer = (c) => {
this.rightBtnContainer = c;
}
generateRightBtnsOnce = () => {
if (this.hasCached['rightBtns']) return this.hasCached['rightBtns'];
renderRightButtons() {
return (this.props.right && this.props.right.length) ? (
const myData = (
<div

@@ -475,3 +473,3 @@ className="rightBtnContainer"

ref={this.bindRightBtnContainer}
style={this.styles.rightContainerStyles}
style={this.rightContainerStyles}
>

@@ -483,2 +481,3 @@ { this.props.right.map(

key={index}
styles={ButtonStyles}
onClickCallback={this.handleBtnClick}

@@ -488,5 +487,11 @@ />

</div>
)
: '';
);
this.hasCached['rightBtns'] = myData;
return myData;
}
renderRightButtons() {
return (this.props.right && this.props.right.length)
? this.generateRightBtnsOnce()
: null;
}

@@ -496,3 +501,3 @@ renderButtons() {

? (
<div className="buttonsContainer" style={this.styles.buttonsContainerStyles}>
<div className="buttonsContainer">
{this.renderLeftButtons()}

@@ -505,3 +510,3 @@ {this.renderRightButtons()}

handleContainerClick() {
handleContainerClick = () => {
if (this.props.onPress) {

@@ -524,8 +529,4 @@ this.props.onPress.call();

this.resetOverlay(false);
}
componentDidUpdate() {
this.update();
}
forceRerender() {

@@ -540,3 +541,3 @@ this.setState((state) => ({ forceRender: !state.forceRender}));

if (this.props.updateKey && nextProps.updateKey !== this.props.updateKey) {
if (this.props.updateKey && (nextProps.updateKey !== this.props.updateKey)) {
return true;

@@ -548,9 +549,18 @@ }

}
computeStyles() {
const baseStyles = SwipeStyles.baseSwipeContainerStyles;
if (!this.props.style) return baseStyles;
if (this.initStyles) return this.initStyles;
this.initStyles = {...baseStyles, ...this.props.style };
return this.initStyles;
}
render() {
const styles = this.computeStyles();
return (
<div ref={this.bindContainerRef} className="swipeContainer" style={this.styles.baseSwipeContainerStyles}>
<div ref={this.bindContainerRef} className="swipeContainer" style={styles}>
{this.renderButtons()}
<div style={this.styles.overlayStyles} className="swipeOverlay" ref={this.bindOverlayRef}>
<div style={SwipeStyles.overlayStyles} className="swipeOverlay" ref={this.bindOverlayRef}>
{this.props.children}

@@ -557,0 +567,0 @@ </div>

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Styles from './Styles';

@@ -10,16 +9,5 @@ class SlidingButton extends Component {

action: PropTypes.object.isRequired,
styles: PropTypes.object.isRequired,
};
constructor(props) {
super(props);
this.handleBtnClick = this.handleBtnClick.bind(this);
this.initStyles();
}
initStyles() {
this.styles = Styles.ButtonStyles;
this.containerStyles = { ...this.styles.container, ...this.props.action.style };
}
shouldComponentUpdate() {

@@ -29,3 +17,3 @@ return false;

handleBtnClick() {
handleBtnClick = () => {
if (this.props.action.onPress) {

@@ -38,5 +26,6 @@ this.props.action.onPress.call();

render() {
const containerStyles = { ...this.props.styles.container, ...this.props.action.style };
return (
<div onClick={this.handleBtnClick} style={this.containerStyles}>
<div style={this.styles.content}>{this.props.action.text}</div>
<div onClick={this.handleBtnClick} style={containerStyles}>
<div style={this.props.styles.content}>{this.props.action.text}</div>
</div>

@@ -43,0 +32,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc