(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[9680],{32485:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t1&&n.props.draggableTrack){if(n.thumbRefs.some((function(t){var n;return null===(n=t.current)||void 0===n?void 0:n.contains(e.target)})))return;n.setState({draggedTrackPos:[e.clientX,e.clientY]},(function(){return n.onMove(e.clientX,e.clientY)}))}else{var r=(0,c.getClosestThumbIndex)(n.thumbRefs.map((function(e){return e.current})),e.clientX,e.clientY,n.props.direction);null===(t=n.thumbRefs[r].current)||void 0===t||t.focus(),n.setState({draggedThumbIndex:r},(function(){return n.onMove(e.clientX,e.clientY)}))}},n.onResize=function(){(0,c.translateThumbs)(n.getThumbs(),n.getOffsets(),n.props.rtl),n.calculateMarkOffsets()},n.onTouchStartTrack=function(e){var t;if(e.persist(),n.addTouchEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some((function(t){var n;return null===(n=t.current)||void 0===n?void 0:n.contains(e.target)})))return;n.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},(function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}else{var r=(0,c.getClosestThumbIndex)(n.thumbRefs.map((function(e){return e.current})),e.touches[0].clientX,e.touches[0].clientY,n.props.direction);null===(t=n.thumbRefs[r].current)||void 0===t||t.focus(),n.setState({draggedThumbIndex:r},(function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}},n.onMouseOrTouchStart=function(e){if(!n.props.disabled){var t=(0,c.isTouchEvent)(e);if(t||0===e.button){var r=n.getTargetIndex(e);-1!==r&&(t?n.addTouchEvents(e):n.addMouseEvents(e),n.setState({draggedThumbIndex:r,thumbZIndexes:n.state.thumbZIndexes.map((function(e,t){return t===r?Math.max.apply(Math,n.state.thumbZIndexes):e<=n.state.thumbZIndexes[r]?e:e-1}))}))}}},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,i=t.onChange,o=t.step,a=t.rtl,s=t.direction,u=n.state.isChanged,f=n.getTargetIndex(e.nativeEvent),p=a||s===l.Direction.Left||s===l.Direction.Down?-1:1;-1!==f&&(d.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:f,isChanged:!0}),i((0,c.replaceAt)(r,f,n.normalizeValue(r[f]+p*("PageUp"===e.key?10*o:o),f)))):h.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:f,isChanged:!0}),i((0,c.replaceAt)(r,f,n.normalizeValue(r[f]-p*("PageDown"===e.key?10*o:o),f)))):"Tab"===e.key?n.setState({draggedThumbIndex:-1},(function(){u&&n.fireOnFinalChange()})):u&&n.fireOnFinalChange())},n.onKeyUp=function(e){var t=n.state.isChanged;n.setState({draggedThumbIndex:-1},(function(){t&&n.fireOnFinalChange()}))},n.onMove=function(e,t){var r=n.state,i=r.draggedThumbIndex,o=r.draggedTrackPos,a=n.props,s=a.direction,u=a.min,d=a.max,h=a.onChange,f=a.values,p=a.step,v=a.rtl;if(-1===i&&-1===o[0]&&-1===o[1])return null;var g=n.trackRef.current;if(!g)return null;var m=g.getBoundingClientRect(),b=(0,c.isVertical)(s)?m.height:m.width;if(-1!==o[0]&&-1!==o[1]){var k=e-o[0],w=t-o[1],M=0;switch(s){case l.Direction.Right:case l.Direction.Left:M=k/b*(d-u);break;case l.Direction.Down:case l.Direction.Up:M=w/b*(d-u);break;default:(0,c.assertUnreachable)(s)}if(v&&(M*=-1),Math.abs(M)>=p/2){for(var T=0;Td?M=d-f[T]:y=p/2&&h((0,c.replaceAt)(f,i,n.normalizeValue(x,i)))}},n.normalizeValue=function(e,t){var r=n.props,i=r.min,o=r.max,a=r.step,s=r.allowOverlap,u=r.values;return(0,c.normalizeValue)(e,t,i,o,a,s,u)},n.onEnd=function(e){if(e.preventDefault(),document.removeEventListener("mousemove",n.schdOnMouseMove),document.removeEventListener("touchmove",n.schdOnTouchMove),document.removeEventListener("mouseup",n.schdOnEnd),document.removeEventListener("touchend",n.schdOnEnd),document.removeEventListener("touchcancel",n.schdOnEnd),-1===n.state.draggedThumbIndex&&-1===n.state.draggedTrackPos[0]&&-1===n.state.draggedTrackPos[1])return null;n.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},(function(){n.fireOnFinalChange()}))},n.fireOnFinalChange=function(){n.setState({isChanged:!1});var e=n.props,t=e.onFinalChange,r=e.values;t&&t(r)},n.updateMarkRefs=function(e){if(!e.renderMark)return n.numOfMarks=void 0,void(n.markRefs=void 0);n.numOfMarks=(e.max-e.min)/n.props.step,n.markRefs=[];for(var t=0;t-1?"grabbing":this.props.draggableTrack?(0,c.isVertical)(this.props.direction)?"ns-resize":"ew-resize":1!==a.length||f?"inherit":"pointer"},onMouseDown:f?c.voidFn:this.onMouseDownTrack,onTouchStart:f?c.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:f,children:s(s([],m.map((function(t,n,r){return o({props:{style:e.props.direction===l.Direction.Left||e.props.direction===l.Direction.Right?{position:"absolute",left:"".concat(t[0],"px"),marginTop:"".concat(t[1],"px")}:{position:"absolute",top:"".concat(t[0],"px"),marginLeft:"".concat(t[1],"px")},key:"mark".concat(n),ref:e.markRefs[n]},index:n})})),!0),a.map((function(t,n){var i=e.state.draggedThumbIndex===n;return r({index:n,value:t,isDragged:i,props:{style:{position:"absolute",zIndex:g[n],cursor:f?"inherit":i?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:n,tabIndex:f?void 0:0,"aria-valuemax":h?d:a[n+1]||d,"aria-valuemin":h?u:a[n-1]||u,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[n],role:"slider",onKeyDown:f?c.voidFn:e.onKeyDown,onKeyUp:f?c.voidFn:e.onKeyUp}})})),!0)})},t.defaultProps={step:1,direction:l.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},t}(u.Component);t.default=f},60124:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var i=r(n(20465));t.Range=i.default;var o=n(21813);Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var a=n(58105);Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})},58105:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(t.Direction||(t.Direction={}))},21813:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;ie)return c;if(l&&li)return i;if(e=n)throw new RangeError("min (".concat(t,") is equal/bigger than max (").concat(n,")"));if(en)throw new RangeError("value (".concat(e,") is bigger than max (").concat(n,")"))},t.checkValuesAgainstBoundaries=function(e,t,n){return en?n:e},t.checkInitialOverlap=function(e){if(!(e.length<2)&&!e.slice(1).every((function(t,n){return e[n]<=t})))throw new RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))},t.getMargin=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}},t.getPaddingAndBorder=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10)+parseInt(t["border-top-width"],10),bottom:parseInt(t["padding-bottom"],10)+parseInt(t["border-bottom-width"],10),left:parseInt(t["padding-left"],10)+parseInt(t["border-left-width"],10),right:parseInt(t["padding-right"],10)+parseInt(t["border-right-width"],10)}},t.translateThumbs=function(e,t,n){var r=n?-1:1;e.forEach((function(e,n){return s(e,r*t[n].x,t[n].y)}))},t.getClosestThumbIndex=function(e,t,n,r){for(var i=0,o=c(e[0],t,n,r),a=1;ae?a:e}),e.getBoundingClientRect().width))};function c(e,t,n,r){var i=e.getBoundingClientRect(),o=i.left,s=i.top,u=i.width,c=i.height;return a(r)?Math.abs(n-(s+c/2)):Math.abs(t-(o+u/2))}t.useThumbOverlap=function(e,n,o,a,s,c){void 0===a&&(a=.1),void 0===s&&(s=" - "),void 0===c&&(c=function(e){return e});var l=(0,t.getStepDecimals)(a),d=(0,i.useState)({}),h=d[0],f=d[1],p=(0,i.useState)(c(n[o].toFixed(l))),v=p[0],g=p[1];return(0,i.useEffect)((function(){if(e){var t=e.getThumbs();if(t.length<1)return;var i={},a=e.getOffsets(),d=function(e,t,n,i,o,a,s){void 0===s&&(s=function(e){return e});var c=[],l=function(e){var d=u(n[e],i[e],o,a,s),h=t[e].x;t.forEach((function(t,f){var p=t.x,v=u(n[f],i[f],o,a,s);e!==f&&(h>=p&&h<=p+v||h+d>=p&&h+d<=p+v)&&(c.includes(f)||(c.push(e),c.push(f),c=r(r([],c,!0),[e,f],!1),l(f)))}))};return l(e),Array.from(new Set(c.sort()))}(o,a,t,n,s,l,c),h=c(n[o].toFixed(l));if(d.length){var p=d.reduce((function(e,t,n,i){return e.length?r(r([],e,!0),[a[i[n]].x],!1):[a[i[n]].x]}),[]);if(Math.min.apply(Math,p)===a[o].x){var v=[];d.forEach((function(e){v.push(n[e].toFixed(l))})),h=Array.from(new Set(v.sort((function(e,t){return parseFloat(e)-parseFloat(t)})))).map(c).join(s);var m=Math.min.apply(Math,p),b=Math.max.apply(Math,p),k=t[d[p.indexOf(b)]].getBoundingClientRect().width;i.left="".concat(Math.abs(m-(b+k))/2,"px"),i.transform="translate(-50%, 0)"}else i.visibility="hidden"}g(h),f(i)}}),[e,n]),[v,h]}}}]);