"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[874],{45420:(e,t,r)=>{r.d(t,{Z:()=>h});var o=r(96596),s=r(21122),n=r(96832),i=r(34853),a=r(7862);const l=["hasBlurred","value","error"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{onChange:r,getErrorMessage:o}=this.props;t&&"object"==typeof t?this.setState(t):this.setState({value:t});const s=o?o(t):"";this.setState({error:s}),r(e,t,s)},this.onBlur=(e,t)=>{const{onBlur:r,onChange:o,getErrorMessage:s,id:n}=this.props;t&&"object"==typeof t?this.setState(t):this.setState({value:t});const i=s?s(t):"";this.setState({error:i,hasBlurred:!0}),o(n,t,i),r(e,t)},this.onFocus=(e,t)=>{const{onFocus:r}=this.props;t&&"object"==typeof t?this.setState(t):this.setState({value:t}),this.setState({hasBlurred:!1}),r(e,t)};const{initialValue:t,getErrorMessage:r}=e;this.state={error:r&&t?r(t):"",hasBlurred:!1,value:t}}componentDidMount(){const{id:e,setInitialValue:t,initialValue:r}=this.props;t(e,r)}render(){const t=(0,o.Z)(this.props,["getErrorMessage"]),r=this.state,{hasBlurred:s,value:n,error:a}=r,h=function(e,t){if(null==e)return{};var r,o,s={},n=Object.keys(e);for(o=0;o=0||(s[r]=e[r]);return s}(r,l),{persistError:u}=this.props,p=a||"";return(0,i.tZ)(e,c({},t,{value:n},h,{errorMessage:s||u?p:"",onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus}))}}).defaultProps={onBlur:s.Z,onChange:s.Z,onFocus:s.Z,persistError:!1,setInitialValue:s.Z},t}}},40874:(e,t,r)=>{r.d(t,{Jg:()=>$,II:()=>A,Ph:()=>H});var o=r(96596),s=r(21122),n=r(46255);const i=(0,n.Z)("span",{target:"e1dclz130"})((({theme:e})=>({backgroundColor:e.colors.white.primary,border:"1px solid transparent",borderRadius:"0.5rem",cursor:"pointer",display:"inline-block",fontSize:"1.6rem",height:"3.2rem",lineHeight:"normal",marginRight:"1rem",outline:"none",padding:"0",position:"relative",transition:"all 0.1s ease-in-out",transitionTimingFunction:"cubic-bezier(0.7, 0, 0.3, 1)",verticalAlign:"middle",width:"3.2rem",zoom:"1"})),""),a=(0,n.Z)("span",{target:"e355d1b0"})((({active:e,theme:t})=>({border:e?`1px solid ${t.colors.blueNew[500]}`:`1px solid ${t.colors.gray.light}`,borderRadius:"0.5rem",height:"3rem",left:"0",pointerEvents:"none",position:"absolute",top:"0",transition:"border-color 0.5s ease",width:"3rem",zIndex:2})),"");var l=r(76683);const c=(0,n.Z)(l.Z,{target:"e1mzmzkr0"})((({active:e,theme:t})=>({display:e?"block":"none",fontSize:"2rem",height:"100%",lineHeight:"3.5rem",textAlign:"center",width:"100%","svg *":{fill:t.colors.blueNew[600]}})),""),h=(0,n.Z)("label",{target:"e1vok92d0"})((({collapseMargin:e=!1,isSdk:t=!1,theme:r})=>({"&.placeholderVisible":{fontSize:"1.6rem",height:0,left:"1rem",letterSpacing:"initial",marginBottom:0,opacity:.01,pointerEvents:"none",top:"1.8rem"},color:r.colors.gray.medium,display:t?"flex":"block",fontSize:"1.3rem",left:0,letterSpacing:"0.1rem",lineHeight:"1.38rem",marginBottom:e?"0.4rem":"1.6rem",opacity:1,pointerEvents:"initial",position:"relative",textTransform:"uppercase",top:0,transition:"all 0.2s",width:"100%"})),""),u=(0,n.Z)("input",{target:"e1lzlosw0"})((({contentIsInvalid:e,theme:t})=>({color:e?t.colors.red.primary:t.colors.gray.medium,[`&:focus ~ ${h}`]:{"&.placeholderVisible":{color:t.colors.gray.medium},color:t.colors.gray.dark},"&.placeholderVisible":{height:"calc(100 % -1.8rem)"},"&::-ms-clear":{display:"none",width:0,height:0}})),""),p=(0,n.Z)(u,{target:"e1m39uy60"})({name:"1oglz34",styles:"border-radius:0.5rem;box-sizing:border-box;display:block;height:4.5rem;left:0;opacity:0;padding:0;position:absolute;top:0;vertical-align:top;width:100%;z-index:1"}),d=(0,n.Z)("span",{target:"e1pv59cr0"})((({theme:e})=>({color:e.colors.gray.medium,display:"inline-block",fontSize:"1.6rem",fontWeight:400,lineHeight:"2rem",letterSpacing:"-0.02rem",maxWidth:"83%",verticalAlign:"middle",zoom:"1"})),"");var g=r(51838),m=r.n(g),b=r(96832),v=r(34853);const f=["className","label","id","toolTip","value","dataTest","children"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{name:t,checked:r}=e.target,{onChange:o}=this.props;o(t,r,e)},this.onBlur=e=>{const{name:t,checked:r}=e.target,{onBlur:o}=this.props;this.setState({isOnFocus:!1}),o(t,r,e)},this.onFocus=e=>{const{name:t,checked:r}=e.target,{onFocus:o}=this.props;this.setState({isOnFocus:!0}),o(t,r,e)},this.state={isOnFocus:!1}}render(){const e=this.props,{className:t,label:r,id:s,toolTip:n,value:l,dataTest:h,children:u}=e,g=function(e,t){if(null==e)return{};var r,o,s={},n=Object.keys(e);for(o=0;o=0||(s[r]=e[r]);return s}(e,f);return(0,v.BX)("label",{className:m()(t),css:Z,children:[(0,v.BX)(i,{children:[(0,v.tZ)(c,{active:!!l,name:"check-skinny"}),(0,v.tZ)(p,y({},(0,o.Z)(g,["initialValue"]),{checked:!!l,"data-test":h,id:s,name:s,onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,title:n||r,type:"checkbox",value:!!l})),(0,v.tZ)(a,{active:!!this.state.isOnFocus})]}),(0,v.tZ)(d,{children:u||null})]})}}x.defaultProps={onChange:s.Z,value:!1};var O=r(45420),B=r(15039),k=r(81305);const C=["collapseLabelMargin","className","label","id","isSdk","toolTip","value","errorMessage","dataTest"];function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{value:t,name:r}=e.target,{onChange:o}=this.props;o(r,t)},this.onBlur=e=>{const{value:t,name:r}=e.target,{onBlur:o}=this.props;o(r,t)},this.onFocus=e=>{const{value:t,name:r}=e.target,{onFocus:o}=this.props;o(r,t)}}render(){const e=this.props,{collapseLabelMargin:t,className:r,label:s,id:n,isSdk:i=!1,toolTip:a,value:l,errorMessage:c,dataTest:p}=e,d=function(e,t){if(null==e)return{};var r,o,s={},n=Object.keys(e);for(o=0;o=0||(s[r]=e[r]);return s}(e,C);return(0,v.BX)(v.HY,{children:[(0,v.tZ)(h,{className:r,collapseMargin:t,dataTest:p,inputId:n,isSdk:i,label:s,placeholderVisible:!l,children:(0,v.tZ)(u,F({},(0,o.Z)(d,["initialValue"]),{contentIsInvalid:!!c,"data-test":`${p}-field`,id:n,name:n,onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,placeholder:s,title:a||s,value:l}))}),c?(0,v.tZ)(k.Z,{"data-test":`${p}-error-message-wrapper`,children:(0,v.tZ)(B.Z,{children:c})}):null]})}}S.defaultProps={collapseLabelMargin:!1,onBlur:s.Z,onChange:s.Z,onFocus:s.Z,type:"text",value:""};var w=r(7862),j=r.n(w),z=r(23587);const I=(0,n.Z)(l.Z,{target:"e102escx0"})((({theme:e})=>({bottom:"0.8rem",lineHeight:"1em",padding:"0 1.5rem",position:"absolute",right:"0","svg *":{fill:e.colors.black.secondary}})),""),V=(0,n.Z)("span",{target:"ess8o3u0"})((({active:e,theme:t})=>({backgroundColor:t.colors.white.primary,border:e?`1px solid ${t.colors.blueNew[500]}`:`1px solid ${t.colors.gray.light}`,borderRadius:"0.5rem",bottom:"0",height:"3.7rem",left:"-0.1rem",pointerEvents:"none",position:"absolute",right:"-0.1rem",width:"calc(100% - 2px)"})),"");function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;tE({},e.mixins.ellipsis,{bottom:0,color:e.colors.gray.medium,left:0,lineHeight:"3.7rem",maxWidth:"100%",padding:"0 3rem 0 1.5rem",pointerEvents:"none",position:"absolute"})),""),P=(0,n.Z)("select",{target:"e1y5mgij0"})((({placeholderVisible:e,theme:t})=>({"&:focus ~ labelWrapper":{color:e?t.colors.gray.medium:t.colors.gray.dark},cursor:"pointer",height:" 3.7rem",opacity:0,width:"100%",border:"1px transparent"})),""),M=["children","label","id","toolTip","value","text","dataTest"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{value:t,options:r,selectedIndex:o,name:s}=e.target,{text:n}=r[o];this.props.onChange(s,{text:n,value:t})},this.onBlur=e=>{const{value:t,options:r,selectedIndex:o,name:s}=e.target,{text:n}=r[o];this.setState({isOnFocus:!1}),this.props.onBlur(s,{text:n,value:t})},this.onFocus=e=>{const{value:t,options:r,selectedIndex:o,name:s}=e.target,{text:n}=r[o];this.setState({isOnFocus:!0}),this.props.onFocus(s,{text:n,value:t})},this.state={isOnFocus:!1}}placeholderIsVisible(){const{value:e,initialValue:t}=this.props;return!t||!e||(0,z.Z)(e,t)}render(){const e=this.props,{children:t,label:r,id:s,toolTip:n,value:i,text:a,dataTest:l}=e,c=function(e,t){if(null==e)return{};var r,o,s={},n=Object.keys(e);for(o=0;o=0||(s[r]=e[r]);return s}(e,M);return(0,v.BX)("div",{css:L,"data-test":l,id:s,children:[(0,v.tZ)(V,{active:!!this.state.isOnFocus}),(0,v.tZ)(T,{children:a||r}),(0,v.tZ)(I,{name:"caret-down"}),(0,v.tZ)(P,_({},(0,o.Z)(c,"initialValue"),{ariaLabel:r,id:s,name:s,onBlur:this.onBlur,onChange:this.onChange,onFocus:this.onFocus,placeholder:r,placeholderVisible:this.placeholderIsVisible(),title:n||r,value:i,children:t}))]})}}N.defaultProps={onBlur:s.Z,onChange:s.Z,onFocus:s.Z};const A=(0,O.Z)(j().string)(S),H=(0,O.Z)(j().shape({text:j().string,value:j().string}))(N),$=(0,O.Z)(j().bool)(x)},15039:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(46255).Z)("p",{target:"en4rmex0"})((({theme:e})=>({"&:before":{borderBottom:`0.7rem solid ${e.colors.gray.dark}`,borderLeft:"0.7rem solid transparent",borderRight:"0.7rem solid transparent",content:"''",height:0,left:"10%",position:"absolute",top:"-0.6rem",width:0},background:e.colors.gray.dark,borderRadius:"0.4rem",color:e.colors.white.primary,display:"block",fontSize:"1.3rem",fontWeight:"bold",left:e.dimensions.gutter,padding:"0.5rem 1rem",position:"absolute",top:"-1rem",zIndex:1})),"")},81305:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(46255).Z)("div",{target:"e1xh03vs0"})({name:"1fwhqt8",styles:"height:0;overflow:visible;position:relative"})}}]); //# sourceMappingURL=874.www.js.map