(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[4472],{68089:function(e,t,n){"use strict";n.d(t,{B:function(){return s}});var r=n(12033),a=n(73884),o=n.n(a),i=n(84343);const s=e=>{var{size:t,color:n="primary",isDisabled:a,isBlock:s,title:c,onClick:u,icon:d,iconPosition:l="left",children:h,isLoading:f=!1,loadingText:p,dataEventCategory:v,dataEventAction:g,dataEventLabel:m,dataProductChannel:b,dataProductSku:k,dataProductBrand:w,dataProductName:y,dataProductPrice:M,dataProductCategory:T,dataProductPosition:O,type:x}=e,D=(0,r._)(e,["size","color","isDisabled","isBlock","title","onClick","icon","iconPosition","children","isLoading","loadingText","dataEventCategory","dataEventAction","dataEventLabel","dataProductChannel","dataProductSku","dataProductBrand","dataProductName","dataProductPrice","dataProductCategory","dataProductPosition","type"]);const R={"data-event-category":v,"data-event-action":g,"data-event-label":m,"data-product-channel":b,"data-product-sku":k,"data-product-brand":w,"data-product-name":y,"data-product-price":M,"data-product-category":T,"data-product-position":O};return o().createElement(i.B,Object.assign({},R,{size:t,variant:"transparent"===n?"white":"danger"===n?"error":n,disabled:a,onClick:e=>{!f&&!a&&u&&u(e)},title:c,loading:f,type:x||"submit",leftIcon:"left"===l?d:void 0,rightIcon:"right"===l?d:void 0,w:s?"100%":void 0,p:s?"12px auto":void 0,"data-color":n,"data-size":t,"data-block":s,"data-has-icon":!!d||void 0,"data-theme":D.theme,"data-is-loading":f},D),f&&p||h)}},32485:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){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,u.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,u.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,u.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,u.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,a=t.onChange,o=t.step,i=t.rtl,s=t.direction,c=n.state.isChanged,f=n.getTargetIndex(e.nativeEvent),p=i||s===d.Direction.Left||s===d.Direction.Down?-1:1;-1!==f&&(l.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:f,isChanged:!0}),a((0,u.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}),a((0,u.replaceAt)(r,f,n.normalizeValue(r[f]-p*("PageDown"===e.key?10*o:o),f)))):"Tab"===e.key?n.setState({draggedThumbIndex:-1},(function(){c&&n.fireOnFinalChange()})):c&&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,a=r.draggedThumbIndex,o=r.draggedTrackPos,i=n.props,s=i.direction,c=i.min,l=i.max,h=i.onChange,f=i.values,p=i.step,v=i.rtl;if(-1===a&&-1===o[0]&&-1===o[1])return null;var g=n.trackRef.current;if(!g)return null;var m=g.getBoundingClientRect(),b=(0,u.isVertical)(s)?m.height:m.width;if(-1!==o[0]&&-1!==o[1]){var k=e-o[0],w=t-o[1],y=0;switch(s){case d.Direction.Right:case d.Direction.Left:y=k/b*(l-c);break;case d.Direction.Down:case d.Direction.Up:y=w/b*(l-c);break;default:(0,u.assertUnreachable)(s)}if(v&&(y*=-1),Math.abs(y)>=p/2){for(var M=0;Ml?y=l-f[M]:T=p/2&&h((0,u.replaceAt)(f,a,n.normalizeValue(x,a)))}},n.normalizeValue=function(e,t){var r=n.props,a=r.min,o=r.max,i=r.step,s=r.allowOverlap,c=r.values;return(0,u.normalizeValue)(e,t,a,o,i,s,c)},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,u.isVertical)(this.props.direction)?"ns-resize":"ew-resize":1!==i.length||f?"inherit":"pointer"},onMouseDown:f?u.voidFn:this.onMouseDownTrack,onTouchStart:f?u.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===d.Direction.Left||e.props.direction===d.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),i.map((function(t,n){var a=e.state.draggedThumbIndex===n;return r({index:n,value:t,isDragged:a,props:{style:{position:"absolute",zIndex:g[n],cursor:f?"inherit":a?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:n,tabIndex:f?void 0:0,"aria-valuemax":h?l:i[n+1]||l,"aria-valuemin":h?c:i[n-1]||c,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[n],role:"slider",onKeyDown:f?u.voidFn:e.onKeyDown,onKeyUp:f?u.voidFn:e.onKeyUp}})})),!0)})},t.defaultProps={step:1,direction:d.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},t}(c.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 a=r(n(20465));t.Range=a.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 i=n(58105);Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return i.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,a=0,o=t.length;ae)return u;if(d&&da)return a;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 a=0,o=u(e[0],t,n,r),i=1;ie?i:e}),e.getBoundingClientRect().width))};function u(e,t,n,r){var a=e.getBoundingClientRect(),o=a.left,s=a.top,c=a.width,u=a.height;return i(r)?Math.abs(n-(s+u/2)):Math.abs(t-(o+c/2))}t.useThumbOverlap=function(e,n,o,i,s,u){void 0===i&&(i=.1),void 0===s&&(s=" - "),void 0===u&&(u=function(e){return e});var d=(0,t.getStepDecimals)(i),l=(0,a.useState)({}),h=l[0],f=l[1],p=(0,a.useState)(u(n[o].toFixed(d))),v=p[0],g=p[1];return(0,a.useEffect)((function(){if(e){var t=e.getThumbs();if(t.length<1)return;var a={},i=e.getOffsets(),l=function(e,t,n,a,o,i,s){void 0===s&&(s=function(e){return e});var u=[],d=function(e){var l=c(n[e],a[e],o,i,s),h=t[e].x;t.forEach((function(t,f){var p=t.x,v=c(n[f],a[f],o,i,s);e!==f&&(h>=p&&h<=p+v||h+l>=p&&h+l<=p+v)&&(u.includes(f)||(u.push(e),u.push(f),u=r(r([],u,!0),[e,f],!1),d(f)))}))};return d(e),Array.from(new Set(u.sort()))}(o,i,t,n,s,d,u),h=u(n[o].toFixed(d));if(l.length){var p=l.reduce((function(e,t,n,a){return e.length?r(r([],e,!0),[i[a[n]].x],!1):[i[a[n]].x]}),[]);if(Math.min.apply(Math,p)===i[o].x){var v=[];l.forEach((function(e){v.push(n[e].toFixed(d))})),h=Array.from(new Set(v.sort((function(e,t){return parseFloat(e)-parseFloat(t)})))).map(u).join(s);var m=Math.min.apply(Math,p),b=Math.max.apply(Math,p),k=t[l[p.indexOf(b)]].getBoundingClientRect().width;a.left="".concat(Math.abs(m-(b+k))/2,"px"),a.transform="translate(-50%, 0)"}else a.visibility="hidden"}g(h),f(a)}}),[e,n]),[v,h]}}}]);