(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[22],{"26mJ":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n("q1tI"),r=n.n(a),o=n("zTlQ"),s=n("17x9"),i=n.n(s);class l extends r.a.PureComponent{constructor(...e){super(...e),this.onChange=e=>{this.props.input.onChange(e)},this.onBlur=e=>{this.props.input.onBlur(e)}}render(){const{label:e,type:t,disabled:n,id:a,input:{value:s},meta:{touched:i,error:l,warning:c},unit:u,required:p,optionalProps:h,className:d,min:m,autofocus:g,placeholder:f}=this.props;return r.a.createElement(o.a,{className:d,required:p,disabled:n,label:e,type:t,onChange:e=>this.onChange(e),id:a,value:s,error:i&&l?l:"",unit:u,optionalProps:h,placeholder:f,warning:i&&c?c:"",min:m||0,autofocus:g,onBlur:this.onBlur})}}l.propTypes={label:i.a.string.isRequired,type:i.a.string.isRequired,unit:i.a.string,id:i.a.string,optionalProps:i.a.object},l.defaultProps={optionalProps:{}}},"2dKy":function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n("q1tI"),r=n.n(a),o=n("17x9"),s=n.n(o),i=(n("2yfn"),n("OwcS")),l=n("CuyV"),c=n("uSQv");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t{let t=!0;if(this.props.onKeyDown&&(t=this.props.onKeyDown(e)),t){if((38===e.which||40===e.which&&["datetime-local","number"].includes(this.props.type))&&e.preventDefault(),40===e.which){let e=[...document.getElementsByTagName("input")],t=this.input.getBoundingClientRect(),n=e.filter(e=>e.getBoundingClientRect().y>t.y),a=this.findClosestsInXInput(n,t);a&&a.select()}if(38===e.which){let e=[...document.getElementsByTagName("input")],t=this.input.getBoundingClientRect(),n=e.filter(e=>e.getBoundingClientRect().yt.getBoundingClientRect().y-e.getBoundingClientRect().y);let a=this.findClosestsInXInput(n,t);a&&a.select()}}},this.onChange=e=>{try{const{type:t,onChangeWithEvent:n}=this.props;if("file"===t)this.props.onChange(e);else{let t=e.target.value;this.props.onChange(n?e:t)}}catch(e){console.error(e)}},this.onClick=e=>{e.stopPropagation(),this.props.onClick&&this.props.onClick(e)},this.disableMouseWheel=e=>{e.preventDefault()},this.onBlur=e=>{const{type:t}=this.props;this.props.onBlur&&this.props.onBlur(e),"number"===t&&this.input.removeEventListener("mousewheel",this.disableMouseWheel)},this.onFocus=e=>{const{onFocus:t,type:n}=this.props;t&&t(e),"number"===n&&this.input&&this.input.addEventListener("mousewheel",this.disableMouseWheel)},this.selectFile=()=>{const{id:e}=this.props;document.getElementById(e).click()},this.onCreate=(e,t,n,a,o,s,i,l,d,m,g,f)=>{const{frName:b}=this.props;try{return"file"===e?r.a.createElement("div",null,r.a.createElement(c.a,{type:"button",buttonColor:"primary",onClick:this.selectFile},b),r.a.createElement("input",h({type:e,id:t,disabled:n,readOnly:a,value:o,style:{display:"none"},ref:e=>this.input=e,min:i,onChange:this.onChange},l,{name:d}))):r.a.createElement("textarea"===e?"textarea":"input",function(e){for(var t=1;tthis.input=e,onBlur:this.onBlur,min:i},l,{pattern:"number"===e?"\\d*":void 0,inputMode:"number"===e?"numeric":void 0,onFocus:this.onFocus,onChange:this.onChange,name:d,lang:m,style:f}))}catch(y){console.error(y)}}}findClosestsInXInput(e,t){let n,a;for(let r of e){let e=r.getBoundingClientRect();if(a){let o=Math.abs(t.x-e.x);o{},readOnly:!1,onClick:e=>{},value:"",placeholder:"",onBlur:()=>{},optionalProps:{},onFocus:()=>{},onKeyDown:()=>{}}},"2seT":function(e,t,n){},"2yfn":function(e,t,n){},GQws:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a=n("Y+p1"),r=n.n(a),o=n("q1tI"),s=n.n(o),i=n("17x9"),l=n.n(i),c=(n("Or1d"),n("y6dH")),u=n("CuyV"),p=n("wd/R"),h=n.n(p),d=n("kiXb"),m=n("wQVC");class g extends s.a.Component{constructor(...e){super(...e),this.onhover=e=>{e.preventDefault(),Object(m.h)(e.currentTarget)&&e.currentTarget.setAttribute("style","overflow:visible; width:max-content !important;")},this.onleave=e=>{e.preventDefault(),e.currentTarget.setAttribute("style","")},this.renderOption=({value:e,svgPath:t,label:n,disabled:a,drafts:o},i,l,p)=>s.a.createElement("div",{className:"option-item",style:{flex:"0 0 ".concat(100/this.props.itemsInRow,"%")}},s.a.createElement("div",{className:"circle-container".concat(r()(i,e)?" selected":"").concat(a?" disabled":""),onClick:a?null:()=>this.props.onChange(e,n)},s.a.createElement(c.a,{src:t,loading:()=>s.a.createElement("svg",{viewBox:"0 0 270.93334 270.93334"})})),l&&s.a.createElement("div",{className:"label",onMouseOver:e=>this.onhover(e),onMouseLeave:e=>this.onleave(e),onClick:a?null:()=>this.props.onChange(e,n)},n),o&&o.length>0&&s.a.createElement(u.a,{tooltipContent:this.props.getDraftTooltip(o),type:"info"},s.a.createElement("div",{className:"draft"},s.a.createElement("i",{className:"fas fa-file"}))))}render(){const{options:e,required:t,value:n,showLabels:a,label:r}=this.props;return s.a.createElement(s.a.Fragment,null,r&&s.a.createElement("label",null,r,t&&s.a.createElement("sup",null,"*")),s.a.createElement("div",{className:"fetura-item-picker"},e.map(e=>this.renderOption(e,n,a))))}}g.propTypes={value:l.a.oneOf([l.a.string,l.a.number,l.a.object]),options:l.a.arrayOf(l.a.shape({value:l.a.oneOf([l.a.string,l.a.number,l.a.object]).isRequired,svgPath:l.a.string,label:l.a.string,disabled:l.a.bool,drafts:l.a.array})),label:l.a.string,onChange:l.a.func,showLabels:l.a.bool,required:l.a.bool,itemsInRow:l.a.number,getDraftTooltip:l.a.func},g.defaultProps={optionsInSingleRow:4,showLabels:!1,onChange:()=>{},itemsInRow:5,getDraftTooltip:e=>s.a.createElement(s.a.Fragment,null,s.a.createElement("div",null,d.a.t("foundDrafts")),e.map((e,t)=>s.a.createElement("div",{key:t},h()(e.time).format("DD.MM.YYYY"))))}},IcrQ:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n("J2iB"),r=n.n(a),o=n("q1tI"),s=n.n(o),i=n("17x9"),l=n.n(i),c=(n("TDvx"),n("y6dH")),u=n("CuyV");class p extends s.a.Component{render(){const{icon:e,value:t,name:n,showWhenValueNotFound:a,disabledTooltip:o}=this.props;return a||!r()(t)&&!t.includes("-")?s.a.createElement("div",{className:"fetura-icon-value"},s.a.createElement("div",{className:"fetura-icon-value-container"},s.a.createElement(u.a,{tooltipContent:o?null:n,placement:"auto-end"},s.a.createElement("div",{className:"fetura-icon-value-svg"},s.a.createElement(c.a,{src:e})))),s.a.createElement(u.a,{tooltipContent:o?null:n,placement:"auto-end"},s.a.createElement("span",null,t))):null}}p.propTypes={icon:l.a.object.isRequired,name:l.a.string.isRequired,value:l.a.node.isRequired,showWhenValueNotFound:l.a.bool,disabledTooltip:l.a.bool},p.defaultProps={showWhenValueNotFound:!0}},MOzw:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n("GoyQ"),r=n.n(a),o=n("UB5X"),s=n.n(o),i=n("Znm+"),l=n.n(i),c=n("q1tI"),u=n.n(c),p=n("17x9"),h=n.n(p);n("doak");const d=e=>l()(e)?e?"\u2713":"\u2717":u.a.isValidElement(e)?e:r()(e)?JSON.stringify(e):e;class m extends u.a.Component{constructor(...e){super(...e),this.getData=(e=this.props)=>{const{json:t=[]}=e;let n=this.isArray(t)?t:this.objectToArray(t);return this.isArray(n)||(n=[]),n},this.arrayToTable=e=>{console.log(e);const t=(e,n=1,a="")=>{let r=new Set;for(let s=0;sr.add(e))}let o=Array.from(r),i=e.map(()=>[]);for(let l=0;l""!==e).join(".")),s()(c)&&c++):this.isObject(u)?i[l][e]=t(this.objectToArray(u,u.$_key),n+1,[a,u.$_key].filter(e=>""!==e).join(".")):("$_key"===o[e]&&(c=u),i[l][e]={isKey:"$_key"===o[e],value:u,path:"$_key"!==o[e]?[a,c].filter(e=>""!==e).join("."):""})}else i[l][o.length]={isKey:!1,value:r,path:a}}return this.tableToHtml(o,i,n)};return t(e)},this.objectToArray=(e,t="")=>{if(this.isObject(e)){let n=[];for(let a in e)n.push({$_key:a,$_value:this.objectToArray(e[a],[t,a].filter(e=>""!==e).join("."))});return n}if(this.isArray(e)){let n=[];for(let a of e)this.isObject(e)?(console.log(JSON.stringify(e)),n.push(this.objectToArray(e,t))):(console.log(JSON.stringify(a)," LDLDdd"),n.push({$_key:n.length,$_value:this.objectToArray(a,[t,n.length].filter(e=>""!==e).join("."))}));return n}return e},this.tableToHtml=(e,t,n)=>{const{cellRenderer:a}=this.props;return u.a.createElement("table",{cellSpacing:"0",className:"depth-".concat(n)},u.a.createElement("thead",null,e.filter(e=>!e.startsWith("$_")).map(e=>u.a.createElement("th",null,e))),u.a.createElement("tbody",null,t.map(e=>{let t=[];for(let n=0;ne).join(" "),{style:t}=this.props,n=this.getData(this.props);return u.a.createElement("div",{style:t,className:e},this.arrayToTable(n))}}m.propTypes={className:h.a.string,json:h.a.oneOf([h.a.array,h.a.object]),cellRenderer:h.a.func,style:h.a.object},m.defaultProps={className:"",json:[],cellRenderer:d}},Or1d:function(e,t,n){},PjVZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n("q1tI"),r=n.n(a),o=n("17x9"),s=n.n(o);n("hoY3");class i extends r.a.Component{render(){const{highlightColor:e,children:t,onClick:n,style:a}=this.props;return r.a.createElement("span",{style:a,className:"fetura-highlight ".concat(e," ").concat(n?"pointer":""),onClick:n},t)}}i.propTypes={highlightColor:s.a.oneOf(["primary","secondary","success","info","warning","error",""]),onClick:s.a.func,style:s.a.object},i.defaultProps={highlightColor:"",style:{}}},TDvx:function(e,t,n){},"XSU/":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var a,r=n("Y+p1"),o=n.n(r),s=n("q1tI"),i=n.n(s),l=n("17x9"),c=n.n(l),u=(n("2seT"),n("uSQv")),p=n("9D2Z"),h=n("kG49"),d=n("v9qu"),m=n("/MKj"),g=n("CuyV");let f=Object(m.connect)(e=>({lang:e.language.lang.lang}))(a=class extends i.a.Component{constructor(e){super(e),this.getTabOffset=()=>{try{return document.getElementsByClassName("menu-button-container").item(0).clientWidth||0}catch(e){return console.error(e),0}},this.onTabsContainerResize=e=>{clearTimeout(this.timer),this.timer=setTimeout(()=>{try{let t=this.tabContainer?this.tabContainer.clientWidth:0,n=0,a=0;for(let e=0;e{this.setState({active:e}),this.props.onTabChange(e)},this.onTabsButtonClick=e=>{this.setState({event:e})},this.renderTabs=()=>{const{tabs:e}=this.props,{maxItems:t,event:n,timestamp:a}=this.state;let r=[],o=[];for(let s=0;sthis.onTabClick(s),buttonRef:e=>this.tabs[s]=e,key:s},e[s].name));if(t!==e.length)for(let s=t;sthis.onTabClick(s),buttonColor:""},e[s].name));return i.a.createElement(i.a.Fragment,null,r,0!==o.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"menu-button-container"},i.a.createElement(u.a,{buttonStyle:"text",className:"menu-button",icon:i.a.createElement("i",{className:"fas fa-ellipsis-v"}),onClick:this.onTabsButtonClick})),i.a.createElement(p.a,{event:n},o)))},this.state={active:void 0===e.active?0:e.active,maxItems:e.tabs.length,widthsOfItems:[],event:null,mobile:Object(d.a)()},this.tabs=[]}shouldComponentUpdate(e,t,n){return!o()(this.state,t)||!o()(this.props.text,e.text)||!o()(this.props.lang,e.lang)||!o()(this.props.tabs,e.tabs)}componentDidMount(){window.addEventListener("resize",this.onTabsContainerResize),this.onTabsContainerResize({timestamp:0})}UNSAFE_componentWillReceiveProps(e,t){this.state.active!==e.active&&this.setState({active:e.active})}componentWillUnmount(){window.removeEventListener("resize",this.onTabsContainerResize),clearTimeout(this.timer)}getTooltipContent(){const{text:e}=this.props;let t=Array.isArray(e)?e:[e];for(let n of t){if("object"!==typeof n)return n;let e=n.props.children.find(e=>"object"!==typeof e);if(e)return e}}render(){const{text:e,tabs:t}=this.props,{mobile:n}=this.state;let a=n?"mobile":null;return i.a.createElement(i.a.Fragment,null,i.a.createElement("header",{className:a,id:"app-header"},i.a.createElement("h2",null,n&&i.a.createElement(g.a,{tooltipContent:this.getTooltipContent(),placement:"bottom"},i.a.createElement("div",null,e)),!n&&i.a.createElement("div",null,e)),t.length>0&&i.a.createElement("div",{className:"tabs",ref:e=>this.tabContainer=e},this.renderTabs())))}})||a;f.propTypes={text:c.a.string.isRequired,tabs:c.a.arrayOf(c.a.shape({name:c.a.string.isRequired})),onTabChange:c.a.func,active:c.a.number},f.defaultProps={tabs:[],onTabChange:e=>{}}},ZXlx:function(e,t,n){"use strict";var a=n("q1tI"),r=n.n(a),o=n("17x9"),s=n.n(o);class i extends a.Component{constructor(...e){super(...e),this.name=()=>{const{text:e,searchText:t}=this.props,n=t.toLowerCase(),a=e.toLowerCase(),o=n.length,s=a.split(n),i=[];let l=0;return s.forEach((t="",n)=>{console.log(l,t.length,e.substr(l,t.length)),i.push(e.substr(l,t.length)),l+=t.length,i.push(r.a.createElement("span",{className:"color-success"},e.substr(l,o).replace(/ /g,"\xa0"))),l+=Math.max(0,o)}),i}}render(){const{searchText:e,text:t}=this.props;return e?this.name():t}}i.propTypes={text:s.a.string.isRequired,searchText:s.a.string.isRequired},t.a=i},a4gc:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n("q1tI"),r=n.n(a),o=n("GQws"),s=n("17x9"),i=n.n(s);class l extends r.a.Component{constructor(...e){super(...e),this.onChange=e=>{this.props.input.onChange(e)}}render(){const{required:e,meta:{error:t,warning:n},input:{value:a},showLabels:s,options:i,label:l,itemsInRow:c}=this.props;return r.a.createElement(o.a,{required:e,label:l,error:t,warning:n,value:a,options:i,showLabels:s,onChange:this.onChange,itemsInRow:c})}}l.propTypes={options:i.a.arrayOf(i.a.shape({value:i.a.oneOf([i.a.string,i.a.number,i.a.object]).isRequired,svgPath:i.a.string.isRequired,label:i.a.string})),label:i.a.string,showLabels:i.a.bool,required:i.a.bool,itemsInRow:i.a.number}},doak:function(e,t,n){},hoY3:function(e,t,n){},lAGl:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n("q1tI"),r=n.n(a),o=n("17x9"),s=n.n(o),i=n("2dKy");class l extends r.a.PureComponent{constructor(...e){super(...e),this.onChange=e=>{this.props.input.onChange(e)},this.onBlur=e=>{this.props.input.onBlur(e)}}render(){const{type:e,id:t,disabled:n,readOnly:a,placeholder:o,unit:s,className:l,icon:c,onClick:u,meta:{touched:p,error:h,warning:d},input:{value:m},showIconOnErrorOnWarning:g,min:f}=this.props;return r.a.createElement(i.a,{type:e,onChange:e=>this.onChange(e),onBlur:e=>this.onBlur(e),id:t,value:m,error:p&&h?h:"",warning:p&&d?d:"",unit:s,disabled:n,readOnly:a,placeholder:o,className:l,icon:c,onClick:u,showIconOnErrorOnWarning:g,min:f||0})}}l.propTypes={type:s.a.string.isRequired,className:s.a.string,id:s.a.string,disabled:s.a.bool,icon:s.a.element,readOnly:s.a.bool,onClick:s.a.func,placeholder:s.a.node,unit:s.a.string,showIconOnErrorOnWarning:s.a.bool}},vzZS:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n("Y+p1"),r=n.n(a),o=n("q1tI"),s=n.n(o),i=n("17x9"),l=n.n(i);n("zUOo");class c extends s.a.Component{shouldComponentUpdate(e,t,n){return!r()(this.props,e)}render(){const{boxColor:e,fixed:t,onClick:n,children:a,className:r}=this.props,o=["fetura-info-box",e?"".concat(e):"",t?"fixed":"",n?"pointer":"",r].filter(e=>!!e).join(" ");return s.a.createElement("div",{className:o,onClick:n},a)}}c.propTypes={boxColor:l.a.oneOf(["primary","secondary","success","info","warning","error",""]),fixed:l.a.bool,className:l.a.string,onClick:l.a.func},c.defaultProps={boxColor:"info",fixed:!1}},zTlQ:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n("q1tI"),r=n.n(a),o=n("17x9"),s=n.n(o),i=n("2dKy"),l=n("OwcS");class c extends r.a.PureComponent{constructor(...e){super(...e),this.onChange=e=>{this.props.onChange(e)},this.onBlur=e=>{this.props.onBlur(e)}}render(){const{id:e,label:t,type:n,disabled:a,value:o,error:s,unit:l,required:c,optionalProps:u,className:p,frName:h,name:d,onChangeWithEvent:m,min:g,autofocus:f,placeholder:b,warning:y}=this.props;return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{htmlFor:e},t,c&&r.a.createElement("sup",null,"*")),r.a.createElement(i.a,{className:p,disabled:a,type:n,id:e,onChange:e=>this.onChange(e),value:o,frName:h,min:g,error:s,unit:l,optionalProps:u,onBlur:this.onBlur,name:d,onChangeWithEvent:m,autofocus:f,placeholder:b,warning:y}))}}c.propTypes={label:s.a.string.isRequired,type:s.a.string.isRequired,id:s.a.string,onChange:s.a.func,onBlur:s.a.func,value:s.a.oneOfType([s.a.string,s.a.number]),error:s.a.string,unit:s.a.string,className:s.a.string,required:s.a.bool,frName:s.a.string,name:s.a.string,onChangeWithEvent:s.a.bool},c.defaultProps={id:Object(l.a)(),required:!1,onChange:e=>{},onBlur:e=>{},optionalProps:{}}},zUOo:function(e,t,n){}}]); //# sourceMappingURL=main~2dd1f6f7.2d9d2e7b.chunk.js.map