/*! For license information please see 2.8d615c15.chunk.js.LICENSE.txt */ (this["webpackJsonpdeveloppez-votre-potentiel"]=this["webpackJsonpdeveloppez-votre-potentiel"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(27)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return g}));var r=n(7),o=n(0),i=n.n(o),a=(n(11),n(5)),l=n(18),u=n(3),c=n(2),s=n(19),f=n.n(s);n(21);function d(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n(24);var p=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),m=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(h.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.a.Component);i.a.Component;i.a.Component;var v={},y=0;function g(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,l=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=v[n]||(v[n]={});if(r[e])return r[e];var o=[],i={regexp:f()(e,o,t),keys:o};return y<1e4&&(r[e]=i,y++),i}(n,{end:i,strict:l,sensitive:c}),o=r.regexp,a=r.keys,u=o.exec(e);if(!u)return null;var s=u[0],d=u.slice(1),p=e===s;return i&&!p?null:{path:n,url:"/"===n&&""===s?"/":s,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?g(n.pathname,e.props):t.match,o=Object(c.a)({},t,{location:n,match:r}),a=e.props,l=a.children,s=a.component,f=a.render;return Array.isArray(l)&&0===l.length&&(l=null),i.a.createElement(h.Provider,{value:o},o.match?l?"function"===typeof l?l(o):l:s?i.a.createElement(s,o):f?f(o):null:"function"===typeof l?l(o):null)}))},t}(i.a.Component);function w(e){return"/"===e.charAt(0)?e:"/"+e}function x(e,t){if(!e)return t;var n=w(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function k(e){return"string"===typeof e?e:Object(a.e)(e)}function T(e){return function(){Object(u.a)(!1)}}function S(){}i.a.Component;var E=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,o=e.props.location||t.location;return i.a.Children.forEach(e.props.children,(function(e){if(null==r&&i.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?g(o.pathname,Object(c.a)({},e.props,{path:a})):t.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(i.a.Component);i.a.useContext},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;d--){var p=a[d];"."===p?i(a,d):".."===p?(i(a,d),f++):f&&(i(a,d),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(3);function s(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,d(),w.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),l=a,u=0;u=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!==typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===r&&(o=!1,r=a+1),46===l?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(41))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i=n(0),a=n.n(i),l=n(5);n(11);function u(){return(u=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var s=n(3),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;on?n:e:e,2)},d=function(e,t){return Math.sqrt(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2))},p=function(e){var t=l({},e);return Object.keys(t).forEach((function(e){return void 0===t[e]&&delete t[e]})),t},h=function(e,t){e&&"function"===typeof e&&e(t)},m=function(e,t,n){var r=n.scale,o=n.options,i=o.maxScale,a=o.minScale;return!!e&&(ra||(Math.sign(e.deltaY)!==Math.sign(t.deltaY)||(e.deltaY>0&&e.deltaYt.deltaY||Math.sign(e.deltaY)!==Math.sign(t.deltaY)))))},v=function(e,t){return Object.keys(e).reduce((function(n,r){return"object"===typeof t[r]&&null!==t[r]?n[r]=l(l({},e[r]),t[r]):n[r]=void 0===t[r]?e[r]:t[r],n}),{})};var y={easeOut:function(e){return-Math.cos(e*Math.PI)/2+.5},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function g(){this.mounted&&(this.animation&&cancelAnimationFrame(this.animation),this.animate=!1,this.animation=!1,this.velocity=!1)}function b(e,t,n){var r=this;if(this.mounted){var o=(new Date).getTime();g.call(this),this.animation=function(){if(r.animation&&r.mounted){var i=(new Date).getTime()-o,a=(0,y[e])(i/t);i>=t?(n(1),r.animation=null):(n(a),requestAnimationFrame(r.animation))}},requestAnimationFrame(this.animation)}}function w(e){var t=this,n=e.targetState,r=e.speed,o=e.type,i=this.stateProvider,a=i.scale,l=i.positionX,u=i.positionY,c=n.scale-a,s=n.positionX-l,f=n.positionY-u;0===r?(this.stateProvider.previousScale=this.stateProvider.scale,this.stateProvider.scale=n.scale,this.stateProvider.positionX=n.positionX,this.stateProvider.positionY=n.positionY,this.applyTransformation()):b.call(this,o,r,(function(e){t.stateProvider.previousScale=t.stateProvider.scale,t.stateProvider.scale=a+c*e,t.stateProvider.positionX=l+s*e,t.stateProvider.positionY=u+f*e,t.applyTransformation()}))}function x(e,t,n,r,o){var i=t-(o?r:0);return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=i?i:e}function k(e,t,n,r,o,i){var a=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,c=n.maxPositionY,s=i?o*i.offsetWidth/100:0,d=i?o*i.offsetHeight/100:0;return{x:f(e,a-s,u+s,r),y:f(t,l-d,c+d,r)}}function T(e,t,n){var r=t.getBoundingClientRect(),o=(e.clientX-r.left)/n,i=(e.clientY-r.top)/n;return(isNaN(o)||isNaN(i))&&console.error("No mouse or touch offset found"),{mouseX:o,mouseY:i}}function S(e,t,n,r,o){var i=this.stateProvider,a=i.scale,l=i.positionX,u=i.positionY,c=i.options.transformEnabled,s=n-a;return"number"!==typeof e||"number"!==typeof t?console.error("Mouse X and Y position were not provided!"):c?k(l-e*s,u-t*s,r,o,0,null):{newPositionX:l,newPositionY:u}}function E(e){var t=e.touches;return t&&1===t.length?{clientX:t[0].clientX,clientY:t[0].clientY}:t?null:{clientX:e.clientX,clientY:e.clientY}}function P(e){var t=this.stateProvider,n=t.scale,r=t.positionX,o=t.positionY,i=t.options,a=i.limitToBounds,l=i.minScale,u=t.pan,c=u.lockAxisX,s=u.lockAxisY,f=u.padding,d=u.paddingSize,p=t.wrapperComponent;if(this.startCoords){var h=this.startCoords,m=h.x,v=h.y,y=E(e);if(!y)return console.error("Cannot find mouse client positions");var g=y.clientX,b=y.clientY,w=c?r:g-m,x=s?o:b-v,T=f&&n>=l?d:0;if(w!==r||x!==o){var S=k(w,x,this.bounds,a,T,p);O.call(this,S.x,S.y)}}}function C(){var e=this.stateProvider,t=e.scale,n=e.options.minScale,r=e.pan,o=r.disabled,i=r.padding,a=r.panReturnAnimationTime,l=r.panReturnAnimationType;if(!(o||ts||td||ns?u.offsetWidth:this.stateProvider.minPositionX||0,y=n>d?u.offsetHeight:this.stateProvider.minPositionY||0,g=S.call(this,v,y,r,this.bounds,a||l),b=g.x,w=g.y;return{scale:r,positionX:h?b:t,positionY:m?w:n}}}function O(e,t){this.stateProvider.pan.padding&&(this.stateProvider.positionX=e,this.stateProvider.positionY=t,this.applyTransformation())}function N(e,t,n,r,o){var i=this.stateProvider,a=i.scale,l=i.options,u=l.maxScale,s=l.minScale,f=i.scalePadding,d=f.size,p=f.disabled,h=i.wrapperComponent,m=null;if(o){m=a+(t-t*(1e-4*window.innerWidth))*e*(a/(e<0?30:20))}else{var v=2-window.innerWidth/h.offsetWidth;m=a+t*e*((a-a*Math.max(.2,Math.min(.99,v)))/20)}if(r)return m;var y=!n&&!p;return x(c(m,3),s,u,d,y)}function z(e,t){var n=this.stateProvider,r=function(e,t,n){var r=e.offsetWidth,o=e.offsetHeight,i=t.offsetWidth*n,a=t.offsetHeight*n;return{wrapperWidth:r,wrapperHeight:o,newContentWidth:i,newDiffWidth:r-i,newContentHeight:a,newDiffHeight:o-a}}(n.wrapperComponent,n.contentComponent,e),o=r.wrapperWidth,i=r.wrapperHeight,a=function(e,t,n,r,o,i,a){var l=e>t?n*(a?1:.5):0,u=r>o?i*(a?1:.5):0;return{minPositionX:e-t-l,maxPositionX:l,minPositionY:r-o-u,maxPositionY:u}}(o,r.newContentWidth,r.newDiffWidth,i,r.newContentHeight,r.newDiffHeight,t);return this.bounds=a,a}function R(e){var t=this.stateProvider,n=t.scale,r=t.contentComponent,o=t.options.limitToBounds,i=t.scalePadding,a=i.size,l=i.disabled,u=t.wheel,c=u.step,f=u.limitsOnWheel;e.preventDefault(),e.stopPropagation();var d=function(e,t){var n=e?e.deltaY<0?1:-1:0;return s(t,n)}(e,null),p=N.call(this,d,c,!e.ctrlKey);if(n!==p){var h=z.call(this,p,!f),m=T(e,r,n),v=m.mouseX,y=m.mouseY,g=o&&(l||0===a||f),b=S.call(this,v,y,p,h,g),w=b.x,x=b.y;this.bounds=h,this.stateProvider.previousScale=n,this.stateProvider.scale=p,this.stateProvider.positionX=w,this.stateProvider.positionY=x,this.applyTransformation()}}function M(e,t,n,r,o){var i=this.stateProvider,a=i.contentComponent,l=i.options,u=l.disabled,s=l.minScale,f=l.maxScale,d=l.limitToBounds,p=l.limitToWrapper;if(!u&&!e){var h=x(c(t,2),s,f,null,null),m=z.call(this,h,p),v=n,y=r;if(o){var g=T(o,a,t);v=g.mouseX,y=g.mouseY}var b=S.call(this,v,y,h,m,d);return{scale:h,positionX:b.x,positionY:b.y}}}function A(){var e=this.stateProvider,t=e.scale,n=e.wrapperComponent,r=e.options,o=r.minScale,i=r.limitToBounds,a=e.scalePadding,l=a.disabled,u=a.animationTime,c=a.animationType,s=l||t>=o;if((t>=1||i)&&C.call(this),!s){var f=n.offsetWidth/2,d=n.offsetHeight/2,p=M.call(this,!1,o,f,d,null);w.call(this,{targetState:p,speed:u,type:c})}}function D(e){e.preventDefault(),e.stopPropagation();var t=this.stateProvider,n=t.contentComponent,r=t.scale,o=t.doubleClick,i=o.disabled,a=o.mode,l=o.step,u=o.animationTime,c=o.animationType;if("reset"===a)return j.call(this,e,u);var s="zoomOut"===a?-1:1,f=N.call(this,s,l,void 0,void 0,!0),d=T(e,n,r),p=d.mouseX,h=d.mouseY,m=M.call(this,i,f,p,h);if(m.scale!==r){var v=L(N.call(this,s,l,!0,void 0,!0),f,u);w.call(this,{targetState:m,speed:v,type:c})}}function I(e,t){var n=this.stateProvider,r=n.scale,o=n.positionX,i=n.positionY,a=n.wrapperComponent,l=n.zoomIn,u=n.zoomOut,c=(a.offsetWidth/2-o)/r,s=(a.offsetHeight/2-i)/r,f=N.call(this,e,t,void 0,void 0,!0),d=f>r,p=d?l.animationTime:u.animationTime,h=d?l.animationType:u.animationType,m=d?l.disabled:u.disabled,v=M.call(this,m,f,c,s);if(v.scale!==r){var y=L(N.call(this,e,t,!0,void 0,!0),f,p);w.call(this,{targetState:v,speed:y,type:h})}}function j(e){var t=this.props.defaultValues,n=t.defaultScale,r=t.defaultPositionX,o=t.defaultPositionY,i=this.stateProvider,a=i.scale,l=i.positionX,c=i.positionY,f=i.reset,d=i.options,p=d.disabled,h=d.limitToBounds,m=d.centerContent,v=d.limitToWrapper;if(!p&&!f.disabled&&(a!==n||l!==r||c!==o)){var y="number"===typeof e?e:f.animationTime,g=s(n,u.scale),b=s(r,u.positionX),x=s(o,u.positionY);if(h&&!v||m){var k=z.call(this,g,v);b=k.minPositionX,x=k.minPositionY}var T={scale:g,positionX:b,positionY:x};w.call(this,{targetState:T,speed:y,type:f.animationType})}}function L(e,t,n){return n*(t/e)}function F(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function W(e){return e===1/0||e===-1/0}function U(e,t){var n=this.stateProvider,r=n.options,o=r.minScale,i=r.maxScale,a=n.scalePadding,l=a.size,u=a.disabled;if("number"!==typeof t||"number"!==typeof e)return console.error("Pinch touches distance was not provided");if(!(e<0)){var s=e/t*this.pinchStartScale;return x(c(s,2),o,i,l,!u)}}function Y(e){var t=this.stateProvider,n=t.scale,r=t.options,o=r.limitToBounds,i=r.limitToWrapper,a=t.scalePadding,l=a.disabled,u=a.size,c=t.wheel.limitsOnWheel,s=t.pinch,f=this.state.contentComponent;if(!s.disabled&&!this.stateProvider.options.disabled&&(e.cancelable&&(e.preventDefault(),e.stopPropagation()),null!==this.pinchStartDistance)){var p=function(e,t,n){var r=n.getBoundingClientRect(),o=e.touches,i=F(o[0].clientX-r.left,5),a=F(o[0].clientY-r.top,5);return{mouseX:(i+F(o[1].clientX-r.left,5))/2/t,mouseY:(a+F(o[1].clientY-r.top,5))/2/t}}(e,n,f),h=p.mouseX,m=p.mouseY;if(!W(h)&&!W(m)){var v=function(e){return d(e.touches[0],e.touches[1])}(e),y=U.call(this,v,this.pinchStartDistance);if(!W(y)&&y!==n){var g=z.call(this,y,i),b=o&&(l||0===u||c),w=S.call(this,h,m,y,g,b),x=w.x,k=w.y;this.lastDistance=v,this.stateProvider.positionX=x,this.stateProvider.positionY=k,this.stateProvider.scale=y,this.stateProvider.previousScale=n,this.applyTransformation()}}}}function X(e,t){return this.stateProvider.pan.velocityEqualToMove?t-t/Math.max(1,e):t}function $(){this.setState({startAnimation:!1})}function V(){this.setState({startAnimation:!0})}function B(){var e=this,t=this.stateProvider,n=t.positionX,r=t.positionY,o=t.options.limitToBounds,i=t.pan,a=i.velocityBaseTime,l=i.lockAxisX,u=i.lockAxisY,c=i.velocityAnimationType,s=i.panReturnAnimationTime,f=i.panReturnAnimationType,d=i.padding,p=i.paddingSize,h=t.wrapperComponent;if(this.mounted){if(!this.velocity||!this.bounds)return g.call(this);var m=this.bounds,v=m.maxPositionX,w=m.minPositionX,x=m.maxPositionY,T=m.minPositionY,S=this.velocity,E=S.velocityX,P=S.velocityY,_=S.velocity,O=X.call(this,_,a);if(O){var N=E,z=P,R=O>s?O:s,M=d?p:0,A=h?M*h.offsetWidth/100:0,D=h?M*h.offsetHeight/100:0,I=v+A,j=w-A,L=x+D,F=T-D,W=k(n,r,this.bounds,o,M,h),U=(new Date).getTime();b.call(this,c,R,(function(t){var i=(new Date).getTime()-U,a=(0,y[f])(i/s);(i>s||a>1||a===1/0||a===-1/0)&&(a=1);var c=Q(l,N,t,a,w,v,o,n,W.x,j,I),d=Q(u,z,t,a,T,x,o,r,W.y,F,L);n===c&&r===d||(e.stateProvider.positionX=c,e.stateProvider.positionY=d,e.applyTransformation())}))}else C.call(this)}}function H(e){var t=this,n=this.stateProvider,r=n.scale,o=n.options.disabled,i=n.pan,a=i.velocity,l=i.velocitySensitivity,u=i.velocityActiveScale,c=i.velocityMinSpeed,s=n.wrapperComponent;if(!(!a||u>=r||o)){$.call(this);var f=Date.now();if(this.lastMousePosition){var d=E(e);if(!d)return console.error("No mouse or touch position detected");var p=d.clientX,h=d.clientY,m=p-this.lastMousePosition.clientX,v=h-this.lastMousePosition.clientY,y=f-this.velocityTime,g=2-s.offsetWidth/window.innerWidth,b=2-s.offsetHeight/window.innerHeight,w=m/y*l*r*(20*Math.max(c,Math.min(2,g))),x=v/y*l*r*(20*Math.max(c,Math.min(2,b))),k=m*m+v*v,T=Math.sqrt(k)/y*l;if(this.velocity&&To&&l>i)return(d=u-(u-i)*r)>s?s:do?o:d}return e?u:f(l+t*n,o,i,a)}var q=["previousScale","scale","positionX","positionY","defaultPositionX","defaultPositionY","defaultScale","onWheelStart","onWheel","onWheelStop","onPanningStart","onPanning","onPanningStop","onPinchingStart","onPinching","onPinchingStop","onZoomChange","options","wheel","scalePadding","pan","pinch","zoomIn","zoomOut","doubleClick","reset"],K=function(e){return Object.keys(e).reduce((function(t,n){return q.includes(n)&&(t[n]=e[n]),t}),{})},Z=o.a.createContext({}),G=null,J=null,ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!0,t.state={wrapperComponent:void 0,contentComponent:void 0},t.stateProvider=l(l(l(l({},u),v(u,t.props.dynamicValues)),t.props.defaultValues),{previousScale:t.props.dynamicValues.scale||t.props.defaultValues.scale||u.scale}),t.windowToWrapperScaleX=0,t.windowToWrapperScaleY=0,t.startCoords=null,t.isDown=!1,t.pinchStartDistance=null,t.lastDistance=null,t.pinchStartScale=null,t.distance=null,t.bounds=null,t.velocityTime=null,t.lastMousePosition=null,t.velocity=null,t.offsetX=null,t.offsetY=null,t.throttle=!1,t.previousWheelEvent=null,t.lastScale=null,t.animate=null,t.animation=null,t.maxBounds=null,t.handleWheel=function(e){var n=t.stateProvider,r=n.scale,o=n.wheel,i=o.disabled,a=o.wheelEnabled,l=o.touchPadEnabled,u=t.props,c=u.onWheelStart,s=u.onWheel,f=u.onWheelStop,d=t.state,p=d.wrapperComponent,v=d.contentComponent;t.isDown||i||t.stateProvider.options.disabled||!p||!v||(a||e.ctrlKey)&&(!l&&e.ctrlKey||(G||(t.lastScale=r,g.call(t),h(c,t.getCallbackProps())),R.call(t,e),h(s,t.getCallbackProps()),t.applyTransformation(null,null,null),t.previousWheelEvent=e,m(t.previousWheelEvent,e,t.stateProvider)&&(clearTimeout(G),G=setTimeout((function(){t.mounted&&(h(f,t.getCallbackProps()),G=null)}),180)),t.animate=!1,t.lastScale=t.stateProvider.scale,clearTimeout(J),J=setTimeout((function(){t.mounted&&A.call(t,e)}),100)))},t.checkPanningTarget=function(e){var n=t.stateProvider.pan.disableOnTarget;return n.map((function(e){return e.toUpperCase()})).includes(e.target.tagName)||n.find((function(t){return e.target.classList.value.includes(t)}))},t.checkIsPanningActive=function(e){var n=t.stateProvider.pan.disabled,r=t.state,o=r.wrapperComponent,i=r.contentComponent;return!t.isDown||n||t.stateProvider.options.disabled||e.touches&&(1!==e.touches.length||Math.abs(t.startCoords.x-e.touches[0].clientX)<1||Math.abs(t.startCoords.y-e.touches[0].clientY)<1)||!o||!i},t.handleSetUpPanning=function(e,n){var r=t.stateProvider,o=r.positionX,i=r.positionY;t.isDown=!0,t.startCoords={x:e-o,y:n-i},h(t.props.onPanningStart,t.getCallbackProps())},t.handleStartPanning=function(e){var n=t.stateProvider,r=n.wrapperComponent,o=n.scale,i=n.options,a=i.minScale,l=i.maxScale,u=i.limitToWrapper,c=n.pan.disabled,s=e.target,f=e.touches;c||t.stateProvider.options.disabled||r&&!r.contains(s)||t.checkPanningTarget(e)||ol||(g.call(t),t.bounds=z.call(t,o,u),f&&1===f.length&&t.handleSetUpPanning(f[0].clientX,f[0].clientY),f||t.handleSetUpPanning(e.clientX,e.clientY))},t.handlePanning=function(e){t.isDown&&e.preventDefault(),t.checkIsPanningActive(e)||(e.stopPropagation(),H.call(t,e),P.call(t,e),h(t.props.onPanning,t.getCallbackProps()))},t.handleStopPanning=function(){if(t.isDown){t.isDown=!1,t.animate=!1,t.animation=!1,V.call(t),h(t.props.onPanningStop,t.getCallbackProps());var e=t.stateProvider,n=e.pan.velocity,r=e.scale;t.velocity&&n&&r>1?B.call(t):C.call(t)}},t.handlePinchStart=function(e){var n=t.stateProvider.scale;e.preventDefault(),e.stopPropagation(),g.call(t);var r=d(e.touches[0],e.touches[1]);t.pinchStartDistance=r,t.lastDistance=r,t.pinchStartScale=n,t.isDown=!1,h(t.props.onPinchingStart,t.getCallbackProps())},t.handlePinch=function(e){t.isDown=!1,Y.call(t,e),h(t.props.onPinching,t.getCallbackProps())},t.handlePinchStop=function(){"number"===typeof t.pinchStartScale&&(t.isDown=!1,t.velocity=null,t.lastDistance=null,t.pinchStartScale=null,t.pinchStartDistance=null,A.call(t),h(t.props.onPinchingStop,t.getCallbackProps()))},t.handleTouchStart=function(e){var n=t.stateProvider,r=n.wrapperComponent,o=n.contentComponent,i=n.scale,a=n.options,l=a.disabled,u=a.minScale,c=e.touches;if(!l&&r&&o&&!(i2e3&&(clearInterval(h),h=null)}),20)}else t.applyTransformation(null,null,null)}))},t.applyTransformation=function(e,n,r){if(t.mounted){var o=t.state.contentComponent,i=t.props.onZoomChange,a=t.stateProvider,l=a.previousScale,u=a.scale,c=a.positionX,s=a.positionY;if(!o)return console.error("There is no content component");var f="translate("+(n||c)+"px, "+(r||s)+"px) scale("+(e||u)+")";o.style.transform=f,o.style.WebkitTransform=f,t.forceUpdate(),i&&l!==u&&h(i,t.getCallbackProps())}},t.getCallbackProps=function(){return K(t.stateProvider)},t}return a(t,e),t.prototype.componentDidMount=function(){window.addEventListener("mousedown",this.handleStartPanning,!1),window.addEventListener("mousemove",this.handlePanning,!1),window.addEventListener("mouseup",this.handleStopPanning,!1)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousedown",this.handleStartPanning,!1),window.removeEventListener("mousemove",this.handlePanning,!1),window.removeEventListener("mouseup",this.handleStopPanning,!1),g.call(this)},t.prototype.componentDidUpdate=function(e,t){var n,r=this.state,o=r.wrapperComponent,i=r.contentComponent,a=this.props.dynamicValues;if(!t.contentComponent&&i&&(this.stateProvider.contentComponent=i),!t.wrapperComponent&&o&&void 0!==o){this.stateProvider.wrapperComponent=o,this.windowToWrapperScaleX=(n=o)?window.innerWidth/n.offsetWidth:0,this.windowToWrapperScaleY=function(e){return e?window.innerHeight/e.offsetHeight:0}(o);o.addEventListener("wheel",this.handleWheel,!1),o.addEventListener("dblclick",this.handleDbClick,!1),o.addEventListener("touchstart",this.handleTouchStart,!1),o.addEventListener("touchmove",this.handleTouch,!1),o.addEventListener("touchend",this.handleTouchStop,!1)}(o&&i||e.dynamicValues!==a)&&(this.maxBounds=z.call(this,this.stateProvider.scale,this.stateProvider.options.limitToWrapper)),e.dynamicValues&&e.dynamicValues!==a&&(this.animation=null,this.stateProvider=l(l({},this.stateProvider),v(this.stateProvider,a)),this.applyTransformation(null,null,null))},t.prototype.render=function(){var e=this.state,t=e.wrapperComponent,n=e.contentComponent,r={loaded:Boolean(t&&n),state:this.getCallbackProps(),dispatch:{setScale:this.setScale,setPositionX:this.setPositionX,setPositionY:this.setPositionY,zoomIn:this.zoomIn,zoomOut:this.zoomOut,setTransform:this.setTransform,resetTransform:this.resetTransform,setDefaultState:this.setDefaultState},nodes:{setWrapperComponent:this.setWrapperComponent,setContentComponent:this.setContentComponent}},i=this.props.children,a="function"===typeof i?i(l(l({},r.state),r.dispatch)):i;return o.a.createElement(Z.Provider,{value:r},a)},t}(r.Component),te=function(e){var t=e.children,n=e.defaultPositionX,r=e.defaultPositionY,i=e.defaultScale,a=e.onWheelStart,u=e.onWheel,c=e.onWheelStop,s=e.onPanningStart,f=e.onPanning,d=e.onPanningStop,h=e.onPinchingStart,m=e.onPinching,v=e.onPinchingStop,y=e.onZoomChange,g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oN.length&&N.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+A(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c