2 lines
No EOL
460 KiB
JavaScript
2 lines
No EOL
460 KiB
JavaScript
(this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[]).push([[0],{573:function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),i=n(34),o=n.n(i),c=n(4),l=n(5),s=n(74),d=n(695),u=n(626),m=n(578),h=n(699),b=n(620),p=n(718),j=n(694),f=n(57),g=n(278),O=n(107),x=n(56),v=n(3),y=n(6),w=n.n(y);function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function k(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var S=r.createElement("desc",null,"Created with Sketch."),N=r.createElement("g",{id:"icon/stage/zodiac/complete",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval",stroke:"#1B2559",transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}),r.createElement("path",{d:"M7.80983711,12 C7.54819546,12 7.28655382,11.9032616 7.08725647,11.710772 L5.29971255,9.98428824 C4.90009582,9.59832189 4.90009582,8.97445811 5.29971255,8.58849175 C5.69932929,8.2025254 6.34525711,8.2025254 6.74487384,8.58849175 L7.80983711,9.61707728 L11.2551262,6.28947477 C11.6547429,5.90350841 12.3016927,5.90350841 12.7002874,6.28947477 C13.0999042,6.674454 13.0999042,7.2993049 12.7002874,7.68527125 L8.53241776,11.710772 C8.33312041,11.9032616 8.07147876,12 7.80983711,12",id:"Path",fill:"#1B2559"}));function E(e,t){var n=e.title,a=e.titleId,i=k(e,["title","titleId"]);return r.createElement("svg",C({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,S,N)}var I=r.forwardRef(E);n.p;function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var P=r.createElement("desc",null,"Created with Sketch."),B=r.createElement("g",{id:"icon/stage/zodiac/current",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval-2-Copy",fill:"#1B2559",cx:9,cy:9,r:4}),r.createElement("circle",{id:"Oval-Copy-5",stroke:"#1B2559",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function D(e,t){var n=e.title,a=e.titleId,i=F(e,["title","titleId"]);return r.createElement("svg",L({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,P,B)}var R=r.forwardRef(D);n.p;function T(){return(T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var W=r.createElement("desc",null,"Created with Sketch."),z=r.createElement("g",{id:"icon/stage/zodiac/empty",stroke:"none",strokeWidth:2,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval-Copy-6",stroke:"#5F668A",transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function M(e,t){var n=e.title,a=e.titleId,i=A(e,["title","titleId"]);return r.createElement("svg",T({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,W,z)}var H=r.forwardRef(M),q=(n.p,"#5f668a"),$="#44e188",V="#ecfbef",Y="#3fd07e",X="#ebefff",U="#dbdfed",G="#16d6d3",Z="#5a67ff",_="#ffffff",K="#ff584a",Q="#ffeceb",J="#1b2559",ee="#48f694",te=$,ne=Y,re="#fafbff",ae=X,ie=U,oe="#dddddd",ce="#f2f2f2",le=J,se=q,de="#72799d",ue=q,me=K,he=1200,be=ee,pe="Mont",je="MuseoSans",fe=24,ge=20,Oe=16,xe=14,ve=13;var ye=ve,we=xe,Ce=Oe,ke=fe,Se=je,Ne=32,Ee=48;var Ie,Le=2*Ne,Fe=J,Pe=Q,Be=V,De={lineHeight:"120%",color:le},Re={h1:{extend:De,fontSize:fe,fontFamily:pe,fontWeight:900},h2:{extend:De,fontSize:ge,fontFamily:pe,fontWeight:900},h3:{extend:De,fontSize:xe,fontFamily:pe,fontWeight:900},h4:{extend:De,fontSize:xe,fontFamily:pe,fontWeight:700},h5:{extend:De,fontSize:Oe,fontFamily:pe,fontWeight:700},p:{extend:De,fontSize:xe,fontFamily:je,fontWeight:500},tl1:{extend:De,fontSize:ge,fontFamily:je,fontWeight:700},tl2:{extend:De,fontSize:xe,fontFamily:je,fontWeight:700},info1:{extend:De,fontSize:fe,fontFamily:je,fontWeight:700},info2:{extend:De,fontSize:Oe,fontFamily:je,fontWeight:700},info3:{extend:De,fontSize:Oe,fontFamily:je,fontWeight:500},mono:{extend:De,fontSize:xe,fontFamily:"BPmono",fontWeight:500},monoBold:{fontWeight:700},monoSmall:{fontSize:ve},inputFont:{fontSize:ge,fontFamily:je,fontWeight:500,lineHeight:"110%",color:le},regularLabel:{fontSize:xe,fontFamily:je,fontWeight:500,lineHeight:"110%"},label1:{fontSize:ve,fontFamily:je,fontWeight:500,color:le},label2:{fontSize:ve,fontFamily:je,fontWeight:700,color:le},label3:{fontSize:xe,fontFamily:je,fontWeight:500,color:le},inline:{display:"inline"},noMargin:{margin:0}},Te=function(e){switch(e){case"sm":return{fontSize:we};case"lg":return{fontSize:ke,fontWeight:700};default:return{fontSize:Ce}}},Ae={fontWeight:700},We=Re.tl2,ze=Re.p,Me=X,He={sidebar:Object(v.a)({display:"flex",backgroundColor:Me,width:520,marginLeft:-300,boxShadow:"-500px 0px 0px 0px ".concat(Me),borderRadius:"0 20px 0 0",alignItems:"flex-end",padding:24,flexDirection:"column"},(Ie=1440,"@media only screen and (max-width: ".concat(Ie,")")),{width:"auto",marginLeft:0,minWidth:250,boxShadow:"-200px 0px 0px 0px ".concat(Me)}),link:{extend:ze,position:"relative",color:ue,margin:"12px 24px 12px 0",cursor:"pointer","&:hover::after":{height:"140%"},"&:after":{content:'""',display:"block",background:J,width:4,height:0,left:"100%",marginLeft:20,bottom:-2,position:"absolute",borderRadius:1e3,transition:"all 0.2s cubic-bezier(0.95, 0.1, 0.45, 0.94)"}},activeLink:{extend:We,color:J,"&::after":{height:"140%"}},customRenderLink:{"&:hover::after":{height:"100%"},"&:after":{bottom:0}},customRenderActiveLink:{"&::after":{height:"100%"}},item:{position:"relative",margin:"12px 0 12px 0",display:"flex"},itemText:{extend:ze,color:ue,marginRight:24},itemTextActive:{extend:We,color:J},itemTextPast:{color:J},stepperPath:{position:"absolute",height:25,width:1,border:[[1,"solid",ue]],right:8,top:18},stepperPast:{border:[[1,"solid",J]]}},qe=n(0),$e=Object(b.a)(He),Ve=function(e){var t=e.data,n=e.displayName,r=e.isSelected,a=e.onClick,i=e.children,o=e.itemRender,c=$e();return Object(qe.jsxs)("div",{className:c.sidebar,children:[t&&t.map((function(e,t){var i;return Object(qe.jsx)("div",{className:w()((i={},Object(v.a)(i,c.activeLink,r(e)),Object(v.a)(i,c.customRenderActiveLink,o&&r(e)),Object(v.a)(i,c.customRenderLink,o),Object(v.a)(i,c.link,!0),i)),onClick:function(){return a(e)},children:o?o(e,r(e)):n(e)},t)})),i]})},Ye=function(e){var t,n,r=e.step,a=e.it,i=e.idx,o=e.steps,c=$e(),l=r===i,s=i<r,d=i>r;return Object(qe.jsxs)("div",{className:c.item,children:[Object(qe.jsx)("span",{className:w()((t={},Object(v.a)(t,c.itemText,!0),Object(v.a)(t,c.itemTextActive,l),Object(v.a)(t,c.itemTextPast,s),t)),children:a.label}),l&&Object(qe.jsx)(R,{}),s&&Object(qe.jsx)(I,{}),d&&Object(qe.jsx)(H,{}),i<o.length-1&&Object(qe.jsx)("div",{className:w()((n={},Object(v.a)(n,c.stepperPath,!0),Object(v.a)(n,c.stepperPast,s),n))})]})},Xe=n(698),Ue=n(18);function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ze(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _e=r.createElement("desc",null,"Created with Sketch."),Ke=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/warning-icon/tomato"},r.createElement("rect",{id:"Rectangle",stroke:"#FF584A",strokeWidth:2,x:1,y:1,width:22,height:22,rx:11}),r.createElement("path",{d:"M11.2971429,14.4857143 L11.1085714,5.82857143 L13.3714286,5.82857143 L13.2,14.4857143 L11.2971429,14.4857143 Z M11.1942857,18 L11.1942857,15.9771429 L13.3028571,15.9771429 L13.3028571,18 L11.1942857,18 Z",id:"!",fill:"#FF584A",fillRule:"nonzero"})));function Qe(e,t){var n=e.title,a=e.titleId,i=Ze(e,["title","titleId"]);return r.createElement("svg",Ge({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,_e,Ke)}var Je=r.forwardRef(Qe),et=(n.p,Object(b.a)(Re));function tt(e){var t,n=e.children,r=e.noMargin,a=e.className,i=Object(Ue.a)(e,["children","noMargin","className"]),o=et(),c=(t={},Object(v.a)(t,o.h1,!0),Object(v.a)(t,o.noMargin,r),Object(v.a)(t,a,!!a),t);return Object(qe.jsx)("h1",Object(l.a)(Object(l.a)({className:w()(c)},i),{},{children:n}))}function nt(e){var t,n=e.children,r=e.noMargin,a=e.className,i=Object(Ue.a)(e,["children","noMargin","className"]),o=et(),c=(t={},Object(v.a)(t,o.h2,!0),Object(v.a)(t,o.noMargin,r),Object(v.a)(t,a,!!a),t);return Object(qe.jsx)("h2",Object(l.a)(Object(l.a)({className:w()(c)},i),{},{children:n}))}function rt(e){var t,n=e.children,r=e.noMargin,a=e.className,i=Object(Ue.a)(e,["children","noMargin","className"]),o=et(),c=(t={},Object(v.a)(t,o.h3,!0),Object(v.a)(t,o.noMargin,r),Object(v.a)(t,a,!!a),t);return Object(qe.jsx)("h3",Object(l.a)(Object(l.a)({className:w()(c)},i),{},{children:n}))}function at(e){var t,n=e.children,r=e.noMargin,a=e.className,i=Object(Ue.a)(e,["children","noMargin","className"]),o=et(),c=(t={},Object(v.a)(t,o.h4,!0),Object(v.a)(t,o.noMargin,r),Object(v.a)(t,a,!!a),t);return Object(qe.jsx)("h4",Object(l.a)(Object(l.a)({className:w()(c)},i),{},{children:n}))}function it(e){var t,n=e.children,r=e.noMargin,a=e.className,i=Object(Ue.a)(e,["children","noMargin","className"]),o=et(),c=(t={},Object(v.a)(t,o.h5,!0),Object(v.a)(t,o.noMargin,r),Object(v.a)(t,a,!!a),t);return Object(qe.jsx)("h5",Object(l.a)(Object(l.a)({className:w()(c)},i),{},{children:n}))}var ot=pt("p"),ct=pt("info1"),lt=pt("info2"),st=pt("info3"),dt=(pt("mono"),pt("tl1")),ut=pt("tl2"),mt=pt("label1"),ht=pt("label2"),bt=pt("label3");function pt(e){return function(t){var n,r=t.inline,a=t.noMargin,i=t.className,o=t.children,c=Object(Ue.a)(t,["inline","noMargin","className","children"]),s=et(),d=(n={},Object(v.a)(n,i,!!i),Object(v.a)(n,s[e],e),Object(v.a)(n,s.inline,r),Object(v.a)(n,s.noMargin,a),n);return Object(qe.jsx)("p",Object(l.a)(Object(l.a)({className:w()(d)},c),{},{children:o}))}}var jt={wrapper:{display:"flex",alignItems:"center","& > svg":{marginRight:10}},message:{display:"flex",alignItems:"center",color:me,margin:0,whiteSpace:"break-spaces"}},ft=Object(b.a)(jt),gt=function(e){var t=e.className,n=e.children,r=(Object(Ue.a)(e,["className","children"]),ft());return Object(qe.jsxs)("div",{className:w()(r.wrapper,t),children:[Object(qe.jsx)(Je,{}),Object(qe.jsx)(st,{className:r.message,children:n})]})},Ot=Object(b.a)({title:{marginTop:24,marginBottom:24}}),xt=Object(r.memo)((function(e){var t=e.children,n=Ot();return Object(qe.jsx)(tt,{className:n.title,children:t})})),vt=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},yt={actionButton:{extend:Re.p,cursor:"pointer",border:"none",height:28,outline:0,borderRadius:6,padding:"0 8px",display:"flex",alignItems:"center"},primary:{extend:vt(ae,ie,se),"&:active":{color:_,"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},"& $actionButtonIconActive":{display:"none"}},secondary:{extend:vt(se,de,_),color:_,"&:active":{color:le,"& $actionButtonIcon":{display:"flex"},"& $actionButtonIconActive":{display:"none"}},"& $actionButtonIcon":{display:"none"},"& $actionButtonIconActive":{display:"flex"}},actionButtonIcon:{display:"flex",paddingRight:7,"@global":{svg:{width:14,height:14}}},actionButtonIconActive:{}},wt=Object(b.a)(yt),Ct=Object(r.memo)((function(e){var t,n=e.className,r=e.Icon,a=e.InverseIcon,i=e.color,o=e.children,c=Object(Ue.a)(e,["className","Icon","InverseIcon","color","children"]),s=wt(),d=(t={},Object(v.a)(t,s.actionButton,!0),Object(v.a)(t,s.primary,"primary"===i),Object(v.a)(t,s.secondary,"secondary"===i),t);return Object(qe.jsxs)("button",Object(l.a)(Object(l.a)({className:w()(d,n)},c),{},{children:[r&&Object(qe.jsx)("div",{className:s.actionButtonIcon,children:Object(qe.jsx)(r,{})}),a&&Object(qe.jsx)("div",{className:w()(s.actionButtonIcon,s.actionButtonIconActive),children:Object(qe.jsx)(a,{})}),o&&Object(qe.jsx)("div",{children:o})]}))}));function kt(){return(kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Nt=r.createElement("desc",null,"Created with Sketch."),Et=r.createElement("g",{id:"icon/button/add/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11.5384615,6 C11.5384615,9.05815385 9.05815385,11.5384615 6,11.5384615 C2.94184615,11.5384615 0.461538462,9.05815385 0.461538462,6 C0.461538462,2.94184615 2.94184615,0.461538462 6,0.461538462 C9.05815385,0.461538462 11.5384615,2.94184615 11.5384615,6 Z",id:"Stroke-1",stroke:"#1B2559"}),r.createElement("line",{x1:6,y1:3.69230769,x2:6,y2:8.30769231,id:"Stroke-3",stroke:"#1B2559"}),r.createElement("line",{x1:3.69230769,y1:6,x2:8.30769231,y2:6,id:"Stroke-5",stroke:"#1B2559"}));function It(e,t){var n=e.title,a=e.titleId,i=St(e,["title","titleId"]);return r.createElement("svg",kt({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Nt,Et)}var Lt=r.forwardRef(It),Ft=(n.p,{button:{extend:Re.p,border:"none",backgroundColor:X,cursor:"pointer",outline:0,display:"flex",justifyContent:"center",alignItems:"center",width:167,height:48,color:le,"&:hover":{backgroundColor:U},"&:active":{backgroundColor:q,color:_,"& svg g *":{stroke:_}},"& svg":{marginRight:8}}}),Pt=Object(b.a)(Ft),Bt=Object(r.memo)((function(e){var t=e.className,n=e.children,r=Object(Ue.a)(e,["className","children"]),a=Pt();return Object(qe.jsxs)("button",Object(l.a)(Object(l.a)({className:w()(a.button,t)},r),{},{children:[Object(qe.jsx)(Lt,{}),n]}))})),Dt=Re.h1,Rt=Re.h3,Tt=function(e){switch(e){case"xl":return 61;case"sm":return 32;case"lg":default:return 40}},At={wrapper:function(e){var t=e.size,n=Tt(t);return{height:n+n/12/2}},button:function(e){var t=e.size,n=Tt(t),r="xl"===t?3:n/12;return{extend:"xl"===t?Dt:Rt,border:"none",color:_,cursor:"pointer",fontWeight:900,outline:0,backgroundColor:ee,"&:disabled":{backgroundColor:oe,boxShadow:"none","&:hover":{backgroundColor:oe,boxShadow:"none"},"&:active":{marginTop:0}},shadowSize:r,height:n,padding:"0 ".concat("xl"===t?20:n/2,"px"),borderRadius:n/4,boxShadow:"0 ".concat(r,"px ").concat(te),"&:hover":{backgroundColor:te,boxShadow:"0 ".concat(r,"px ").concat(ne)},"&:active":{marginTop:r/2,backgroundColor:te,boxShadow:"0 ".concat(r/2,"px ").concat(ne)}}}},Wt=Object(b.a)(At),zt=Object(r.memo)((function(e){var t=e.size,n=void 0===t?"lg":t,r=e.children,a=e.className,i=Object(Ue.a)(e,["size","children","className"]),o=Wt({size:n});return Object(qe.jsx)("div",{className:w()(a,o.wrapper),children:Object(qe.jsx)("button",Object(l.a)(Object(l.a)({className:o.button},i),{},{children:r}))})})),Mt=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},Ht={baseButton:{extend:Mt(ae,ie,se),cursor:"pointer",border:"none",outline:0,height:32,color:le,"&:active":{color:_}},primary:{extend:Mt(ae,ie,se),"&:active":{color:_,"& $buttonIcon":{display:"none"},"& $buttonIconActive":{display:"block"}},"& $buttonIconActive":{display:"none"}},secondary:{extend:Mt(se,de,_),color:_,"&:active":{color:le,"& $buttonIcon":{display:"flex"},"& $buttonIconActive":{display:"none"}},"& $buttonIcon":{display:"none"},"& $buttonIconActive":{display:"flex"}}},qt=Ht.baseButton,$t=Ht.primary,Vt={featureButton:{extend:qt,width:qt.height,borderRadius:qt.height/2,display:"flex",padding:0},primary:$t,buttonIcon:{margin:"auto","& svg":{width:16,height:16,overflow:"visible","& g":{strokeWidth:1.8}}},buttonIconActive:{}},Yt=Object(b.a)(Vt),Xt=Object(r.memo)((function(e){var t,n=e.className,r=e.Icon,a=e.InverseIcon,i=e.children,o=Object(Ue.a)(e,["className","Icon","InverseIcon","children"]),c=Yt(),s=(t={},Object(v.a)(t,c.featureButton,!0),Object(v.a)(t,c.primary,!0),t);return Object(qe.jsxs)("button",Object(l.a)(Object(l.a)({className:w()(s,n)},o),{},{children:[r&&Object(qe.jsx)("div",{className:c.buttonIcon,children:Object(qe.jsx)(r,{})}),a&&Object(qe.jsx)("div",{className:w()(c.buttonIcon,c.buttonIconActive),children:Object(qe.jsx)(a,{})}),i]}))})),Ut=n(625),Gt=n(623),Zt=n(220),_t=n(622),Kt=function(e){var t,n=e.children,a=e.bgColor,i=void 0===a?_:a,o=e.arrowSize,s=void 0===o?6:o,d=e.className,u=Object(Ue.a)(e,["children","bgColor","arrowSize","className"]),m=Object(r.useState)(null),h=Object(c.a)(m,2),p=h[0],j=h[1],f={popover:{zIndex:3e3,backgroundColor:i,borderRadius:4},arrow:{position:"absolute",fontSize:s,width:"3em",height:"3em"},arrowBottom:{top:0,width:0,height:0,borderLeft:[["2em","solid","transparent"]],borderRight:[["2em","solid","transparent"]],borderBottom:[["2em","solid",i]],marginTop:"-1.9em","&:after":{zIndex:-10,content:'""',position:"absolute",width:3*s,height:3*s,marginLeft:0,bottom:0,top:"calc(50% - 0px)",left:0,border:"5px solid #fff",borderColor:"transparent transparent #fff #fff",transformOrigin:"0 0",transform:"rotate(45deg)",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)"}},arrowTop:{bottom:0,width:0,height:0,borderLeft:[["2em","solid","transparent"]],borderRight:[["2em","solid","transparent"]],borderTop:[["2em","solid",i]],marginBottom:"-1.9em","&:after":{zIndex:-10,content:'""',position:"absolute",width:3*s,height:3*s,marginLeft:0,bottom:0,top:-(4*s+2),left:0,border:"5px solid #fff",borderColor:"transparent transparent #fff #fff",transformOrigin:"0 0",transform:"rotate(45deg)",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)"}},arrowRight:{left:0,width:0,height:0,borderTop:[["2em","solid","transparent"]],borderBottom:[["2em","solid","transparent"]],borderRight:[["2em","solid",i]],marginLeft:"-1.9em"},arrowLeft:{right:0,width:0,height:0,borderTop:[["2em","solid","transparent"]],borderBottom:[["2em","solid","transparent"]],borderLeft:[["2em","solid",i]],marginRight:"-1.9em"},root:{backgroundColor:i}},g=Object(b.a)(f)(),O=(t={},Object(v.a)(t,g.arrow,!0),Object(v.a)(t,g.arrowBottom,"bottom"===u.placement),Object(v.a)(t,g.arrowTop,"top"===u.placement),Object(v.a)(t,g.arrowRight,"right"===u.placement),Object(v.a)(t,g.arrowLeft,"left"===u.placement),t),x=_t.a(u.modifiers,{flip:{enabled:!1},preventOverflow:{enabled:!0,boundariesElement:"scrollParent"},offset:{enabled:!0,offset:"0, 10"},arrow:{enabled:!0,element:p},computeStyle:{gpuAcceleration:!1}});return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)(Gt.a,Object(l.a)(Object(l.a)({disablePortal:!1,modifiers:x,className:g.popover},u),{},{children:Object(qe.jsxs)(Zt.a,{className:w()(g.root,d),children:[Object(qe.jsx)("span",{className:w()(O),ref:j}),n]})}))})},Qt=Re.info2,Jt=function(e,t,n){return{backgroundColor:e,"&:hover":{backgroundColor:t},"&:active":{backgroundColor:n}}},en={idButton:{width:34,height:28,display:"flex",borderRadius:4,padding:0,border:"none",cursor:"pointer"},buttonIcon:{margin:"auto",lineHeight:1,"& svg":{overflow:"visible"}},closed:{extend:Jt(ae,ie,se)},open:{extend:Jt(se,se,se)},popoverContent:{extend:Qt,padding:8,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:4,"& img":{maxHeight:145}}},tn=Object(b.a)(en),nn=Object(r.memo)((function(e){var t,n=e.name,a=e.className,i=e.Icon,o=e.InverseIcon,s=(e.popoverWidth,e.children),d=e.popoverClassname,u=Object(Ue.a)(e,["name","className","Icon","InverseIcon","popoverWidth","children","popoverClassname"]),m=Object(r.useState)(null),h=Object(c.a)(m,2),b=h[0],p=h[1],j=tn(),f=Boolean(b),g=f?"simple-popper-".concat(n):void 0,O=(t={},Object(v.a)(t,j.idButton,!0),Object(v.a)(t,j.primary,!0),Object(v.a)(t,j.open,f),Object(v.a)(t,j.closed,!f),t),x=Object(v.a)({},j.buttonIcon,!0),y=function(){p(null)};return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Ut.a,{onClickAway:y,children:Object(qe.jsxs)("button",Object(l.a)(Object(l.a)({"aria-describedby":g,onClick:function(e){p(b?null:e.currentTarget)},className:w()(O,a)},u),{},{children:[i&&!f&&Object(qe.jsx)("div",{className:w()(x),children:Object(qe.jsx)(i,{})}),o&&f&&Object(qe.jsx)("div",{className:w()(x),children:Object(qe.jsx)(o,{})})]}))}),Object(qe.jsx)(Kt,{className:d,id:g,open:f,anchorEl:b,onClose:y,arrowSize:3,placement:"top",children:Object(qe.jsx)("div",{className:j.popoverContent,children:Object(qe.jsx)("div",{children:s})})})]})})),rn=n(576),an={label:function(e){var t=e.size;return{width:t,height:t}},root:{"& svg":{flex:1},"&:hover":{backgroundColor:"inherit"},"&:hover rect":{stroke:q},"&:hover polygon":{stroke:q},"&:hover path":{stroke:q}}},on=Object(b.a)(an),cn=function(e){var t=e.size,n=e.children,r=e.onClick,a=Object(Ue.a)(e,["size","children","onClick"]),i=on({size:t});return Object(qe.jsx)(rn.a,Object(l.a)(Object(l.a)({},a),{},{size:"small",classes:{root:i.root,label:i.label},disableRipple:!0,onClick:r,children:n}))},ln=n(145),sn=function(e){return{boxShadow:"inset 0 -4px 0 0 ".concat(Object(ln.fade)(e,.8)),"&:hover":{boxShadow:"none",backgroundColor:Object(ln.fade)(e,.8)}}},dn={link:{extend:Re.h4,textDecoration:"none",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:"0",height:"100%"},primary:{extend:sn(be)},secondary:{extend:sn("#ff584a"),"&:hover":{color:_}},noColor:{extend:sn(_)},action:{extend:sn(be),color:X}},un=Object(b.a)(dn),mn=Object(r.memo)((function(e){var t,n=e.submit,r=e.className,a=e.children,i=e.color,o=void 0===i?"primary":i,c=Object(Ue.a)(e,["submit","className","children","color"]),s=un(),d=(t={},Object(v.a)(t,s.link,!0),Object(v.a)(t,s.primary,"primary"===o),Object(v.a)(t,s.secondary,"secondary"===o),Object(v.a)(t,s.noColor,"noColor"===o),Object(v.a)(t,s.action,"action"===o),t);return Object(qe.jsx)("button",Object(l.a)(Object(l.a)({type:n?"submit":"button",className:w()(d,r)},c),{},{children:a}))})),hn=Ht.baseButton,bn=Ht.primary,pn={button:{extend:hn,borderRadius:hn.height/2,outline:0,padding:"0 20px"},primary:bn,buttonIcon:{marginTop:4,marginRight:4,"& svg":{width:20,height:20,overflow:"visible"}},buttonIconActive:{}};Object(b.a)(pn);function jn(){return(jn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fn(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gn=r.createElement("desc",null,"Created with Sketch."),On=r.createElement("g",{id:"icon/button/cancel/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",transform:"translate(1.000000, 1.000000)",stroke:"#FFFFFF"},r.createElement("line",{x1:10,y1:0,x2:0,y2:10,id:"Stroke-1"}),r.createElement("line",{x1:0,y1:0,x2:10,y2:10,id:"Stroke-3"})));function xn(e,t){var n=e.title,a=e.titleId,i=fn(e,["title","titleId"]);return r.createElement("svg",jn({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,gn,On)}var vn=r.forwardRef(xn),yn=(n.p,Ht.baseButton),wn={button:{extend:yn,padding:0,color:_,borderRadius:yn.height/2},normalButton:{width:yn.height},activeButton:{display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:se,fontWeight:"bold",padding:"0 5px","&:hover":{backgroundColor:se}},buttonIcon:{width:16,height:16,overflow:"visible","& g":{strokeWidth:1.8}},buttonIconActiveLeft:{marginRight:12,marginLeft:4},buttonIconActiveRight:{marginRight:5,marginLeft:20}},Cn=Object(b.a)(wn),kn=Object(r.memo)((function(e){var t,n=e.className,a=e.Icon,i=e.InverseIcon,o=e.toggle,l=e.children,s=Object(r.useState)(!1),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Cn(),b=(t={},Object(v.a)(t,h.button,!0),Object(v.a)(t,h.normalButton,!u),Object(v.a)(t,h.activeButton,u),t),p=Object(qe.jsx)(a,{className:h.buttonIcon}),j=Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(i,{className:w()(h.buttonIcon,h.buttonIconActiveLeft)}),l,Object(qe.jsx)(vn,{className:w()(h.buttonIcon,h.buttonIconActiveRight)})]});return Object(qe.jsx)("button",{className:w()(b,n),onClick:function(){var e=!u;o(e),m(e)},children:u?j:p})}));function Sn(){return(Sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nn(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var En=r.createElement("desc",null,"Created with Sketch."),In=r.createElement("g",{id:"icon/action/external-link/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("polyline",{id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2,points:"20 12.1113 20 21.0003 0 21.0003 0 1.0003 8.889 1.0003"}),r.createElement("polyline",{id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,points:"14.4443 1 20.0003 1 20.0003 6.556"}),r.createElement("line",{x1:10,y1:11,x2:20,y2:1,id:"Stroke-5",stroke:"#FFFFFF",strokeWidth:2}));function Ln(e,t){var n=e.title,a=e.titleId,i=Nn(e,["title","titleId"]);return r.createElement("svg",Sn({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,En,In)}var Fn=r.forwardRef(Ln);n.p;function Pn(){return(Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bn(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Dn=r.createElement("desc",null,"Created with Sketch."),Rn=r.createElement("g",{id:"icon/action/external-link/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-7",transform:"translate(0.000000, 1.000000)",stroke:"#1B2559",strokeWidth:2},r.createElement("polyline",{id:"Stroke-1",points:"20 11.1113 20 20.0003 0 20.0003 0 0.0003 8.889 0.0003"}),r.createElement("polyline",{id:"Stroke-3",points:"14.4443 0 20.0003 0 20.0003 5.556"}),r.createElement("line",{x1:10,y1:10,x2:20,y2:0,id:"Stroke-5"})));function Tn(e,t){var n=e.title,a=e.titleId,i=Bn(e,["title","titleId"]);return r.createElement("svg",Pn({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Dn,Rn)}var An=r.forwardRef(Tn),Wn=(n.p,Object(b.a)({actionButton:{marginBottom:32},actionButtonLink:{textDecoration:"none",color:J}})),zn=function(e){var t=e.link,n=e.label,r=Wn();return Object(qe.jsx)("a",{className:r.actionButtonLink,target:"_blank",rel:"noopener noreferrer",href:t,children:Object(qe.jsx)(Ct,{className:r.actionButton,color:"primary",Icon:An,InverseIcon:Fn,children:n})})},Mn={titleWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},titleAndButtonsContainer:{display:"flex",alignItems:"center"},error:{marginLeft:12},subpageButton:{marginLeft:12},buttonText:{color:re,fontSize:15},icon:{marginRight:6},label:{marginRight:24}},Hn=Object(b.a)(Mn),qn=function(e){var t=e.className,n=e.title,r=e.error,a=e.labels,i=e.button,o=e.children,c=Hn();return Object(qe.jsxs)("div",{className:w()(c.titleWrapper,t),children:[Object(qe.jsxs)("div",{className:c.titleAndButtonsContainer,children:[Object(qe.jsx)(xt,{children:n}),r&&Object(qe.jsx)(gt,{className:c.error,children:"Failed to save"}),i&&Object(qe.jsx)(kn,{className:c.subpageButton,Icon:i.icon,InverseIcon:i.inverseIcon,toggle:i.toggle,children:Object(qe.jsx)(ct,{className:c.buttonText,children:i.text})})]}),Object(qe.jsx)(Xe.a,{display:"flex",flexDirection:"row",children:(null!==a&&void 0!==a?a:[]).map((function(e,t){var n=e.icon,r=e.label;return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"center",children:[Object(qe.jsx)("div",{className:c.icon,children:n}),Object(qe.jsx)(mt,{className:c.label,children:r})]},t)}))}),o]})},$n=n(63),Vn=n(314),Yn=n(109),Xn=n(64),Un=n(287),Gn=n(315),Zn="",_n=function(e){var t=e.children,n=function(e,t){return new Yn.a({link:Xn.a.from([Object(Un.a)((function(n){var r=n.graphQLErrors,a=n.networkError;r&&r.forEach((function(n){var r=n.message,a=n.locations,i=n.path,o=n.extensions;"UNAUTHENTICATED"===(null===o||void 0===o?void 0:o.code)&&"/404"!==t.pathname&&e.push("/404"),console.log("[GraphQL error]: Message: ".concat(r,", Location: ").concat(a,", Path: ").concat(i))})),a&&console.log("[Network error]: ".concat(a))})),new Gn.a({credentials:"include",uri:"".concat(Zn,"/graphql")})]),cache:new Vn.a,defaultOptions:{watchQuery:{fetchPolicy:"no-cache",errorPolicy:"ignore"},query:{fetchPolicy:"no-cache",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})}(Object(O.h)(),Object(O.i)());return Object(qe.jsx)($n.a,{client:n,children:t})},Kn=n(16),Qn=n(15),Jn=n(17),er=n.n(Jn),tr=n(313),nr=n(304),rr=n(629),ar=n(88),ir=n(290),or=n(627),cr=n(171),lr=n(194),sr=n(628);function dr(){return(dr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var mr=r.createElement("desc",null,"Created with Sketch."),hr=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-1295.000000, -19.000000)",stroke:"#1B2559",strokeWidth:2},r.createElement("g",{id:"icon/menu/notification",transform:"translate(1296.000000, 20.000000)"},r.createElement("path",{d:"M10.1052632,14.3157895 C10.1052632,15.2454737 9.35073684,16 8.42105263,16 C7.49136842,16 6.73684211,15.2454737 6.73684211,14.3157895",id:"Stroke-1"}),r.createElement("path",{d:"M1.6,14.3157895 C0.7168,14.3157895 0,13.6031813 0,12.7251462 C0,11.8471111 0.7168,11.1345029 1.6,11.1345029 L1.6,6.3625731 C1.6,2.84884211 4.4656,0 8,0 C11.5344,0 14.4,2.84884211 14.4,6.3625731 L14.4,11.1345029 C15.2832,11.1345029 16,11.8471111 16,12.7251462 C16,13.6031813 15.2832,14.3157895 14.4,14.3157895 L1.6,14.3157895 Z",id:"Stroke-3",strokeLinejoin:"round"}))));function br(e,t){var n=e.title,a=e.titleId,i=ur(e,["title","titleId"]);return r.createElement("svg",dr({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,mr,hr)}var pr=r.forwardRef(br);n.p;function jr(){return(jr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gr=r.createElement("desc",null,"Created with Sketch."),Or=r.createElement("g",{id:"icon/stage/spring/empty",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval-Copy-6",stroke:"#DDDDDD",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function xr(e,t){var n=e.title,a=e.titleId,i=fr(e,["title","titleId"]);return r.createElement("svg",jr({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,gr,Or)}var vr=r.forwardRef(xr);n.p;function yr(){return(yr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Cr=r.createElement("desc",null,"Created with Sketch."),kr=r.createElement("g",{id:"icon/stage/zodiac/full",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval-2-Copy",fill:"#1B2559",cx:9,cy:9,r:8}),r.createElement("circle",{id:"Oval-Copy-5",stroke:"#1B2559",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function Sr(e,t){var n=e.title,a=e.titleId,i=wr(e,["title","titleId"]);return r.createElement("svg",yr({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Cr,kr)}var Nr=r.forwardRef(Sr),Er=(n.p,{background:{position:"absolute",width:"100vw",height:"100vh",left:0,top:0,zIndex:-1,backgroundColor:_,boxShadow:"0 0 14px 0 rgba(0, 0, 0, 0.24)"},container:{left:-200,top:-42,backgroundColor:_,height:"110vh"},header:{display:"flex",justifyContent:"space-between"},headerText:{marginTop:20,marginLeft:24},actionButtons:{display:"flex",marginLeft:16,height:0},notificationIcon:function(e){var t=e.buttonCoords,n=e.xOffset;return{position:"absolute",top:t?t.y-1:0,left:t?t.x-n:0,cursor:"pointer",background:"transparent",boxShadow:"0px 0px 0px transparent",border:"0px solid transparent",textShadow:"0px 0px 0px transparent",outline:"none"}},clearAllButton:{marginTop:-16,marginLeft:8,backgroundColor:X},notificationsList:{width:440,height:"90vh",maxHeight:"100vh",marginTop:24,marginLeft:0,marginRight:-50,overflowY:"auto",overflowX:"hidden",backgroundColor:_,zIndex:10},notificationRow:{position:"relative",marginBottom:4,paddingTop:12},unread:{backgroundColor:V},notificationRowIcon:{alignSelf:"center","& > *":{marginLeft:24}},unreadIcon:{marginLeft:8,marginTop:5,width:"12px",height:"12px",backgroundColor:ee,borderRadius:"50%",cursor:"pointer",zIndex:1},readIcon:{marginLeft:8,marginTop:5,width:"12px",height:"12px",border:[[1,"solid",q]],borderRadius:"50%",cursor:"pointer",zIndex:1},notificationTitle:{margin:0,color:q},notificationBody:{margin:0},notificationSubtitle:{margin:0,marginBottom:8,color:q},stripes:{position:"absolute",height:"100%",top:"0px",opacity:"60%"},hasUnread:{position:"absolute",top:0,left:16,width:"9px",height:"9px",backgroundColor:ee,borderRadius:"50%"}}),Ir=n(289),Lr=n.n(Ir);function Fr(){return(Fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Br=r.createElement("g",{id:"\\u21B3-notification-center",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"notification-center_v01a#2-(open)",transform:"translate(-1023.000000, -459.000000)",stroke:"#1B2559"},r.createElement("g",{id:"Group-5",transform:"translate(1000.000000, 0.000000)"},r.createElement("g",{id:"icon/sf-small/wrench",transform:"translate(24.000000, 460.000000)"},r.createElement("path",{d:"M15.7602493,3.10720971 L13.1962412,5.67121772 L10.3290323,5.67121772 L10.3290323,2.80400876 L12.8930403,0.24000075 C12.4378389,0.0872002725 11.9506373,0 11.4434358,0 C8.9282279,0 6.88822153,2.04000637 6.88822153,4.55681424 C6.88822153,5.08081588 6.98102182,5.58321745 7.14422233,6.05201891 L0.580201813,12.6168394 C-0.193400604,13.3904418 -0.193400604,14.6456458 0.580201813,15.4200482 C1.35460423,16.1936506 2.60980816,16.1936506 3.38341057,15.4200482 L9.94823109,8.85602767 C10.4170326,9.01922818 10.9186341,9.11202847 11.4434358,9.11202847 C13.9602436,9.11202847 16.00025,7.0720221 16.00025,4.55681424 C16.00025,4.04961265 15.9130497,3.56241113 15.7602493,3.10720971 Z",id:"Stroke-1"})))));function Dr(e,t){var n=e.title,a=e.titleId,i=Pr(e,["title","titleId"]);return r.createElement("svg",Fr({width:"32px",height:"32px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Br)}var Rr=r.forwardRef(Dr);n.p;function Tr(){return(Tr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ar(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Wr=r.createElement("g",{id:"\\u21B3-notification-center",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"notification-center_v01a#1-(marked-one-as-read)",transform:"translate(-1023.000000, -123.000000)",stroke:"#1B2559"},r.createElement("g",{id:"Group-5",transform:"translate(1000.000000, 0.000000)"},r.createElement("g",{id:"Group-4",transform:"translate(24.000000, 124.000000)"},r.createElement("g",{id:"Group-3"},r.createElement("line",{x1:0,y1:4,x2:16,y2:4,id:"Path-2"}),r.createElement("polyline",{id:"Path-3",points:"12 0 16 4 12 8"})),r.createElement("g",{id:"Group-2",transform:"translate(8.000000, 12.000000) scale(-1, 1) translate(-8.000000, -12.000000) translate(0.000000, 8.000000)"},r.createElement("line",{x1:0,y1:4,x2:16,y2:4,id:"Path-2-Copy"}),r.createElement("polyline",{id:"Path-3-Copy",points:"12 0 16 4 12 8"}))))));function zr(e,t){var n=e.title,a=e.titleId,i=Ar(e,["title","titleId"]);return r.createElement("svg",Tr({width:"24px",height:"24px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Wr)}var Mr=r.forwardRef(zr);n.p;function Hr(){return(Hr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qr(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var $r=r.createElement("defs",null,r.createElement("pattern",{id:"pattern_68JiZ",patternUnits:"userSpaceOnUse",width:5.5,height:5.5,patternTransform:"rotate(45)"},r.createElement("line",{x1:0,y:0,x2:0,y2:5.5,stroke:"#DBDFED",strokeWidth:3}))),Vr=r.createElement("rect",{width:"100%",height:"100%",fill:"url(#pattern_68JiZ)",opacity:1});function Yr(e,t){var n=e.title,a=e.titleId,i=qr(e,["title","titleId"]);return r.createElement("svg",Hr({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"36px",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,$r,"{' '}\n ",Vr)}var Xr,Ur,Gr,Zr=r.forwardRef(Yr),_r=(n.p,Object(b.a)(Er)),Kr={transaction:{display:"Transactions",icon:Object(qe.jsx)(Mr,{})},highValueTransaction:{display:"Transactions",icon:Object(qe.jsx)(Mr,{})},fiatBalance:{display:"Maintenance",icon:Object(qe.jsx)(Rr,{})},cryptoBalance:{display:"Maintenance",icon:Object(qe.jsx)(Rr,{})},compliance:{display:"Compliance",icon:Object(qe.jsx)(Je,{})},error:{display:"Error",icon:Object(qe.jsx)(Je,{})}},Qr=function(e){var t,n,r,a=e.id,i=e.type,o=(e.detail,e.message),c=e.deviceName,l=e.created,s=e.read,d=e.valid,m=e.toggleClear,h=_r(),b=null!==(t=cr.a([i,"display"])(Kr))&&void 0!==t?t:null,p=null!==(n=cr.a([i,"icon"])(Kr))&&void 0!==n?n:Object(qe.jsx)(Rr,{}),j=Lr()((new Date).getTime()-new Date(l).getTime(),{compact:!0,verbose:!0}),f=b&&c?"".concat(b," - ").concat(c):"".concat(!b&&c?c:b),g=(r={},Object(v.a)(r,h.readIcon,s),Object(v.a)(r,h.unreadIcon,!s),r);return Object(qe.jsxs)(u.a,{container:!0,className:w()(h.notificationRow,!s&&d?h.unread:""),children:[Object(qe.jsx)(u.a,{item:!0,xs:2,className:h.notificationRowIcon,children:p}),Object(qe.jsxs)(u.a,{item:!0,container:!0,xs:7,direction:"row",children:[Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(ht,{className:h.notificationTitle,children:f})}),Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(ut,{className:h.notificationBody,children:o})}),Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(mt,{className:h.notificationSubtitle,children:j})})]}),Object(qe.jsx)(u.a,{item:!0,xs:3,style:{zIndex:1},children:Object(qe.jsx)("div",{onClick:function(){return m(a)},className:w()(g)})}),!d&&Object(qe.jsx)(Zr,{className:h.stripes})]})},Jr=Object(b.a)(Er),ea=er()(Xr||(Xr=Object(Kn.a)(["\n query getNotifications {\n notifications {\n id\n type\n detail\n message\n created\n read\n valid\n }\n hasUnreadNotifications\n machines {\n deviceId\n name\n }\n }\n"]))),ta=er()(Ur||(Ur=Object(Kn.a)(["\n mutation toggleClearNotification($id: ID!, $read: Boolean!) {\n toggleClearNotification(id: $id, read: $read) {\n id\n read\n }\n }\n"]))),na=er()(Gr||(Gr=Object(Kn.a)(["\n mutation clearAllNotifications {\n clearAllNotifications {\n id\n }\n }\n"]))),ra=function(e){var t,n,a=e.close,i=e.hasUnreadProp,o=e.buttonCoords,l=e.popperRef,s=e.refetchHasUnreadHeader,d=Object(Qn.c)(ea,{pollInterval:6e4}),u=d.data,m=d.loading,h=Object(r.useState)(300),b=Object(c.a)(h,2),p=b[0],j=b[1],f=Object(r.useState)(!1),g=Object(c.a)(f,2),O=g[0],x=g[1],v=Jr({buttonCoords:o,xOffset:p}),y=tr.a(ar.a(ir.a("name")),or.a(ir.a("deviceId")))(null!==(t=cr.a(["machines"])(u))&&void 0!==t?t:[]),w=null!==(n=cr.a(["notifications"])(u))&&void 0!==n?n:[],C=Object(r.useState)(i),k=Object(c.a)(C,2),S=k[0],N=k[1],E=Object(Qn.b)(ta,{onError:function(){return console.error("Error while clearing notification")},refetchQueries:function(){return["getNotifications"]}}),I=Object(c.a)(E,1)[0],L=Object(Qn.b)(na,{onError:function(){return console.error("Error while clearing all notifications")},refetchQueries:function(){return["getNotifications"]}}),F=Object(c.a)(L,1)[0];Object(r.useEffect)((function(){j(l.current.getBoundingClientRect().x),u&&u.hasUnreadNotifications!==S&&(s(),N(!S))}),[l,u,S,s]);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:v.container,children:[Object(qe.jsxs)("div",{className:v.header,children:[Object(qe.jsx)(it,{className:v.headerText,children:"Notifications"}),Object(qe.jsxs)("button",{onClick:a,className:v.notificationIcon,children:[Object(qe.jsx)(pr,{}),S&&Object(qe.jsx)("div",{className:v.hasUnread})]})]}),Object(qe.jsxs)("div",{className:v.actionButtons,children:[S&&Object(qe.jsx)(Ct,{color:"primary",Icon:Nr,InverseIcon:vr,className:v.clearAllButton,onClick:function(){return x(!O)},children:O?"Show all":"Show unread"}),S&&Object(qe.jsx)(Ct,{color:"primary",Icon:H,InverseIcon:vr,className:v.clearAllButton,onClick:F,children:"Mark all as read"})]}),Object(qe.jsx)("div",{className:v.notificationsList,children:!m&&(O&&S?lr.a(sr.a("read",!1))(w):w).map((function(e){return Object(qe.jsx)(Qr,{id:e.id,type:e.type,detail:e.detail,message:e.message,deviceName:y[e.detail.deviceId],created:e.created,read:e.read,valid:e.valid,toggleClear:function(){return I({variables:{id:e.id,read:!e.read}})}},e.id)}))})]}),Object(qe.jsx)("div",{className:v.background})]})},aa=n(637),ia=n(638),oa=n(179),ca=n(22),la=n(177),sa=n.n(la),da=n(635),ua=n(636),ma=n(7),ha=n(216),ba=n(703),pa=n(296),ja=n(710),fa=n(631),ga=n(709),Oa=n(299),xa=n(632),va=n(697),ya={size:function(e){var t=e.size;return Object(l.a)({marginTop:"lg"===t?0:2},Te(t))},bold:Ae,root:function(e){return{width:e.width,"& input":{textAlign:e.textAlign}}},underline:{"&:before":{borderBottomColor:ee},"&:hover:not(.Mui-disabled)::before":{borderBottomColor:ee}}},wa=Object(b.a)(ya),Ca=Object(r.memo)((function(e){var t=e.name,n=e.isPasswordFilled,r=e.onChange,a=e.onBlur,i=e.value,o=e.error,c=(e.suffix,e.textAlign),s=e.width,d=e.size,u=e.bold,m=e.className,h=e.InputProps,b=Object(Ue.a)(e,["name","isPasswordFilled","onChange","onBlur","value","error","suffix","textAlign","width","size","bold","className","InputProps"]),p=wa({textAlign:c,width:s,size:d}),j=!o&&!rr.a(i)&&!ga.a(i),f=n||j,g=Object(v.a)({},p.bold,u);return Object(qe.jsx)(va.a,Object(l.a)({id:t,onChange:r,onBlur:a,error:o,value:i,classes:{root:p.root},className:m,InputProps:Object(l.a)({className:w()(g),classes:{root:p.size,underline:f?p.underline:null}},h)},b))})),ka=function(e){e.optionsLimit;var t=e.limit,n=e.options,r=e.label,a=e.valueProp,i=e.multiple,o=e.onChange,c=e.labelProp,s=(e.shouldStayOpen,e.value),d=e.error,u=e.fullWidth,m=e.textAlign,h=e.size,b=e.autoFocus,p=Object(Ue.a)(e,["optionsLimit","limit","options","label","valueProp","multiple","onChange","labelProp","shouldStayOpen","value","error","fullWidth","textAlign","size","autoFocus"]),j=function(e){return function(t){return ja.a(sr.a(a,t))(e)}},f=ir.a(a),g=a?(i?ar.a(j(n)):j(n))(s):s,O=function(){return rr.a(g)?[]:i?g:[g]};return Object(qe.jsx)(ba.a,Object(l.a)(Object(l.a)({options:n,multiple:i,value:g,onChange:function(e,t){if(!a)return o(e,t);var n=i?ar.a(f)(t):f(t);o(e,n)},getOptionLabel:cr.a([c]),forcePopupIcon:!1,filterOptions:function(e,n){var r=n.inputValue;return fa.a(ga.a(r)?O():[],function(e,t){return t?Object(pa.a)(e,t,{keys:[a,c]}):e}(e,r)).slice(0,Oa.a(void 0)(t)&&Math.max(t,ga.a(r)?O().length:0))},openOnFocus:!0,autoHighlight:!0,disableClearable:!0,ChipProps:{onDelete:null},clearOnEscape:!0,getOptionSelected:xa.a(a)},p),{},{renderInput:function(e){return Object(qe.jsx)(Ca,Object(l.a)(Object(l.a)({},e),{},{autoFocus:b,label:r,value:s,error:d,size:h,fullWidth:u,textAlign:m}))}}))},Sa=(n(704),n(302),n(301),Object(b.a)({root:{color:ee,"&$checked":{color:ee}},checked:{}}),n(303)),Na=Object(r.memo)((function(e){var t=e.name,n=e.onChange,r=e.onBlur,a=e.value,i=e.error,o=e.suffix,c=e.textAlign,s=e.width,d=e.size,u=e.bold,m=e.className,h=e.decimalPlaces,b=(e.InputProps,Object(Ue.a)(e,["name","onChange","onBlur","value","error","suffix","textAlign","width","size","bold","className","decimalPlaces","InputProps"]));return Object(qe.jsx)(Sa.a,Object(l.a)({name:t,onChange:n,onBlur:r,value:a,error:i,suffix:o,textAlign:c,width:s,size:d,bold:u,className:m,customInput:Ca,decimalScale:h,onValueChange:function(e){n({target:{id:t,value:e.floatValue}})}},b))})),Ea=n(720),Ia=n(633),La=n(702),Fa=Object(b.a)({label:{height:16,lineHeight:"16px",margin:[[0,0,4,0]],paddingLeft:3}}),Pa=function(e){var t=e.name,n=e.label,r=e.value,a=e.options,i=e.onChange,o=e.className,c=e.labelClassName,l=e.radioClassName,s=Fa();return Object(qe.jsxs)(qe.Fragment,{children:[n&&Object(qe.jsx)(mt,{className:s.label,children:n}),Object(qe.jsx)(Ea.a,{name:t,value:r,onChange:i,className:w()(o),children:a.map((function(e,t){return Object(qe.jsx)(Ia.a,{value:e.code,control:Object(qe.jsx)(La.a,{className:l}),label:e.display,className:w()(c)},t)}))})]})},Ba=Object(r.memo)((function(e){var t=e.value,n=e.onFocus,a=e.isPasswordFilled,i=e.onBlur,o=Object(Ue.a)(e,["value","onFocus","isPasswordFilled","onBlur"]),s=Object(r.useState)(!1),d=Object(c.a)(s,2),u=d[0],m=d[1];return Object(qe.jsx)(Ca,Object(l.a)(Object(l.a)({},o),{},{type:"password",onFocus:function(e){m(!0),n&&n(e)},onBlur:function(e){m(!1),i&&i(e)},isPasswordFilled:a,value:t,InputProps:{value:t},InputLabelProps:{shrink:a||t||u},placeholder:a?"\u26ac \u26ac \u26ac This field is set \u26ac \u26ac \u26ac":""}))})),Da=n(634),Ra=Object(b.a)((function(e){return{root:{width:32,height:20,padding:0,margin:e.spacing(1)},switchBase:{padding:2,"&$disabled":{color:ce,"& + $track":{backgroundColor:oe,opacity:1}},"&$checked":{transform:"translateX(58%)",color:e.palette.common.white,"&$disabled":{color:ce},"& + $track":{backgroundColor:ee,opacity:1,border:"none"}},"&$focusVisible $thumb":{border:"6px solid #fff"}},thumb:{width:16,height:16},track:{borderRadius:17,border:"none",backgroundColor:se,opacity:1,transition:e.transitions.create(["background-color","border"])},disabled:{},checked:{},focusVisible:{}}})),Ta=Object(r.memo)((function(e){var t=Object.assign({},e),n=Ra();return Object(qe.jsx)(Da.a,Object(l.a)({focusVisibleClassName:n.focusVisible,disableRipple:!0,classes:{root:n.root,switchBase:n.switchBase,thumb:n.thumb,track:n.track,checked:n.checked,disabled:n.disabled}},t))})),Aa=function(e){var t=e.options,n=e.onChange,a=Object(Ue.a)(e,["options","onChange"]),i=Object(r.useState)(!1),o=Object(c.a)(i,2),s=o[0],d=o[1],u=a.field,m=u.name,h=u.onBlur,b=u.value,p=a.form,j=p.touched,f=p.errors,g=p.setFieldValue,O=p.setFieldTouched,x=!(!j[m]||!f[m]),v=Object(ca.e)(),y=v.initialValues,w=v.values,C="Function"===ha.a(t)?t(y,w):t,k=function(e){return g(m,e)},S=!!a.shouldStayOpen;return Object(qe.jsx)(ka,Object(l.a)({name:m,onChange:function(e,t){if(n)return n(b,t,k);g(m,t)},onBlur:function(e){m&&O(m,!0),h&&h(e)},value:b,error:x,open:s,options:C,onOpen:function(){if(!a.multiple)return d(!0);d((null===b||void 0===b?void 0:b.length)!==a.limit)},onClose:function(e,t){d(!(!S||"blur"===t))}},a))},Wa=n(719),za=n(19),Ma=Object(r.memo)((function(e){var t=e.classes,n=Object(Ue.a)(e,["classes"]);return Object(qe.jsx)(Wa.a,Object(l.a)({size:"small",classes:t},n))})),Ha=Object(za.a)((function(e){return{root:{backgroundColor:ae,borderRadius:4,margin:e.spacing(.5,.25),height:18},label:{fontSize:ye,color:le,fontWeight:500,fontFamily:Se,paddingRight:4,paddingLeft:4}}}))(Ma),qa={cashOut:{empty:K,full:J},cashIn:{empty:J,full:K}},$a=function(e){var t=e.percent,n=e.cashOut;return qa[n?"cashOut":"cashIn"][t>=50?"full":"empty"]},Va={cashbox:{borderColor:$a,backgroundColor:$a,height:118,width:80,border:"2px solid",textAlign:"end",display:"inline-block"},emptyPart:{backgroundColor:"white",height:function(e){var t=e.percent;return"".concat(100-t,"%")},position:"relative","& > p":{color:$a,display:"inline-block",position:"absolute",margin:0,bottom:0,right:0}},fullPart:{backgroundColor:$a,"& > p":{color:"white",display:"inline"}}},Ya={row:{display:"flex"},innerRow:{display:"flex",justifyContent:"flex-start"},col2:{marginLeft:16},noMarginText:{marginTop:0,marginBottom:0},link:{marginTop:8},chip:{margin:[[0,0,0,7]]}},Xa=Object(b.a)(Va),Ua=Object(b.a)(Ya),Ga=function(e){var t=e.percent,n=void 0===t?0:t,r=e.cashOut,a=void 0!==r&&r,i=e.className,o=e.emptyPartClassName,c=e.labelClassName,l=Xa({percent:n,cashOut:a});return Object(qe.jsxs)("div",{className:w()(i,l.cashbox),children:[Object(qe.jsx)("div",{className:w()(o,l.emptyPart),children:n<=51&&Object(qe.jsxs)(ht,{className:c,children:[n.toFixed(0),"%"]})}),Object(qe.jsx)("div",{className:l.fullPart,children:n>51&&Object(qe.jsxs)(ht,{className:c,children:[n.toFixed(0),"%"]})})]})},Za=function(e){e.currency;var t=e.notes,n=(e.total,Ua());return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)("div",{className:n.row,children:Object(qe.jsxs)("div",{children:[Object(qe.jsx)("div",{className:n.innerRow,children:Object(qe.jsxs)(lt,{className:n.noMarginText,children:[t," notes"]})}),Object(qe.jsx)("div",{className:n.innerRow})]})})})},_a=function(e){var t=e.capacity,n=void 0===t?500:t,r=e.denomination,a=void 0===r?0:r,i=e.currency,o=e.notes,c=e.className,l=e.editingMode,s=void 0!==l&&l,d=100*o/n,u=Ua();return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsxs)("div",{className:u.row,children:[Object(qe.jsx)("div",{className:u.col,children:Object(qe.jsx)(Ga,{className:c,percent:d,cashOut:!0})}),!s&&Object(qe.jsxs)("div",{className:u.col2,children:[Object(qe.jsxs)("div",{className:u.innerRow,children:[Object(qe.jsx)(lt,{className:u.noMarginText,children:o}),Object(qe.jsx)(Ha,{className:u.chip,label:"".concat(a," ").concat(i.code)})]}),Object(qe.jsx)("div",{className:u.innerRow,children:Object(qe.jsxs)(mt,{className:u.noMarginText,children:[o*a," ",i.code]})})]})]})})},Ka=Object(b.a)({flex:{display:"flex"},cashCassette:{width:80,height:36,marginRight:16}}),Qa=Object(r.memo)((function(e){var t=e.decimalPlaces,n=Object(Ue.a)(e,["decimalPlaces"]),a=Ka(),i=n.field,o=i.name,s=i.onChange,d=i.onBlur,u=i.value,m=n.form,h=m.touched,b=m.errors,p=Object(r.useState)(u),j=Object(c.a)(p,2),f=j[0],g=j[1],O=!(!h[o]||!b[o]);return Object(qe.jsxs)("div",{className:a.flex,children:[Object(qe.jsx)(_a,{className:a.cashCassette,notes:f,editingMode:!0}),Object(qe.jsx)(Na,Object(l.a)({name:o,onChange:function(e){return g(e.target.value),s(e)},onBlur:d,value:u,error:O,decimalPlaces:t},n))]})})),Ja=Object(r.memo)((function(e){var t=e.decimalPlaces,n=Object(Ue.a)(e,["decimalPlaces"]),r=n.field,a=r.name,i=r.onChange,o=r.onBlur,c=r.value,s=n.form,d=s.touched,u=s.errors,m=!(!d[a]||!u[a]);return Object(qe.jsx)(Na,Object(l.a)({name:a,onChange:i,onBlur:o,value:c,error:m,decimalPlaces:t},n))})),ei=Object(r.memo)((function(e){var t=e.label,n=Object(Ue.a)(e,["label"]),r=n.field,a=r.name,i=r.onChange,o=r.value;return Object(qe.jsx)(Pa,Object(l.a)({name:a,label:t,value:o,options:n.options,ariaLabel:a,onChange:function(e){i(e),n.resetError&&n.resetError()},className:n.className},n))})),ti=Object(r.memo)((function(e){var t=e.isPasswordFilled,n=Object(Ue.a)(e,["isPasswordFilled"]),r=n.field,a=r.name,i=r.onChange,o=r.onBlur,c=r.value,s=n.form,d=s.touched,u=s.errors,m=!t&&!(!d[a]||!u[a]);return Object(qe.jsx)(Ba,Object(l.a)({name:a,isPasswordFilled:t,onChange:i,onBlur:o,value:c,error:m},n))})),ni=Object(r.memo)((function(e){var t=Object.assign({},e),n=t.field,r=n.name,a=n.onChange,i=n.onBlur,o=n.value,c=t.form,s=c.touched,d=c.errors,u=!(!s[r]||!d[r]);return Object(qe.jsx)(Ca,Object(l.a)({name:r,onChange:a,onBlur:i,value:o,error:u},t))}));function ri(){return(ri=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ai(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ii=r.createElement("style",{type:"text/css"},"\n\t.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#1B2559;}\n"),oi=r.createElement("desc",null,"Created with Sketch."),ci=r.createElement("g",{id:"color_x2F_primary_x2F_zodiac",transform:"translate(-0.000000, 0.000000)"},r.createElement("g",{id:"Mask"},r.createElement("path",{id:"path-1_1_",className:"st0",d:"M11.1,9l6.5,6.5c0.6,0.6,0.6,1.5,0,2.1c-0.3,0.3-0.7,0.4-1.1,0.4c-0.4,0-0.8-0.2-1.1-0.4 L9,11.1l-6.5,6.5C2.3,17.8,1.9,18,1.5,18c-0.4,0-0.8-0.2-1.1-0.4c-0.6-0.6-0.6-1.5,0-2.1L6.9,9L0.4,2.5C-0.1,2-0.1,1,0.4,0.4 C1-0.1,2-0.1,2.5,0.4L9,6.9l6.5-6.5c0.6-0.6,1.5-0.6,2.1,0c0.6,0.6,0.6,1.5,0,2.1L11.1,9z"})));function li(e,t){var n=e.title,a=e.titleId,i=ai(e,["title","titleId"]);return r.createElement("svg",ri({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 18 18",style:{enableBackground:"new 0 0 18 18"},xmlSpace:"preserve",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,ii,oi,ci)}var si=r.forwardRef(li);n.p;function di(){return(di=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ui(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var mi=r.createElement("desc",null,"Created with Sketch."),hi=r.createElement("g",{id:"icon/stage/spring/complete",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval",stroke:"#48F694",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}),r.createElement("path",{d:"M7.80983711,12 C7.54819546,12 7.28655382,11.9032616 7.08725647,11.710772 L5.29971255,9.98428824 C4.90009582,9.59832189 4.90009582,8.97445811 5.29971255,8.58849175 C5.69932929,8.2025254 6.34525711,8.2025254 6.74487384,8.58849175 L7.80983711,9.61707728 L11.2551262,6.28947477 C11.6547429,5.90350841 12.3016927,5.90350841 12.7002874,6.28947477 C13.0999042,6.674454 13.0999042,7.2993049 12.7002874,7.68527125 L8.53241776,11.710772 C8.33312041,11.9032616 8.07147876,12 7.80983711,12",id:"Path",fill:"#48F694"}));function bi(e,t){var n=e.title,a=e.titleId,i=ui(e,["title","titleId"]);return r.createElement("svg",di({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,mi,hi)}var pi=r.forwardRef(bi);n.p;function ji(){return(ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fi(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gi=r.createElement("desc",null,"Created with Sketch."),Oi=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/warning-icon/comet"},r.createElement("rect",{id:"Rectangle",stroke:"#5F668A",strokeWidth:2,x:1,y:1,width:22,height:22,rx:11}),r.createElement("path",{d:"M11.2971429,14.4857143 L11.1085714,5.82857143 L13.3714286,5.82857143 L13.2,14.4857143 L11.2971429,14.4857143 Z M11.1942857,18 L11.1942857,15.9771429 L13.3028571,15.9771429 L13.3028571,18 L11.1942857,18 Z",id:"!",fill:"#5F668A",fillRule:"nonzero"})));function xi(e,t){var n=e.title,a=e.titleId,i=fi(e,["title","titleId"]);return r.createElement("svg",ji({width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,gi,Oi)}var vi,yi,wi=r.forwardRef(xi),Ci=(n.p,"100%"),ki="column",Si={dialog:{backgroundColor:re,width:Ci,minHeight:Ci,display:"flex",flexDirection:ki,padding:0},wrapper:{width:he,height:Ci,margin:"0 auto",flex:1,display:"flex",flexDirection:ki},contentDiv:{display:"flex",flex:1,flexDirection:"row"},headerDiv:{display:"flex",justifyContent:"space-between",alignItems:"center"},contentWrapper:{marginLeft:48},button:{marginTop:64},nameTitle:{marginTop:16,marginBottom:25},qrTitle:{marginTop:12,marginBottom:40},qrCodeWrapper:{display:"flex"},qrTextInfoWrapper:{display:"flex",flexDirection:"row"},qrTextWrapper:{width:381,marginLeft:80,display:"flex",flexDirection:"column"},textWrapper:{display:"flex",flexDirection:"column"},qrTextIcon:{marginRight:16},qrText:{marginTop:0},item:{position:"relative",margin:"12px 0 12px 0",display:"flex"},itemText:{extend:Re.p,color:ue,marginRight:24},itemTextActive:{extend:Re.tl2,color:J},itemTextPast:{color:J},stepperPath:{position:"absolute",height:25,width:1,border:[[1,"solid",ue]],right:8,top:18},stepperPast:{border:[[1,"solid",J]]},successMessageWrapper:{backgroundColor:V,display:"flex",flexDirection:"row",padding:"0px 10px",borderRadius:"8px"},successMessage:{color:$,margin:"8px 0px"},successMessageIcon:{marginRight:16,marginBottom:2,display:"flex",flexDirection:"col",alignItems:"center"}},Ni=er()(vi||(vi=Object(Kn.a)(["\n mutation createPairingTotem($name: String!) {\n createPairingTotem(name: $name)\n }\n"]))),Ei=er()(yi||(yi=Object(Kn.a)(["\n {\n machines {\n name\n deviceId\n }\n }\n"]))),Ii=Object(b.a)(Si),Li=tr.a(da.a,ua.a([],["machines"])),Fi={name:""},Pi=ma.d().shape({name:ma.e().required().max(50)}),Bi=[{label:"Machine name",component:function(e){var t=e.nextStep,n=e.classes,r=e.setQrCode,a=e.setName,i=Object(Qn.b)(Ni,{onCompleted:function(e){var n=e.createPairingTotem;r(n),t()},onError:function(e){return console.log(e)}}),o=Object(c.a)(i,1)[0];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(lt,{className:n.nameTitle,children:"Machine Name (ex: Coffee shop 01)"}),Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,initialValues:Fi,validationSchema:Pi,onSubmit:function(e){var t=e.name;a(t),o({variables:{name:t}})},children:Object(qe.jsxs)(ca.c,{className:n.form,children:[Object(qe.jsx)("div",{children:Object(qe.jsx)(ca.a,{name:"name",label:"Enter machine name",component:ni})}),Object(qe.jsx)("div",{className:n.button,children:Object(qe.jsx)(zt,{type:"submit",children:"Submit"})})]})})]})}},{label:"Scan QR code",component:function(e){var t,n=e.classes,a=e.qrCode,i=e.name,o=e.count,c=e.onPaired,l=Object(r.useRef)(null),s=Object(Qn.c)(Ei,{pollInterval:1e4}).data;Object(r.useEffect)((function(){return function(){l.current&&clearTimeout(l.current)}}),[]);var d=null===s||void 0===s||null===(t=s.machines)||void 0===t?void 0:t.find((function(e){return e.name===i})),u=Li(s)>o&&d;return u&&(l.current=setTimeout((function(){return c(d)}),2e3)),Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(lt,{className:n.qrTitle,children:"Scan QR code with your new cryptomat"}),Object(qe.jsxs)("div",{className:n.qrCodeWrapper,children:[Object(qe.jsx)("div",{children:Object(qe.jsx)(sa.a,{size:240,fgColor:J,value:a})}),Object(qe.jsxs)("div",{className:n.qrTextWrapper,children:[Object(qe.jsxs)("div",{className:n.qrTextInfoWrapper,children:[Object(qe.jsx)("div",{className:n.qrTextIcon,children:Object(qe.jsx)(wi,{})}),Object(qe.jsx)("div",{className:n.textWrapper,children:Object(qe.jsx)(ot,{className:n.qrText,children:"To pair the machine you need scan the QR code with your machine. To do this either snap a picture of this QR code or download it through the button above and scan it with the scanning bay on your machine."})})]}),u&&Object(qe.jsxs)("div",{className:n.successMessageWrapper,children:[Object(qe.jsx)("div",{className:n.successMessageIcon,children:Object(qe.jsx)(pi,{})}),Object(qe.jsx)(lt,{className:n.successMessage,children:"Machine has been successfully paired!"})]})]})]})]})}}],Di=Object(r.memo)((function(e){var t=e.close,n=e.onPaired,a=Ii(),i=Object(Qn.c)(Ei).data,o=Object(r.useState)(""),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(""),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(r.useState)(0),j=Object(c.a)(p,2),f=j[0],g=j[1],O=Li(i),x=Bi[f].component;return Object(qe.jsx)("div",{children:Object(qe.jsx)(aa.a,{fullScreen:!0,className:a.dialog,open:!0,"aria-labelledby":"form-dialog-title",children:Object(qe.jsx)(ia.a,{className:a.dialog,children:Object(qe.jsxs)("div",{className:a.wrapper,children:[Object(qe.jsxs)("div",{className:a.headerDiv,children:[Object(qe.jsx)(xt,{children:"Add Machine"}),Object(qe.jsx)(rn.a,{disableRipple:!0,onClick:t,children:Object(qe.jsx)(oa.a,{color:"error",children:Object(qe.jsx)(si,{})})})]}),Object(qe.jsxs)("div",{className:a.contentDiv,children:[Object(qe.jsx)(Ve,{children:Bi.map((function(e,t){return function(e,t,n,r){var a,i,o=e===n,c=n<e,l=n>e;return Object(qe.jsxs)("div",{className:r.item,children:[Object(qe.jsx)("span",{className:w()((a={},Object(v.a)(a,r.itemText,!0),Object(v.a)(a,r.itemTextActive,o),Object(v.a)(a,r.itemTextPast,c),a)),children:t.label}),o&&Object(qe.jsx)(R,{}),c&&Object(qe.jsx)(I,{}),l&&Object(qe.jsx)(H,{}),n<Bi.length-1&&Object(qe.jsx)("div",{className:w()((i={},Object(v.a)(i,r.stepperPath,!0),Object(v.a)(i,r.stepperPast,c),i))})]})}(f,e,t,a)}))}),Object(qe.jsx)("div",{className:a.contentWrapper,children:Object(qe.jsx)(x,{classes:a,nextStep:function(){return g(1)},count:O,onPaired:n,qrCode:s,setQrCode:d,name:h,setName:b})})]})]})})})})}));function Ri(){return(Ri=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ti(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ai=r.createElement("desc",null,"Created with Sketch."),Wi=r.createElement("g",{id:"icon/button/add/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11.5384615,6 C11.5384615,9.05815385 9.05815385,11.5384615 6,11.5384615 C2.94184615,11.5384615 0.461538462,9.05815385 0.461538462,6 C0.461538462,2.94184615 2.94184615,0.461538462 6,0.461538462 C9.05815385,0.461538462 11.5384615,2.94184615 11.5384615,6 Z",id:"Stroke-1",stroke:"#FFFFFF"}),r.createElement("line",{x1:6,y1:3.69230769,x2:6,y2:8.30769231,id:"Stroke-3",stroke:"#FFFFFF"}),r.createElement("line",{x1:3.69230769,y1:6,x2:8.30769231,y2:6,id:"Stroke-5",stroke:"#FFFFFF"}));function zi(e,t){var n=e.title,a=e.titleId,i=Ti(e,["title","titleId"]);return r.createElement("svg",Ri({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Ai,Wi)}var Mi=r.forwardRef(zi);n.p;function Hi(){return(Hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qi(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var $i=r.createElement("desc",null,"Created with Sketch."),Vi=r.createElement("defs",null,r.createElement("path",{d:"M17.8413132,12.8764646 C17.8413132,12.8764646 16.6555879,12.5091919 15.661533,12.2855556 C15.661533,12.2855556 15.3477198,10.3246465 14.8939121,8.23646465 C14.8939121,8.23646465 15.1560495,8.21373737 15.3383242,8.8710101 L16.0223242,12.0219192 C16.0223242,12.0219192 17.2343571,12.2991919 18.1795549,12.6537374 L17.8413132,12.8764646 Z M15.2603407,6.10282828 L15.5328132,5.80555556 C16.0627253,5.87828283 16.3483516,6.02828283 16.3483516,6.02828283 L16.291978,6.11191919 L16.3972088,6.9310101 C16.2440604,6.93646465 16.0091703,7.05919192 16.0091703,7.05919192 L15.8315934,6.95010101 L15.8315934,6.38282828 C15.3026209,6.29919192 15.2556429,6.21828283 15.2556429,6.21828283 L15.2603407,6.10282828 Z M12.4557527,18.2873737 C11.2831813,18.4964646 9.84565385,18.2237374 9.84565385,18.2237374 L9.89732967,17.9991919 C9.89732967,17.9991919 11.6496099,18.1955556 12.6248736,17.8973737 C12.5553462,18.0628283 12.5356154,18.1137374 12.4557527,18.2873737 L12.4557527,18.2873737 Z M9.18984066,14.5464646 C8.379,15.1364646 7.56064286,15.6791919 7.00442308,16.1091919 C6.9705989,16.6955556 6.91516484,17.6464646 6.91516484,17.6464646 L5.46448352,18.5182828 L5.22207692,18.3737374 C5.27845055,17.9219192 5.34891758,17.5882828 5.34891758,17.5882828 L5.55186264,17.4410101 C5.50676374,17.7282828 5.48515385,18.1346465 5.48515385,18.1346465 L6.5928956,17.440101 C6.63705495,16.7019192 6.72443407,15.960101 6.72443407,15.960101 C6.9705989,15.7373737 8.73697253,14.5237374 10.0100803,13.6864646 C10.0100803,13.6864646 10.018533,13.9437374 9.18984066,14.5464646 L9.18984066,14.5464646 Z M14.977533,0.195555556 C15.2612802,0.167373737 15.5065055,0.184646465 15.7103901,0.228282828 L15.7103901,0.228282828 L15.8813901,0.697373737 L16.1003077,0.361919192 C16.2694286,0.447373737 16.3746593,0.547373737 16.4056648,0.624646465 C16.4056648,0.624646465 16.3615055,0.909191919 16.4319725,1.36464646 C16.5005604,1.80373737 16.6988077,2.78191919 16.6988077,2.78191919 C16.9740989,3.00646465 17.2850934,3.51282828 17.2850934,3.51282828 C17.4758242,4.41737374 17.4645495,5.04919192 17.4636099,5.1210101 C16.6734396,4.68646465 15.6173736,4.58555556 15.6173736,4.58555556 L15.6173736,4.58555556 L15.2481264,4.90828283 C15.9753462,5.00828283 16.8792033,5.26555556 17.1122143,5.44555556 C17.2484505,5.74737374 17.3386484,6.22828283 17.3386484,6.22828283 L17.3386484,6.22828283 L17.0445659,6.58919192 L17.3198571,6.8810101 C17.3386484,7.22464646 17.2183846,7.56919192 17.2183846,7.56919192 C17.7905769,7.93010101 17.9512418,8.79373737 18.3101538,10.250101 C18.6700055,11.7064646 18.9903956,12.9055556 18.9903956,12.9055556 L18.9903956,12.9055556 L18.4567253,13.2019192 C19.1623352,15.7282828 18.444511,17.7391919 17.5378352,19.0664646 C16.6320989,20.3946465 16.0862143,21.7137374 16.1031264,22.8910101 L16.1031264,22.8910101 L16.5475385,23.2346465 L16.7749121,23.9491919 L14.3048077,23.9491919 L14.293533,23.2728283 C14.2925934,21.5619192 14.9230385,20.1328283 14.9230385,20.1328283 C15.2857088,20.0473737 15.6596538,19.7628283 15.6596538,19.7628283 C15.0733681,19.8828283 14.3414505,19.7964646 14.3414505,19.7964646 C14.8676044,18.8537374 15.0292088,18.1773737 15.0292088,18.1773737 L15.0292088,18.1773737 L14.7811648,18.1228283 C14.6956648,18.310101 14.6073462,18.4937374 14.5133901,18.6710101 C13.8754286,19.8864646 13.1735769,20.6628283 12.7554725,22.4055556 L12.7554725,22.4055556 L13.1933077,22.7455556 L13.6987912,23.9491919 L10.8509835,23.9491919 C10.8340714,21.8246465 11.495522,20.2273737 11.7341703,19.7628283 C10.2233571,19.9264646 8.42128022,19.1782828 6.99314835,19.4664646 C6.60041209,21.9473737 4.59257143,22.4355556 3.65019231,22.300101 L3.65019231,22.300101 L2.97652747,23.4146465 L3.58724176,23.9491919 L1.33135714,23.9491919 C1.32008242,23.8546465 1.2918956,23.7537374 1.22988462,23.6591919 C1.22988462,23.6591919 1.97401648,22.5882828 2.48231868,21.150101 C2.89008791,21.3255556 3.75166484,20.9928283 3.78736813,20.1055556 C3.82401099,19.2191919 3.67086264,17.8419192 4.46854945,16.7891919 C5.2652967,15.7355556 6.12687363,15.1655556 7.25152747,14.3328283 C7.98250549,13.7910101 9.22084615,12.8755556 9.99974176,12.3010101 L9.99974176,12.3010101 L9.61546154,12.3864646 L6.81087363,14.6491919 L5.82997253,14.6491919 L8.66368681,12.1164646 L8.29725824,12.1091919 L5.33576374,14.6491919 L4.34170879,14.6491919 L7.27313736,11.720101 L6.9208022,11.7173737 L3.88038462,14.6491919 L2.86565934,14.6491919 L5.8093022,11.3037374 L5.46918132,11.3055556 L2.43534066,14.6491919 L1.36706044,14.6491919 L4.22614286,10.8528283 L3.89635714,10.8573737 L0.963989011,14.6491919 L0,14.6491919 C0,14.6491919 4.11809341,8.22464646 4.92893407,7.00737374 C5.73883516,5.79010101 6.6192033,4.62282828 8.06894505,4.38464646 C9.53465934,4.14282828 10.5343516,4.46646465 11.2502967,5.63373737 C11.636456,6.2610101 12.1034176,6.97828283 12.4698462,7.55919192 C12.0968407,8.1510101 11.6298791,8.6110101 11.5857198,9.32282828 C11.534044,10.1419192 12.0921429,10.6373737 12.6558791,10.6773737 C12.2321374,10.5282828 11.8976538,10.0337374 12.0489231,9.37646465 C12.2058297,8.69737374 12.7554725,8.35191919 13.1726374,7.80282828 C13.5315495,7.32828283 13.5371868,6.63282828 13.5108791,6.4010101 C13.4836319,6.16919192 13.2167967,5.98828283 13.2167967,5.98828283 C13.2167967,5.98828283 13.2252527,5.52373737 13.2167967,5.01646465 C13.2083407,4.51010101 13.4300769,4.21828283 13.4300769,4.21828283 C13.4300769,4.21828283 13.4216209,3.4610101 13.3943736,2.57646465 C13.3671264,1.72555556 13.2863242,1.46828283 13.205522,1.35464646 C13.205522,1.35464646 13.2694121,1.10919192 13.5099396,0.844646465 L13.5099396,0.844646465 L13.7542253,1.06282828 L13.8284505,0.571919192 C13.9825385,0.469191919 14.1723297,0.375555556 14.4072198,0.307373737 C14.4325879,0.30010101 14.4570165,0.294646465 14.4823846,0.288282828 L14.4823846,0.288282828 L14.7896209,0.644646465 Z M7.71628243,19.8937938 C8.32897736,19.8402566 9.02386307,19.9393405 9.75797621,20.0432188 L9.75797621,20.0432188 L9.86538462,20.058401 C9.7449004,20.8103202 9.02106112,21.7691969 7.79193531,22.0896215 L7.79193531,22.0896215 L9.01358923,23.5151515 L7.36136769,23.5151515 C7.15589073,23.2226941 6.50396838,22.32135 6.16586538,21.9681638 C6.72065317,21.6525335 7.42954868,21.0388524 7.71628243,19.8937938 Z",id:"path-1"})),Yi=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-128.000000, -14.000000)"},r.createElement("g",{id:"icon/lamassu-logo",transform:"translate(128.000000, 14.000000)"},r.createElement("g",{id:"color/amaz/default"},r.createElement("mask",{id:"mask-2",fill:"white"},r.createElement("use",{xlinkHref:"#path-1"})),r.createElement("use",{id:"Mask",fill:"#16D6D3",xlinkHref:"#path-1"})))));function Xi(e,t){var n=e.title,a=e.titleId,i=qi(e,["title","titleId"]);return r.createElement("svg",Hi({width:"19px",height:"24px",viewBox:"0 0 19 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,$i,Vi,Yi)}var Ui=r.forwardRef(Xi);n.p;function Gi(){return(Gi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Zi(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _i=r.createElement("desc",null,"Created with Sketch."),Ki=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"nav-/-primary-/-1440",transform:"translate(-1295.000000, -19.000000)",stroke:"#FFFFFF",strokeWidth:2},r.createElement("g",{id:"icon/menu/notification",transform:"translate(1296.000000, 20.000000)"},r.createElement("path",{d:"M10.1052632,14.3157895 C10.1052632,15.2454737 9.35073684,16 8.42105263,16 C7.49136842,16 6.73684211,15.2454737 6.73684211,14.3157895",id:"Stroke-1"}),r.createElement("path",{d:"M1.6,14.3157895 C0.7168,14.3157895 0,13.6031813 0,12.7251462 C0,11.8471111 0.7168,11.1345029 1.6,11.1345029 L1.6,6.3625731 C1.6,2.84884211 4.4656,0 8,0 C11.5344,0 14.4,2.84884211 14.4,6.3625731 L14.4,11.1345029 C15.2832,11.1345029 16,11.8471111 16,12.7251462 C16,13.6031813 15.2832,14.3157895 14.4,14.3157895 L1.6,14.3157895 Z",id:"Stroke-3",strokeLinejoin:"round"}))));function Qi(e,t){var n=e.title,a=e.titleId,i=Zi(e,["title","titleId"]);return r.createElement("svg",Gi({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,_i,Ki)}var Ji=r.forwardRef(Qi),eo=(n.p,Re.tl2),to=Re.p,no=56,ro=40;var ao,io={headerContainer:{position:"relative"},header:{backgroundColor:J,color:_,height:no,display:"flex"},content:{maxWidth:he,flex:1,display:"flex",alignItems:"center",margin:"0 auto"},nav:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},ul:{display:"flex",paddingLeft:36,height:56,margin:0},li:{listStyle:"none",color:_,margin:[[20,20,0,20]],"&:hover":{color:_},"&:hover::after":{width:"50%",marginLeft:"-25%"},position:"relative","&:after":{content:'""',display:"block",background:_,width:0,height:4,left:"50%",marginLeft:0,bottom:-8,position:"absolute",borderRadius:1e3,transition:[["all","0.2s","cubic-bezier(0.95, 0.1, 0.45, 0.94)"]]}},link:{extend:to,textDecoration:"none",border:"none",color:_,backgroundColor:"transparent"},forceSize:{display:"inline-block",textAlign:"center","&:after":{display:"block",content:"attr(forcesize)",fontWeight:700,height:0,overflow:"hidden",visibility:"hidden"}},activeLink:{color:_,"& li::after":{width:"50%",marginLeft:"-25%"}},addMachine:{marginLeft:"auto"},subheader:{backgroundColor:ae,color:_,height:ro,display:"flex"},subheaderUl:{display:"flex",paddingLeft:0},subheaderLi:{extend:eo,display:"flex",alignItems:"center",height:24,listStyle:"none",padding:[[0,20]],"&:first-child":{paddingLeft:0}},subheaderLink:{extend:to,textDecoration:"none",border:"none",color:ue},activeSubheaderLink:{extend:eo,color:le},white:{color:_},logo:{display:"flex",alignItems:"center","& > svg":{marginRight:16}},logoLink:{cursor:"pointer"},actionButtonsContainer:{zIndex:1,position:"relative",display:"flex",justifyContent:"space-between",minWidth:200,transform:"translateZ(0)"},notificationIcon:{marginTop:4,cursor:"pointer",background:"transparent",boxShadow:"0px 0px 0px transparent",border:"0px solid transparent",textShadow:"0px 0px 0px transparent",outline:"none"},hasUnread:{position:"absolute",top:4,left:182,width:"9px",height:"9px",backgroundColor:ee,borderRadius:"50%"},popper:{zIndex:1}},oo=Object(b.a)(io),co=er()(ao||(ao=Object(Kn.a)(["\n query getUnread {\n hasUnreadNotifications\n }\n"]))),lo=function(e){var t=e.item,n=e.classes,a=Object(r.useState)(null),i=Object(c.a)(a,2),o=i[0],l=i[1];return Object(qe.jsx)("div",{className:n.subheader,children:Object(qe.jsx)("div",{className:n.content,children:Object(qe.jsx)("nav",{children:Object(qe.jsx)("ul",{className:n.subheaderUl,children:t.children.map((function(e,t){return Object(qe.jsx)("li",{className:n.subheaderLi,children:Object(qe.jsx)(x.c,{to:{pathname:e.route,state:{prev:o}},className:n.subheaderLink,activeClassName:n.activeSubheaderLink,isActive:function(t){return!!t&&(l(e.route),!0)},children:e.label})},t)}))})})})})},so=tr.a(nr.a,rr.a),uo=Object(r.memo)((function(e){var t=e.tree,n=Object(r.useState)(!1),a=Object(c.a)(n,2),i=a[0],o=a[1],l=Object(r.useState)(null),s=Object(c.a)(l,2),d=s[0],u=s[1],m=Object(r.useState)({x:0,y:0}),h=Object(c.a)(m,2),b=h[0],p=h[1],j=Object(r.useState)(),f=Object(c.a)(j,2),g=f[0],v=f[1],y=Object(r.useState)(!1),C=Object(c.a)(y,2),k=C[0],S=C[1],N=Object(Qn.c)(co,{pollInterval:6e4}),E=N.data,I=N.refetch,L=Object(r.useRef)(),F=Object(r.useRef)(),P=Object(O.h)(),B=oo();Object(r.useEffect)((function(){return(null===E||void 0===E?void 0:E.hasUnreadNotifications)?S(!0):so(null===E||void 0===E?void 0:E.hasUnreadNotifications)?S(!1):void 0}),[E]);var D=function(){u(null),document.querySelector("#root").classList.remove("root-notifcenter-open"),document.querySelector("body").classList.remove("body-notifcenter-open")},R=Boolean(d),T=R?"notifications-popper":void 0;return Object(qe.jsxs)("header",{className:B.headerContainer,children:[Object(qe.jsx)("div",{className:B.header,children:Object(qe.jsxs)("div",{className:B.content,children:[Object(qe.jsxs)("div",{onClick:function(){v(!1),P.push("/dashboard")},className:w()(B.logo,B.logoLink),children:[Object(qe.jsx)(Ui,{}),Object(qe.jsx)(at,{className:B.white,children:"Lamassu Admin"})]}),Object(qe.jsx)("nav",{className:B.nav,children:Object(qe.jsx)("ul",{className:B.ul,children:t.map((function(e,t){return Object(qe.jsx)(x.c,{to:e.route||e.children[0].route,isActive:function(t){return!!t&&(v(e),!0)},className:w()(B.link,B.whiteLink),activeClassName:B.activeLink,children:Object(qe.jsx)("li",{className:B.li,children:Object(qe.jsx)("span",{className:B.forceSize,forcesize:e.label,children:e.label})})},t)}))})}),Object(qe.jsxs)("div",{className:B.actionButtonsContainer,children:[Object(qe.jsx)(Ct,{color:"secondary",Icon:Lt,InverseIcon:Mi,onClick:function(){return o(!0)},children:"Add machine"}),Object(qe.jsx)(Ut.a,{onClickAway:D,children:Object(qe.jsxs)("div",{ref:L,children:[Object(qe.jsxs)("button",{onClick:function(e){var t=L.current.getBoundingClientRect();p({x:t.x,y:t.y}),u(d?null:e.currentTarget),document.querySelector("#root").classList.add("root-notifcenter-open"),document.querySelector("body").classList.add("body-notifcenter-open")},className:B.notificationIcon,children:[Object(qe.jsx)(Ji,{}),k&&Object(qe.jsx)("div",{className:B.hasUnread})]}),Object(qe.jsx)(Gt.a,{ref:F,id:T,open:R,anchorEl:d,className:B.popper,disablePortal:!1,modifiers:{preventOverflow:{enabled:!0,boundariesElement:"viewport"}},children:Object(qe.jsx)(ra,{popperRef:F,buttonCoords:b,close:D,hasUnreadProp:k,refetchHasUnreadHeader:I})})]})})]})]})}),g&&g.children&&Object(qe.jsx)(lo,{item:g,classes:B}),i&&Object(qe.jsx)(Di,{close:function(){return o(!1)},onPaired:function(e){o(!1),P.push("/maintenance/machine-status",{id:e.deviceId})}})]})})),mo=n(317),ho=n(693),bo=n(711),po=n(661),jo=n(683),fo=n(716),go=n(705),Oo=n(706),xo=n(664),vo=n(712),yo=n(305),wo=n.n(yo),Co=function(){var e=Object(O.h)(),t=new URLSearchParams(Object(O.i)().search);return wo()({url:"".concat("","/api/register?otp=").concat(t.get("otp")),method:"GET",options:{withCredentials:!0},trigger:[],customHandler:function(t,n){t||n&&e.push("/wizard",{fromAuthRegister:!0})}}),Object(qe.jsx)("span",{children:"registering..."})},ko=n(40),So=n.n(ko),No=n(65),Eo=n(649);function Io(){return(Io=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Lo(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Fo=r.createElement("desc",null,"Created with Sketch."),Po=r.createElement("g",{id:"icon/action/help/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M20.0004,11 C20.0004,6.03028475 15.9701153,2 11.0004,2 C6.03004556,2 2.0004,6.02992391 2.0004,11 C2.0004,15.9700761 6.03004556,20 11.0004,20 C15.9701153,20 20.0004,15.9697153 20.0004,11 Z M22.0004,11 C22.0004,17.0742847 17.0746847,22 11.0004,22 C4.92544514,22 0.000400000001,17.0746147 0.000400000001,11 C0.000400000001,4.92538534 4.92544514,0 11.0004,0 C17.0746847,0 22.0004,4.92571525 22.0004,11 Z",id:"Stroke-1",fill:"#1B2559",fillRule:"nonzero"}),r.createElement("path",{d:"M9.9164,8.9063 C9.9164,9.45858475 9.46868475,9.9063 8.9164,9.9063 C8.36411525,9.9063 7.9164,9.45858475 7.9164,8.9063 C7.9164,6.89094438 9.72972438,5.35290249 11.7463843,5.7072003 C13.0663562,5.93764844 14.1348314,7.00654285 14.3652323,8.32479116 C14.6130182,9.7312185 13.941375,11.0876584 12.732214,11.7545735 C12.370484,11.9534687 12.1664,12.2664153 12.1664,12.5913 L12.1664,12.6563 C12.1664,13.2085847 11.7186847,13.6563 11.1664,13.6563 C10.6141153,13.6563 10.1664,13.2085847 10.1664,12.6563 L10.1664,12.5913 C10.1664,11.5009567 10.7946963,10.5375141 11.7674377,10.0026589 C12.2360927,9.74417086 12.493064,9.22519581 12.3953326,8.67046887 C12.3098185,8.1811985 11.8915858,7.76280177 11.4013649,7.67721566 C10.6126181,7.53864454 9.9164,8.1291691 9.9164,8.9063 Z",id:"Stroke-3",fill:"#1B2559",fillRule:"nonzero"}),r.createElement("path",{d:"M10.1039,15.2188 C10.1039,14.6318 10.5799,14.1568 11.1659,14.1568 C11.7529,14.1568 12.2289,14.6318 12.2289,15.2188 C12.2289,15.8058 11.7529,16.2808 11.1659,16.2808 C10.5799,16.2808 10.1039,15.8058 10.1039,15.2188",id:"Fill-5",fill:"#1B2559"}));function Bo(e,t){var n=e.title,a=e.titleId,i=Lo(e,["title","titleId"]);return r.createElement("svg",Io({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Fo,Po)}var Do=r.forwardRef(Bo),Ro=(n.p,Object(b.a)({transparentButton:{border:"none",backgroundColor:"transparent",marginTop:4,outline:"none",cursor:"pointer"},popoverContent:function(e){return{width:e.width,padding:[[10,15]]}}})),To=function(e){var t=Ro({width:e}),n=Object(r.useState)(null),a=Object(c.a)(n,2),i=a[0],o=a[1],l=Boolean(i);return{classes:t,helpPopperAnchorEl:i,helpPopperOpen:l,handleOpenHelpPopper:function(e){o(i?null:e.currentTarget)},handleCloseHelpPopper:function(){o(null)}}},Ao=Object(r.memo)((function(e){var t=e.children,n=e.width,r=e.Icon,a=void 0===r?Do:r,i=To(n);return Object(qe.jsx)(Ut.a,{onClickAway:i.handleCloseHelpPopper,children:Object(qe.jsxs)("div",{children:[Object(qe.jsx)("button",{type:"button",className:i.classes.transparentButton,onClick:i.handleOpenHelpPopper,children:Object(qe.jsx)(a,{})}),Object(qe.jsx)(Kt,{open:i.helpPopperOpen,anchorEl:i.helpPopperAnchorEl,placement:"bottom",children:Object(qe.jsx)("div",{className:i.classes.popoverContent,children:t})})]})})})),Wo=Object(r.memo)((function(e){var t=e.parentElements,n=e.children,r=e.width,a=To(r);return Object(qe.jsxs)("div",{children:[Object(qe.jsx)("div",{onMouseEnter:a.handleOpenHelpPopper,onMouseLeave:a.handleCloseHelpPopper,children:t}),Object(qe.jsx)(Kt,{open:a.helpPopperOpen,anchorEl:a.helpPopperAnchorEl,placement:"bottom",children:Object(qe.jsx)("div",{className:a.classes.popoverContent,children:n})})]})})),zo=n(316);function Mo(){return(Mo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ho(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var qo=r.createElement("desc",null,"Created with Sketch."),$o=r.createElement("defs",null,r.createElement("path",{id:"arrow-path",d:"M5.3501239,7.53208616 L0.473798314,2.73082122 C-0.158421727,2.1051411 -0.158421727,1.0952488 0.476737158,0.466675069 C1.11220338,-0.155816755 2.1378971,-0.155816755 2.77494316,0.468226909 L6.49990857,4.13723769 L10.2264532,0.466675069 C10.8619195,-0.155816755 11.8876132,-0.155816755 12.5260183,0.469568675 C13.1582383,1.0952488 13.1582383,2.1051411 12.5245507,2.73226987 L7.64673876,7.53497972 C7.33802629,7.83583835 6.92590837,8 6.49990828,8 C6.0739082,8 5.66179027,7.83583835 5.3501239,7.53208616 Z"})),Vo=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fillRule:"evenodd"},r.createElement("g",{id:"icon/action/arrow/regular"},r.createElement("mask",{id:"mask-2",fill:"white"},r.createElement("use",{xlinkHref:"#path-1"})),r.createElement("use",{id:"Mask",fillRule:"nonzero",xlinkHref:"#arrow-path"})));function Yo(e,t){var n=e.title,a=e.titleId,i=Ho(e,["title","titleId"]);return r.createElement("svg",Mo({width:"13px",height:"8px",viewBox:"0 0 13 8",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,qo,$o,Vo)}var Xo=r.forwardRef(Yo),Uo=(n.p,Re.p),Go=152,Zo={selectedItem:{width:111,display:"block",whiteSpace:"nowrap",overflow:"hidden"},select:{width:Go,zIndex:2,"& label":{extend:Re.label1,color:se,paddingLeft:10},"& button":{extend:Uo,position:"relative",border:0,backgroundColor:ae,width:Go,padding:[[6,0,6,12]],borderRadius:20,lineHeight:"1.14",textAlign:"left",color:se,cursor:"pointer",outline:"0 none"},"& ul":{maxHeight:"200px",width:Go,overflowY:"auto",position:"absolute",margin:0,borderTop:0,padding:0,borderRadius:[[0,0,8,8]],backgroundColor:ae,outline:"0 none","& li":{extend:Uo,listStyleType:"none",padding:[[6,12]],cursor:"pointer","& span":{width:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap"}},"& li:hover":{backgroundColor:se,color:_}},"& svg":{position:"absolute",top:12,right:14,fill:se}},selectFiltered:{"& button":{backgroundColor:se,color:_},"& ul":{"& li":{backgroundColor:se,color:_},"& li:hover":{backgroundColor:ae,color:se}},"& svg":{fill:[[_],"!important"]}},open:{"& button":{borderRadius:[[8,8,0,0]]}}},_o=Object(b.a)(Zo);var Ko=function(e){var t,n=e.className,r=e.label,a=e.items,i=Object(Ue.a)(e,["className","label","items"]),o=_o(),c=Object(zo.a)({items:a,selectedItem:i.selectedItem,onSelectedItemChange:function(e){i.onSelectedItemChange(e.selectedItem)}}),s=c.isOpen,d=c.selectedItem,u=c.getToggleButtonProps,m=c.getLabelProps,h=c.getMenuProps,b=c.getItemProps,p=(t={},Object(v.a)(t,o.select,!0),Object(v.a)(t,o.selectFiltered,d!==i.default),Object(v.a)(t,o.open,s),t);return Object(qe.jsxs)("div",{className:w()(p,n),children:[Object(qe.jsx)("label",Object(l.a)(Object(l.a)({},m()),{},{children:r})),Object(qe.jsxs)("button",Object(l.a)(Object(l.a)({},u()),{},{children:[Object(qe.jsx)("span",{className:o.selectedItem,children:d.display}),Object(qe.jsx)(Xo,{})]})),Object(qe.jsx)("ul",Object(l.a)(Object(l.a)({},h()),{},{children:s&&a.map((function(e,t){var n=e.code,r=e.display;return Object(qe.jsx)("li",Object(l.a)(Object(l.a)({},b({code:n,index:t})),{},{children:Object(qe.jsx)("span",{children:r})}),"".concat(n).concat(t))}))}))]})},Qo=n(639),Jo=n(640),ec=n(306),tc=n(641),nc=n(642),rc="cashOut",ac="wallets",ic="operatorInfo",oc="notifications",cc="locale",lc="commissions",sc="receipt",dc="coinAtmRadar",uc="termsConditions",mc=Qo.a((function(e,t){return Jo.a(ar.a(ec.a(0,e),tc.a(t)))})),hc=Qo.a((function(e,t){return Jo.a(lr.a((function(t){return e(t[0])}),tc.a(t)))})),bc=Qo.a((function(e,t){return nc.a(e,t)?t.slice(e.length):t})),pc=Qo.a((function(e,t){return tr.a(function(e){return mc(bc("".concat(e,"_")))}(e),function(e){return hc(nc.a("".concat(e,"_")))}(e))(t)})),jc=Qo.a((function(e,t){return mc((function(t){return"".concat(e,"_").concat(t)}))(t)})),fc={grid:{flex:1,height:"100%"},content:{display:"flex",flexDirection:"column",flex:1,marginLeft:48},footer:{margin:[["auto",0,24,"auto"]]},modalTitle:{lineHeight:"120%",color:J,fontSize:14,fontFamily:pe,fontWeight:900},subtitle:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},white:{color:_},deleteButton:{paddingLeft:13},addressRow:{marginLeft:8},error:{color:me}},gc=n(643),Oc=n(319),xc=Object(b.a)({modal:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},wrapper:function(e){var t=e.width,n=e.height;return{width:t,height:n,display:"flex",flexDirection:"column",minHeight:null!==n&&void 0!==n?n:400,maxHeight:"90vh",overflowY:"auto",borderRadius:8,outline:0}},infoPanelWrapper:function(e){var t=e.width,n=e.infoPanelHeight;return{width:t,height:n,marginTop:16,display:"flex",flexDirection:"column",minHeight:null!==n&&void 0!==n?n:200,maxHeight:"90vh",overflowY:"auto",borderRadius:8,outline:0}},panelContent:{width:"100%",display:"flex",flexDirection:"column",flex:1,padding:[[0,24]]},content:function(e){var t=e.small;return{width:"100%",display:"flex",flexDirection:"column",flex:1,padding:e.xl?[[0,88]]:t?[[0,16]]:[[0,32]]}},button:function(e){var t=e.small,n=e.xl;return{padding:[[0,0,n?26:0,0]],margin:n?[[0,0,"auto","auto"]]:t?[[12,12,"auto","auto"]]:[[16,16,"auto","auto"]]}},header:{display:"flex"},title:function(e){return{margin:e.small?[[20,0,8,16]]:[[28,0,8,32]]}}}),vc=function(e){var t=e.width,n=e.height,r=e.infoPanelHeight,a=e.title,i=e.small,o=e.xl,c=e.infoPanel,s=e.handleClose,d=e.children,u=(e.secondaryModal,e.className),m=e.closeOnEscape,h=e.closeOnBackdropClick,b=Object(Ue.a)(e,["width","height","infoPanelHeight","title","small","xl","infoPanel","handleClose","children","secondaryModal","className","closeOnEscape","closeOnBackdropClick"]),p=xc({width:t,height:n,small:i,infoPanelHeight:r,xl:o}),j=i?at:tt,f=o?28:i?16:20;return Object(qe.jsx)(Oc.a,Object(l.a)(Object(l.a)({onClose:function(e,t){(h||"backdropClick"!==t)&&(m||"escapeKeyDown"!==t)&&s()},className:p.modal},b),{},{children:Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)(Zt.a,{className:w()(p.wrapper,u),children:[Object(qe.jsxs)("div",{className:p.header,children:[a&&Object(qe.jsx)(j,{className:p.title,children:a}),Object(qe.jsx)(cn,{size:f,className:p.button,onClick:function(){return s()},children:Object(qe.jsx)(si,{})})]}),Object(qe.jsx)("div",{className:p.content,children:d})]}),c&&Object(qe.jsx)(Zt.a,{className:w()(p.infoPanelWrapper,u),children:Object(qe.jsx)("div",{className:p.panelContent,children:c})})]})}))},yc=Object(b.a)(fc),wc=function(e){var t=e.onClose,n=e.selectedCoin,r=e.addToBlacklist,a=e.errorMsg,i=yc();return Object(qe.jsxs)(vc,{closeOnBackdropClick:!0,width:676,height:200,handleClose:t,open:!0,children:[Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,initialValues:{address:""},validationSchema:ma.d({address:ma.e().trim().required("An address is required")}),onSubmit:function(e,t){var a=e.address,i=t.resetForm;!function(e){"BCH"!==n.code||e.startsWith("bitcoincash:")||(e="bitcoincash:"+e),r(n.code,e)}(a.trim()),i()},children:Object(qe.jsxs)(ca.c,{id:"address-form",children:[Object(qe.jsx)(rt,{children:n.display?"Blacklist ".concat(gc.a(n.display)," address"):""}),Object(qe.jsx)("span",{className:i.error,children:a}),Object(qe.jsx)(ca.b,{name:"address",fullWidth:!0,autoComplete:"off",label:"Paste new address to blacklist here",placeholder:"ex: ".concat({BTC:"1ADwinnimZKGgQ3dpyfoUZvJh4p1UWSSpD",ETH:"0x71C7656EC7ab88b098defB751B7401B5f6d8976F",LTC:"LPKvbjwV1Kaksktzkr7TMK3FQtQEEe6Wqa",DASH:"XqQ7gU8eM76rEfey726cJpT2RGKyJyBrcn",ZEC:"t1KGyyv24eL354C9gjveBGEe8Xz9UoPKvHR",BCH:"qrd6za97wm03lfyg82w0c9vqgc727rhemg5yd9k3dm"}[n.code]),component:ni})]})}),Object(qe.jsx)("div",{className:i.footer,children:Object(qe.jsx)(mn,{type:"submit",form:"address-form",children:"Blacklist address"})})]})},Cc=n(66),kc=n(644),Sc=Object(b.a)({content:{width:434,padding:16,paddingRight:28},titleSection:{padding:16,paddingRight:12,display:"flex",justifyContent:"space-between",margin:0},actions:{padding:32,paddingTop:16},title:{margin:0},closeButton:{padding:0,marginTop:-4}}),Nc=function(e){var t=e.children,n=e.close,r=Sc();return Object(qe.jsxs)("div",{className:r.titleSection,children:[t,n&&Object(qe.jsx)(cn,{size:16,"aria-label":"close",onClick:n,className:r.closeButton,children:Object(qe.jsx)(si,{})})]})},Ec=function(e){var t=e.title,n=void 0===t?"Confirm Delete":t,r=e.open,a=void 0!==r&&r,i=e.onConfirmed,o=e.onDismissed,c=e.item,l=void 0===c?"item":c,s=e.confirmationMessage,d=void 0===s?"Are you sure you want to delete this ".concat(l,"?"):s,u=e.errorMessage,m=void 0===u?"":u,h=Sc();return Object(qe.jsxs)(aa.a,{open:a,"aria-labelledby":"form-dialog-title",children:[Object(qe.jsx)(Nc,{close:function(){return o()},children:Object(qe.jsx)(at,{className:h.title,children:n})}),m&&Object(qe.jsx)(Nc,{children:Object(qe.jsx)(gt,{children:m.split(":").map((function(e){return Object(qe.jsxs)(qe.Fragment,{children:[e,Object(qe.jsx)("br",{})]})}))})}),Object(qe.jsx)(ia.a,{className:h.content,children:d&&Object(qe.jsx)(ot,{children:d})}),Object(qe.jsx)(kc.a,{className:h.actions,children:Object(qe.jsx)(zt,{onClick:i,children:"Confirm"})})]})},Ic=n(647),Lc=n(91),Fc=n(645),Pc=n(646),Bc=Re.tl2,Dc=Re.label1,Rc={size:function(e){var t=e.size;return Te(t)},bold:Ae,header:{extend:Bc,backgroundColor:Fe,height:Ne,textAlign:"left",color:_,display:"flex",alignItems:"center"},doubleHeader:{extend:Bc,backgroundColor:Fe,height:Le,color:_,display:"table-row"},thDoubleLevel:function(e){return{width:e.width,display:"table-cell","& > :first-child":{margin:[[0,10]],extend:Dc,fontWeight:700,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:se,color:_,borderRadius:[[0,0,8,8]],height:28},"& > :last-child":{padding:[[0,11]],display:"table-cell",verticalAlign:"middle",height:Le-28}}},cellDoubleLevel:{display:"flex",padding:[[0,16]]},td:function(e){var t=e.textAlign;return{width:e.width,padding:[[1,24,0,24]],textAlign:t}},tdHeader:{verticalAlign:"middle",display:"table-cell",padding:[[0,24]]},trError:{backgroundColor:Pe},trAdding:{backgroundColor:Be},mainContent:function(e){return{display:"flex",alignItems:"center",minHeight:{sm:34,lg:68}[e.size]||48}},cardContentRoot:{margin:0,padding:0,"&:last-child":{padding:0}},card:{extend:Re.p,"&:before":{height:0},margin:[[4,0,0,0]],width:"100%",boxShadow:[[0,0,4,0,"rgba(0, 0, 0, 0.08)"]]},actionCol:{marginLeft:"auto"},errorContent:{padding:[[12,0,12,24]],color:me}},Tc=Object(b.a)(Rc),Ac=function(e){var t=e.children,n=e.className,r=Object(Ue.a)(e,["children","className"]);return Object(qe.jsx)("div",Object(l.a)(Object(l.a)({className:w()(n)},r),{},{children:t}))},Wc=function(e){var t=e.children,n=e.className,r=Tc();return Object(qe.jsx)("div",{className:w()(n,r.header),children:t})},zc=function(e){var t=e.children,n=e.className,r=Tc();return Object(qe.jsx)("div",{className:w()(n,r.doubleHeader),children:t})},Mc=function(e){var t=e.children,n=e.className;return Object(qe.jsx)("div",{className:w()(n),children:t})},Hc=function(e){var t,n=e.children,r=e.header,a=e.className,i=e.width,o=void 0===i?100:i,c=e.size,l=e.bold,s=e.textAlign,d=e.action,u=Tc({textAlign:s,width:o,size:c}),m=(t={},Object(v.a)(t,u.td,!0),Object(v.a)(t,u.tdHeader,r),Object(v.a)(t,u.actionCol,d),Object(v.a)(t,u.size,!r),Object(v.a)(t,u.bold,!r&&l),t);return Object(qe.jsx)("div",{className:w()(a,m),children:n})},qc=function(e){var t=e.children,n=Object(Ue.a)(e,["children"]);return Object(qe.jsx)(Hc,Object(l.a)(Object(l.a)({header:!0},n),{},{children:t}))},$c=function(e){var t=e.title,n=e.children,r=e.className,a=e.width,i=Tc({width:a});return Object(qe.jsxs)("div",{className:w()(r,i.thDoubleLevel),children:[Object(qe.jsx)("div",{children:t}),Object(qe.jsx)("div",{children:n})]})},Vc=function(e){var t,n=e.onClick,r=e.error,a=e.errorMessage,i=e.children,o=e.className,c=e.size,l=e.newRow,s=Tc({size:c}),d={root:s.cardContentRoot},u=(t={},Object(v.a)(t,s.tr,!0),Object(v.a)(t,s.trError,r),Object(v.a)(t,s.card,!0),Object(v.a)(t,s.trAdding,l),Object(v.a)(t,"className",o),t);return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)(Fc.a,{className:w()(u,o),onClick:n,children:Object(qe.jsxs)(Pc.a,{classes:d,children:[Object(qe.jsx)("div",{className:s.mainContent,children:i}),r&&Object(qe.jsx)("div",{className:s.errorContent,children:a})]})})})};function Yc(){return(Yc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Xc(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Uc=r.createElement("defs",null,r.createElement("circle",{id:"path-100",cx:80,cy:80,r:80}),r.createElement("rect",{id:"path-300",x:28,y:44,width:104,height:116,rx:4}),r.createElement("filter",{x:"-23.1%",y:"-20.7%",width:"146.2%",height:"141.4%",filterUnits:"objectBoundingBox",id:"filter-4"},r.createElement("feOffset",{dx:0,dy:0,in:"SourceAlpha",result:"shadowOffsetOuter1"}),r.createElement("feGaussianBlur",{stdDeviation:8,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0",type:"matrix",in:"shadowBlurOuter1"})),r.createElement("rect",{id:"path-5",x:37,y:66,width:84,height:8,rx:2}),r.createElement("mask",{id:"mask-6",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},r.createElement("use",{xlinkHref:"#path-5"})),r.createElement("rect",{id:"path-7",x:37,y:78,width:84,height:8,rx:2}),r.createElement("mask",{id:"mask-8",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},r.createElement("use",{xlinkHref:"#path-7"})),r.createElement("rect",{id:"path-9",x:37,y:90,width:84,height:8,rx:2}),r.createElement("mask",{id:"mask-10",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},r.createElement("use",{xlinkHref:"#path-9"})),r.createElement("rect",{id:"path-11",x:37,y:102,width:84,height:8,rx:2}),r.createElement("mask",{id:"mask-12",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:84,height:8,fill:"white"},r.createElement("use",{xlinkHref:"#path-11"}))),Gc=r.createElement("g",{id:"\\u21B3-v13a",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"transactions_v13a#1-(empty-table)",transform:"translate(-640.000000, -220.000000)"},r.createElement("g",{id:"Group-2",transform:"translate(640.000000, 220.000000)"},r.createElement("g",{id:"Rectangle"},r.createElement("mask",{id:"mask-200",fill:"white"},r.createElement("use",{xlinkHref:"#path-100"})),r.createElement("use",{id:"Mask",fill:"#EBEFFF",xlinkHref:"#path-100"}),r.createElement("g",{mask:"url(#mask-200)"},r.createElement("use",{fill:"black",fillOpacity:1,filter:"url(#filter-4)",xlinkHref:"#path-300"}),r.createElement("use",{fill:"#FFFFFF",fillRule:"evenodd",xlinkHref:"#path-300"}))),r.createElement("use",{id:"Rectangle",stroke:"#5F668A",mask:"url(#mask-6)",strokeDasharray:1,xlinkHref:"#path-5"}),r.createElement("use",{id:"Rectangle-Copy",stroke:"#5F668A",mask:"url(#mask-8)",strokeDasharray:1,xlinkHref:"#path-7"}),r.createElement("use",{id:"Rectangle-Copy-2",stroke:"#5F668A",mask:"url(#mask-10)",strokeDasharray:1,xlinkHref:"#path-9"}),r.createElement("use",{id:"Rectangle-Copy-3",stroke:"#5F668A",mask:"url(#mask-12)",strokeDasharray:1,xlinkHref:"#path-11"}),r.createElement("rect",{id:"Rectangle",fill:"#EBEFFF",x:37,y:56,width:84,height:6,rx:2}))));function Zc(e,t){var n=e.title,a=e.titleId,i=Xc(e,["title","titleId"]);return r.createElement("svg",Yc({width:"160px",height:"160px",viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Uc,Gc)}var _c=r.forwardRef(Zc),Kc=(n.p,Object(b.a)({emptyTable:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:52}})),Qc=Object(r.memo)((function(e){var t=e.message,n=Kc();return Object(qe.jsxs)("div",{className:n.emptyTable,children:[Object(qe.jsx)(_c,{}),Object(qe.jsx)(at,{children:t})]})})),Jc=Object(b.a)({table:{tableLayout:"fixed",borderCollapse:"separate",borderSpacing:"0 0"}}),el=Object(r.memo)((function(e){var t=e.className,n=e.children,r=Object(Ue.a)(e,["className","children"]),a=Jc();return Object(qe.jsx)("table",Object(l.a)(Object(l.a)({},r),{},{className:w()(a.table,t),children:n}))})),tl=Object(r.memo)((function(e){var t=e.children,n=Object(Ue.a)(e,["children"]);return Object(qe.jsx)("tbody",Object(l.a)(Object(l.a)({},n),{},{children:t}))})),nl=Object(b.a)({td:{padding:[[0,24]]},alignRight:{textAlign:"right"}}),rl=Object(r.memo)((function(e){var t,n=e.colspan,r=e.rightAlign,a=e.className,i=e.children,o=Object(Ue.a)(e,["colspan","rightAlign","className","children"]),c=nl(),s=(t={},Object(v.a)(t,c.td,!0),Object(v.a)(t,c.alignRight,r),t);return Object(qe.jsx)("td",Object(l.a)(Object(l.a)({colSpan:n,className:w()(s,a)},o),{},{children:i}))})),al=Object(r.memo)((function(e){var t=e.children,n=Object(Ue.a)(e,["children"]);return Object(qe.jsx)("thead",Object(l.a)(Object(l.a)({},n),{},{children:t}))})),il=Re.tl2,ol=Object(b.a)({th:{extend:il,backgroundColor:Fe,height:Ne,textAlign:"left",color:_,padding:"0 ".concat(24,"px")},alignRight:{textAlign:"right"}}),cl=Object(r.memo)((function(e){var t,n=e.rightAlign,r=e.children,a=e.className,i=Object(Ue.a)(e,["rightAlign","children","className"]),o=ol(),c=(t={},Object(v.a)(t,o.th,!0),Object(v.a)(t,o.alignRight,n),t);return Object(qe.jsx)("th",Object(l.a)(Object(l.a)({},i),{},{className:w()(c,a),children:r}))})),ll=Re.info2,sl=Re.p,dl=Object(b.a)({tr:{extend:sl,padding:4,height:Ee,backgroundColor:"#ffffff"},lg:{extend:ll,height:76},sm:{height:30},error:{backgroundColor:Pe},success:{backgroundColor:Be}}),ul=Object(r.memo)((function(e){var t,n=e.className,r=e.children,a=e.header,i=e.error,o=e.success,c=e.size,s=void 0===c?"sm":c,d=Object(Ue.a)(e,["className","children","header","error","success","size"]),u=dl(),m=(t={},Object(v.a)(t,u.tr,!a),Object(v.a)(t,u.sm,!a&&"sm"===s),Object(v.a)(t,u.lg,!a&&"lg"===s),Object(v.a)(t,u.error,i),Object(v.a)(t,u.success,o),t);return Object(qe.jsx)("tr",Object(l.a)(Object(l.a)({className:w()(m,n)},d),{},{children:r}))}));function ml(){return(ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function hl(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var bl=r.createElement("desc",null,"Created with Sketch."),pl=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/action/expand/closed",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559",strokeWidth:1.5},r.createElement("circle",{id:"Oval-4",cx:14,cy:2,r:2}),r.createElement("circle",{id:"Oval-4-Copy",cx:8,cy:2,r:2}),r.createElement("circle",{id:"Oval-4-Copy-2",cx:2,cy:2,r:2})));function jl(e,t){var n=e.title,a=e.titleId,i=hl(e,["title","titleId"]);return r.createElement("svg",ml({width:"18px",height:"6px",viewBox:"0 0 18 6",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,bl,pl)}var fl=r.forwardRef(jl);n.p;function gl(){return(gl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ol(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var xl=r.createElement("desc",null,"Created with Sketch."),vl=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/action/expand/open",transform:"translate(1.000000, 1.000000)",fill:"#1B2559",stroke:"#1B2559",strokeWidth:1.5},r.createElement("circle",{id:"Oval-4",cx:14,cy:2,r:2}),r.createElement("circle",{id:"Oval-4-Copy",cx:8,cy:2,r:2}),r.createElement("circle",{id:"Oval-4-Copy-2",cx:2,cy:2,r:2})));function yl(e,t){var n=e.title,a=e.titleId,i=Ol(e,["title","titleId"]);return r.createElement("svg",gl({width:"18px",height:"6px",viewBox:"0 0 18 6",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,xl,vl)}var wl=r.forwardRef(yl),Cl=(n.p,{expandButton:{outline:"none",border:"none",backgroundColor:"transparent",cursor:"pointer",padding:4},rowWrapper:{padding:1},row:{border:[[2,"solid","transparent"]],borderRadius:0},expanded:{border:[[2,"solid",X]],boxShadow:"0 0 8px 0 rgba(0,0,0,0.08)"},before:{paddingTop:12},after:{paddingBottom:12},pointer:{cursor:"pointer"},body:{flex:[[1,1,"auto"]]},table:function(e){return{marginBottom:30,minHeight:200,width:e.width,flex:1,display:"flex",flexDirection:"column"}},emptyTable:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:52}}),kl=Object(b.a)(Cl),Sl=function(e){var t,n=e.id,r=e.elements,a=e.data,i=e.width,o=e.Details,c=e.expanded,s=e.expandRow,d=e.expWidth,u=e.expandable,m=e.onClick,h=e.size,b=kl(),p=m||u,j=(t={},Object(v.a)(t,b.pointer,p),Object(v.a)(t,b.row,!0),Object(v.a)(t,b.expanded,c),t);return Object(qe.jsxs)("div",{className:b.rowWrapper,children:[Object(qe.jsx)("div",{className:w()(Object(v.a)({},b.before,c&&0!==n)),children:Object(qe.jsxs)(Vc,{size:h,className:w()(j),onClick:function(){u&&s(n,a),m&&m(a)},error:a.error,errorMessage:a.errorMessage,children:[r.map((function(e,t){var n=e.view,r=void 0===n?function(e){return null===e||void 0===e?void 0:e.toString()}:n,i=Object(Ue.a)(e,["view"]);return Object(qe.jsx)(Hc,Object(l.a)(Object(l.a)({},i),{},{children:r(a)}),t)})),u&&Object(qe.jsx)(Hc,{width:d,textAlign:"center",children:Object(qe.jsxs)("button",{onClick:function(){return s(n,a)},className:b.expandButton,children:[c&&Object(qe.jsx)(wl,{}),!c&&Object(qe.jsx)(fl,{})]})})]})}),u&&c&&Object(qe.jsx)("div",{className:b.after,children:Object(qe.jsx)(Vc,{className:w()(Object(v.a)({},b.expanded,c)),children:Object(qe.jsx)(Hc,{width:i,children:Object(qe.jsx)(o,{it:a})})})})]})},Nl=function(e){var t=e.elements,n=void 0===t?[]:t,a=e.data,i=void 0===a?[]:a,o=e.Details,s=(e.className,e.expandable),d=e.initialExpanded,u=e.onClick,m=e.loading,h=e.emptyText,b=e.rowSize,p=Object(Ue.a)(e,["elements","data","Details","className","expandable","initialExpanded","onClick","loading","emptyText","rowSize"]),j=Object(r.useState)(d),f=Object(c.a)(j,2),g=f[0],O=f[1];Object(r.useEffect)((function(){return O(d)}),[d]);var x=tr.a(Ic.a,ar.a(ir.a("width")))(n),v=1200-x,y=x+(s?v:0),w=kl({width:y}),C=function(e,t){t.id?(k.clear(t.id),O(t.id===g?null:t.id)):(k.clear(e),O(e===g?null:e))},k=new Lc.c({defaultHeight:58,fixedWidth:!0});function S(e){var t=e.index,r=e.key,a=e.parent,c=e.style;return Object(qe.jsx)(Lc.b,{cache:k,columnIndex:0,parent:a,rowIndex:t,children:function(e){var r=e.registerChild;return Object(qe.jsx)("div",{ref:r,style:c,children:Object(qe.jsx)(Sl,{width:y,size:b,id:i[t].id?i[t].id:t,expWidth:v,elements:n,data:i[t],Details:o,expanded:i[t].id?i[t].id===g:t===g,expandRow:C,expandable:s,onClick:u})})}},r)}return Object(qe.jsx)(Xe.a,{display:"flex",flex:"1",flexDirection:"column",children:Object(qe.jsxs)(Ac,{className:w.table,children:[Object(qe.jsxs)(Wc,{children:[n.map((function(e,t){var n=e.width,r=e.className,a=e.textAlign,i=e.header;return Object(qe.jsx)(qc,{width:n,className:r,textAlign:a,children:i},t)})),s&&Object(qe.jsx)(qc,{width:v})]}),Object(qe.jsxs)(Mc,{className:w.body,children:[m&&Object(qe.jsx)(at,{children:"Loading..."}),!m&&ga.a(i)&&Object(qe.jsx)(Qc,{message:h}),Object(qe.jsx)(Lc.a,{disableWidth:!0,children:function(e){var t=e.height;return Object(qe.jsx)(Lc.d,Object(l.a)(Object(l.a)({style:{overflow:"inherit",outline:"none"}},p),{},{height:m?0:t,width:y,rowCount:i.length,rowHeight:k.rowHeight,rowRenderer:S,overscanRowCount:5,deferredMeasurementCache:k}))}})]})]})})},El=n(648),Il=n(310);function Ll(){return(Ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Fl(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Pl=r.createElement("desc",null,"Created with Sketch."),Bl=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinejoin:"round"},r.createElement("g",{id:"icon/action/copy",transform:"translate(1.000000, 1.000000)",stroke:"#1B2559"},r.createElement("g",{id:"Group-5-Copy-2"},r.createElement("polyline",{id:"Stroke-1",strokeWidth:2,points:"6 1.2 6 -0.00024 16 -0.00024 16 13.06376 12 13.06376"}),r.createElement("polygon",{id:"Stroke-3",strokeWidth:2,strokeLinecap:"round",points:"0 15.9368 10 15.9368 10 2.9368 0 2.9368"}))));function Dl(e,t){var n=e.title,a=e.titleId,i=Fl(e,["title","titleId"]);return r.createElement("svg",Ll({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Pl,Bl)}var Rl=r.forwardRef(Dl),Tl=(n.p,{titleWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},wrapper:{flex:1,display:"flex",flexDirection:"row",height:"100%"},tableWrapper:{flex:1,marginLeft:40,display:"block",overflowX:"auto",width:"100%",maxWidth:"78%",maxHeight:"70vh"},table:{whiteSpace:"nowrap",display:"block","& th":{position:"sticky",top:0}},dateColumn:{minWidth:160},levelColumn:{minWidth:100},fillColumn:{width:"100%"},shareButton:{margin:8,display:"flex",alignItems:"center",fontSize:ve,padding:[[0,12]]},shareIcon:{marginRight:6},button:{margin:8},titleAndButtonsContainer:{display:"flex"},buttonsWrapper:{display:"flex",marginLeft:16,"& > *":{margin:"auto 6px"}}}),Al=Re.label1,Wl={wrapper:{extend:Re.mono,display:"flex",alignItems:"center"},address:{lineBreak:"anywhere"},buttonWrapper:{"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},popoverContent:{extend:Al,display:"flex",justifyContent:"center",alignItems:"center",color:_,borderRadius:4,padding:[[5,9]]}},zl={idCardDataCard:{extend:Re.p,display:"flex",padding:[[11,8]],"& > div":{display:"flex",flexDirection:"column","& > div":{width:144,height:37,marginBottom:15,"&:last-child":{marginBottom:0}}}}},Ml={label:{extend:Al,color:se,marginBottom:4}},Hl={titleWrapper:Tl.titleWrapper,titleAndButtonsContainer:Tl.titleAndButtonsContainer,buttonsWrapper:Tl.buttonsWrapper,headerLabels:{display:"flex",flexDirection:"row","& div":{display:"flex",alignItems:"center"},"& > div:first-child":{marginRight:24},"& span":{extend:Al,marginLeft:6}},overflowTd:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},flexWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",marginRight:16},customerLinkIcon:{marginLeft:2}},ql=Object(b.a)(Wl),$l=function(e){var t=e.className,n=e.buttonClassname,a=e.children,i=(Object(Ue.a)(e,["className","buttonClassname","children"]),Object(r.useState)(null)),o=Object(c.a)(i,2),l=o[0],s=o[1];Object(r.useEffect)((function(){l&&setTimeout((function(){return s(null)}),3e3)}),[l]);var d=ql(),u=Boolean(l),m=u?"simple-popper":void 0;return Object(qe.jsx)("div",{className:d.wrapper,children:a&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:w()(d.address,t),children:a}),Object(qe.jsx)("div",{className:w()(d.buttonWrapper,n),children:Object(qe.jsx)(Il.CopyToClipboard,{text:El.a(/\s/g,"")(a),children:Object(qe.jsx)("button",{"aria-describedby":m,onClick:function(e){return function(e){s(l?null:e.currentTarget)}(e)},children:Object(qe.jsx)(Rl,{})})})}),Object(qe.jsx)(Kt,{id:m,open:u,anchorEl:l,onClose:function(){s(null)},arrowSize:3,bgColor:q,placement:"top",children:Object(qe.jsx)("div",{className:d.popoverContent,children:Object(qe.jsx)("div",{children:"Copied to clipboard!"})})})]})})};function Vl(){return(Vl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yl(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Xl=r.createElement("desc",null,"Created with Sketch."),Ul=r.createElement("g",{id:"icon/action/delete/enabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round"},r.createElement("line",{x1:9,y1:9,x2:9,y2:18,id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:13,y1:9,x2:13,y2:18,id:"Stroke-2",stroke:"#1B2559",strokeWidth:2}),r.createElement("polyline",{id:"Stroke-3",stroke:"#1B2559",strokeWidth:2,strokeLinejoin:"round",points:"3 6 5 21 17 21 19 6"}),r.createElement("line",{x1:1,y1:5,x2:21,y2:5,id:"Stroke-5",stroke:"#1B2559",strokeWidth:2}),r.createElement("path",{d:"M14,4 C14,2.343 12.657,1 11,1 C9.343,1 8,2.343 8,4",id:"Stroke-7",stroke:"#1B2559",strokeWidth:2}));function Gl(e,t){var n=e.title,a=e.titleId,i=Yl(e,["title","titleId"]);return r.createElement("svg",Vl({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Xl,Ul)}var Zl,_l,Kl,Ql,Jl,es=r.forwardRef(Gl),ts=(n.p,Object(b.a)(fc)),ns=function(e){var t=e.data,n=e.selectedCoin,a=e.handleDeleteEntry,i=e.errorMessage,o=e.setErrorMessage,l=e.deleteDialog,s=e.setDeleteDialog,d=ts(),u=Object(r.useState)(),m=Object(c.a)(u,2),h=m[0],b=m[1],p=[{name:"address",header:Object(qe.jsx)(mt,{className:d.white,children:"Addresses"}),width:800,textAlign:"left",size:"sm",view:function(e){return Object(qe.jsx)("div",{className:d.addressRow,children:Object(qe.jsx)($l,{children:cr.a(["address"],e)})})}},{name:"deleteButton",header:Object(qe.jsx)(mt,{className:d.white,children:"Delete"}),width:130,textAlign:"center",size:"sm",view:function(e){return Object(qe.jsx)(cn,{className:d.deleteButton,onClick:function(){s(!0),b(e)},children:Object(qe.jsx)(es,{})})}}],j=n?t[n.code]:t[Cc.a(t)[0]];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Nl,{data:j,elements:p,emptyText:"No blacklisted addresses so far",name:"blacklistTable"}),Object(qe.jsx)(Ec,{open:l,onDismissed:function(){s(!1),o(null)},onConfirmed:function(){o(null),a(cr.a(["cryptoCode"],h),cr.a(["address"],h))},errorMessage:i})]})},rs=Object(b.a)(fc),as=Eo.a((function(e){return e.cryptoCode})),is=er()(Zl||(Zl=Object(Kn.a)(["\n mutation DeleteBlacklistRow($cryptoCode: String!, $address: String!) {\n deleteBlacklistRow(cryptoCode: $cryptoCode, address: $address) {\n cryptoCode\n address\n }\n }\n"]))),os=er()(_l||(_l=Object(Kn.a)(["\n query getBlacklistData {\n blacklist {\n cryptoCode\n address\n }\n cryptoCurrencies {\n display\n code\n }\n }\n"]))),cs=er()(Kl||(Kl=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),ls=er()(Ql||(Ql=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),ss=er()(Jl||(Jl=Object(Kn.a)(["\n mutation InsertBlacklistRow($cryptoCode: String!, $address: String!) {\n insertBlacklistRow(cryptoCode: $cryptoCode, address: $address) {\n cryptoCode\n address\n }\n }\n"]))),ds=function(){var e,t,n,a=Object(Qn.c)(os).data,i=Object(Qn.c)(ls).data,o=Object(r.useState)(!1),l=Object(c.a)(o,2),s=l[0],d=l[1],m=Object(r.useState)({code:"BTC",display:"Bitcoin"}),h=Object(c.a)(m,2),b=h[0],p=h[1],j=Object(r.useState)(null),f=Object(c.a)(j,2),g=f[0],O=f[1],x=Object(r.useState)(!1),v=Object(c.a)(x,2),y=v[0],w=v[1],C=Object(Qn.b)(is,{onError:function(e){var t=e.message;O(null!==t&&void 0!==t?t:"Error while deleting row")},onCompleted:function(){return w(!1)},refetchQueries:function(){return["getBlacklistData"]}}),k=Object(c.a)(C,1)[0],S=Object(Qn.b)(ss,{onError:function(){return console.log("Error while adding row")},refetchQueries:function(){return["getBlacklistData"]}}),N=Object(c.a)(S,1)[0],E=Object(Qn.b)(cs,{refetchQueries:function(){return["getData"]}}),I=Object(c.a)(E,1)[0],L=rs(),F=null!==(e=cr.a(["blacklist"])(a))&&void 0!==e?e:[],P=null!==(t=cr.a(["cryptoCurrencies"],a))&&void 0!==t?t:[],B=as(F),D=(null===i||void 0===i?void 0:i.config)&&pc("compliance")(i.config),R=null!==(n=null===D||void 0===D?void 0:D.rejectAddressReuse)&&void 0!==n&&n,T=function(){var e=Object(No.a)(So.a.mark((function e(t,n){var r,a;return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(null),e.next=3,N({variables:{cryptoCode:t,address:n}});case 3:if((r=e.sent).errors){e.next=6;break}return e.abrupt("return",d(!1));case 6:a=r.errors.some((function(e){return e.message.includes("duplicate")})),O(a?"This address is already being blocked":"Server error");case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Blacklisted addresses",children:Object(qe.jsx)(Xe.a,{display:"flex",justifyContent:"flex-end",children:Object(qe.jsx)(mn,{color:"primary",onClick:function(){return d(!0)},children:"Blacklist new addresses"})})}),Object(qe.jsxs)(u.a,{container:!0,className:L.grid,children:[Object(qe.jsx)(Ve,{data:P,isSelected:sr.a("code",b.code),displayName:function(e){return e.display},onClick:function(e){p({code:e.code,display:e.display})}}),Object(qe.jsxs)("div",{className:L.content,children:[Object(qe.jsxs)(Xe.a,{display:"flex",justifyContent:"space-between",mb:3,children:[Object(qe.jsxs)(at,{noMargin:!0,className:L.subtitle,children:[b.display?"".concat(b.display," blacklisted addresses"):""," "]}),Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"center",justifyContent:"end",mr:"-5px",children:[Object(qe.jsx)(ot,{children:"Reject reused addresses"}),Object(qe.jsx)(Ta,{checked:R,onChange:function(e){!function(e){var t=jc("compliance")(e);I({variables:{config:t}})}({rejectAddressReuse:e.target.checked})},value:R}),Object(qe.jsx)(ht,{children:R?"On":"Off"}),Object(qe.jsx)(Ao,{width:304,children:Object(qe.jsx)(ot,{children:'The "Reject reused addresses" option means that all addresses that are used once will be automatically rejected if there\'s an attempt to use them again on a new transaction.'})})]})]}),Object(qe.jsx)(ns,{data:B,selectedCoin:b,handleDeleteEntry:function(e,t){k({variables:{cryptoCode:e,address:t}})},errorMessage:g,setErrorMessage:O,deleteDialog:y,setDeleteDialog:w})]})]}),s&&Object(qe.jsx)(wc,{onClose:function(){O(null),d(!1)},errorMsg:g,selectedCoin:b,addToBlacklist:T})]})},us=n(656),ms=n(122),hs=n(309),bs=n(713),ps=n(654),js=n(87),fs=n(130),gs=n(655),Os=n(708),xs="You have unsaved changes on this page. Are you sure you want to leave?",vs=function(e){var t=e.message,n=void 0===t?xs:t,a=Object(ca.e)(),i=a.dirty&&0===a.submitCount;Object(r.useEffect)((function(){window.onbeforeunload=i?o:void 0}),[i]);var o=function(){return xs};return Object(qe.jsx)(O.a,{when:i,message:n})},ys=a.a.createContext(),ws=n(700),Cs=n(650),ks=n(651),Ss=n(187),Ns=Ss.create({checkTypes:!1,env:Ss.env}),Es=Ns.compose(Ns.joinWith(""))(ec.a(0,Ns.toLower)),Is=Ns.compose(Ns.joinWith(""))(ec.a(0,Ns.toUpper)),Ls=Ns.compose(Is)(Ns.toLower),Fs=tr.a(Ns.splitOn(" "),El.a(/([A-Z])/g," $1"),Es),Ps=tr.a(Ns.joinWith(" "),Ns.map(Ls),Fs),Bs=function(e,t,n){return 1===parseInt(e)?t:n},Ds=function(){var e=Object(r.useContext)(ys),t=e.elements,n=e.enableEdit,a=e.editWidth,i=e.enableDelete,o=e.deleteWidth,l=e.enableToggle,s=e.toggleWidth,d=e.DEFAULT_COL_SIZE,u=function(e,t){var n=e.name,r=e.width,a=void 0===r?d:r,i=e.header,o=e.textAlign;return Object(qe.jsx)(Hc,{header:!0,width:a,textAlign:o,children:i||Ps(n)},t)},m=function(e){var t=ws.a(bo.a("doubleHeader"))(e),n=Object(c.a)(t,2),r=n[0],a=n[1];if(!r.length)return[e,Wc];var i=Cs.a(r[0],e),o=tr.a(Ic.a,ar.a(cr.a(["width"])))(r);return[ks.a(i,{width:o,elements:r,name:r[0].doubleHeader},a),zc]}(t),h=Object(c.a)(m,2),b=h[0],p=h[1];return Object(qe.jsxs)(p,{children:[b.map((function(e,t){var n=e.width,r=e.elements,a=e.name;return r&&r.length?Object(qe.jsx)($c,{width:n,title:a,children:r.map(u)},t):u(e,t)})),n&&Object(qe.jsx)(Hc,{header:!0,width:a,textAlign:"center",children:"Edit"}),i&&Object(qe.jsx)(Hc,{header:!0,width:o,textAlign:"center",children:"Delete"}),l&&Object(qe.jsx)(Hc,{header:!0,width:s,textAlign:"center",children:"Enable"})]})},Rs=n(652),Ts=n(653);function As(){return(As=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ws(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var zs=r.createElement("defs",null,r.createElement("path",{id:"a",d:"M0 0h22v22H0z"})),Ms=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("mask",{id:"b",fill:"#fff"},r.createElement("use",{xlinkHref:"#a"})),r.createElement("path",{stroke:"#9B9B9B",strokeWidth:2,strokeLinecap:"round",mask:"url(#b)",d:"M9 9v9M13 9v9"}),r.createElement("g",{mask:"url(#b)",stroke:"#9B9B9B",strokeLinecap:"round",strokeWidth:2},r.createElement("path",{strokeLinejoin:"round",d:"M3 6l2 15h12l2-15"}),r.createElement("path",{d:"M1 5h20M14 4a3 3 0 10-6 0"})));function Hs(e,t){var n=e.title,a=e.titleId,i=Ws(e,["title","titleId"]);return r.createElement("svg",As({width:22,height:22,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,zs,Ms)}var qs=r.forwardRef(Hs);n.p;function $s(){return($s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Vs(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ys=r.createElement("desc",null,"Created with Sketch."),Xs=r.createElement("g",{id:"icon/action/edit/disabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#9B9B9B",strokeWidth:2}),r.createElement("polygon",{id:"Stroke-3",stroke:"#9B9B9B",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function Us(e,t){var n=e.title,a=e.titleId,i=Vs(e,["title","titleId"]);return r.createElement("svg",$s({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Ys,Xs)}var Gs=r.forwardRef(Us);n.p;function Zs(){return(Zs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ks=r.createElement("desc",null,"Created with Sketch."),Qs=r.createElement("g",{id:"icon/action/edit/enabled",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),r.createElement("polygon",{id:"Stroke-3",stroke:"#1B2559",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function Js(e,t){var n=e.title,a=e.titleId,i=_s(e,["title","titleId"]);return r.createElement("svg",Zs({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Ks,Qs)}var ed=r.forwardRef(Js),td=(n.p,{saveButton:{marginRight:20},lastOfGroup:{marginBottom:24},extraPadding:{paddingLeft:35,paddingRight:30},extraPaddingRight:{paddingRight:39},withSuffix:function(e){var t=e.textAlign;return{display:"flex",alignItems:"baseline",justifyContent:"right"===t?"end":t}},suffix:{marginLeft:7},size:function(e){var t=e.size;return Te(t)},bold:Ae}),nd=Object(b.a)(td),rd=function(e){var t=e.disabled,n=e.editing,a=nd(),i=Object(ca.e)(),o=i.values,l=i.submitForm,s=i.resetForm,d=Object(r.useContext)(ys),u=d.editWidth,m=d.onEdit,h=d.enableEdit,b=d.enableDelete,p=d.disableRowEdit,j=d.onDelete,f=d.deleteWidth,g=d.enableToggle,O=d.onToggle,x=d.toggleWidth,v=d.forceAdd,y=d.clearError,w=d.actionColSize,C=d.error,k=t||p&&p(o),S=Object(r.useState)(!1),N=Object(c.a)(S,2),E=N[0],I=N[1];return Object(qe.jsxs)(qe.Fragment,{children:[n&&Object(qe.jsxs)(Hc,{textAlign:"center",width:w,children:[Object(qe.jsx)(mn,{className:a.saveButton,type:"submit",color:"primary",onClick:l,children:"Save"}),!v&&Object(qe.jsx)(mn,{color:"secondary",onClick:function(){y(),s()},children:"Cancel"})]}),!n&&h&&Object(qe.jsx)(Hc,{textAlign:"center",width:u,children:Object(qe.jsx)(cn,{disabled:k,className:a.editButton,onClick:function(){return m&&m(o.id)},children:k?Object(qe.jsx)(Gs,{}):Object(qe.jsx)(ed,{})})}),!n&&b&&Object(qe.jsxs)(Hc,{textAlign:"center",width:f,children:[Object(qe.jsx)(cn,{disabled:t,onClick:function(){I(!0)},children:t?Object(qe.jsx)(qs,{}):Object(qe.jsx)(es,{})}),Object(qe.jsx)(Ec,{open:E,setDeleteDialog:I,onConfirmed:function(){j(o.id).then((function(e){rr.a(e)||I(!1)}))},onDismissed:function(){I(!1),y()},errorMessage:C})]}),!n&&g&&Object(qe.jsx)(Hc,{textAlign:"center",width:x,children:Object(qe.jsx)(Ta,{checked:!!o.active,value:!!o.active,disabled:t,onChange:function(){return O(o.id)}})})]})},ad=function(e){var t,n=e.editing,r=e.focus,a=e.config,i=e.extraPaddingRight,o=e.extraPadding,c=a.name,s=a.bypassField,d=a.input,u=a.editable,m=void 0===u||u,h=a.size,b=a.bold,p=a.width,j=a.textAlign,f=a.editingAlign,g=void 0===f?j:f,O=a.suffix,x=a.SuffixComponent,y=void 0===x?ut:x,w=a.textStyle,C=void 0===w?function(e){}:w,k=a.view,S=void 0===k?function(e){return null===e||void 0===e?void 0:e.toString()}:k,N=a.inputProps,E=void 0===N?{}:N,I=Object(ca.e)().values,L=n&&m,F=!s,P=nd({textAlign:L?g:j,size:h}),B=Object(l.a)({fullWidth:!0,autoFocus:r,size:h,bold:b,textAlign:L?g:j},E);return Object(qe.jsxs)(Hc,{className:(t={},Object(v.a)(t,P.extraPaddingRight,i),Object(v.a)(t,P.extraPadding,o),Object(v.a)(t,P.withSuffix,O),t),width:p,size:h,bold:b,textAlign:j,children:[L&&F&&Object(qe.jsx)(ca.b,Object(l.a)({name:c,component:d},B)),L&&!F&&Object(qe.jsx)(a.input,{name:c}),!L&&I&&Object(qe.jsx)("div",{style:C(I,L),children:S(I[c],I)}),O&&Object(qe.jsx)(y,{className:P.suffix,style:L?{}:C(I,L),children:O})]})},id=function(e){var t=e.editing,n=e.disabled,a=e.lastOfGroup,i=e.newRow,o=Object(ca.e)(),l=o.touched,s=o.errors,d=o.values,u=Object(r.useContext)(ys),m=u.elements,h=u.enableEdit,b=u.enableDelete,p=u.error,j=u.enableToggle,f=u.rowSize,g=u.stripeWhen,O=nd(),x=g&&g(d)?function(e){var t=ws.a(sr.a("stripe",!0))(e),n=Object(c.a)(t,2),r=n[0],a=n[1];if(!r.length)return e;var i=Cs.a(r[0],e),o=tr.a(Ic.a,ar.a(cr.a(["width"])))(r);return ks.a(i,{width:o,editable:!1,view:function(){return Object(qe.jsx)(Zr,{})}},a)}(m):m,y=ws.a(bo.a("doubleHeader"))(m),C=Object(c.a)(y,1)[0],k=(null===C||void 0===C?void 0:C.length)?Cs.a(C[0],m):-1,S=(null===C||void 0===C?void 0:C.length)?Cs.a(C[C.length-1],m):-1,N=x.findIndex((function(e){return void 0===e.editable||e.editable})),E=Object(v.a)({},O.lastOfGroup,a),I=Rs.a(Cc.a(l),s),L=I&&Cc.a(I).length>0||!!p,F=p||I&&Ts.a(I).join(", ");return Object(qe.jsxs)(Vc,{className:w()(E),size:f,error:t&&L,newRow:i&&!L,errorMessage:F,children:[x.map((function(e,n){return Object(qe.jsx)(ad,{config:e,editing:t,focus:n===N&&t,extraPaddingRight:S===n,extraPadding:k===n},n)})),(h||b||j)&&Object(qe.jsx)(rd,{disabled:n,editing:t})]})},od={wrapper:function(e){return{width:e.width}},addLink:{marginLeft:"auto"},title:{margin:0,color:se},outerHeader:{minHeight:16,marginBottom:24,display:"flex",justifyContent:"space-between",alignItems:"center"}},cd=Object(b.a)(od),ld=tr.a(ms.a(hs.a)(0),ar.a((function(e){var t;return null!==(t=e.width)&&void 0!==t?t:100}))),sd=function(e){var t,n,a,i=e.name,o=e.title,s=e.titleLg,d=e.elements,u=void 0===d?[]:d,m=e.data,h=void 0===m?[]:m,b=e.save,p=e.error,j=e.rowSize,f=void 0===j?"md":j,g=e.validationSchema,O=e.enableCreate,x=e.enableEdit,y=e.editWidth,w=e.enableDelete,C=e.deleteWidth,k=void 0===C?87:C,S=e.enableToggle,N=e.toggleWidth,E=void 0===N?87:N,I=e.onToggle,L=e.forceDisable,F=e.disableAdd,P=e.initialValues,B=e.setEditing,D=e.shouldOverrideEdit,R=e.editOverride,T=e.stripeWhen,A=e.disableRowEdit,W=e.groupBy,z=e.sortBy,M=e.createText,H=void 0===M?"Add override":M,q=e.forceAdd,$=void 0!==q&&q,V=e.tbodyWrapperClass,Y=Object(r.useState)(null),X=Object(c.a)(Y,2),U=X[0],G=X[1],Z=Object(r.useState)(!1),_=Object(c.a)(Z,2),K=_[0],Q=_[1],J=Object(r.useState)(!1),ee=Object(c.a)(J,2),te=ee[0],ne=ee[1],re=Object(r.useState)(null),ae=Object(c.a)(re,2),ie=ae[0],oe=ae[1];Object(r.useEffect)((function(){return oe(p)}),[p]),Object(r.useEffect)((function(){oe(null),Q($)}),[$]);var ce=function(){var e=Object(No.a)(So.a.mark((function e(t){var n,r,a;return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!te){e.next=2;break}return e.abrupt("return");case 2:if(ne(!0),n=g.cast(t),r=vo.a(sr.a("id",n.id))(h),a=-1!==r?bs.a(r,n,h):ps.a(n,h),js.a(h[r],n)){e.next=16;break}return e.prev=7,e.next=10,b(Object(v.a)({},i,a),n);case 10:e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(7),ne(!1),e.abrupt("return");case 16:Q(!1),G(null),B&&B(!1),ne(!1);case 20:case"end":return e.stop()}}),e,null,[[7,12]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){Q(!1),G(null),B&&B(!1)},se=function(){Q(!0),oe(null),B&&B(!0,!0)},de=w||S?87:174,ue=Oa.a(de)(y),me=(null!==(t=w&&k)&&void 0!==t?t:0)+(null!==(n=x&&ue)&&void 0!==n?n:0)+(null!==(a=S&&E)&&void 0!==a?a:0),he=ld(u)+me,be=cd({width:he}),pe=!h.length&&O&&!K,je=!L&&!U&&!F&&!K,fe=K||0!==h.length,ge=z?gs.a(z)(h):h,Oe={elements:u,enableEdit:x,onEdit:function(e){if(D&&D(e))return R(e);G(e),oe(null),B&&B(e,!0)},clearError:function(){return oe(null)},error:ie,disableRowEdit:A,editWidth:ue,enableDelete:w,onDelete:function(e){var t=fs.a((function(t){return t.id===e}),h);return b(Object(v.a)({},i,t))},deleteWidth:k,enableToggle:S,rowSize:f,onToggle:I,toggleWidth:E,actionColSize:me,stripeWhen:T,forceAdd:$,DEFAULT_COL_SIZE:100};return Object(qe.jsx)(ys.Provider,{value:Oe,children:Object(qe.jsxs)("div",{className:be.wrapper,children:[pe&&je&&Object(qe.jsx)(Bt,{onClick:se,children:H}),fe&&Object(qe.jsxs)(qe.Fragment,{children:[(o||O)&&Object(qe.jsxs)("div",{className:be.outerHeader,children:[o&&s&&Object(qe.jsx)(dt,{className:be.title,children:o}),o&&!s&&Object(qe.jsx)(lt,{className:be.title,children:o}),O&&je&&Object(qe.jsx)(mn,{className:be.addLink,onClick:se,children:H})]}),Object(qe.jsxs)(Ac,{children:[Object(qe.jsx)(Ds,{}),Object(qe.jsx)("div",{className:V,children:Object(qe.jsxs)(Mc,{children:[K&&Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,initialValues:Object(l.a)({id:Object(Os.a)()},P),onReset:le,validationSchema:g,onSubmit:ce,children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsx)(vs,{}),Object(qe.jsx)(id,{editing:!0,disabled:L,newRow:!0})]})}),ge.map((function(e,t){var n,r=ge[t+1],a=!!W&&r,i="Function"===ha.a(W)?W:ir.a(W),o=a&&i(e)!==i(r);return Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:e,onReset:le,validationSchema:g,onSubmit:ce,children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsx)(vs,{}),Object(qe.jsx)(id,{lastOfGroup:o,editing:U===e.id,disabled:L||U&&U!==e.id||K})]})},null!==(n=e.id)&&void 0!==n?n:t)}))]})})]})]})]})})},dd=function(e){var t=e.name,n=e.save,r=e.data,a=void 0===r?{}:r,i=e.namespaces,o=void 0===i?[]:i,c=Object(Ue.a)(e,["name","save","data","namespaces"]),s=ar.a((function(e){return Object(l.a)({id:e},pc(e)(a))}))(o);return Object(qe.jsx)(sd,Object(l.a)({name:t,data:s,save:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=t[1];return n(jc(a.id)(us.a(["id2"],a)))}},c))},ud={AUD:{5:130,10:137,20:144,50:151,100:158},BBD:{2:150,5:150,10:150,20:150,50:150,100:150},CAD:{5:152,10:152,20:152,50:152,100:152},CHF:{10:126,20:137,50:148,100:159,200:170,1e3:181},DKK:{50:125,100:135,200:145,500:155,1e3:165},EUR:{5:120,10:127,20:133,50:140,100:147,200:153,500:160},GBP:{5:135,10:142,20:149,50:156},HKD:{10:134,20:143,50:148,100:153,500:158,1e3:163},HUF:{200:154,500:154,1e3:154,2e3:154,5e3:154,1e4:154,2e4:154},ILS:{20:129,50:136,100:143,200:150},JMD:{50:145,100:145,500:145,1e3:145,5e3:145},JPY:{1e3:150,2e3:154,5e3:156,1e4:160},KZT:{200:126,500:130,1e3:134,2e3:139,5e3:144,1e4:155,2e4:155},MXN:{20:120,50:127,100:134,200:141,500:148,1e3:155},MYR:{1:120,5:135,10:140,20:145,50:145,100:150},NZD:{5:135,10:140,20:145,50:150,100:155},PHP:{20:160,50:160,100:160,200:160,500:160,1e3:160},PLN:{10:120,20:126,50:132,100:138,200:144,500:150},SGD:{2:126,5:133,10:141,50:156,100:162,1e3:170},TWD:{100:145,200:150,500:155,1e3:160,2e3:165},UAH:{1:118,2:118,5:118,10:124,20:130,50:136,100:142,200:148,500:154},USD:{1:156,5:156,10:156,20:156,50:156,100:156},VND:{1e4:132,2e4:136,5e4:140,1e5:144,2e5:148,5e5:152},ZAR:{10:128,20:134,50:140,100:146,200:152}};function md(){return(md=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function hd(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var bd=r.createElement("desc",null,"Created with Sketch."),pd=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/direction/cash-out",transform:"translate(-1.000000, 0.000000)",fill:"#5A67FF"},r.createElement("path",{d:"M3.99134364,0.321790399 L10.1430099,4.40569595 C11.0271728,4.99266501 11.2660914,6.1822461 10.6766494,7.06269968 C10.5357408,7.27317585 10.3543728,7.45378298 10.1430099,7.59410043 L3.99134364,11.678006 C3.10718075,12.264975 1.91258801,12.0270588 1.32314609,11.1466052 C1.11243854,10.8318699 1,10.4620686 1,10.0838037 L1,1.91599264 C1,0.857819122 1.86143307,0 2.92406462,0 C3.30392305,0 3.67528233,0.11196683 3.99134364,0.321790399 Z",id:"Path-3",transform:"translate(6.000000, 6.000000) scale(-1, 1) translate(-6.000000, -6.000000) "})));function jd(e,t){var n=e.title,a=e.titleId,i=hd(e,["title","titleId"]);return r.createElement("svg",md({width:"10px",height:"12px",viewBox:"0 0 10 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,bd,pd)}var fd=r.forwardRef(jd),gd=(n.p,{logo:{maxHeight:80,maxWidth:200},subtitle:{margin:0,marginBottom:42,textAlign:"center"},text:{margin:0},button:{margin:[[0,"auto"]]},modalContent:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,padding:[[0,34,107,34]]},innerContent:{paddingBottom:72},title:{color:Z,marginBottom:12,marginTop:30,textAlign:"center"},titleDecorator:{verticalAlign:"bottom",marginRight:12,width:24,height:26}}),Od=Object(b.a)(gd),xd=function(e){var t=e.name,n=e.onContinue,r=Od();return Object(qe.jsxs)("div",{className:r.modalContent,children:[Object(qe.jsxs)("div",{className:r.innerContent,children:[Object(qe.jsxs)(tt,{className:r.title,children:[Object(qe.jsx)(fd,{className:r.titleDecorator}),Object(qe.jsx)("span",{children:"Enable cash-out"})]}),Object(qe.jsx)(lt,{className:r.subtitle,children:t}),Object(qe.jsxs)(ot,{children:["You are about to activate cash-out functionality on your ",t," ","machine which will allow your customers to sell crypto to you."]}),Object(qe.jsx)(ot,{children:"In order to activate cash-out for this machine, please enter the denominations for the machine."})]}),Object(qe.jsx)(zt,{className:r.button,onClick:n,children:"Start configuration"})]})},vd=n(657);function yd(){return(yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wd(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Cd=r.createElement("desc",null,"Created with Sketch."),kd=r.createElement("g",{id:"icon/stage/spring/current",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval-2-Copy",fill:"#48F694",cx:9,cy:9,r:4}),r.createElement("circle",{id:"Oval-Copy-5",stroke:"#48F694",strokeWidth:2,transform:"translate(9.000000, 9.000000) rotate(-270.000000) translate(-9.000000, -9.000000) ",cx:9,cy:9,r:8}));function Sd(e,t){var n=e.title,a=e.titleId,i=wd(e,["title","titleId"]);return r.createElement("svg",yd({width:"18px",height:"18px",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Cd,kd)}var Nd,Ed,Id=r.forwardRef(Sd),Ld=(n.p,{stages:{display:"flex",alignItems:"center"},wrapper:{display:"flex",alignItems:"center",margin:0},stage:{display:"flex",height:28,width:28,zIndex:2,"& > svg":{height:"100%",width:"100%",overflow:"visible"}},separator:{width:28,height:2,border:[[2,"solid"]],zIndex:1},separatorSpring:{borderColor:ee},separatorZodiac:{borderColor:J},separatorSpringEmpty:{borderColor:oe},separatorZodiacEmpty:{borderColor:se}}),Fd=Object(b.a)(Ld),Pd=Object(r.memo)((function(e){var t,n,r=e.steps,a=e.currentStep,i=e.color,o=void 0===i?"spring":i,c=e.className;if(a<1||a>r)throw Error("Value of currentStage is invalid");if(r<1)throw Error("Value of stages is invalid");var l=Fd(),s=(t={},Object(v.a)(t,l.separator,!0),Object(v.a)(t,l.separatorSpring,"spring"===o),Object(v.a)(t,l.separatorZodiac,"zodiac"===o),t),d=(n={},Object(v.a)(n,l.separator,!0),Object(v.a)(n,l.separatorSpringEmpty,"spring"===o),Object(v.a)(n,l.separatorZodiacEmpty,"zodiac"===o),n);return Object(qe.jsxs)("div",{className:w()(c,l.stages),children:[vd.a(1,a).map((function(e){return Object(qe.jsxs)("div",{className:l.wrapper,children:[e>1&&Object(qe.jsx)("div",{className:w()(s)}),Object(qe.jsxs)("div",{className:l.stage,children:["spring"===o&&Object(qe.jsx)(pi,{}),"zodiac"===o&&Object(qe.jsx)(I,{})]})]},e)})),Object(qe.jsxs)("div",{className:l.wrapper,children:[a>1&&Object(qe.jsx)("div",{className:w()(s)}),Object(qe.jsxs)("div",{className:l.stage,children:["spring"===o&&Object(qe.jsx)(Id,{}),"zodiac"===o&&Object(qe.jsx)(R,{})]})]}),vd.a(a+1,r+1).map((function(e){return Object(qe.jsxs)("div",{className:l.wrapper,children:[Object(qe.jsx)("div",{className:w()(d)}),Object(qe.jsxs)("div",{className:l.stage,children:["spring"===o&&Object(qe.jsx)(vr,{}),"zodiac"===o&&Object(qe.jsx)(H,{})]})]},e)}))]})})),Bd=n.p+"static/media/cashout-cassette-1.fac6c691.svg",Dd=n.p+"static/media/cashout-cassette-2.34a98cfa.svg",Rd={title:{margin:[[0,0,12,0]]},titleDiv:{paddingBottom:32},subtitle:{margin:[[32,0,21,0]]},edit:{margin:[[0,0,0,0]]},error:{color:me},bill:{width:131,display:"flex",alignItems:"center",justifyContent:"end"},billInput:{width:"100%"},suffix:{paddingLeft:16},button:{marginLeft:"auto"},submit:{float:"right"},picker:{width:150},header:{display:"flex",paddingBottom:95},thirdStepHeader:{display:"flex",paddingBottom:188},step:{flex:1},stepImage:{position:"relative",top:-20,right:14},content:{display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,paddingBottom:32},disclaimer:{display:"flex",flex:1,flexDirection:"column",justifyContent:"space-between"},disclaimerIcon:{float:"left",margin:[[-4,16,48,0]]}},Td=Object(b.a)(Rd),Ad=function(e){var t=e.name,n=e.step,r=e.schema,a=e.error,i=e.lastStep,o=e.onContinue,c=e.steps,l=e.fiatCurrency,s=e.options,d=Td(),u=i?"Finish":"Next",m={1:Bd,2:Dd};return Object(qe.jsxs)("div",{className:d.content,children:[Object(qe.jsxs)("div",{className:d.titleDiv,children:[Object(qe.jsx)(lt,{className:d.title,children:t}),Object(qe.jsx)(Pd,{steps:4,currentStep:n})]}),n<=2&&Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,onSubmit:o,initialValues:{top:"",bottom:""},enableReinitialize:!0,validationSchema:r,children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsxs)("div",{className:d.header,children:[c.map((function(e,t){var r=e.type,a=e.display,i=e.component;return 1+t===n&&Object(qe.jsxs)("div",{className:d.step,children:[Object(qe.jsxs)(at,{className:d.edit,children:["Edit ",a]}),Object(qe.jsx)(mt,{children:"Choose bill denomination"}),Object(qe.jsxs)("div",{className:d.bill,children:[Object(qe.jsx)(ca.b,{className:d.billInput,type:"text",size:"lg",autoFocus:1+t===n,component:(null===s||void 0===s?void 0:s.length)>0?i:Ja,fullWidth:!0,decimalPlaces:0,name:r,options:s,valueProp:"code",labelProp:"display"}),Object(qe.jsx)(ct,{noMargin:!0,className:d.suffix,children:l})]})]},t)})),Object(qe.jsx)("img",{className:d.stepImage,alt:"cassette",width:"148",height:"196",src:m[n]})]}),Object(qe.jsx)(zt,{className:d.submit,type:"submit",children:u})]})}),3===n&&Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,onSubmit:o,initialValues:{zeroConfLimit:""},enableReinitialize:!0,validationSchema:c[n-1].schema,children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsx)("div",{className:d.thirdStepHeader,children:Object(qe.jsxs)("div",{className:d.step,children:[Object(qe.jsx)(at,{className:d.edit,children:"Edit 0-conf Limit"}),Object(qe.jsx)(mt,{children:"Choose a limit"}),Object(qe.jsxs)("div",{className:d.bill,children:[Object(qe.jsx)(ca.b,{className:d.billInput,type:"text",size:"lg",autoFocus:!0,component:Ja,fullWidth:!0,decimalPlaces:0,name:c[n-1].type}),Object(qe.jsx)(ct,{noMargin:!0,className:d.suffix,children:l})]})]})}),Object(qe.jsx)(zt,{className:d.submit,type:"submit",children:u})]})}),i&&Object(qe.jsxs)("div",{className:d.disclaimer,children:[Object(qe.jsx)(lt,{className:d.title,children:"Cash-out Bill Count"}),Object(qe.jsxs)(ot,{children:[Object(qe.jsx)(wi,{className:d.disclaimerIcon}),"When enabling cash-out, your bill count will be automatically set to zero. Make sure you physically put cash inside the cash cassettes to allow the machine to dispense it to your users. If you already did, make sure you set the correct cash-out bill count for this machine on your Cash Cassettes tab under Maintenance."]}),Object(qe.jsx)(lt,{className:d.title,children:"Default Commissions"}),Object(qe.jsxs)(ot,{children:[Object(qe.jsx)(wi,{className:d.disclaimerIcon}),"When enabling cash-out, default commissions will be set. To change commissions for this machine, please go to the Commissions tab under Settings where you can set exceptions for each of the available cryptocurrencies."]}),Object(qe.jsxs)("div",{children:[a&&Object(qe.jsx)(gt,{children:"Failed to save"}),Object(qe.jsx)(zt,{className:d.submit,onClick:function(){return o()},children:u})]})]})]})},Wd=999999999,zd=ma.d().shape({top:ma.c().label("Cassette 1 (Top)").required().min(1).max(Wd),bottom:ma.c().label("Cassette 2 (Bottom)").required().min(1).max(Wd),zeroConfLimit:ma.c().label("0-conf Limit").required().min(0).max(Wd)}),Md=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fiatCurrency;return[{name:"id",header:"Machine",width:200,view:function(t){return e.find((function(e){return e.deviceId===t})).name},size:"sm",editable:!1},{name:"top",header:"Cassette 1 (Top)",size:"sm",stripe:!0,width:200,textAlign:"right",input:Ja,inputProps:{decimalPlaces:0},suffix:n},{name:"bottom",header:"Cassette 2 (Bottom)",size:"sm",stripe:!0,textAlign:"right",width:200,input:Ja,inputProps:{decimalPlaces:0},suffix:n},{name:"zeroConfLimit",header:"0-conf Limit",size:"sm",stripe:!0,textAlign:"right",width:200,input:Ja,inputProps:{decimalPlaces:0},suffix:n}]},Hd=Qo.a((function(e,t){var n=ir.a("fiatCurrency")(e);return tr.a(ar.a((function(e){return{code:e,display:e}})),Cc.a,cr.a([n]))(t)})),qd=function(e){var t=e.machine,n=e.locale,a=e.onClose,i=e.save,o=e.error,l=Object(r.useState)({step:0,config:{active:!0}}),s=Object(c.a)(l,2),d=s[0],u=d.step,m=d.config,h=s[1],b=Hd(n,ud),p=4===u,j=function(){var e=Object(No.a)(So.a.mark((function e(n){var r;return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=2;break}return e.abrupt("return",i(jc(t.deviceId,zd.cast(m))));case 2:r=_t.a(m,n),h({step:u+1,config:r});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=[{type:"top",display:"Cassette 1 (Top)",component:Aa,inputProps:{options:ar.a((function(e){return{code:e,display:e}}))(b),labelProp:"display",valueProp:"code"}},{type:"bottom",display:"Cassette 2",component:Aa,inputProps:{options:ar.a((function(e){return{code:e,display:e}}))(b),labelProp:"display",valueProp:"code"}},{type:"zeroConfLimit",display:"0-conf Limit",schema:ma.d().shape({zeroConfLimit:ma.c().required()})}];return Object(qe.jsxs)(vc,{title:0===u?null:"Enable cash-out",handleClose:a,width:554,height:520,open:!0,children:[0===u&&Object(qe.jsx)(xd,{name:t.name,onContinue:function(){return j()}}),0!==u&&Object(qe.jsx)(Ad,{step:u,name:t.name,error:o,lastStep:p,steps:f,fiatCurrency:n.fiatCurrency,options:b,schema:ma.d().shape({top:ma.c().required(),bottom:u>=2?ma.c().required():ma.c()}),onContinue:j})]})},$d=Object(b.a)({fudgeFactor:{display:"flex",alignItems:"center",marginRight:156},switchLabel:{margin:6,width:24}}),Vd=er()(Nd||(Nd=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Yd=er()(Ed||(Ed=Object(Kn.a)(["\n query getData {\n machines {\n name\n deviceId\n cashbox\n cassette1\n cassette2\n }\n config\n }\n"]))),Xd=function(e){var t,n,a=e.name,i=$d(),o=Object(r.useState)(!1),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(Qn.c)(Yd).data,m=Object(Qn.b)(Vd,{onCompleted:function(){return d(!1)},refetchQueries:function(){return["getData"]}}),h=Object(c.a)(m,2),b=h[0],p=h[1].error,j=function(e,t){var n=jc(a)(e);return b({variables:{config:n,accounts:t}})},f=(null===u||void 0===u?void 0:u.config)&&pc(a)(u.config),g=null!==(t=null===f||void 0===f?void 0:f.fudgeFactorActive)&&void 0!==t&&t,O=(null===u||void 0===u?void 0:u.config)&&pc("locale")(u.config),x=null!==(n=null===u||void 0===u?void 0:u.machines)&&void 0!==n?n:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Cash-out",children:Object(qe.jsxs)("div",{className:i.fudgeFactor,children:[Object(qe.jsx)(ot,{children:"Transaction fudge factor"}),Object(qe.jsx)(Ta,{checked:g,onChange:function(e){j({fudgeFactorActive:e.target.checked})},value:g}),Object(qe.jsx)(ht,{className:i.switchLabel,children:g?"On":"Off"}),Object(qe.jsxs)(Ao,{width:304,children:[Object(qe.jsx)(ot,{children:"Automatically accept customer deposits as complete if their received amount is 100 crypto atoms or less."}),Object(qe.jsx)(ot,{children:"(Crypto atoms are the smallest unit in each cryptocurrency. E.g., satoshis in Bitcoin, or wei in Ethereum.)"})]})]})}),Object(qe.jsx)(dd,{namespaces:ar.a(cr.a(["deviceId"]))(x),data:f,stripeWhen:function(e){return 1===tr.a(da.a,Cc.a)(e)},enableEdit:!0,editWidth:134,enableToggle:!0,toggleWidth:109,onToggle:function(e){var t=pc(e)(f);if(!zd.isValidSync(t))return d(e);j(jc(e,{active:!(null===t||void 0===t?void 0:t.active)}))},save:j,error:null===p||void 0===p?void 0:p.message,validationSchema:zd,disableRowEdit:tr.a(nr.a,cr.a(["active"])),elements:Md(x,O)}),ga.a(x)&&Object(qe.jsx)(Qc,{message:"No machines so far"}),s&&Object(qe.jsx)(qd,{machine:ja.a(sr.a("deviceId",s))(x),onClose:function(){return d(!1)},save:j,error:null===p||void 0===p?void 0:p.message,locale:O})]})},Ud=n(668),Gd=n(669),Zd=n(715);function _d(){return(_d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kd(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Qd=r.createElement("desc",null,"Created with Sketch."),Jd=r.createElement("g",{id:"icon/sf-small/listing/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:0,y1:1,x2:20,y2:1,id:"Path-4",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:0,y1:7,x2:9,y2:7,id:"Path-4-Copy",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:0,y1:13,x2:20,y2:13,id:"Path-4-Copy-2",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:0,y1:19,x2:12,y2:19,id:"Path-4-Copy-3",stroke:"#FFFFFF",strokeWidth:2}));function eu(e,t){var n=e.title,a=e.titleId,i=Kd(e,["title","titleId"]);return r.createElement("svg",_d({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Qd,Jd)}var tu=r.forwardRef(eu);n.p;function nu(){return(nu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ru(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var au=r.createElement("desc",null,"Created with Sketch."),iu=r.createElement("g",{id:"icon/sf-small/listing/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:0,y1:1,x2:20,y2:1,id:"Path-4",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:0,y1:7,x2:9,y2:7,id:"Path-4-Copy",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:0,y1:13,x2:20,y2:13,id:"Path-4-Copy-2",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:0,y1:19,x2:12,y2:19,id:"Path-4-Copy-3",stroke:"#1B2559",strokeWidth:2}));function ou(e,t){var n=e.title,a=e.titleId,i=ru(e,["title","titleId"]);return r.createElement("svg",nu({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,au,iu)}var cu=r.forwardRef(ou);n.p;function lu(){return(lu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function su(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var du=r.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#44e188"});function uu(e,t){var n=e.title,a=e.titleId,i=su(e,["title","titleId"]);return r.createElement("svg",lu({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,du)}var mu=r.forwardRef(uu),hu=(n.p,n(665)),bu=n(714),pu=Object(b.a)({subtitle:{color:se,marginTop:16,marginBottom:16},extraMarginTop:{marginTop:72}}),ju=Object(r.memo)((function(e){var t,n=e.children,r=e.className,a=e.extraMarginTop,i=pu(),o=(t={},Object(v.a)(t,i.subtitle,!0),Object(v.a)(t,i.extraMarginTop,a),t);return Object(qe.jsx)(dt,{className:w()(o,r),children:n})})),fu=Object(b.a)({section:{marginBottom:72},sectionHeader:{display:"flex",alignItems:"center"},sectionTitle:{margin:[[16,20,23,0]]}}),gu=function(e){var t=e.error,n=e.children,r=e.title,a=fu();return Object(qe.jsxs)("div",{className:a.section,children:[(r||t)&&Object(qe.jsxs)("div",{className:a.sectionHeader,children:[Object(qe.jsx)(ju,{className:a.sectionTitle,children:r}),t&&Object(qe.jsx)(gt,{children:"Failed to save changes"})]}),n]})},Ou=n(197),xu=n(658),vu=n(659),yu=n(660),wu=n(195),Cu=n(662),ku=n(663);function Su(){return(Su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nu(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Eu=r.createElement("desc",null,"Created with Sketch."),Iu=r.createElement("g",{id:"Styleguide",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"icon/direction/cash-in",transform:"translate(-1.000000, 0.000000)",fill:"#16D6D3"},r.createElement("path",{d:"M3.99134364,0.321790399 L10.1430099,4.40569595 C11.0271728,4.99266501 11.2660914,6.1822461 10.6766494,7.06269968 C10.5357408,7.27317585 10.3543728,7.45378298 10.1430099,7.59410043 L3.99134364,11.678006 C3.10718075,12.264975 1.91258801,12.0270588 1.32314609,11.1466052 C1.11243854,10.8318699 1,10.4620686 1,10.0838037 L1,1.91599264 C1,0.857819122 1.86143307,0 2.92406462,0 C3.30392305,0 3.67528233,0.11196683 3.99134364,0.321790399 Z",id:"Path-3"})));function Lu(e,t){var n=e.title,a=e.titleId,i=Nu(e,["title","titleId"]);return r.createElement("svg",Su({width:"10px",height:"12px",viewBox:"0 0 10 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Eu,Iu)}var Fu,Pu,Bu=r.forwardRef(Lu),Du=(n.p,{name:"All Machines",deviceId:"ALL_MACHINES"}),Ru={display:"All Coins",code:"ALL_COINS"},Tu={marginLeft:6},Au=Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Bu,{}),Object(qe.jsx)("span",{style:Tu,children:"Cash-in"})]}),Wu=Object(qe.jsxs)("div",{children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)("span",{style:Tu,children:"Cash-out"})]}),zu=function(e,t,n){return function(r){if(!e)return"";var a=ja.a(sr.a(null!==n&&void 0!==n?n:"code",r))(e);return a?ir.a(t,a):"Unpaired machine"}},Mu=function(e){return function(t){return t?tr.a(xu.a(", "),ar.a(zu(e,"display")))(t):t}},Hu=function(e,t,n){var r=vu.a(Ru.code)(t),a=vu.a(Ru.code)(e);return r&&a&&da.a(t)>1?n(fs.a(js.a(Ru.code))(t)):r&&!a?n([Ru.code]):void n(t)},qu=function(){return{fontWeight:"bold"}},$u=function(e){return[{header:Au,name:"cashIn",display:"Cash-in",width:169,size:"lg",editingAlign:"right",input:Ja,suffix:"%",textStyle:qu,inputProps:{decimalPlaces:3}},{header:Wu,name:"cashOut",display:"Cash-out",width:169,size:"lg",editingAlign:"right",input:Ja,suffix:"%",textStyle:qu,inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:169,size:"lg",doubleHeader:"Cash-in only",textAlign:"center",editingAlign:"right",input:Ja,suffix:e,textStyle:qu,inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:169,size:"lg",doubleHeader:"Cash-in only",textAlign:"center",editingAlign:"right",input:Ja,suffix:e,textStyle:qu,inputProps:{decimalPlaces:2}}]},Vu=function(e,t,n){return function(e,t,n){var r=[Du].concat(e(["machines"])),a=e(["cryptoCurrencies"]),i=[Ru].concat(ar.a((function(e){return{display:e.code,code:e.code}}))(null!==a&&void 0!==a?a:[]));return[{name:"machine",width:196,size:"sm",view:zu(r,"name","deviceId"),input:Aa,inputProps:{options:r,valueProp:"deviceId",labelProp:"name"}},{name:"cryptoCurrencies",width:280,size:"sm",view:Mu(i),input:Aa,inputProps:{options:i,valueProp:"code",labelProp:"display",multiple:!0,onChange:Hu,shouldStayOpen:!0}},{header:Au,name:"cashIn",display:"Cash-in",width:130,input:Ja,textAlign:"right",suffix:"%",textStyle:qu,inputProps:{decimalPlaces:3}},{header:Wu,name:"cashOut",display:"Cash-out",width:130,input:Ja,textAlign:"right",suffix:"%",textStyle:qu,inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,input:Ja,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:qu,inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:144,input:Ja,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:qu,inputProps:{decimalPlaces:2}}]}(cr.a(yu.a,e),t)},Yu=100,Xu=9999999,Uu=ma.d().shape({cashIn:ma.c().label("Cash-in").min(0).max(Yu).required(),cashOut:ma.c().label("Cash-out").min(0).max(Yu).required(),fixedFee:ma.c().label("Fixed Fee").min(0).max(Xu).required(),minimumTx:ma.c().label("Minimum Tx").min(0).max(Xu).required()}),Gu=function(e,t){var n=cr.a(yu.a,t),r=[Du].concat(n(["machines"])),a=n(["cryptoCurrencies"]),i=[Ru].concat(ar.a((function(e){return{display:e.code,code:e.code}}))(null!==a&&void 0!==a?a:[]));return ma.d().shape({machine:ma.e().nullable().label("Machine").required(),cryptoCurrencies:ma.a().test({test:function(){var t=this.parent,n=t.id,a=t.machine,o=t.cryptoCurrencies,c=function(e,t,n){var r=ir.a("cryptoCurrencies"),a=ir.a("machine"),i=lr.a(sr.a("machine",t))(n),o=ja.a(sr.a("id",e))(n),c=r(o),l=a(o),s=tr.a(wu.a,po.a,ar.a(r))(i);return t!==l?null!==s&&void 0!==s?s:[]:Cu.a(s,c)}(n,a,e),l=a===Du.deviceId,s=vu.a(Ru.code,o);if(l&&s)return this.createError({message:"All machines and all coins should be configured in the default setup table"});var d=ku.a(c,o);if(!ga.a(d)){var u=Mu(i)(d),m=zu(r,"name","deviceId")(a),h="".concat(u," already overriden for machine: ").concat(m);return this.createError({message:h})}return!0}}).label("Crypto Currencies").required().min(1),cashIn:ma.c().label("Cash-in").min(0).max(Yu).required(),cashOut:ma.c().label("Cash-out").min(0).max(Yu).required(),fixedFee:ma.c().label("Fixed Fee").min(0).max(Xu).required(),minimumTx:ma.c().label("Minimum Tx").min(0).max(Xu).required()})},Zu={cashIn:"",cashOut:"",fixedFee:"",minimumTx:""},_u={machine:null,cryptoCurrencies:[],cashIn:"",cashOut:"",fixedFee:"",minimumTx:""},Ku=function(e){var t=e.machine,n=e.cryptoCurrencies,r=t===Du.deviceId,a=xo.a(Ru.code,n);return r&&a?0:r?1:a?2:3},Qu=function(e,t,n,r){return{minimumTx:r.minimumTx,fixedFee:r.fixedFee,cashOut:r.cashOut,cashIn:r.cashIn,machine:t,cryptoCurrencies:[e],default:n,id:Object(Os.a)()}},Ju=function(e,t){return{color:e.default?J:te}},em=function(e,t,n){var r=cr.a(yu.a,e);return tm(r,t,Zu)},tm=function(e,t,n){var r=[Du].concat(e(["machines"]));return[{name:"machine",width:196,size:"sm",view:zu(r,"name","deviceId"),editable:!1},{name:"cryptoCurrencies",display:"Crypto Currency",width:265,view:ir.a(0),size:"sm",editable:!1},{header:Au,name:"cashIn",display:"Cash-in",width:130,input:Ja,textAlign:"right",suffix:"%",textStyle:function(e){return Ju(e)},inputProps:{decimalPlaces:3}},{header:Wu,name:"cashOut",display:"Cash-out",width:130,input:Ja,textAlign:"right",greenText:!0,suffix:"%",textStyle:function(e){return Ju(e)},inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,input:Ja,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:function(e){return Ju(e)},inputProps:{decimalPlaces:2}},{name:"minimumTx",display:"Minimun Tx",width:144,input:Ja,doubleHeader:"Cash-in only",textAlign:"right",suffix:t,textStyle:function(e){return Ju(e)},inputProps:{decimalPlaces:2}}]},nm=Object(r.memo)((function(e){var t,n=e.config,a=e.currency,i=e.data,o=e.error,l=e.save,s=e.saveOverrides,d=Object(r.useState)(!1),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(r.useState)(!1),p=Object(c.a)(b,2),j=p[0],f=p[1],g=n&&!ga.a(n)?n:Zu,O=null!==(t=null===g||void 0===g?void 0:g.overrides)&&void 0!==t?t:[],x=gs.a([hu.a(Ku),hu.a(ir.a("machine"))])(O);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{error:null===o||void 0===o?void 0:o.message,title:"Default setup",rowSize:"lg",titleLg:!0,name:"commissions",enableEdit:!0,initialValues:g,save:l,validationSchema:Uu,data:bu.a(g),elements:$u(a),setEditing:function(e,t){return h(t)},forceDisable:j})}),Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{error:null===o||void 0===o?void 0:o.message,title:"Overrides",titleLg:!0,name:"overrides",enableDelete:!0,enableEdit:!0,enableCreate:!0,groupBy:Ku,initialValues:_u,save:s,validationSchema:Gu(x,i),data:x,elements:Vu(i,a),setEditing:function(e,t){return f(t)},forceDisable:m})})]})})),rm=n(666),am=n(667),im=n(701),om={code:"SHOW_ALL",display:"Show all"},cm=[{code:"machine",display:"Machine Name"},{code:"cryptoCurrencies",display:"Cryptocurrency"},{code:"cashIn",display:"Cash-in"},{code:"cashOut",display:"Cash-out"},{code:"fixedFee",display:"Fixed Fee"},{code:"minimumTx",display:"Minimum Tx"}],lm=Object(b.a)({headerLine:{display:"flex",justifyContent:"",marginBottom:24},select:{marginRight:24},tableWrapper:{flex:1,display:"block",overflowY:"auto",width:"100%",maxHeight:"70vh"}}),sm=function(e,t){return{code:e,display:t||e}},dm=Object(r.memo)((function(e){var t=e.config,n=e.localeConfig,a=e.currency,i=e.data,o=e.error,l=e.saveOverrides,s=lm(),d=Object(r.useState)(om),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(r.useState)(om),p=Object(c.a)(b,2),j=p[0],f=p[1],g=Object(r.useState)(cm[0]),O=Object(c.a)(g,2),x=O[0],v=O[1],y=ir.a("cryptoCurrencies",n),w=ar.a(sm)(y),C=rm.a(ir.a("display"),ar.a((function(e){return sm(ir.a("deviceId",e),ir.a("name",e))}))(ir.a("machines",i))),k=im.a(ar.a((function(e){var t,r=null===(t=ir.a("overrides",n))||void 0===t?void 0:t.find(sr.a("machine",e)),a=r?ir.a("cryptoCurrencies",r):y;return am.a([e],a)}))(C.map(ir.a("code")))),S=ar.a((function(e){var n=Object(c.a)(e,2),r=n[0];return function(e,t,n){var r=ir.a("overrides",n);if(!r&&ga.a(r))return Qu(e,t,!0,n);var a=ja.a((function(n){return n.machine===t&&Ou.includes(e)(n.cryptoCurrencies)}))(r);if(void 0!==a)return Qu(e,t,!1,a);var i=ja.a((function(e){return e.machine===t&&Ou.includes("ALL_COINS")(e.cryptoCurrencies)}))(r);if(void 0!==i)return Qu(e,t,!1,i);var o=ja.a((function(t){return"ALL_MACHINES"===t.machine&&Ou.includes(e)(t.cryptoCurrencies)}))(r);return void 0!==o?Qu(e,t,!1,o):Qu(e,t,!0,n)}(n[1],r,t)}))(k),N=tr.a(function(e){switch(e){case cm[0]:return rm.a(ja.a(sr.a("code",ir.a("machine"))));case cm[1]:return rm.a(cr.a(["cryptoCurrencies",0]));default:return rm.a(ir.a(e.code))}}(x),function(e,t){return tr.a(lr.a((function(e){return t===om|t.code===e.machine})),lr.a((function(t){return e===om|e.code===t.cryptoCurrencies[0]})))}(j,m))(S);return Object(qe.jsxs)("div",{children:[Object(qe.jsxs)("div",{className:s.headerLine,children:[Object(qe.jsx)(Ko,{className:s.select,onSelectedItemChange:h,label:"Machines",default:om,items:[om].concat(C),selectedItem:m}),Object(qe.jsx)(Ko,{className:s.select,onSelectedItemChange:f,label:"Cryptocurrency",default:om,items:[om].concat(w),selectedItem:j}),Object(qe.jsx)(Ko,{onSelectedItemChange:v,label:"Sort by",default:cm[0],items:cm,selectedItem:x})]}),Object(qe.jsx)("div",{className:s.tableWrapper,children:Object(qe.jsx)(sd,{error:null===o||void 0===o?void 0:o.message,name:"comissionsList",enableEdit:!0,save:l,initialValues:_u,validationSchema:ma.d().shape({machine:ma.e().label("Machine").required(),cryptoCurrencies:ma.a().label("Crypto Currency").required().min(1),cashIn:ma.c().label("Cash-in").min(0).max(Yu).required(),cashOut:ma.c().label("Cash-out").min(0).max(Yu).required(),fixedFee:ma.c().label("Fixed Fee").min(0).max(Xu).required(),minimumTx:ma.c().label("Minimum Tx").min(0).max(Xu).required()}),data:N,elements:em(i,a)})})]})})),um=Object(b.a)({listViewButton:{marginLeft:4}}),mm=er()(Fu||(Fu=Object(Kn.a)(["\n query getData {\n config\n cryptoCurrencies {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),hm=er()(Pu||(Pu=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),bm=function(e){var t,n=e.name,a=um(),i=Object(r.useState)(!1),o=Object(c.a)(i,2),l=o[0],s=o[1],d=Object(r.useState)(null),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(Qn.c)(mm).data,p=Object(Qn.b)(hm,{refetchQueries:function(){return["getData"]},onError:function(e){return h(e)}}),j=Object(c.a)(p,1)[0],f=(null===b||void 0===b?void 0:b.config)&&pc(n)(b.config),g=(null===b||void 0===b?void 0:b.config)&&pc(cc)(b.config),O=ir.a("fiatCurrency")(g),x=ir.a("overrides")(f),v=l?[{label:"Override value",icon:Object(qe.jsx)(mu,{})}]:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Commissions",labels:v,button:{text:"List view",icon:cu,inverseIcon:tu,toggle:s},iconClassName:a.listViewButton}),!l&&Object(qe.jsx)(nm,{config:f,currency:O,data:b,error:m,save:function(e){var t=jc(n)(e.commissions[0]);return j({variables:{config:t}})},saveOverrides:function(e){var t=jc(n)(e);return h(null),j({variables:{config:t}})}}),l&&Object(qe.jsx)(dm,{config:f,localeConfig:g,currency:O,data:b,error:m,saveOverrides:(t=x,function(e,n){var r,a=cr.a(["cryptoCurrencies",0],n),i=xa.a("machine",n),o=lr.a(Zd.a(i,(function(e){return!xa.a("cryptoCurrencies",n,e)}))),c=(r=a,function(e){return Ud.a(e,{cryptoCurrencies:Gd.a([r],e.cryptoCurrencies)})}),l=ar.a(c)(o(t)).concat(lr.a((function(e){return!i(e)}),t)),s={commissions_overrides:ps.a(n,l)};return j({variables:{config:s}})})})]})},pm=n(707),jm=n(190),fm=n.n(jm),gm=n(670),Om=n(671),xm={error:K,warning:"#ff7311",success:ne,neutral:J},vm={error:Q,warning:"#fbf3ec",success:V,neutral:X},ym=Object(b.a)({root:{borderRadius:4,marginTop:4,marginRight:2,marginBottom:4,marginLeft:2,height:24,backgroundColor:function(e){var t=e.type;return vm[t]}},label:{fontSize:ye,fontWeight:500,fontFamily:Se,paddingRight:4,paddingLeft:4,color:function(e){var t=e.type;return xm[t]}}}),wm=function(e){var t=e.status,n=ym({type:t.type});return Object(qe.jsx)(Wa.a,{type:t.type,label:t.label,classes:n})},Cm=function(e){var t=e.statuses,n=t.find((function(e){return"error"===e.type}))||t.find((function(e){return"warning"===e.type}))||t[0],r={label:"+".concat(t.length-1),type:n.type};return Object(qe.jsxs)("div",{children:[Object(qe.jsx)(wm,{status:n}),t.length>1&&Object(qe.jsx)(wm,{status:r})]})};function km(){return(km=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Sm(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Nm=r.createElement("desc",null,"Created with Sketch."),Em=r.createElement("g",{id:"icon/button/authorize/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("circle",{id:"Oval",stroke:"#FFFFFF",cx:6,cy:6,r:5}),r.createElement("polyline",{id:"Stroke-13",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",points:"4 6.66666667 5 8 8 4"}));function Im(e,t){var n=e.title,a=e.titleId,i=Sm(e,["title","titleId"]);return r.createElement("svg",km({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Nm,Em)}var Lm=r.forwardRef(Im);n.p;function Fm(){return(Fm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pm(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Bm=r.createElement("desc",null,"Created with Sketch."),Dm=r.createElement("g",{id:"icon/button/authorize/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Group-9",stroke:"#1B2559"},r.createElement("circle",{id:"Oval",cx:6,cy:6,r:5})),r.createElement("polyline",{id:"Stroke-13",stroke:"#1B2559",strokeLinecap:"round",strokeLinejoin:"round",points:"4 6.66666667 5 8 8 4"}));function Rm(e,t){var n=e.title,a=e.titleId,i=Pm(e,["title","titleId"]);return r.createElement("svg",Fm({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Bm,Dm)}var Tm=r.forwardRef(Rm);n.p;function Am(){return(Am=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wm(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var zm=r.createElement("desc",null,"Created with Sketch."),Mm=r.createElement("g",{id:"icon/button/cancel/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",stroke:"#1B2559",strokeWidth:1.2},r.createElement("line",{x1:12,y1:0,x2:0,y2:12,id:"Stroke-1"}),r.createElement("line",{x1:0,y1:0,x2:12,y2:12,id:"Stroke-3"})));function Hm(e,t){var n=e.title,a=e.titleId,i=Wm(e,["title","titleId"]);return r.createElement("svg",Am({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,zm,Mm)}var qm=r.forwardRef(Hm),$m=(n.p,{label1:{display:"flex",marginBottom:2,marginTop:"auto",width:85},label1Pending:{color:q},label1Rejected:{color:K},label1Accepted:{color:Y},cardActionButton:{display:"flex",height:28,marginRight:"auto",marginLeft:12},propertyCardTopRow:{display:"flex",margin:[[0,10,5,0]]},propertyCardBottomRow:{display:"flex",flexDirection:"row",height:45},propertyCard:{display:"flex",flexDirection:"column",borderRadius:8,width:"100%",height:100,padding:[[20]],boxSizing:"border-box",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.04)",border:"solid 0",backgroundColor:_,margin:[[20,0,0,0]]},rowSpaceBetween:{display:"flex",flexFlow:"row nowrap",alignItems:"center",justifyContent:"space-between"},columnSpaceBetween:{display:"flex",flexFlow:"column nowrap",alignItems:"center",justifyContent:"space-between",width:90},buttonsWrapper:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"auto",marginTop:"auto"}}),Vm=Object(b.a)($m),Ym="automatic",Xm="verified",Um="blocked",Gm=Object(r.memo)((function(e){var t,n=e.className,r=e.title,a=e.state,i=e.authorize,o=e.reject,c=e.children,l=Vm(),s=(t={},Object(v.a)(t,l.label1,!0),Object(v.a)(t,l.label1Pending,a===Ym),Object(v.a)(t,l.label1Rejected,a===Um),Object(v.a)(t,l.label1Accepted,a===Xm),t),d=a===Ym?{label:"Pending",type:"neutral"}:a===Um?{label:"Rejected",type:"error"}:{label:"Accepted",type:"success"};return Object(qe.jsxs)(Zt.a,{className:w()(l.propertyCard,n),elevation:0,children:[Object(qe.jsx)(rt,{className:l.propertyCardTopRow,children:r}),Object(qe.jsxs)("div",{className:l.propertyCardBottomRow,children:[Object(qe.jsx)("div",{className:w()(s),children:Object(qe.jsx)(Cm,{statuses:[d]})}),c,Object(qe.jsxs)("div",{className:l.buttonsWrapper,children:[i&&a!==Xm&&Object(qe.jsx)(Ct,{className:l.cardActionButton,color:"secondary",Icon:Tm,InverseIcon:Lm,onClick:function(){return i()},children:"Authorize"}),o&&a!==Um&&Object(qe.jsx)(Ct,{className:l.cardActionButton,color:"secondary",Icon:qm,InverseIcon:vn,onClick:function(){return o()},children:"Reject"})]})]})]})}));function Zm(){return(Zm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Km=r.createElement("desc",null,"Created with Sketch."),Qm=r.createElement("g",{id:"icon/button/block/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",stroke:"#FFFFFF"},r.createElement("circle",{id:"Oval",cx:6,cy:6,r:5}),r.createElement("line",{x1:9,y1:3,x2:3,y2:9,id:"Stroke-3"})));function Jm(e,t){var n=e.title,a=e.titleId,i=_m(e,["title","titleId"]);return r.createElement("svg",Zm({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Km,Qm)}var eh=r.forwardRef(Jm);n.p;function th(){return(th=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var rh=r.createElement("desc",null,"Created with Sketch."),ah=r.createElement("g",{id:"icon/button/block/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",stroke:"#1B2559"},r.createElement("circle",{id:"Oval",cx:6,cy:6,r:5}),r.createElement("line",{x1:9,y1:3,x2:3,y2:9,id:"Stroke-3"})));function ih(e,t){var n=e.title,a=e.titleId,i=nh(e,["title","titleId"]);return r.createElement("svg",th({viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,rh,ah)}var oh=r.forwardRef(ih),ch=(n.p,{labelLink:{cursor:"pointer",color:q},breadcrumbs:{margin:[[20,0]]},actionLabel:{color:q,margin:[[4,0]]},customerDetails:{marginBottom:18}});function lh(){return(lh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function sh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var dh=r.createElement("desc",null,"Created with Sketch."),uh=r.createElement("g",{id:"icon/sf-small/search/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M15.8635238,8.17028571 C15.8635238,12.4198095 12.4187619,15.8645714 8.1692381,15.8645714 C3.92066667,15.8645714 0.475904762,12.4198095 0.475904762,8.17028571 C0.475904762,3.9207619 3.92066667,0.476 8.1692381,0.476 C12.4187619,0.476 15.8635238,3.9207619 15.8635238,8.17028571 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:13.7035238,y1:13.7046667,x2:19.4844762,y2:19.485619,id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round"}));function mh(e,t){var n=e.title,a=e.titleId,i=sh(e,["title","titleId"]);return r.createElement("svg",lh({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,dh,uh)}var hh=r.forwardRef(mh);n.p;function bh(){return(bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ph(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var jh=r.createElement("desc",null,"Created with Sketch."),fh=r.createElement("g",{id:"icon/sf-small/search/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M15.8635238,8.17028571 C15.8635238,12.4198095 12.4187619,15.8645714 8.1692381,15.8645714 C3.92066667,15.8645714 0.475904762,12.4198095 0.475904762,8.17028571 C0.475904762,3.9207619 3.92066667,0.476 8.1692381,0.476 C12.4187619,0.476 15.8635238,3.9207619 15.8635238,8.17028571 Z",id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:13.7035238,y1:13.7046667,x2:19.4844762,y2:19.485619,id:"Stroke-3",stroke:"#1B2559",strokeWidth:2,strokeLinecap:"round"}));function gh(e,t){var n=e.title,a=e.titleId,i=ph(e,["title","titleId"]);return r.createElement("svg",bh({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,jh,fh)}var Oh=r.forwardRef(gh),xh=(n.p,Object(b.a)({row:{display:"flex",flexDirection:"row"},image:function(e){return{objectFit:"cover",borderRadius:"8px 0px 0px 8px",width:e.width,height:e.height}},popupImage:function(e){return{objectFit:"cover",width:e.popupWidth,height:e.popupHeight}},button:function(e){return{borderRadius:"0px 8px 8px 0px",height:e.height}},popoverContent:{display:"block",padding:[[10,15]]}})),vh=Object(r.memo)((function(e){var t=e.className,n=e.width,a=e.height,i=e.popupWidth,o=e.popupHeight,l=e.src,s=xh({width:n,height:a,popupWidth:i,popupHeight:o}),d=Object(r.useState)(null),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Boolean(m),p=function(e){var t=e.className;return Object(qe.jsx)("img",{className:w()(t),src:l,alt:""})};return Object(qe.jsx)(Ut.a,{onClickAway:function(){h(null)},children:Object(qe.jsxs)("div",{className:w()(s.row,t),children:[Object(qe.jsx)(p,{className:s.image}),Object(qe.jsx)(Xt,{Icon:Oh,InverseIcon:hh,className:s.button,onClick:function(e){h(m?null:e.currentTarget)}}),Object(qe.jsx)(Kt,{open:b,anchorEl:m,placement:"top",children:Object(qe.jsx)("div",{className:s.popoverContent,children:Object(qe.jsx)(p,{className:s.popupImage})})})]})})}));function yh(){return(yh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ch=r.createElement("desc",null,"Created with Sketch."),kh=r.createElement("g",{id:"icon/crossed-camera",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"crossed-camera"},r.createElement("g",{id:"Group-2"},r.createElement("g",{id:"icon/ID/cam/zodiac",transform:"translate(0.000000, 3.657143)",fill:"#1B2559",fillRule:"nonzero"},r.createElement("path",{d:"M16,19.1876029 C12.4482116,19.1876029 9.56809571,16.389776 9.56809571,12.9394673 C9.56809571,9.48915858 12.4482116,6.69133172 16,6.69133172 C19.5517884,6.69133172 22.4319043,9.48915858 22.4319043,12.9394673 C22.4319043,16.389776 19.5517884,19.1876029 16,19.1876029 Z M16,17.104891 C18.3677075,17.104891 20.2879362,15.239526 20.2879362,12.9394673 C20.2879362,10.6394086 18.3677075,8.77404358 16,8.77404358 C13.6322925,8.77404358 11.7120638,10.6394086 11.7120638,12.9394673 C11.7120638,15.239526 13.6322925,17.104891 16,17.104891 Z M22.7667469,3.30692494 L30.7397807,3.30692494 C31.3318211,3.30692494 31.8117647,3.77315587 31.8117647,4.34828087 L31.8117647,22.0513317 C31.8117647,22.6264567 31.3318211,23.0926877 30.7397807,23.0926877 L1.26021934,23.0926877 C0.6681789,23.0926877 0.188235294,22.6264567 0.188235294,22.0513317 L0.188235294,4.34828087 C0.188235294,3.77315587 0.6681789,3.30692494 1.26021934,3.30692494 L9.23325311,3.30692494 L12.0766705,0.494526627 C12.2782333,0.295162767 12.5538198,0.182857143 12.8414756,0.182857143 L19.1585244,0.182857143 C19.4461802,0.182857143 19.7217667,0.295162767 19.9233295,0.494526627 L22.7667469,3.30692494 Z M29.6677966,5.3896368 L22.3170489,5.3896368 C22.0293931,5.3896368 21.7538065,5.27733118 21.5522438,5.07796732 L18.7088264,2.26556901 L13.2911736,2.26556901 L10.4477562,5.07796732 C10.2461935,5.27733118 9.97060695,5.3896368 9.68295115,5.3896368 L2.33220339,5.3896368 L2.33220339,21.0099758 L29.6677966,21.0099758 L29.6677966,5.3896368 Z",id:"Stroke-1"})),r.createElement("line",{x1:32,y1:0,x2:0,y2:32,id:"Line",stroke:"#FF584A",strokeWidth:2,strokeLinecap:"square"}))));function Sh(e,t){var n=e.title,a=e.titleId,i=wh(e,["title","titleId"]);return r.createElement("svg",yh({width:"32px",height:"32px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Ch,kh)}var Nh=r.forwardRef(Sh),Eh=(n.p,Object(b.a)({field:{height:46},label:{color:q,margin:[[0,3]]},value:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",margin:0,paddingLeft:4}})),Ih=Object(r.memo)((function(e){var t=e.label,n=e.display,r=e.size,a=e.className,i=Eh();return Object(qe.jsxs)("div",{className:w()(i.field,a),style:{width:r},children:[Object(qe.jsx)(mt,{className:i.label,children:t}),Object(qe.jsx)(st,{className:i.value,children:n})]})})),Lh=Object(b.a)({complianceDetailsGrid:{display:"flex",flexDirection:"row"},firstColumn:{display:"flex",flexDirection:"column",width:"100%",marginRight:10},lastColumn:{display:"flex",flexDirection:"column",width:"100%",marginLeft:10},photoWrapper:function(e){return{display:"flex",justifyContent:"center",width:e.width}}}),Fh=function(e){var t=e.show,n=e.src,r=Lh({width:165});return Object(qe.jsx)(qe.Fragment,{children:t?Object(qe.jsx)(vh,{src:n,width:165,height:45,popupWidth:360,popupHeight:240}):Object(qe.jsx)("div",{className:r.photoWrapper,children:Object(qe.jsx)(Nh,{})})})},Ph=function(e){var t=e.customer,n=e.updateCustomer,r=Lh({width:165}),a=cr.a(["sanctions"])(t),i=cr.a(["sanctionsAt"])(t)?a?"Passed":"Failed":"Not checked yet";return Object(qe.jsxs)("div",{children:[Object(qe.jsx)(rt,{children:"Compliance details"}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(cb,{customerData:t,updateCustomer:n}),Object(qe.jsxs)(Xe.a,{className:r.complianceDetailsGrid,children:[Object(qe.jsxs)(Xe.a,{className:r.firstColumn,children:[Object(qe.jsx)(Gm,{title:"ID photo",state:cr.a(["idCardPhotoOverride"])(t),authorize:function(){return n({idCardPhotoOverride:Xm})},reject:function(){return n({idCardPhotoOverride:Um})},children:Object(qe.jsx)(Fh,{show:t.idCardPhotoPath,src:"".concat(Zn,"/id-card-photo/").concat(cr.a(["idCardPhotoPath"])(t))})}),Object(qe.jsx)(Gm,{title:"Front facing camera",state:cr.a(["frontCameraOverride"])(t),authorize:function(){return n({frontCameraOverride:Xm})},reject:function(){return n({frontCameraOverride:Um})},children:Object(qe.jsx)(Fh,{show:t.frontCameraPath,src:"".concat(Zn,"/front-camera-photo/").concat(cr.a(["frontCameraPath"])(t))})})]}),Object(qe.jsxs)(Xe.a,{className:r.lastColumn,children:[Object(qe.jsx)(Gm,{title:"US SSN",state:cr.a(["usSsnOverride"])(t),authorize:function(){return n({usSsnOverride:Xm})},reject:function(){return n({usSsnOverride:Um})},children:Object(qe.jsx)(Ih,{label:"US SSN",display:t.usSsn})}),Object(qe.jsx)(Gm,{title:"Sanctions check",state:cr.a(["sanctionsOverride"])(t),authorize:function(){return n({sanctionsOverride:Xm})},reject:function(){return n({sanctionsOverride:Um})},children:Object(qe.jsx)(st,{children:i})})]})]})]})]})};function Bh(){return(Bh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Rh=r.createElement("desc",null,"Created with Sketch."),Th=r.createElement("g",{id:"icon/ID/card/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-2",stroke:"#1B2559",strokeWidth:1.6},r.createElement("g",{id:"id-copy"},r.createElement("polygon",{id:"Stroke-1",points:"0 16 22 16 22 0 0 0"}),r.createElement("line",{x1:11.7857143,y1:4,x2:18.8571429,y2:4,id:"Stroke-3"}),r.createElement("line",{x1:11.7857143,y1:7.2,x2:18.8571429,y2:7.2,id:"Stroke-4"}),r.createElement("polygon",{id:"Stroke-5",points:"3.14285714 11.2 8.64285714 11.2 8.64285714 4 3.14285714 4"}))));function Ah(e,t){var n=e.title,a=e.titleId,i=Dh(e,["title","titleId"]);return r.createElement("svg",Bh({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Rh,Th)}var Wh=r.forwardRef(Ah);n.p;function zh(){return(zh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Hh=r.createElement("g",{id:"icon/sf-small/law/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"bevel"},r.createElement("line",{x1:8.4141,y1:7.4648,x2:14.0711,y2:1.8078,id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:12.6568,y1:.3936,x2:15.4858,y2:3.2216,id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:7,y1:6.0498,x2:9.829,y2:8.8788,id:"Stroke-6",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:11.2427,y1:4.6357,x2:19.2427,y2:12.6357,id:"Stroke-7",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:3,y1:16.5,x2:10,y2:16.5,id:"Stroke-9",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("line",{x1:0,y1:19.5,x2:13,y2:19.5,id:"Stroke-10",stroke:"#FFFFFF",strokeWidth:2}));function qh(e,t){var n=e.title,a=e.titleId,i=Mh(e,["title","titleId"]);return r.createElement("svg",zh({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Hh)}var $h=r.forwardRef(qh);n.p;function Vh(){return(Vh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Xh=r.createElement("g",{id:"icon/sf-small/law/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"bevel"},r.createElement("line",{x1:8.4141,y1:7.4648,x2:14.0711,y2:1.8078,id:"Stroke-1",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:12.6568,y1:.3936,x2:15.4858,y2:3.2216,id:"Stroke-3",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:7,y1:6.0498,x2:9.829,y2:8.8788,id:"Stroke-6",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:11.2427,y1:4.6357,x2:19.2427,y2:12.6357,id:"Stroke-7",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:3,y1:16.5,x2:10,y2:16.5,id:"Stroke-9",stroke:"#1B2559",strokeWidth:2}),r.createElement("line",{x1:0,y1:19.5,x2:13,y2:19.5,id:"Stroke-10",stroke:"#1B2559",strokeWidth:2}));function Uh(e,t){var n=e.title,a=e.titleId,i=Yh(e,["title","titleId"]);return r.createElement("svg",Vh({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Xh)}var Gh=r.forwardRef(Uh),Zh=(n.p,{titleWrapper:Tl.titleWrapper,titleAndButtonsContainer:Tl.titleAndButtonsContainer,row:{display:"flex",flexFlow:"row nowrap"},rowSpaceBetween:{display:"flex",flexFlow:"row nowrap",alignItems:"center",justifyContent:"space-between"},column:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between"},textInput:{width:144},p:{fontFamily:"MuseoSans",fontSize:xe,fontWeight:500,fontStretch:"normal",fontStyle:"normal",lineHeight:1.14,letterSpacing:"normal",color:J},txId:{fontFamily:"MuseoSans",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},txClassIconLeft:{marginRight:11},txClassIconRight:{marginLeft:11},headerLabels:{display:"flex",flexDirection:"row","& div":{display:"flex",alignItems:"center"},"& > div:first-child":{marginRight:24},"& span":{extend:Re.label1,marginLeft:6}},photo:{width:92,height:92,borderRadius:8,backgroundColor:X,margin:[[0,28,0,0]],alignItems:"center",justifyContent:"center",display:"flex"},img:{width:80},customerName:{marginBottom:32},icon:{marginRight:11},name:{display:"flex",flexDirection:"row",alignItems:"center"},value:{height:16},label:{marginBottom:4,color:q},idIcon:{marginRight:10},subpageButton:{marginLeft:16}}),_h=n(696),Kh=function(e){return"blocked"===e.authorizedOverride?{label:"Blocked",type:"error"}:e.daysSuspended>0?{label:"".concat(e.daysSuspended," day suspension"),type:"warning"}:{label:"Authorized",type:"success"}},Qh=function(e,t){var n=e&&t?Object(_h.a)(e,t):null;return n?n.formatInternational():e},Jh=function(e){var t,n,r=cr.a(["idCardData"])(e);return"".concat(null!==(t=cr.a(["firstName"])(r))&&void 0!==t?t:""," ").concat(null!==(n=cr.a(["lastName"])(r))&&void 0!==n?n:"").trim()},eb=Object(b.a)(Zh),tb=Object(r.memo)((function(e){var t=e.frontCameraPath,n=eb();return Object(qe.jsx)(Zt.a,{className:n.photo,elevation:0,children:t?Object(qe.jsx)("img",{className:n.img,src:"".concat(Zn,"/front-camera-photo/").concat(t),alt:""}):Object(qe.jsx)(Nh,{})})})),nb=Object(b.a)(Zh),rb=Object(r.memo)((function(e){var t,n,r=e.customer,a=e.locale,i=e.setShowCompliance,o=nb(),c=[{header:"Phone number",size:172,value:Qh(r.phone,a.country)},{header:"ID number",size:172,value:null!==(t=cr.a(["idCardData","documentNumber"])(r))&&void 0!==t?t:""},{header:"US SSN",size:127,value:null!==(n=cr.a(["usSsn"])(r))&&void 0!==n?n:""}],l=Jh(r);return Object(qe.jsxs)(Xe.a,{display:"flex",children:[Object(qe.jsx)(tb,{frontCameraPath:cr.a(["frontCameraPath"])(r)}),Object(qe.jsxs)(Xe.a,{display:"flex",flexDirection:"column",children:[Object(qe.jsxs)("div",{className:o.name,children:[Object(qe.jsx)(Wh,{className:o.idIcon}),Object(qe.jsx)(nt,{noMargin:!0,children:l.length?l:Qh(cr.a(["phone"])(r),a.country)}),Object(qe.jsx)(kn,{className:o.subpageButton,Icon:Gh,InverseIcon:$h,toggle:i,children:"Compliance details"})]}),Object(qe.jsx)(Xe.a,{display:"flex",mt:"auto",children:c.map((function(e,t){var n=e.size,r=e.header;return Object(qe.jsx)(mt,{noMargin:!0,className:o.label,style:{width:n},children:r},t)}))}),Object(qe.jsx)(Xe.a,{display:"flex",children:c.map((function(e,t){var n=e.size,r=e.value;return Object(qe.jsx)(ot,{noMargin:!0,className:o.value,style:{width:n},children:r},t)}))})]})]})})),ab=n(25),ib=n.n(ab),ob=function(e,t){return rr.a(e)?"":t},cb=Object(r.memo)((function(e){var t=e.customerData,n=e.updateCustomer,r=cr.a(["idCardData"])(t),a=cr.a(["expirationDate"])(r),i=cr.a(["country"])(r),o=cr.a(["dateOfBirth"])(r),c=[{header:"Name",display:"".concat(Jh(t)),size:190},{header:"ID number",display:cr.a(["documentNumber"])(r),size:160},{header:"Birth Date",display:ob(o,ib.a.utc(o).format("YYYY-MM-DD")),size:110},{header:"Age",display:ob(o,ib.a.utc().diff(ib.a.utc(o).format("YYYY-MM-DD"),"years")),size:50},{header:"Gender",display:cr.a(["gender"])(r),size:80},{header:"Canada"===i?"Province":"State",display:cr.a(["state"])(r),size:120},{header:"Expiration Date",display:ob(a,ib.a.utc(a).format("YYYY-MM-DD"))}];return Object(qe.jsx)(Gm,{title:"ID data",state:cr.a(["idCardDataOverride"])(t),authorize:function(){return n({idCardDataOverride:Xm})},reject:function(){return n({idCardDataOverride:Um})},children:Object(qe.jsx)(Xe.a,{display:"flex",alignItems:"center",children:c.map((function(e,t){var n=e.header,r=e.display,a=e.size;return Object(qe.jsx)(Ih,{label:n,display:r,size:a},t)}))})})})),lb=n(41),sb=n.n(lb),db=[{cryptoCode:"BTC",display:"Bitcoin",code:"bitcoin",unitScale:8},{cryptoCode:"ETH",display:"Ethereum",code:"ethereum",unitScale:18},{cryptoCode:"LTC",display:"Litecoin",code:"litecoin",unitScale:8},{cryptoCode:"DASH",display:"Dash",code:"dash",unitScale:8},{cryptoCode:"ZEC",display:"Zcash",code:"zcash",unitScale:8},{cryptoCode:"BCH",display:"Bitcoin Cash",code:"bitcoincash",unitScale:8}];function ub(e,t){var n=function(e){var t=ja.a(sr.a("cryptoCode",e))(db);if(!t)throw new Error("Unsupported crypto: ".concat(e));return t}(t).unitScale;return e.shiftedBy(-n)}function mb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"BCH"===e?t.replace("bitcoincash:",""):t}var hb,bb,pb,jb,fb=Object(b.a)(Zh),gb=function(e){var t=e.customer,n=e.data,r=e.loading,a=fb(),i="cashOut"===t.lastTxClass?fd:Bu,o=!(ga.a(n)||rr.a(n)),c=[{header:"Transactions",size:127,value:ob(t.totalTxs,"".concat(Number.parseInt(t.totalTxs)))},{header:"Transaction volume",size:167,value:ob(t.totalSpent,"".concat(Number.parseFloat(t.totalSpent)," ").concat(t.lastTxFiatCode))},{header:"Last active",size:142,value:ob(t.lastActive,ib.a.utc(t.lastActive).format("YYYY-MM-D"))},{header:"Last transaction",size:198,value:ob(t.lastTxFiat,Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(i,{className:a.icon}),"".concat(Number.parseFloat(t.lastTxFiat)," \n ").concat(t.lastTxFiatCode)]}))}],l=[{header:"Direction",width:207,view:function(e){return Object(qe.jsxs)(qe.Fragment,{children:["cashOut"===e.txClass?Object(qe.jsx)(fd,{className:a.txClassIconLeft}):Object(qe.jsx)(Bu,{className:a.txClassIconLeft}),"cashOut"===e.txClass?"Cash-out":"Cash-in"]})}},{header:"Transaction ID",width:414,view:function(e){return Object(qe.jsx)($l,{className:a.txId,children:e.id})}},{header:"Cash",width:146,textAlign:"right",view:function(e){return Object(qe.jsxs)(qe.Fragment,{children:["".concat(Number.parseFloat(e.fiat)," "),Object(qe.jsx)(ht,{inline:!0,children:e.fiatCode})]})}},{header:"Crypto",width:142,textAlign:"right",view:function(e){return Object(qe.jsxs)(qe.Fragment,{children:["".concat(ub(new sb.a(e.cryptoAtoms),e.cryptoCode).toFormat(5)," "),Object(qe.jsx)(ht,{inline:!0,children:e.cryptoCode})]})}},{header:"Date",width:157,view:function(e){return ib.a.utc(e.created).format("YYYY-MM-D")}},{header:"Time (h:m:s)",width:134,view:function(e){return ib.a.utc(e.created).format("hh:mm:ss")}}];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(rt,{children:"Transactions"}),Object(qe.jsxs)(Xe.a,{display:"flex",flexDirection:"column",children:[Object(qe.jsx)(Xe.a,{display:"flex",mt:"auto",children:c.map((function(e,t){var n=e.size,r=e.header;return Object(qe.jsx)(mt,{noMargin:!0,className:a.label,style:{width:n},children:r},t)}))}),Object(qe.jsx)(Xe.a,{display:"flex",children:c.map((function(e,t){var n=e.size,r=e.value;return Object(qe.jsx)(ot,{noMargin:!0,className:a.value,style:{width:n},children:r},t)}))})]}),Object(qe.jsx)("div",{className:a.titleWrapper,children:Object(qe.jsx)("div",{className:a.titleAndButtonsContainer,children:Object(qe.jsx)(at,{children:r?"Loading":o?"All transactions from this customer":"No transactions so far"})})}),o&&Object(qe.jsx)(Nl,{elements:l,data:n})]})},Ob=Object(b.a)(ch),xb=er()(hb||(hb=Object(Kn.a)(["\n query customer($customerId: ID!) {\n config\n customer(customerId: $customerId) {\n id\n authorizedOverride\n frontCameraPath\n frontCameraOverride\n phone\n isAnonymous\n smsOverride\n idCardData\n idCardDataOverride\n idCardDataExpiration\n idCardPhotoPath\n idCardPhotoOverride\n usSsn\n usSsnOverride\n sanctions\n sanctionsAt\n sanctionsOverride\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n transactions {\n txClass\n id\n fiat\n fiatCode\n cryptoAtoms\n cryptoCode\n created\n errorMessage: error\n error: errorCode\n }\n }\n }\n"]))),vb=er()(bb||(bb=Object(Kn.a)(["\n mutation setCustomer($customerId: ID!, $customerInput: CustomerInput) {\n setCustomer(customerId: $customerId, customerInput: $customerInput) {\n id\n authorizedOverride\n frontCameraPath\n frontCameraOverride\n phone\n smsOverride\n idCardData\n idCardDataOverride\n idCardDataExpiration\n idCardPhotoPath\n idCardPhotoOverride\n usSsn\n usSsnOverride\n sanctions\n sanctionsAt\n sanctionsOverride\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n }\n }\n"]))),yb=Object(r.memo)((function(){var e,t,n,a=Ob(),i=Object(O.h)(),o=Object(r.useState)(!1),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(O.j)().id,m=Object(Qn.c)(xb,{variables:{customerId:u}}),h=m.data,b=m.refetch,p=m.loading,j=Object(Qn.b)(vb,{onCompleted:function(){return b()}}),f=Object(c.a)(j,1)[0],g=function(e){return f({variables:{customerId:u,customerInput:e}})},x=null!==(e=cr.a(["config"])(h))&&void 0!==e?e:[],v=x&&pc(cc,x),y=null!==(t=cr.a(["customer"])(h))&&void 0!==t?t:[],w=null!==(n=cr.a(["transactions"])(y))&&void 0!==n?n:[],C=gm.a(Om.a(ir.a("cryptoAtoms")))(w),k=Jh(y),S=cr.a(["authorizedOverride"])(y)===Um;return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)(pm.a,{classes:{root:a.breadcrumbs},separator:Object(qe.jsx)(fm.a,{fontSize:"small"}),"aria-label":"breadcrumb",children:[Object(qe.jsx)(mt,{noMargin:!0,className:a.labelLink,onClick:function(){return i.push("/compliance/customers")},children:"Customers"}),Object(qe.jsx)(ht,{noMargin:!0,className:a.labelLink,children:k.length?k:Qh(cr.a(["phone"])(y),v.country)})]}),Object(qe.jsx)("div",{children:Object(qe.jsxs)(Xe.a,{className:a.customerDetails,display:"flex",justifyContent:"space-between",children:[Object(qe.jsx)(rb,{customer:y,locale:v,setShowCompliance:function(){return d(!s)}}),!p&&!y.isAnonymous&&Object(qe.jsxs)("div",{children:[Object(qe.jsx)(mt,{className:a.actionLabel,children:"Actions"}),Object(qe.jsx)(Ct,{color:"primary",Icon:S?Tm:oh,InverseIcon:S?Lm:eh,onClick:function(){return g({authorizedOverride:S?Xm:Um})},children:"".concat(S?"Authorize":"Block"," customer")})]})]})}),!s&&Object(qe.jsx)(gb,{customer:y,data:C,loading:p}),s&&Object(qe.jsx)(Ph,{customer:y,updateCustomer:g})]})})),wb=Object(b.a)(Zh),Cb=function(e){var t=e.data,n=e.locale,r=e.onClick,a=e.loading,i=wb(),o=[{header:"Phone",width:172,view:function(e){return Qh(e.phone,n.country)}},{header:"Name",width:241,view:Jh},{header:"Total TXs",width:126,textAlign:"right",view:function(e){return"".concat(Number.parseInt(e.totalTxs))}},{header:"Total spent",width:152,textAlign:"right",view:function(e){var t;return"".concat(Number.parseFloat(e.totalSpent)," ").concat(null!==(t=e.lastTxFiatCode)&&void 0!==t?t:"")}},{header:"Last active",width:133,view:function(e){return ob(e.lastActive,ib.a.utc(e.lastActive).format("YYYY-MM-D"))}},{header:"Last transaction",width:161,textAlign:"right",view:function(e){var t,n=!rr.a(e.lastTxFiatCode),r="cashOut"===e.lastTxClass?fd:Bu,a=Object(qe.jsx)(r,{className:i.txClassIconRight});return Object(qe.jsxs)(qe.Fragment,{children:[n&&"".concat(parseFloat(e.lastTxFiat)," ").concat(null!==(t=e.lastTxFiatCode)&&void 0!==t?t:""),n&&a]})}},{header:"Status",width:188,view:function(e){return Object(qe.jsx)(Cm,{statuses:[Kh(e)]})}}];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Customers",labels:[{label:"Cash-in",icon:Object(qe.jsx)(Bu,{})},{label:"Cash-out",icon:Object(qe.jsx)(fd,{})}]}),Object(qe.jsx)(Nl,{loading:a,emptyText:"No customers so far",elements:o,data:t,onClick:r})]})},kb=er()(pb||(pb=Object(Kn.a)(["\n {\n config\n customers {\n id\n idCardData\n phone\n totalTxs\n totalSpent\n lastActive\n lastTxFiat\n lastTxFiatCode\n lastTxClass\n authorizedOverride\n daysSuspended\n }\n }\n"]))),Sb=function(){var e,t,n=Object(O.h)(),r=Object(Qn.c)(kb),a=r.data,i=r.loading,o=null!==(e=cr.a(["config"])(a))&&void 0!==e?e:[],c=o&&pc(cc,o),l=gs.a([Om.a(ir.a("lastActive"))])(null!==(t=cr.a(["customers"])(a))&&void 0!==t?t:[]);return Object(qe.jsx)(Cb,{data:l,locale:c,onClick:function(e){return n.push("/compliance/customer/".concat(e.id))},loading:i})},Nb={headerLabels:{display:"flex",flexDirection:"row"},headerLabelContainerMargin:{marginRight:24},headerLabelContainer:{display:"flex",alignItems:"center"},headerLabelSpan:{extend:Re.label1,marginLeft:6},root:{flexGrow:1,display:"flex",marginBottom:120},card:{wordWrap:"break-word",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)",borderRadius:12,padding:24,backgroundColor:_,flex:1,marginRight:24},container:{display:"flex",justifyContent:"space-between"},button:{color:J,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"}},upperButtonLabel:{textAlign:"center",marginBottom:0,marginTop:0,marginLeft:8},alertsCard:{marginBottom:8},h4:{marginTop:0},centerLabel:{marginTop:40,marginBottom:0},systemStatusCard:{flex:1,marginTop:8},expandedCard:{flex:.9},shrunkCard:{flex:.1},displayFlex:{display:"flex",flexDirection:"column"}},Eb={label:{color:se},headerLabels:{whiteSpace:"pre",display:"flex",flexDirection:"row",marginTop:-20},headerLabel:{display:"flex",alignItems:"center"},txOutMargin:{marginLeft:24},footer:function(e){var t=e.expanded,n=e.bigFooter;return{height:t&&n?312:t?208:96,left:0,bottom:0,position:"fixed",width:"100vw",backgroundColor:_,textAlign:"left",boxShadow:"0px -1px 10px 0px rgba(50, 50, 50, 0.1)"}},tickerLabel:{color:se,marginTop:-5},content:{width:1200,backgroundColor:_,zIndex:1,position:"fixed",bottom:-8,transform:"translateY(-100%)"},footerContainer:function(e){var t=e.expanded,n=e.bigFooter;return{marginLeft:40,height:100,marginTop:t&&n?-300:t?-200:-100,overflow:!t&&"hidden"}},mouseWatcher:function(e){var t=e.expanded,n=e.bigFooter;return{position:"fixed",bottom:0,left:0,width:"100vw",height:t&&n?312:t?208:96,zIndex:2}}},Ib=er()(jb||(jb=Object(Kn.a)(["\n query getData {\n cryptoRates\n cryptoCurrencies {\n code\n display\n }\n config\n accountsConfig {\n code\n display\n }\n }\n"])));sb.a.config({ROUNDING_MODE:sb.a.ROUND_HALF_UP});var Lb=Object(b.a)(Eb),Fb=function(){var e,t,n,a,i,o=Object(Qn.c)(Ib).data,l=Object(r.useState)(!1),s=Object(c.a)(l,2),d=s[0],m=s[1],h=Object(r.useState)(null),b=Object(c.a)(h,2),p=b[0],j=b[1],f=null!==(e=cr.a(["cryptoRates","withCommissions"])(o))&&void 0!==e?e:{},g=Lb({bigFooter:Cc.a(f).length>8,expanded:d}),O=null!==(t=cr.a(["config"])(o))&&void 0!==t?t:{},x=Cc.a(f).length>4,v=pc("wallets")(O),y=null!==(n=cr.a(["cryptoCurrencies"])(o))&&void 0!==n?n:[],C=null!==(a=cr.a(["accountsConfig"])(o))&&void 0!==a?a:[],k=null!==(i=cr.a(["locale_fiatCurrency"])(O))&&void 0!==i?i:"";return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:g.mouseWatcher,onMouseLeave:function(){clearTimeout(p),m(!1)},onMouseEnter:function(){j(setTimeout((function(){return x&&m(!0)}),300))}}),Object(qe.jsx)("div",{className:g.content,children:Object(qe.jsx)(u.a,{container:!0,spacing:1,children:Object(qe.jsx)(u.a,{container:!0,className:g.footerContainer,children:Cc.a(f).map((function(e){return function(e){var t=vo.a(sr.a("code",e))(y),n=v["".concat(e,"_ticker")],r=vo.a(sr.a("code",n))(C),a=r>-1?C[r].display:"",i=parseFloat(cr.a(["cryptoRates","withoutCommissions",e,"cashIn"])(o)),c=parseFloat(cr.a(["cryptoRates","withoutCommissions",e,"cashOut"])(o)),l=new sb.a((i+c)/2).toFormat(2),s=new sb.a(parseFloat(cr.a(["cryptoRates","withCommissions",e,"cashIn"])(o))).toFormat(2),d=new sb.a(parseFloat(cr.a(["cryptoRates","withCommissions",e,"cashOut"])(o))).toFormat(2);return Object(qe.jsxs)(u.a,{item:!0,xs:3,children:[Object(qe.jsx)(ht,{className:g.label,children:y[t].display}),Object(qe.jsxs)("div",{className:g.headerLabels,children:[Object(qe.jsxs)("div",{className:g.headerLabel,children:[Object(qe.jsx)(Bu,{}),Object(qe.jsx)(ht,{children:" ".concat(s," ").concat(k)})]}),Object(qe.jsxs)("div",{className:w()(g.headerLabel,g.txOutMargin),children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)(ht,{children:" ".concat(d," ").concat(k)})]})]}),Object(qe.jsx)(ht,{className:g.tickerLabel,children:"".concat(a,": ").concat(l," ").concat(k)})]},e)}(e)}))})})}),Object(qe.jsx)("div",{className:g.footer})]})};function Pb(){return(Pb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bb(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Db=r.createElement("g",{id:"icon/label/icon/down",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Group-6"},r.createElement("circle",{id:"Oval",fill:"#FFECEB",cx:6,cy:6,r:6}),r.createElement("g",{id:"Group-5",transform:"translate(6.096194, 6.096194) rotate(-315.000000) translate(-6.096194, -6.096194) translate(2.596194, 3.096194)",stroke:"#FF584A"},r.createElement("polyline",{id:"Path-2",points:"3.15780333 -4.54747351e-13 6.15780333 2.82998193 3.15780333 5.65996386"}),r.createElement("line",{x1:5.42178888,y1:2.82998193,x2:-545696821e-21,y2:2.82998193,id:"Path-3"}))));function Rb(e,t){var n=e.title,a=e.titleId,i=Bb(e,["title","titleId"]);return r.createElement("svg",Pb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Db)}var Tb=r.forwardRef(Rb);n.p;function Ab(){return(Ab=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wb(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var zb=r.createElement("g",{id:"icon/label/icon/equal",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Group-6",fill:"#EBEFFF"},r.createElement("circle",{id:"Oval",cx:6,cy:6,r:6})),r.createElement("g",{id:"Group",transform:"translate(4.000000, 4.000000)",stroke:"#5F668A",strokeLinecap:"square"},r.createElement("line",{x1:0,y1:1,x2:4,y2:1,id:"Line-12"}),r.createElement("line",{x1:0,y1:3,x2:4,y2:3,id:"Line-12"})));function Mb(e,t){var n=e.title,a=e.titleId,i=Wb(e,["title","titleId"]);return r.createElement("svg",Ab({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,zb)}var Hb=r.forwardRef(Mb);n.p;function qb(){return(qb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $b(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Vb=r.createElement("g",{id:"icon/label/icon/up",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Group-6"},r.createElement("circle",{id:"Oval",fill:"#ECFBEF",cx:6,cy:6,r:6}),r.createElement("g",{id:"Group-5",transform:"translate(6.096194, 6.096194) rotate(-45.000000) translate(-6.096194, -6.096194) translate(2.596194, 3.096194)",stroke:"#00CD5A"},r.createElement("polyline",{id:"Path-2",points:"3.15780333 -4.54747351e-13 6.15780333 2.82998193 3.15780333 5.65996386"}),r.createElement("line",{x1:5.42178888,y1:2.82998193,x2:-545696821e-21,y2:2.82998193,id:"Path-3"}))));function Yb(e,t){var n=e.title,a=e.titleId,i=$b(e,["title","titleId"]);return r.createElement("svg",qb({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Vb)}var Xb,Ub=r.forwardRef(Yb),Gb=(n.p,{wrapper:{display:"flex",height:130,marginTop:-8},percentageBox:{height:130,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"pre"},label:{color:_},inColor:{backgroundColor:G},outColor:{backgroundColor:Z},other:{minWidth:"6px",borderRadius:2},inWidth:{width:function(e){return"".concat(e,"%")}},outWidth:{width:function(e){return"".concat(100-e,"%")},marginRight:4}}),Zb=Object(b.a)(Gb),_b=function(e){var t,n=e.cashIn,r=e.cashOut,a=n||0!==r?n:50,i=Zb(a),o=function(e){if(!(e<=15))return Object(qe.jsxs)(mt,{className:i.label,children:[e,"%"]})},c=(t={},Object(v.a)(t,i.percentageBox,!0),Object(v.a)(t,i.other,a<5&&a>0),t);return Object(qe.jsxs)("div",{className:i.wrapper,children:[Object(qe.jsx)("div",{className:w()(c,i.outColor,i.outWidth),children:o(100-a)}),Object(qe.jsx)("div",{className:w()(c,i.inColor,i.inWidth),children:o(a)})]})},Kb=n(52),Qb=n(193),Jb=n(672),ep=function(e){var t=e.cashInFee?Number.parseFloat(e.cashInFee):0;return Number.parseFloat(e.commissionPercentage)*Number.parseFloat(e.fiat)+t},tp=function(e,t,n){return{created:new Date(new Date(e.created).getTime()+t).toISOString(),profit:n}},np=function(e){var t=e.created;return new Date(t).toISOString().substring(0,10)},rp=function(e){var t=e.created;return new Date(t).toISOString().substring(0,13)},ap=function(e,t){var n=e.profit||0;return Object(l.a)(Object(l.a)({},t),{},{profit:n+ep(t)})},ip={Day:864e5,Week:6048e5,Month:2592e6},op=function(e){var t=e.data,n=e.previousTimeData,a=e.previousProfit,i=e.timeFrame,o=Object(r.useRef)(),l=Object(r.useCallback)((function(){var e=Kb.i(o.current),r=0,l=0,s=0,d=336-s-l,u=128-r-0,m=function(){var e="Day"===i?rp:np,r=Ts.a(Qb.a(ap,[],e,t));if(!r.length&&!n.length){var o={created:(new Date).toISOString(),profit:0};return[[o,tp(o,-36e5,0)],!0]}if(!r.length&&n.length){var c={created:(new Date).toISOString(),profit:0};return[[c,tp(c,-ip[i],1)],!1]}if(r.length&&!n.length){var l={created:(new Date).toISOString(),profit:1};return[[l,tp(l,-ip[i],0)],!1]}return 1===r.length?[Jb.a({created:new Date(Date.now()-ip[i]).toISOString(),profit:a},r),!1]:[r,!1]}(),h=Object(c.a)(m,2),b=h[0],p=h[1];e.attr("width",d),e.append("rect").attr("x",0).attr("y",-r).attr("width",d+s+l).attr("height",u+r).attr("fill",re).attr("transform","translate(".concat(0,",",r,")")),e.append("linearGradient").attr("id","area-gradient").attr("gradientUnits","userSpaceOnUse").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2","100%").selectAll("stop").data([{offset:"0%",color:X},{offset:"25%",color:X},{offset:"100%",color:re}]).enter().append("stop").attr("offset",(function(e){return e.offset})).attr("stop-color",(function(e){return e.color}));var j=e.append("g").attr("transform","translate(".concat(s,",").concat(r,")")),f=Kb.d(b,(function(e){return e.created})),g=p?[0,.1]:[0,Kb.f(b,(function(e){return e.profit}))],O=Kb.g().range([u,30]).domain([0,g[1]]),x=Kb.h().domain([new Date(f[0]),new Date(f[1])]).range([0,d]),v=Kb.e().x((function(e){return x(new Date(e.created))})).y((function(e){return O(e.profit)})),y=Kb.a().x((function(e){return x(new Date(e.created))})).y0(u).y1((function(e){return O(e.profit)}));j.append("path").datum(b).attr("d",y).attr("fill","url(#area-gradient)"),j.append("path").datum(b).attr("d",v).attr("fill","none").attr("stroke-width","2").attr("stroke-linejoin","round").attr("stroke",J)}),[t,i,n,a]);return Object(r.useEffect)((function(){Kb.i(o.current).selectAll("*").remove(),l()}),[l,t]),Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)("svg",{ref:o})})},cp=function(e){var t=e.data,n=e.timeFrame,a=Object(r.useRef)(),i=lr.a(sr.a("txClass","cashIn"))(t),o=lr.a(sr.a("txClass","cashOut"))(t),c=Object(r.useCallback)((function(){var e=Kb.i(a.current),r=25,c=0,l=15,s=555-l-c,d=150-r-25;e.attr("width",s),e.append("rect").attr("x",0).attr("y",-r).attr("width",s+l+c).attr("height",d+r).attr("fill",re).attr("transform","translate(".concat(0,",",r,")"));var u=e.append("g").attr("transform","translate(".concat(l,",").concat(r,")")),m=function(){if(0===t.length)return 100;var e=100*Math.ceil(Kb.f(t,(function(e){return parseFloat(e.fiat)}))/100),n=Math.max(100,e);return n%1e3===0?n+100:n}(),h=function(){switch(n){case"Week":return{nice:7,ticks:7,subtractDays:7,timeFormat:"%a %d",timeRange:[50,500]};case"Month":return{nice:6,ticks:6,subtractDays:30,timeFormat:"%b %d",timeRange:[50,500]};default:return{nice:null,ticks:4,subtractDays:1,timeFormat:"%H:%M",timeRange:[50,500]}}}(),b=Kb.g().range([d,0]).domain([0,m]).nice(3),p=Kb.h().domain([ib()().add(-h.subtractDays,"day").valueOf(),ib()().valueOf()]).range(h.timeRange).nice(h.nice);u.append("g").style("color","#eef1ff").call(Kb.c(b).ticks(4).tickSize(-s).tickFormat("")).call((function(e){return e.select(".domain").remove()})),u.append("g").attr("transform","translate(0,"+d+")").style("font-size","13px").style("color","#5f668a").style("font-family","MuseoSans").style("margin-top","11px").call(Kb.b(p).ticks(h.ticks).tickSize(0).tickFormat(Kb.j(h.timeFormat))).selectAll("text").attr("dy","1.5em"),u.append("g").attr("transform","translate(0,"+d+")").style("color","#eef1ff").call(Kb.b(p).ticks(6).tickSize(0).tickFormat("")).selectAll("text").attr("dy","1.5em"),u.append("g").style("font-size","13px").style("color","#5f668a").style("font-family","MuseoSans").style("margin-top","11px").call(Kb.c(b).ticks(4).tickSize(0)).call((function(e){return e.select(".domain").remove()})).selectAll("text").attr("dy","-0.40em").attr("dx","3em"),e.append("g").selectAll("dot").data(i).enter().append("circle").attr("cx",(function(e){return p(new Date(e.created))})).attr("cy",(function(e){return b(e.fiat)})).attr("r",4).attr("transform","translate("+l+",15)").style("fill",G),e.append("g").selectAll("dot").data(o).enter().append("circle").attr("cx",(function(e){return p(new Date(e.created))})).attr("cy",(function(e){return b(e.fiat)})).attr("r",4).attr("transform","translate("+l+",15)").style("fill",Z)}),[i,o,t,n]);return Object(r.useEffect)((function(){Kb.i(a.current).selectAll("*").remove(),c()}),[c]),Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)("svg",{ref:a})})},lp=function(e){var t=e.info,n=e.label;return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(ct,{style:{marginBottom:0},children:t}),Object(qe.jsx)(mt,{style:{margin:0},children:n})]})},sp={titleWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"},titleAndButtonsContainer:{display:"flex"},error:{marginLeft:12},icon:{marginRight:6},h4:{margin:0,marginRight:64},label:{cursor:"pointer",minHeight:0,minWidth:0,padding:0,color:se,textTransform:"none",borderBottom:"2px solid transparent",display:"inline-block",lineHeight:1.5,"&:hover":{backgroundColor:"transparent"}},newHighlightedLabel:{cursor:"pointer",color:J,fontWeight:700,borderRadius:0,minHeight:0,minWidth:0,textTransform:"none",borderBottom:"2px solid ".concat(J),display:"inline-block",lineHeight:1.5,"&:hover":{backgroundColor:"transparent"}},navButton:{marginLeft:24},navContainer:{display:"flex"},profitLabel:{fontSize:Oe,fontFamily:je,fontWeight:700,color:le},percentUp:{fontSize:Oe,fontFamily:je,fontWeight:700,color:Y,height:10},percentDown:{fontSize:Oe,fontFamily:je,fontWeight:700,color:K,height:13},percentNeutral:{fontSize:Oe,fontFamily:je,fontWeight:700,color:q},profitContainer:{display:"flex",justifyContent:"space-between",margin:"0 26px -30px 16px",position:"relative"},gridContainer:{marginTop:30,height:225},inSquare:{width:8,height:8,borderRadius:2,marginTop:18,marginRight:4,backgroundColor:G},outSquare:{width:8,height:8,borderRadius:2,marginTop:18,marginRight:4,backgroundColor:Z},directionLabelContainer:{display:"flex"},dirLabContMargin:{marginRight:20},directionIcon:{width:16,height:16,marginBottom:-2,marginRight:4},labelMargin:{marginBottom:20,marginRight:32}},dp=Object(b.a)(sp),up=["Month","Week","Day"],mp=function(e){var t=e.handleSetRange,n=dp(),a=Object(r.useState)("Day"),i=Object(c.a)(a,2),o=i[0],l=i[1],s=js.a(o);return Object(qe.jsxs)("div",{className:w()(n.titleWrapper),children:[Object(qe.jsx)("div",{className:n.titleAndButtonsContainer,children:Object(qe.jsx)(at,{className:n.h4,children:"System performance"})}),Object(qe.jsx)("div",{className:n.navContainer,children:up.map((function(e,r){return Object(qe.jsx)("div",{onClick:function(e){return n=e.target.innerText,l(n),void t(n);var n},className:s(e)?w()(n.newHighlightedLabel,n.navButton):w()(n.label,n.navButton),children:e},r)}))})]})};sb.a.config({ROUNDING_MODE:sb.a.ROUND_HALF_UP});var hp=ar.a(ir.a("fiat")),bp=Object(b.a)(sp),pp=ar.a(ir.a("cashInFee")),jp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?ib()(t):ib()();return n.subtract(e,"second")},fp={Day:{left:jp(172800,ib()()),right:jp(86400,ib()())},Week:{left:jp(1209600,ib()()),right:jp(604800,ib()())},Month:{left:jp(5184e3,ib()()),right:jp(2592e3,ib()())}},gp=er()(Xb||(Xb=Object(Kn.a)(["\n query getData {\n transactions {\n fiatCode\n fiat\n cashInFee\n commissionPercentage\n created\n txClass\n error\n }\n fiatRates {\n code\n name\n rate\n }\n config\n }\n"]))),Op=function(e,t){return e+Number.parseFloat(t.commissionPercentage)*Number.parseFloat(t.fiat)},xp=function(){var e,t,n,a=bp(),i=Object(r.useState)("Day"),o=Object(c.a)(i,2),s=o[0],d=o[1],m=Object(Qn.c)(gp),h=m.data,b=m.loading,p=pc("locale")(null===h||void 0===h?void 0:h.config).fiatCurrency,j=function(e){return function(t){return null===t.error&&(e?null===t.error&&ib()(t.created).isBetween(fp[s].left,fp[s].right):null===t.error&&ib()(t.created).isBetween(fp[s].right,ib()()))}},f=function(e){if(e.fiatCode===p)return e;var t=ja.a(sr.a("code",e.fiatCode))(h.fiatRates),n=ja.a(sr.a("code",p))(h.fiatRates).rate/t.rate;return Object(l.a)(Object(l.a)({},e),{},{fiat:parseFloat(e.fiat)*n})},g=ar.a(f)(lr.a(j(!1),null!==(e=null===h||void 0===h?void 0:h.transactions)&&void 0!==e?e:[])),O=ar.a(f)(lr.a(j(!0),null!==(t=null===h||void 0===h?void 0:h.transactions)&&void 0!==t?t:[])),x=function(e){var t=Ic.a(pp(e)),n=ms.a(Op,0,e);return new sb.a(n+t)},y=function(){var e=ws.a(sr.a("txClass","cashIn"))(g),t=Object(c.a)(e,2),n=t[0],r=t[1],a=n.length+r.length;return 0===a?{cashIn:0,cashOut:0}:{cashIn:Math.round(n.length/a*100),cashOut:Math.round(r.length/a*100)}},C=function(){var e=x(g),t=x(O);return e.eq(t)?0:t.eq(0)?100:e.minus(t).times(100).div(t).toNumber()}(),k=(n={},Object(v.a)(n,a.percentDown,C<0),Object(v.a)(n,a.percentUp,C>0),Object(v.a)(n,a.percentNeutral,0===C),n);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(mp,{handleSetRange:d}),!b&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)(u.a,{container:!0,spacing:2,children:[Object(qe.jsx)(u.a,{item:!0,xs:3,children:Object(qe.jsx)(lp,{info:da.a(g),label:"transactions"})}),Object(qe.jsx)(u.a,{item:!0,xs:3,children:Object(qe.jsx)(lp,{info:new sb.a(Ic.a(hp(g))).toFormat(2),label:"".concat(null===h||void 0===h?void 0:h.config.locale_fiatCurrency," volume")})})]}),Object(qe.jsx)(u.a,{container:!0,className:a.gridContainer,children:Object(qe.jsxs)(u.a,{item:!0,xs:12,children:[Object(qe.jsx)(ht,{children:"Transactions"}),Object(qe.jsx)(cp,{timeFrame:s,data:g})]})}),Object(qe.jsxs)(u.a,{container:!0,className:a.gridContainer,children:[Object(qe.jsxs)(u.a,{item:!0,xs:8,children:[Object(qe.jsx)(ht,{className:a.labelMargin,children:"Profit from commissions"}),Object(qe.jsxs)("div",{className:a.profitContainer,children:[Object(qe.jsx)("div",{className:a.profitLabel,children:"".concat(x(g).toFormat(2)," ").concat(null===h||void 0===h?void 0:h.config.locale_fiatCurrency)}),Object(qe.jsxs)("div",{className:w()(k),children:[0===C?Object(qe.jsx)(Hb,{className:a.directionIcon}):C>0?Object(qe.jsx)(Ub,{className:a.directionIcon}):Object(qe.jsx)(Tb,{className:a.directionIcon}),"".concat(new sb.a(C).toFormat(2),"%")]})]}),Object(qe.jsx)(op,{timeFrame:s,data:g,previousTimeData:O,previousProfit:x(O)})]}),Object(qe.jsxs)(u.a,{item:!0,xs:4,children:[Object(qe.jsxs)(u.a,{container:!0,children:[Object(qe.jsx)(u.a,{item:!0,children:Object(qe.jsx)(ht,{className:a.labelMargin,children:"Direction"})}),Object(qe.jsxs)(u.a,{item:!0,className:w()(a.directionLabelContainer,a.dirLabContMargin),children:[Object(qe.jsx)("div",{className:a.outSquare}),Object(qe.jsx)(mt,{className:a.directionLabel,children:"Out"})]}),Object(qe.jsxs)(u.a,{item:!0,className:a.directionLabelContainer,children:[Object(qe.jsx)("div",{className:a.inSquare}),Object(qe.jsx)(mt,{className:a.directionLabel,children:"In"})]})]}),Object(qe.jsx)(u.a,{item:!0,xs:!0,children:Object(qe.jsx)(_b,{cashIn:y().cashIn,cashOut:y().cashOut})})]})]})]})]})},vp=Object(b.a)(Nb),yp=function(){var e=vp();return Object(qe.jsx)(u.a,{item:!0,xs:12,className:e.displayFlex,children:Object(qe.jsx)("div",{className:e.card,children:Object(qe.jsx)(xp,{})})})},wp=n(674),Cp=Object.freeze({DEFAULT:"default",SHRUNK:"shrunk",EXPANDED:"expanded"}),kp={card:{wordWrap:"break-word",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)",borderRadius:12,padding:24,backgroundColor:_}},Sp=Object(b.a)(kp),Np=function(e){var t=e.className,n=e.state,r=e.shrunkComponent,a=e.children,i=Sp();return Object(qe.jsx)(u.a,{item:!0,className:w()(t,i.card),children:n===Cp.SHRUNK?r:a})},Ep={container:{display:"flex",justifyContent:"space-between"},h4:{margin:0,marginBottom:10},centerLabel:{marginBottom:0,padding:0,textAlign:"center"},upperButtonLabel:{marginTop:-3,marginBottom:24},button:{color:J,marginTop:0,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"}},alertsTableContainer:{margin:0},expandedAlertsTableContainer:{margin:0,maxHeight:460},noAlertsLabel:{color:q,marginLeft:-5,height:100},table:{maxHeight:465,overflowX:"hidden",overflowY:"auto"},listItemText:{margin:"8px 0 8px 0"},linkIcon:{marginLeft:"auto",cursor:"pointer"}},Ip=n(630),Lp=n(673),Fp=n(124);function Pp(){return(Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bp(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Dp=r.createElement("desc",null,"Created with Sketch."),Rp=r.createElement("g",{id:"icon/button/link/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-7",stroke:"#1B2559",strokeWidth:1.2},r.createElement("polyline",{id:"Stroke-1",points:"12 6.66678 12 12.00018 0 12.00018 0 0.00018 5.3334 0.00018"}),r.createElement("polyline",{id:"Stroke-3",points:"8.66658 0 12.00018 0 12.00018 3.3336"}),r.createElement("line",{x1:6,y1:6,x2:12,y2:0,id:"Stroke-5"})));function Tp(e,t){var n=e.title,a=e.titleId,i=Bp(e,["title","titleId"]);return r.createElement("svg",Pp({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Dp,Rp)}var Ap=r.forwardRef(Tp);n.p;function Wp(){return(Wp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function zp(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Mp=r.createElement("g",{id:"DASHBOARD",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"dashboard_v9#1-(week)",transform:"translate(-772.000000, -212.000000)"},r.createElement("g",{id:"dashboard/row/alert/positive",transform:"translate(756.000000, 204.000000)"},r.createElement("g",{id:"Group-2",transform:"translate(16.000000, 8.000000)"},r.createElement("polygon",{id:"Rectangle-2-Copy-45",fill:"#FF584A",fillRule:"nonzero",points:"0 11 16 11 16 16 0 16"}),r.createElement("rect",{id:"Rectangle-Copy-10",stroke:"#FF584A",strokeWidth:2,x:1,y:1,width:14,height:14})))));function Hp(e,t){var n=e.title,a=e.titleId,i=zp(e,["title","titleId"]);return r.createElement("svg",Wp({width:"16px",height:"16px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),void 0===n?r.createElement("title",{id:a},"07E3DD15-D5E4-46A8-BF7B-064F598230CE"):n?r.createElement("title",{id:a},n):null,Mp)}var qp,$p=r.forwardRef(Hp),Vp=(n.p,Object(b.a)(Ep)),Yp={error:Object(qe.jsx)(Je,{style:{height:20,width:20,marginRight:12}}),fiatBalance:Object(qe.jsx)($p,{style:{height:18,width:18,marginRight:14}})},Xp={error:"/maintenance/machine-status",fiatBalance:"/maintenance/cash-cassettes",cryptoBalance:"/maintenance/funding"},Up=function(e){var t=e.numToRender,n=e.alerts,r=e.machines,a=Object(O.h)(),i=Vp(),o=Fp.a(0,t,n);return Object(qe.jsx)(Ip.a,{dense:!0,className:i.table,children:o.map((function(e,t){return Object(qe.jsxs)(Lp.a,{children:[Yp[e.type]||Object(qe.jsx)(Rr,{style:{height:23,width:23,marginRight:8}}),Object(qe.jsx)(ot,{className:i.listItemText,children:"".concat(e.message).concat(e.detail.deviceId&&" - "+r[e.detail.deviceId])}),Object(qe.jsx)(Ap,{className:i.linkIcon,onClick:function(){return a.push(Xp[e.type]||"/dashboard")}})]},t)}))})},Gp=er()(qp||(qp=Object(Kn.a)(["\n query getAlerts {\n alerts {\n id\n type\n detail\n message\n created\n read\n valid\n }\n machines {\n deviceId\n name\n }\n }\n"]))),Zp=Object(b.a)(Ep),_p=function(e){var t,n,r,a=e.onReset,i=e.onExpand,o=e.size,c=Zp(),l=o===Cp.EXPANDED,s=Object(Qn.c)(Gp).data,d=null!==(t=cr.a(["alerts"])(s))&&void 0!==t?t:[],m=tr.a(ar.a(ir.a("name")),or.a(ir.a("deviceId")))(null!==(n=null===s||void 0===s?void 0:s.machines)&&void 0!==n?n:[]),h=d.length,b=(r={},Object(v.a)(r,c.alertsTableContainer,!l),Object(v.a)(r,c.expandedAlertsTableContainer,l),r);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:c.container,children:[Object(qe.jsx)(at,{className:c.h4,children:"Alerts (".concat(h,")")}),l&&Object(qe.jsx)(mt,{className:c.upperButtonLabel,children:Object(qe.jsx)(wp.a,{onClick:a,size:"small",disableRipple:!0,disableFocusRipple:!0,className:c.button,children:"Show less"})})]}),Object(qe.jsx)(u.a,{className:w()(b),container:!0,spacing:1,children:Object(qe.jsxs)(u.a,{item:!0,xs:12,children:[!d.length&&Object(qe.jsx)(mt,{className:c.noAlertsLabel,children:"No new alerts. Your system is running smoothly."}),Object(qe.jsx)(Up,{numToRender:l?d.length:3,alerts:d,machines:m})]})}),!l&&h>3&&Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(mt,{className:c.centerLabel,children:Object(qe.jsx)(wp.a,{onClick:function(){return i("alerts")},size:"small",disableRipple:!0,disableFocusRipple:!0,className:c.button,children:"Show all (".concat(d.length,")")})})})]})},Kp=n(677),Qp=n(680),Jp=n(675),ej=n(676),tj=n(678),nj=n(679);function rj(){return(rj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function aj(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ij=r.createElement("defs",null,r.createElement("circle",{id:"path-1-right",cx:10,cy:10,r:10})),oj=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-232.000000, -187.000000)"},r.createElement("g",{id:"icon/sf-contain-b-copy-4",transform:"translate(242.000000, 197.000000) scale(-1, 1) rotate(-270.000000) translate(-242.000000, -197.000000) translate(232.000000, 187.000000)"},r.createElement("mask",{id:"mask-2",fill:"white"},r.createElement("use",{xlinkHref:"#path-1-right"})),r.createElement("use",{id:"Mask",fill:"#EBEFFF",fillRule:"nonzero",xlinkHref:"#path-1-right"}),r.createElement("g",{id:"icon/sf-small/wizzard",mask:"url(#mask-2)",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},r.createElement("g",null,r.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),r.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function cj(e,t){var n=e.title,a=e.titleId,i=aj(e,["title","titleId"]);return r.createElement("svg",rj({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,ij,oj)}var lj,sj,dj,uj=r.forwardRef(cj),mj=(n.p,{container:{display:"flex",justifyContent:"space-between"},label:{margin:0,color:se},row:{backgroundColor:re,borderBottom:"none"},clickableRow:{cursor:"pointer"},header:{display:"flex",alignItems:"center",whiteSpace:"pre"},error:{color:me},button:{color:J,minHeight:0,minWidth:0,padding:0,textTransform:"none","&:hover":{backgroundColor:"transparent"},marginBottom:-40},buttonLabel:{position:"absolute",bottom:160,marginBottom:0},upperButtonLabel:{textAlign:"center",marginBottom:0,marginTop:0},statusHeader:{marginLeft:2},table:{maxHeight:440,"&::-webkit-scrollbar":{width:7},"&::-webkit-scrollbar-thumb":{backgroundColor:se,borderRadius:5}},tableBody:{overflow:"auto"},h4:{marginTop:0},tl2:{display:"inline"},label1:{display:"inline"},machinesTableContainer:{marginTop:10,height:220},expandedMachinesTableContainer:{marginTop:10,height:414},centerLabel:{marginBottom:0,padding:0,textAlign:"center"},machineNameWrapper:{display:"flex",flexDirection:"row",alignItems:"center"},machineRedirectIcon:{marginLeft:10}}),hj=Object(b.a)(mj),bj=Object(za.a)({root:{borderBottom:"4px solid white",padding:0,paddingLeft:15}})(Jp.a),pj=Object(za.a)({root:{borderBottom:"4px solid white",padding:0,paddingLeft:15,backgroundColor:"white"}})(Jp.a),jj=function(e){var t=e.machines,n=e.numToRender,r=hj(),a=Object(O.h)(),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return Math.round(e/t*100)},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=i(e,t);return n<20?Object(qe.jsx)(ut,{className:r.error,children:"".concat(n,"%")}):Object(qe.jsx)(ut,{children:"".concat(n,"%")})},c=function(e){var t=e.name,n=e.deviceId;return a.push("/machines/".concat(n),{selectedMachine:t})};return Object(qe.jsx)(ej.a,{className:r.table,children:Object(qe.jsxs)(Kp.a,{children:[Object(qe.jsx)(tj.a,{children:Object(qe.jsxs)(nj.a,{children:[Object(qe.jsx)(pj,{children:Object(qe.jsx)("div",{className:r.header,children:Object(qe.jsx)(ht,{className:r.label,children:"Machines"})})}),Object(qe.jsx)(pj,{children:Object(qe.jsx)("div",{className:"".concat(r.header," ").concat(r.statusHeader),children:Object(qe.jsx)(ht,{className:r.label,children:"Status"})})}),Object(qe.jsx)(pj,{children:Object(qe.jsxs)("div",{className:r.header,children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)(ht,{className:r.label,children:" 1"})]})}),Object(qe.jsx)(pj,{children:Object(qe.jsxs)("div",{className:r.header,children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)(ht,{className:r.label,children:" 2"})]})})]})}),Object(qe.jsx)(Qp.a,{children:t.map((function(e,t){return t<n?Object(qe.jsxs)(nj.a,{onClick:function(){return c(e)},className:w()(r.row),children:[Object(qe.jsxs)(bj,{align:"left",className:r.machineNameWrapper,children:[Object(qe.jsx)(ut,{children:e.name}),Object(qe.jsx)(uj,{className:w()(r.machineRedirectIcon,r.clickableRow),onClick:function(){return c(e)}})]}),Object(qe.jsx)(bj,{children:Object(qe.jsx)(wm,{status:e.statuses[0]})}),Object(qe.jsx)(bj,{align:"left",children:o(e.cassette1)}),Object(qe.jsx)(bj,{align:"left",children:o(e.cassette2)})]},e.deviceId+t):null}))})]})})},fj=Object(b.a)(mj),gj=er()(lj||(lj=Object(Kn.a)(["\n query getData {\n machines {\n name\n deviceId\n cashbox\n cassette1\n cassette2\n statuses {\n label\n type\n }\n }\n serverVersion\n uptime {\n name\n state\n uptime\n }\n }\n"]))),Oj=function(e){var t,n,r=e.onReset,a=e.onExpand,i=e.size,o=fj(),c=Object(Qn.c)(gj),l=c.data,s=c.loading,d=null!==(t=cr.a(["machines"])(l))&&void 0!==t?t:[],m=i===Cp.EXPANDED,h=(n={},Object(v.a)(n,o.machinesTableContainer,!m),Object(v.a)(n,o.expandedMachinesTableContainer,m),n);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:o.container,children:[Object(qe.jsx)(at,{className:o.h4,children:"System status"})," ",m&&Object(qe.jsx)(mt,{className:o.upperButtonLabel,children:Object(qe.jsx)(wp.a,{onClick:r,size:"small",disableRipple:!0,disableFocusRipple:!0,className:o.button,children:"Show less"})})]}),!s&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)(u.a,{container:!0,spacing:1,children:[Object(qe.jsxs)(u.a,{item:!0,xs:4,children:[Object(qe.jsx)(ut,{className:o.tl2,children:null===l||void 0===l?void 0:l.serverVersion}),Object(qe.jsx)(mt,{className:o.label1,children:" server version"})]}),Object(qe.jsx)(u.a,{item:!0,xs:4})]}),Object(qe.jsx)(u.a,{container:!0,spacing:1,className:w()(h),children:Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(jj,{numToRender:m?1/0:4,machines:d})})}),!m&&d.length>4&&Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsx)(mt,{className:o.centerLabel,children:Object(qe.jsx)(wp.a,{onClick:function(){return a()},size:"small",disableRipple:!0,disableFocusRipple:!0,className:o.button,children:"Show all (".concat(d.length,")")})})})]})]})},xj=Object(b.a)(Nb),vj=function(e){var t=e.title,n=e.buttonName,r=e.onUnshrink,a=xj();return Object(qe.jsxs)("div",{className:a.container,children:[Object(qe.jsx)(at,{className:a.h4,children:t}),Object(qe.jsx)(mt,{className:a.upperButtonLabel,children:Object(qe.jsx)(wp.a,{onClick:r,size:"small",disableRipple:!0,disableFocusRipple:!0,className:a.button,children:n})})]})},yj=function(){var e,t,n=xj(),a=Object(r.useState)(Cp.DEFAULT),i=Object(c.a)(a,2),o=i[0],l=i[1],s=Object(r.useState)(Cp.DEFAULT),d=Object(c.a)(s,2),m=d[0],h=d[1],b=function(){h(Cp.DEFAULT),l(Cp.DEFAULT)};return Object(qe.jsx)(u.a,{item:!0,xs:12,className:n.displayFlex,children:Object(qe.jsx)("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Np,{className:w()((e={},Object(v.a)(e,n.alertsCard,m!==Cp.SHRUNK),Object(v.a)(e,n.shrunkCard,m===Cp.SHRUNK),Object(v.a)(e,n.expandedCard,m===Cp.EXPANDED),e)),state:m,shrunkComponent:Object(qe.jsx)(vj,{title:"Alerts",buttonName:"Show alerts",onUnshrink:b}),children:Object(qe.jsx)(_p,{onExpand:function(){h(Cp.EXPANDED),l(Cp.SHRUNK)},onReset:b,size:m})}),Object(qe.jsx)(Np,{className:w()((t={},Object(v.a)(t,n.shrunkCard,o===Cp.SHRUNK),Object(v.a)(t,n.systemStatusCard,o!==Cp.SHRUNK),Object(v.a)(t,n.expandedCard,m===Cp.EXPANDED),t)),state:o,shrunkComponent:Object(qe.jsx)(vj,{title:"System status",buttonName:"Show machines",onUnshrink:b}),children:Object(qe.jsx)(Oj,{onExpand:function(){l(Cp.EXPANDED),h(Cp.SHRUNK)},onReset:b,size:o})})]})})})},wj=Object(b.a)(Nb),Cj=function(){var e=wj();return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Dashboard",children:Object(qe.jsxs)("div",{className:e.headerLabels,children:[Object(qe.jsxs)("div",{className:w()(e.headerLabelContainer,e.headerLabelContainerMargin),children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)("span",{className:e.headerLabelSpan,children:"Cash-out"})]}),Object(qe.jsxs)("div",{className:e.headerLabelContainer,children:[Object(qe.jsx)(Bu,{}),Object(qe.jsx)("span",{className:e.headerLabelSpan,children:"Cash-in"})]})]})}),Object(qe.jsx)("div",{className:e.root,children:Object(qe.jsxs)(u.a,{container:!0,children:[Object(qe.jsx)(u.a,{container:!0,direction:"column",item:!0,xs:6,children:Object(qe.jsx)(yp,{})}),Object(qe.jsx)(u.a,{container:!0,direction:"column",item:!0,xs:6,children:Object(qe.jsx)(yj,{})})]})}),Object(qe.jsx)(Fb,{})]})},kj=n(579),Sj=Object(kj.a)({wrapper:{display:"flex",alignItems:"center"},colorIndicator:{borderRadius:3,height:12,width:12,marginRight:8}}),Nj=function(e){var t=e.className,n=e.label,r=e.color,a=Object(Ue.a)(e,["className","label","color"]),i=Sj();return Object(qe.jsxs)("div",Object(l.a)(Object(l.a)({className:w()(i.wrapper,t)},a),{},{children:[r&&Object(qe.jsx)("div",{className:i.colorIndicator,style:{backgroundColor:r}}),Object(qe.jsx)(mt,Object(l.a)(Object(l.a)({},a),{},{children:n}))]}))},Ej=Re.label1,Ij=Re.mono,Lj={wrapper:{display:"flex",flex:1,flexDirection:"row",height:"100%"},main:{display:"flex",flex:1},firstSide:{margin:"0 ".concat(64,"px 0 ").concat(48,"px")},secondSide:{marginTop:-29},error:{color:me},coinTotal:{margin:"".concat(12,"px 0")},leftSpacer:{marginLeft:8},topSpacer:{marginTop:40},addressWrapper:{display:"flex",flexDirection:"column",flex:1,backgroundColor:ae},address:{width:375,margin:"".concat(12,"px ").concat(24,"px")},itemWrapper:{textAlign:"end"},item:{extend:Ej,margin:2},inactiveItem:{color:q},firstItem:{fontWeight:700,margin:2},total:{marginTop:"auto",textAlign:"right",marginRight:24},totalPending:{marginTop:2},totalTitle:{color:ue,marginBottom:2},table:{marginTop:8,marginLeft:48},tableLabel:{justifyContent:"end",marginTop:-38},pending:{backgroundColor:ce},copyToClipboard:{marginLeft:"auto",paddingTop:6,paddingLeft:15,marginRight:-11},mono:{extend:Ij,width:375,margin:"".concat(12,"px ").concat(24,"px")}},Fj=Object(b.a)(Lj),Pj=165,Bj=140,Dj=130,Rj=er()(sj||(sj=Object(Kn.a)(["\n {\n funding {\n cryptoCode\n errorMsg\n fundingAddress\n fundingAddressUrl\n confirmedBalance\n pending\n fiatConfirmedBalance\n fiatPending\n fiatCode\n display\n unitScale\n }\n }\n"]))),Tj=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return mb(e,t).replace(/(.{4})/g,"$1 ")},Aj=function(e,t){return e.plus(t)},Wj=function(e){return new sb.a(e).toFormat(2)},zj=function(e){return Wj(e.filter((function(e){return!e.errorMsg})).map((function(e){return new sb.a(e.fiatConfirmedBalance)})).reduce(Aj,new sb.a(0)))},Mj=function(){var e,t=Object(r.useState)(null),n=Object(c.a)(t,2),a=n[0],i=n[1],o=Object(r.useState)(!1),l=Object(c.a)(o,1)[0],s=Fj(),d=[{cryptoAmount:2,balance:10.23,fiatValue:1e3,date:new Date,performedBy:null,pending:!0},{cryptoAmount:10,balance:12.23,fiatValue:12e3,date:new Date,performedBy:null},{cryptoAmount:5,balance:5,fiatValue:5e4,date:new Date,performedBy:null}],u=Object(Qn.c)(Rj).data,m=null!==(e=cr.a(["funding"])(u))&&void 0!==e?e:[];m.length&&!a&&i(m[0]);var h=Wj(m.filter((function(e){return!e.errorMsg})).map((function(e){return new sb.a(e.fiatPending)})).reduce(Aj,new sb.a(0))),b=function(e){return e>=0?"+":""};return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{children:Object(qe.jsx)(xt,{children:"Funding"})}),Object(qe.jsxs)("div",{className:s.wrapper,children:[Object(qe.jsx)(Ve,{data:m,isSelected:function(e){return a&&a.cryptoCode===e.cryptoCode},onClick:i,displayName:function(e){return e.display},itemRender:function(e,t){var n,r,a=(n={},Object(v.a)(n,s.item,!0),Object(v.a)(n,s.inactiveItem,!t),n),i=(r={},Object(v.a)(r,s.itemWrapper,!0),Object(v.a)(r,s.error,e.errorMsg),r);return Object(qe.jsxs)("div",{className:w()(i),children:[Object(qe.jsx)("div",{className:s.firstItem,children:e.display}),!e.errorMsg&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:w()(a),children:[Wj(e.fiatConfirmedBalance)," ",e.fiatCode]}),Object(qe.jsxs)("div",{className:w()(a),children:[e.confirmedBalance," ",e.cryptoCode]})]})]})},children:m.length&&Object(qe.jsxs)("div",{className:s.total,children:[Object(qe.jsx)(mt,{className:s.totalTitle,children:"Total Crypto Balance"}),Object(qe.jsxs)(ct,{noMargin:!0,children:[zj(m),m[0].fiatCode]}),Object(qe.jsxs)(mt,{className:s.totalPending,children:["(",b(h)," ",h," pending)"]})]})}),a&&!l&&a.errorMsg&&Object(qe.jsx)("div",{className:s.main,children:Object(qe.jsx)("div",{className:s.firstSide,children:Object(qe.jsx)(st,{className:s.error,children:a.errorMsg})})}),a&&!l&&!a.errorMsg&&Object(qe.jsxs)("div",{className:s.main,children:[Object(qe.jsxs)("div",{className:s.firstSide,children:[Object(qe.jsxs)(rt,{children:["Balance (",a.display,")"]}),Object(qe.jsxs)("div",{className:s.coinTotal,children:[Object(qe.jsx)(ct,{inline:!0,noMargin:!0,children:"".concat(a.confirmedBalance," ").concat(a.cryptoCode)}),Object(qe.jsx)(lt,{inline:!0,noMargin:!0,className:s.leftSpacer,children:"(".concat(b(a.pending)," ").concat(a.pending," pending)")})]}),Object(qe.jsxs)("div",{className:s.coinTotal,children:[Object(qe.jsx)(st,{inline:!0,noMargin:!0,children:"= ".concat(Wj(a.fiatConfirmedBalance)," ").concat(a.fiatCode)}),Object(qe.jsx)(bt,{inline:!0,noMargin:!0,className:s.leftSpacer,children:"(".concat(b(a.fiatPending)," ").concat(Wj(a.fiatPending)," pending)")})]}),Object(qe.jsx)(rt,{className:s.topSpacer,children:"Address"}),Object(qe.jsx)("div",{className:s.addressWrapper,children:Object(qe.jsx)("div",{className:s.mono,children:Object(qe.jsx)("strong",{children:Object(qe.jsx)($l,{buttonClassname:s.copyToClipboard,children:Tj(a.cryptoCode,a.fundingAddress)})})})})]}),Object(qe.jsxs)("div",{className:s.secondSide,children:[Object(qe.jsxs)(mt,{children:["Scan to send ",a.display]}),Object(qe.jsx)(sa.a,{size:240,fgColor:J,value:a.fundingAddressUrl})]})]}),a&&l&&Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Nj,{className:s.tableLabel,label:"Pending",color:"#cacaca"}),Object(qe.jsxs)(Ac,{className:s.table,children:[Object(qe.jsxs)(Wc,{children:[Object(qe.jsx)(Hc,{header:!0,width:Pj,children:"Amount Entered"}),Object(qe.jsx)(Hc,{header:!0,width:Pj,children:"Balance After"}),Object(qe.jsx)(Hc,{header:!0,width:Pj,children:"Cash Value"}),Object(qe.jsx)(Hc,{header:!0,width:Dj,children:"Date"}),Object(qe.jsx)(Hc,{header:!0,width:Bj,children:"Time (h:m:s)"}),Object(qe.jsx)(Hc,{header:!0,width:Pj,children:"Performed By"})]}),Object(qe.jsx)(Mc,{children:d.map((function(e,t){return Object(qe.jsxs)(Vc,{className:w()(Object(v.a)({},s.pending,e.pending)),children:[Object(qe.jsxs)(Hc,{width:Pj,children:[e.cryptoAmount," ",a.cryptoCode]}),Object(qe.jsxs)(Hc,{width:Pj,children:[e.balance," ",a.cryptoCode]}),Object(qe.jsxs)(Hc,{width:Pj,children:[e.fiatValue," ",a.fiatCode]}),Object(qe.jsx)(Hc,{width:Dj,children:ib()(e.date).format("YYYY-MM-DD")}),Object(qe.jsx)(Hc,{width:Bj,children:ib()(e.date).format("hh:mm:ss")}),Object(qe.jsx)(Hc,{width:Pj,children:"add"})]},t)}))})]})]})]})]})},Hj=function(e){return{test:function(t){return!rr.a(e)||!rr.a(t)||this.createError()}}},qj=function(e){return e&&e.length},$j=function(e,t){return ma.e().max(100,"Too long").when(e,{is:qj,then:ma.e().test(Hj(t))})},Vj={code:"bitgo",name:"BitGo",title:"BitGo (Wallet)",elements:[{code:"token",display:"API Token",component:ni,face:!0,long:!0},{code:"environment",display:"Environment",component:Aa,inputProps:{options:[{code:"prod",display:"prod"},{code:"test",display:"test"}],labelProp:"display",valueProp:"code"},face:!0},{code:"BTCWalletId",display:"BTC Wallet ID",component:ni},{code:"BTCWalletPassphrase",display:"BTC Wallet Passphrase",component:ti},{code:"LTCWalletId",display:"LTC Wallet ID",component:ni},{code:"LTCWalletPassphrase",display:"LTC Wallet Passphrase",component:ti},{code:"ZECWalletId",display:"ZEC Wallet ID",component:ni},{code:"ZECWalletPassphrase",display:"ZEC Wallet Passphrase",component:ti},{code:"BCHWalletId",display:"BCH Wallet ID",component:ni},{code:"BCHWalletPassphrase",display:"BCH Wallet Passphrase",component:ti},{code:"DASHWalletId",display:"DASH Wallet ID",component:ni},{code:"DASHWalletPassphrase",display:"DASH Wallet Passphrase",component:ti}],getValidationSchema:function(e){return ma.d().shape({token:ma.e().max(100,"Too long").required(),BTCWalletId:ma.e().max(100,"Too long"),BTCWalletPassphrase:$j("BTCWalletId",null===e||void 0===e?void 0:e.BTCWalletPassphrase),LTCWalletId:ma.e().max(100,"Too long"),LTCWalletPassphrase:$j("LTCWalletId",null===e||void 0===e?void 0:e.LTCWalletPassphrase),ZECWalletId:ma.e().max(100,"Too long"),ZECWalletPassphrase:$j("ZECWalletId",null===e||void 0===e?void 0:e.ZECWalletPassphrase),BCHWalletId:ma.e().max(100,"Too long"),BCHWalletPassphrase:$j("BCHWalletId",null===e||void 0===e?void 0:e.BCHWalletPassphrase),DASHWalletId:ma.e().max(100,"Too long"),DASHWalletPassphrase:$j("DASHWalletId",null===e||void 0===e?void 0:e.DASHWalletPassphrase),environment:ma.e().matches(/(prod|test)/).required()})}},Yj={code:"bitstamp",name:"Bitstamp",title:"Bitstamp (Exchange)",elements:[{code:"clientId",display:"Client ID",component:ni,face:!0,long:!0},{code:"key",display:"API Key",component:ni,face:!0,long:!0},{code:"secret",display:"API Secret",component:ti}],getValidationSchema:function(e){return ma.d().shape({clientId:ma.e().max(100,"Too long").required(),key:ma.e().max(100,"Too long").required(),secret:ma.e().max(100,"Too long").test(Hj(null===e||void 0===e?void 0:e.secret))})}},Xj={code:"blockcypher",name:"Blockcypher",title:"Blockcypher (Payments)",elements:[{code:"token",display:"API Token",component:ni,face:!0,long:!0},{code:"confidenceFactor",display:"Confidence Factor",component:ni,face:!0}],getValidationSchema:function(){return ma.d().shape({token:ma.e().max(100,"Too long").required(),confidenceFactor:ma.c().integer("Please input a positive integer").positive("Please input a positive integer").required()})}},Uj={code:"infura",name:"Infura",title:"Infura (Wallet)",elements:[{code:"apiKey",display:"Project ID",component:ni,face:!0,long:!0},{code:"apiSecret",display:"Project Secret",component:ti},{code:"endpoint",display:"Endpoint",component:ni,face:!0}],getValidationSchema:function(e){return ma.d().shape({apiKey:ma.e().max(100,"Too long").required(),apiSecret:ma.e().max(100,"Too long").test(Hj(null===e||void 0===e?void 0:e.apiSecret)),endpoint:ma.e().max(100,"Too long").required()})}},Gj={code:"itbit",name:"itBit",title:"itBit (Exchange)",elements:[{code:"userId",display:"User ID",component:ni,face:!0,long:!0},{code:"walletId",display:"Wallet ID",component:ni,face:!0,long:!0},{code:"clientKey",display:"Client Key",component:ni},{code:"clientSecret",display:"Client Secret",component:ti}],getValidationSchema:function(e){return ma.d().shape({userId:ma.e().max(100,"Too long").required(),walletId:ma.e().max(100,"Too long").required(),clientKey:ma.e().max(100,"Too long").required(),clientSecret:ma.e().max(100,"Too long").test(Hj(null===e||void 0===e?void 0:e.clientSecret))})}},Zj={code:"kraken",name:"Kraken",title:"Kraken (Exchange)",elements:[{code:"apiKey",display:"API Key",component:ni,face:!0,long:!0},{code:"privateKey",display:"Private Key",component:ti}],getValidationSchema:function(e){return ma.d().shape({apiKey:ma.e().max(100,"Too long").required(),privateKey:ma.e().max(100,"Too long").test(Hj(null===e||void 0===e?void 0:e.privateKey))})}},_j={code:"mailgun",name:"Mailgun",title:"Mailgun (Email)",elements:[{code:"apiKey",display:"API Key",component:ni},{code:"domain",display:"Domain",component:ni},{code:"fromEmail",display:"From Email",component:ni,face:!0},{code:"toEmail",display:"To Email",component:ni,face:!0}],getValidationSchema:function(){return ma.d().shape({apiKey:ma.e().max(100,"Too long").required(),domain:ma.e().max(100,"Too long").required(),fromEmail:ma.e().max(100,"Too long").email("Please input a valid email address").required(),toEmail:ma.e().max(100,"Too long").email("Please input a valid email address").required()})}},Kj={code:"twilio",name:"Twilio",title:"Twilio (SMS)",elements:[{code:"accountSid",display:"Account SID",component:ni},{code:"authToken",display:"Auth Token",component:ti},{code:"fromNumber",display:"Twilio Number (international format)",component:ni,face:!0},{code:"toNumber",display:"Notifications Number (international format)",component:ni,face:!0}],getValidationSchema:function(e){return ma.d().shape({accountSid:ma.e().max(100,"Too long").required(),authToken:ma.e().max(100,"Too long").test(Hj(null===e||void 0===e?void 0:e.authToken)),fromNumber:ma.e().max(100,"Too long").required(),toNumber:ma.e().max(100,"Too long").required()})}},Qj=(dj={},Object(v.a)(dj,Vj.code,Vj),Object(v.a)(dj,Yj.code,Yj),Object(v.a)(dj,Xj.code,Xj),Object(v.a)(dj,Uj.code,Uj),Object(v.a)(dj,Gj.code,Gj),Object(v.a)(dj,Zj.code,Zj),Object(v.a)(dj,_j.code,_j),Object(v.a)(dj,Kj.code,Kj),dj);function Jj(){return(Jj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ef(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var tf=r.createElement("circle",{cx:52,cy:32,r:32,fill:"#F7931A"}),nf=r.createElement("path",{d:"m66.1 27.4c0.6-4.3-2.6-6.5-7-8.1l1.4-5.8-3.5-0.9-1.4 5.6c-0.9-0.2-1.9-0.4-2.8-0.7l1.4-5.7-3.5-0.9-1.4 5.8c-0.8-0.2-1.5-0.3-2.2-0.5l0 0-4.8-1.2-0.9 3.8s2.6 0.6 2.6 0.6c1.4 0.4 1.7 1.3 1.6 2l-1.6 6.6c0.1 0 0.2 0.1 0.4 0.1-0.1 0-0.2-0.1-0.4-0.1l-2.3 9.2c-0.2 0.4-0.6 1.1-1.6 0.8 0 0.1-2.6-0.6-2.6-0.6l-1.7 4 4.6 1.1c0.9 0.2 1.7 0.4 2.5 0.6l-1.5 5.8 3.5 0.9 1.4-5.8c1 0.3 1.9 0.5 2.8 0.7l-1.4 5.7 3.5 0.9 1.5-5.8c6 1.1 10.5 0.7 12.4-4.7 1.5-4.4-0.1-6.9-3.2-8.5 2.3-0.5 4-2 4.5-5.2zm-8 11.2c-1.1 4.4-8.4 2-10.8 1.4l1.9-7.7c2.4 0.6 10 1.8 8.9 6.3zm1.1-11.3c-1 4-7.1 2-9.1 1.5l1.7-7c2 0.5 8.4 1.4 7.3 5.6z",fill:"#FFF"});function rf(e,t){var n=e.title,a=e.titleId,i=ef(e,["title","titleId"]);return r.createElement("svg",Jj({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,tf,nf)}var af=r.forwardRef(rf);n.p;function of(){return(of=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function cf(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var lf=r.createElement("path",{fill:"#F7931A",d:"m0,0l29.7,0a39,39,0,0,0,0,64l-29.7,0zm52,0a32,32,0,0,0,0,64a32,32,0,0,0,0,-64m52,0l-29.7,0a39,39,0,0,1,0,64l29.7,0z"}),sf=r.createElement("path",{fill:"#FFF",transform:"rotate(-28 52 32)",d:"m66.103,27.444c0.637-4.258-2.605-6.547-7.038-8.074l1.438-5.768-3.511-0.875-1.4,5.616c-0.923-0.23-1.871-0.447-2.813-0.662l1.41-5.653-3.509-0.875-1.439,5.766c-0.764-0.174-1.514-0.346-2.242-0.527l0.004-0.018-4.842-1.209-0.934,3.75s2.605,0.597,2.55,0.634c1.422,0.355,1.679,1.296,1.636,2.042l-1.638,6.571c0.098,0.025,0.225,0.061,0.365,0.117-0.117-0.029-0.242-0.061-0.371-0.092l-2.296,9.205c-0.174,0.432-0.615,1.08-1.609,0.834,0.035,0.051-2.552-0.637-2.552-0.637l-1.743,4.019,4.569,1.139c0.85,0.213,1.683,0.436,2.503,0.646l-1.453,5.834,3.507,0.875,1.439-5.772c0.958,0.26,1.888,0.5,2.798,0.726l-1.434,5.745,3.511,0.875,1.453-5.823c5.987,1.133,10.489,0.676,12.384-4.739,1.527-4.36-0.076-6.875-3.226-8.515,2.294-0.529,4.022-2.038,4.483-5.155zm-8.022,11.249c-1.085,4.36-8.426,2.003-10.806,1.412l1.928-7.729c2.38,0.594,10.012,1.77,8.878,6.317zm1.086-11.312c-0.99,3.966-7.1,1.951-9.082,1.457l1.748-7.01c1.982,0.494,8.365,1.416,7.334,5.553z"});function df(e,t){var n=e.title,a=e.titleId,i=cf(e,["title","titleId"]);return r.createElement("svg",of({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,lf,sf)}var uf=r.forwardRef(df);n.p;function mf(){return(mf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function hf(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var bf=r.createElement("circle",{cx:1e3,cy:1e3,r:1e3,fill:"#2573c2"}),pf=r.createElement("g",{fill:"#fff"},r.createElement("path",{d:"M1652.6 736.8a143.65 143.65 0 0 0-19.2-63.6c-10-20-27.8-35.6-48.6-43.6a143.51 143.51 0 0 0-68.4-15H628.8l-63.6 190.6h804.2l-127 389.6h-804l-63.6 190.6h891.8a246.33 246.33 0 0 0 77.8-15c25-14.2 53.6-28.6 77.8-48.6a382.69 382.69 0 0 0 63.6-63.6 432.2 432.2 0 0 0 39.2-73.4l117.8-370.4a137.38 137.38 0 0 0 9.8-77.6z"}),r.createElement("path",{d:"M882.2 911.6H409l-63.6 176.2h478z"}));function jf(e,t){var n=e.title,a=e.titleId,i=hf(e,["title","titleId"]);return r.createElement("svg",mf({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2000 2000",width:2500,height:2500,ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,bf,pf)}var ff=r.forwardRef(jf);n.p;function gf(){return(gf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Of(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var xf=r.createElement("g",null,r.createElement("polygon",{fill:"#343434",points:"127.9611 0 125.1661 9.5 125.1661 285.168 127.9611 287.958 255.9231 212.32"}),r.createElement("polygon",{fill:"#8C8C8C",points:"127.962 0 0 212.32 127.962 287.959 127.962 154.158"}),r.createElement("polygon",{fill:"#3C3C3B",points:"127.9611 312.1866 126.3861 314.1066 126.3861 412.3056 127.9611 416.9066 255.9991 236.5866"}),r.createElement("polygon",{fill:"#8C8C8C",points:"127.962 416.9052 127.962 312.1852 0 236.5852"}),r.createElement("polygon",{fill:"#141414",points:"127.9611 287.9577 255.9211 212.3207 127.9611 154.1587"}),r.createElement("polygon",{fill:"#393939",points:"0.0009 212.3208 127.9609 287.9578 127.9609 154.1588"}));function vf(e,t){var n=e.title,a=e.titleId,i=Of(e,["title","titleId"]);return r.createElement("svg",gf({width:"256px",height:"417px",viewBox:"0 0 256 417",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,xf)}var yf=r.forwardRef(vf);n.p;function wf(){return(wf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Cf(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var kf=r.createElement("circle",{fill:"#989898",cx:52,cy:32,r:32}),Sf=r.createElement("path",{fill:"#FFF",d:"m46.92598,12.31703l-4.97801,18.8088l-3.42705,1.32711l-1.64691,6.17189l3.42705,-1.29514l-2.8461,10.76083l30.60893,0l2.09993,-7.98401l-18.42505,0l2.09993,-7.82412l3.3631,-1.26316l1.6469,-6.17188l-3.36309,1.29513l3.6509,-13.83611l-12.21053,0z"});function Nf(e,t){var n=e.title,a=e.titleId,i=Cf(e,["title","titleId"]);return r.createElement("svg",wf({xmlns:"http://www.w3.org/2000/svg",width:104,height:64,ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,kf,Sf)}var Ef=r.forwardRef(Nf);n.p;function If(){return(If=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Lf(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ff=r.createElement("style",{type:"text/css"},"\n\t.st0{fill:#231F20;}\n\t.st1{fill:#F4B728;}\n"),Pf=r.createElement("path",{className:"st0",d:"M245.4,20C121.1,20,20,121.1,20,245.4s101.1,225.4,225.4,225.4s225.4-101.1,225.4-225.4S369.7,20,245.4,20z M245.4,433.6c-103.8,0-188.2-84.4-188.2-188.2S141.6,57.2,245.4,57.2s188.2,84.4,188.2,188.2S349.2,433.6,245.4,433.6z"}),Bf=r.createElement("circle",{className:"st1",cx:245.4,cy:245.4,r:177.6}),Df=r.createElement("polygon",{className:"st0",points:"165,315.5 165,349.9 226.5,349.9 226.5,387.6 264.3,387.6 264.3,349.9 325.8,349.9 325.8,304.4 230.4,304.4 325.8,175 325.8,140.6 264.3,140.6 264.3,103 226.5,103 226.5,140.6 165,140.6 165,186.2 260.4,186.2 "});function Rf(e,t){var n=e.title,a=e.titleId,i=Lf(e,["title","titleId"]);return r.createElement("svg",If({id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 493.3 490.2",style:{enableBackground:"new 0 0 493.3 490.2"},xmlSpace:"preserve",ref:t,"aria-labelledby":a},i),Ff,void 0===n?r.createElement("title",{id:a},"headerArtboard 7"):n?r.createElement("title",{id:a},n):null,Pf,Bf,Df)}var Tf,Af,Wf,zf,Mf,Hf=r.forwardRef(Rf),qf=(n.p,Object(b.a)({logo:{maxHeight:80,maxWidth:200},title:{margin:[[24,0,32,0]]},text:{margin:0},button:{marginTop:"auto",marginBottom:58},modalContent:{display:"flex",flexDirection:"column",alignItems:"center",padding:[[0,42]],flex:1}})),$f=function(e){var t=e.code,n=e.name,r=e.onContinue,a=qf(),i=function(e){switch(e){case"BTC":return af;case"BCH":return uf;case"DASH":return ff;case"ETH":return yf;case"LTC":return Ef;case"ZEC":return Hf;default:return null}}(t);return Object(qe.jsxs)("div",{className:a.modalContent,children:[Object(qe.jsx)(i,{className:a.logo}),Object(qe.jsxs)(tt,{className:a.title,children:["Enable ",n]}),Object(qe.jsxs)(ot,{className:a.text,children:["You are about to enable ",n," on your system. This will allow you to use this cryptocurrency on your machines. To be able to do that, you\u2019ll have to set up all the necessary 3rd party services."]}),Object(qe.jsx)(zt,{className:a.button,onClick:r,children:"Start configuration"})]})},Vf=n(681),Yf=Object(b.a)({button:{margin:[["auto",0,32,"auto"]]},form:{flex:1,display:"flex",flexDirection:"column"},grid:{marginBottom:24,marginTop:12}}),Xf=function(e){var t=e.validationSchema,n=e.elements,r=e.value,a=e.save,i=e.buttonLabel,o=void 0===i?"Save changes":i,c=e.buttonClass,s=e.xs,d=void 0===s?12:s,m=Yf(),h=tr.a(Vf.a,ar.a((function(e){var t,n=e.code;return Object(v.a)({},n,null!==(t=r&&r[n])&&void 0!==t?t:"")})))(n),b=_t.a(h,r);return Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:b,validationSchema:t,onSubmit:function(e){var t=tr.a(ar.a(ir.a("code")),lr.a((function(t){return ir.a("component",t)===ti&&ga.a(e[ir.a("code",t)])})))(n);return a(us.a(t,e))},children:Object(qe.jsxs)(ca.c,{className:m.form,children:[Object(qe.jsx)(u.a,{container:!0,spacing:3,className:m.grid,children:n.map((function(e){var t=e.component,n=e.code,r=e.display,a=e.inputProps;return Object(qe.jsx)(u.a,{item:!0,xs:d,children:Object(qe.jsx)(ca.a,Object(l.a)(Object(l.a)({component:t},a),{},{name:n,label:r,fullWidth:!0}))},n)}))}),Object(qe.jsx)(zt,{className:w()(m.button,c),type:"submit",children:o})]})})},Uf={title:{margin:[[0,0,12,0]]},subtitle:{margin:[[32,0,21,0]]},error:{color:me},button:{marginLeft:"auto"},submit:{display:"flex",flexDirection:"row",margin:[["auto",0,24]]},radioGroup:{flexDirection:"row"},radioLabel:{width:150,height:48},radio:{padding:4,margin:4},setupNew:{display:"flex",alignItems:"center",height:48},picker:{width:150}},Gf=Object(b.a)(Uf),Zf={form:null,selected:null,isNew:!1,iError:!1},_f=function(e,t){switch(t.type){case"select":return{form:null,selected:t.selected,isNew:null,iError:!1};case"new":return{form:e.form,selected:null,isNew:!0,iError:!1};case"form":return{form:t.form,selected:t.form.code,isNew:!0,iError:!1};case"error":return _t.a(e,{innerError:!0});case"reset":return Zf;default:throw new Error}},Kf=function(e){var t,n=e.type,a=e.name,i=e.step,o=e.error,l=e.lastStep,s=e.onContinue,d=e.filled,u=e.unfilled,m=e.getValue,h=Gf(),b=Object(r.useReducer)(_f,Zf),p=Object(c.a)(b,2),j=p[0],f=j.innerError,g=j.selected,O=j.form,x=j.isNew,y=p[1];Object(r.useEffect)((function(){y({type:"reset"})}),[i]);var C=function(e,t){if(!e||!e[n])return y({type:"error"});s(e,t)},k=l?"Finish":"Next",S=null!==a&&void 0!==a?a:n,N=(t={},Object(v.a)(t,h.subtitle,!0),Object(v.a)(t,h.error,f),t);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(lt,{className:h.title,children:Ps(n)}),Object(qe.jsx)(Pd,{steps:4,currentStep:i}),Object(qe.jsxs)(at,{className:w()(N),children:["Select a ",S," or set up a new one"]}),Object(qe.jsx)(Pa,{options:d,value:g,className:h.radioGroup,onChange:function(e,t){y({type:"select",selected:t})},labelClassName:h.radioLabel,radioClassName:h.radio}),Object(qe.jsxs)("div",{className:h.setupNew,children:[!ga.a(u)&&!rr.a(u)&&Object(qe.jsx)(Pa,{value:x,onChange:function(e,t){y({type:"new"})},labelClassName:h.radioLabel,radioClassName:h.radio,options:[{display:"Set up new",code:!0}]}),x&&Object(qe.jsx)(ka,{fullWidth:!0,label:"Select ".concat(S),className:h.picker,getOptionSelected:xa.a("code"),labelProp:"display",options:u,onChange:function(e,t){y({type:"form",form:t})}})]}),O&&Object(qe.jsx)(Xf,{save:function(e){return C(Object(v.a)({},n,O.code),Object(v.a)({},O.code,e))},elements:Qj[O.code].elements,validationSchema:Qj[O.code].validationSchema,value:m(O.code),buttonLabel:k}),!O&&Object(qe.jsxs)("div",{className:h.submit,children:[o&&Object(qe.jsx)(gt,{children:"Failed to save"}),Object(qe.jsx)(zt,{className:h.button,onClick:function(){return C(Object(v.a)({},n,g))},children:k})]})]})},Qf=function(e,t){return lr.a((function(n){return function(e){return sr.a("class",e)}(t)(n)&&function(e){return tr.a(xo.a(e),ir.a("cryptos"))}(e)(n)}))},Jf=lr.a((function(e){return!e.deprecated})),eg=function(e,t,n,r){var a=Jf(Qf(r,n)(e)),i=ws.a((function(e){var n=e.code,r=function(e){return t&&t[e]}(n);return!Qj[n]||(0,Qj[n].getValidationSchema)(r).isValidSync(r)}))(a),o=Object(c.a)(i,2);return{filled:o[0],unfilled:o[1]}},tg=function(e){var t=e.coin,n=e.onClose,a=e.accountsConfig,i=e.accounts,o=e.save,s=e.error,d=Object(r.useState)({step:0,config:{active:!0},accountsToSave:{}}),u=Object(c.a)(d,2),m=u[0],h=m.step,b=m.config,p=m.accountsToSave,j=u[1],f="Enable ".concat(t.display),g=4===h,O={filled:Qf(t.code,"ticker")(a)},x=eg(a,i,"wallet",t.code),v=eg(a,i,"exchange",t.code),y=eg(a,i,"zeroConf",t.code),w=function(){var e=Object(No.a)(So.a.mark((function e(n,r){var a,i;return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=_t.a(b,n),i=r?_t.a(p,r):p,!g){e.next=4;break}return e.abrupt("return",o(jc(t.code,a),i));case 4:j({step:h+1,config:a,accountsToSave:i});case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(qe.jsxs)(vc,{title:0===h?null:f,handleClose:n,width:554,open:!0,children:[0===h&&Object(qe.jsx)($f,{code:t.code,name:t.display,onContinue:function(){return w()}}),0!==h&&Object(qe.jsx)(Kf,Object(l.a)(Object(l.a)({step:h,error:s,lastStep:g},function(){switch(h){case 1:return Object(l.a)({type:"ticker"},O);case 2:return Object(l.a)({type:"wallet"},x);case 3:return Object(l.a)({type:"exchange"},v);case 4:return Object(l.a)({type:"zeroConf",name:"zero conf"},y);default:return null}}()),{},{onContinue:w,getValue:function(e){return ja.a(sr.a("code",e))(i)}}))]})},ng=function(e){return lr.a((function(t){return t.class===e}))},rg=function(e){var t=e.id;return lr.a((function(e){return xo.a(t)(e.cryptos)}))},ag=ma.d().shape({ticker:ma.e().required(),wallet:ma.e().required(),exchange:ma.e().required(),zeroConf:ma.e().required()}),ig=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=r?11:0,i=function(t){return tr.a(ir.a(["display"]),ja.a(sr.a("code",t)))(e)},o=function(e){return ng(e)(t||[])},c=function(e){return function(t){return tr.a(ir.a("display"),ja.a(sr.a("code",t)))(o(e))}},l=Qo.a((function(e,t){return rg(t)(o(e))}));return[{name:"id",header:"Cryptocurrency",width:180-a,view:i,size:"sm",editable:!1},{name:"ticker",size:"sm",stripe:!0,view:c("ticker"),width:190-a,input:Aa,inputProps:{options:l("ticker"),valueProp:"code",labelProp:"display",optionsLimit:null}},{name:"wallet",size:"sm",stripe:!0,view:c("wallet"),width:190-a,input:Aa,inputProps:{options:l("wallet"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}},{name:"exchange",size:"sm",stripe:!0,view:c("exchange"),width:190-a,input:Aa,inputProps:{options:l("exchange"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}},{name:"zeroConf",header:"Confidence Checking",size:"sm",stripe:!0,view:c("zeroConf"),input:Aa,width:220-a,inputProps:{options:l("zeroConf"),valueProp:"code",labelProp:"display",optionsLimit:null,onChange:n}}]},og=n(682),cg=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return lr.a((function(e){return vu.a(e.name,t)}),lg(e,n,r))},lg=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=function(e,t,n){return function(r){return e?tr.a(ir.a(t),ja.a(sr.a(null!==n&&void 0!==n?n:"code",r)))(e):""}},a=function(e){return function(t){return t?tr.a(xu.a(", "),ar.a(r(e,"code")))(t):t}},i=ar.a((function(e){return e.machine}),n),o=function(e){return og.a((function(e,t){return e.deviceId===t}),e,i)},c=e(["machines"]),l=e(["countries"]),s=e(["currencies"]),d=e(["languages"]),u=e(["cryptoCurrencies"]),m=function(e){var t=ja.a(sr.a("deviceId",e.machine))(c);return t?[t]:[]};return[{name:"machine",width:200,size:"sm",view:r(c,"name","deviceId"),input:Aa,inputProps:{options:function(e){return jo.a(m(e))(o(c))},valueProp:"deviceId",labelProp:"name"}},{name:"country",width:200,size:"sm",view:r(l,"display"),input:Aa,inputProps:{options:l,valueProp:"code",labelProp:"display"}},{name:"fiatCurrency",width:150,size:"sm",view:r(s,"code"),input:Aa,inputProps:{options:s,valueProp:"code",labelProp:"code"}},{name:"languages",width:240,size:"sm",view:a(d),input:Aa,inputProps:{options:d,valueProp:"code",labelProp:"display",multiple:!0}},{name:"cryptoCurrencies",width:290,size:"sm",view:a(u),input:Aa,inputProps:{options:u,valueProp:"code",labelProp:"code",multiple:!0,optionsLimit:null,onChange:t}}]},sg=function(e,t){var n=cr.a(yu.a,e);return cg(n,["country","fiatCurrency","languages","cryptoCurrencies"],t)},dg=function(e,t,n){var r=cr.a(yu.a,e);return cg(r,["machine","country","languages","cryptoCurrencies"],n,t)},ug=ma.d().shape({country:ma.e().label("Country").required(),fiatCurrency:ma.e().label("Fiat Currency").required(),languages:ma.a().label("Languages").required().min(1).max(4),cryptoCurrencies:ma.a().label("Crypto Currencies").required().min(1)}),mg=ma.d().shape({machine:ma.e().label("Machine").required(),country:ma.e().label("Country").required(),languages:ma.a().label("Languages").required().min(1),cryptoCurrencies:ma.a().label("Crypto Currencies").required().min(1)}),hg={country:"",fiatCurrency:"",languages:[],cryptoCurrencies:[]},bg={machine:"",country:"",languages:[],cryptoCurrencies:[]},pg=Object(b.a)({rightAligned:{marginTop:"20px",marginLeft:"auto",marginBottom:"20px"},rightLink:{marginLeft:"20px"}}),jg=er()(Tf||(Tf=Object(Kn.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n currencies {\n code\n display\n }\n countries {\n code\n display\n }\n cryptoCurrencies {\n code\n display\n }\n languages {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),fg=er()(Af||(Af=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),gg=function(e){var t=e.open,n=e.close,r=e.save,a=pg();return Object(qe.jsxs)(vc,{title:"Change fiat currency?",handleClose:n,width:450,height:310,open:t,children:[Object(qe.jsx)(ot,{children:"Please note that all values you set that were based on your prior fiat currency are still the same. If you need to adjust these to reflect the new fiat currency (such as minimum transaction amounts, fixed fees, and compliance triggers, for example), please do so now."}),Object(qe.jsx)(ot,{children:"Also, if you have cash-out enabled, you must define new dispenser bill counts for the new currency for cash-out on the new currency to work."}),Object(qe.jsxs)("div",{className:a.rightAligned,children:[Object(qe.jsx)(mn,{onClick:n,color:"secondary",children:"Cancel"}),Object(qe.jsx)(mn,{className:a.rightLink,onClick:r,color:"primary",children:"Save"})]})]})},Og=function(e){var t,n,a,i,o,l,s=e.name,d=Object(r.useState)(!1),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(r.useState)(null),p=Object(c.a)(b,2),j=p[0],f=p[1],g=Object(r.useState)(null),O=Object(c.a)(g,2),x=O[0],v=O[1],y=Object(r.useState)(!1),w=Object(c.a)(y,2),C=w[0],k=w[1],S=Object(r.useState)(!1),N=Object(c.a)(S,2),E=N[0],I=N[1],L=Object(Qn.c)(jg).data,F=Object(Qn.b)(fg,{onCompleted:function(){return h(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return v(e)}}),P=Object(c.a)(F,1)[0],B=Object(r.useState)(null),D=Object(c.a)(B,2),R=D[0],T=D[1],A=(null===L||void 0===L?void 0:L.config)&&pc(s)(L.config),W=(null===L||void 0===L?void 0:L.config)&&pc(ac)(L.config),z=null===L||void 0===L?void 0:L.accountsConfig,M=null!==(t=null===L||void 0===L?void 0:L.accounts)&&void 0!==t?t:[],H=null!==(n=null===L||void 0===L?void 0:L.cryptoCurrencies)&&void 0!==n?n:[],q=A&&!ga.a(A)?A:hg,$=null!==(a=q.overrides)&&void 0!==a?a:[],V=function(e){return T(null),P({variables:{config:e}})},Y=function(e,t,n){var r=Cu.a(t,e)[0];if(!r)return n(t);var a=pc(r)(W);if(!ag.isValidSync(a))return f((function(){return function(){return n(t)}})),void h(r);n(t)};return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(gg,{open:R,close:function(){return T(null)},save:function(){return R&&V(R)}}),Object(qe.jsx)(qn,{title:"Locales"}),Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{title:"Default settings",error:null===x||void 0===x?void 0:x.message,titleLg:!0,name:"locale",enableEdit:!0,initialValues:q,save:function(e){var t=jc(s)(e.locale[0]);return A.fiatCurrency&&t.locale_fiatCurrency!==A.fiatCurrency?T(t):V(t)},validationSchema:ug,data:bu.a(q),elements:sg(L,Y),setEditing:function(e,t){return k(t)},forceDisable:E})}),Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{error:null===x||void 0===x?void 0:x.message,title:"Overrides",titleLg:!0,name:"overrides",enableDelete:!0,enableEdit:!0,enableCreate:!0,initialValues:bg,save:function(e){var t=jc(s)(e);return v(null),P({variables:{config:t}})},validationSchema:mg,data:null!==$&&void 0!==$?$:[],elements:dg(L,$,Y),disableAdd:tr.a(ga.a,Cu.a)(null!==(i=null===L||void 0===L?void 0:L.machines.map((function(e){return e.deviceId})))&&void 0!==i?i:[],null!==(o=null===$||void 0===$?void 0:$.map((function(e){return e.machine})))&&void 0!==o?o:[]),setEditing:function(e,t){return I(t)},forceDisable:C})}),m&&Object(qe.jsx)(tg,{coin:ja.a(sr.a("code",m))(H),onClose:function(){return h(!1)},save:function(e){return V(jc(ac)(e)).then((function(e){return j(),f(null),e}))},error:null===x||void 0===x?void 0:x.message,cryptoCurrencies:H,userAccounts:null===L||void 0===L||null===(l=L.config)||void 0===l?void 0:l.accounts,accounts:M,accountsConfig:z})]})},xg={footer:{display:"flex",flexDirection:"row",margin:[["auto",0,24,0]]},modalLabel1:{marginTop:20},modalLabel2Wrapper:{marginTop:40,display:"flex",flexDirection:"row",justifyContent:"flex-start"},discountInput:{display:"flex",flexDirection:"row",alignItems:"flex-start"},inputLabel:{color:J,fontFamily:pe,fontSize:24,marginLeft:8,marginTop:15},tableWidth:{width:620},error:{color:me},form:{display:"flex",flexDirection:"column",height:"100%"},submit:{margin:[["auto",0,0,"auto"]]}},vg=n(684),yg=Object(b.a)(xg),wg={code:"",discount:""},Cg=ma.d().shape({code:ma.e().required().trim().max(25),discount:ma.c().required().min(0).max(100)}),kg=function(e){var t=e.showModal,n=e.onClose,r=e.errorMsg,a=e.addCode,i=yg();return Object(qe.jsx)(qe.Fragment,{children:t&&Object(qe.jsx)(vc,{title:"Add promo code discount",closeOnBackdropClick:!0,width:600,height:500,handleClose:n,open:!0,children:Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,initialValues:wg,validationSchema:Cg,onSubmit:function(e){!function(e,t){a(vg.a(e),parseInt(t))}(e.code,e.discount)},children:Object(qe.jsxs)(ca.c,{id:"promo-form",className:i.form,children:[Object(qe.jsx)(rt,{className:i.modalLabel1,children:"Promo code name"}),Object(qe.jsx)(ca.b,{name:"code",autoFocus:!0,size:"lg",autoComplete:"off",width:338,inputProps:{style:{textTransform:"uppercase"}},component:ni}),Object(qe.jsxs)("div",{className:i.modalLabel2Wrapper,children:[Object(qe.jsx)(rt,{className:i.modalLabel2,children:"Define discount rate"}),Object(qe.jsxs)(Ao,{width:304,children:[Object(qe.jsx)(ot,{children:"This is a percentage discount off of your existing commission rates for a customer entering this code at the machine."}),Object(qe.jsx)(ot,{children:"For instance, if you charge 8% commissions, and this code is set for 50%, then you'll instead be charging 4% on transactions using the code."})]})]}),Object(qe.jsxs)("div",{className:i.discountInput,children:[Object(qe.jsx)(ca.b,{name:"discount",size:"lg",autoComplete:"off",width:50,decimalScale:0,className:i.discountInputField,component:Ja}),Object(qe.jsx)(dt,{inline:!0,className:i.inputLabel,children:"%"})]}),Object(qe.jsxs)("div",{className:i.footer,children:[r&&Object(qe.jsx)(gt,{children:r}),Object(qe.jsx)(zt,{type:"submit",form:"promo-form",className:i.submit,children:"Add code"})]})]})})})})},Sg=Object(b.a)(xg),Ng="Failed to save",Eg=er()(Wf||(Wf=Object(Kn.a)(["\n query promoCodes {\n promoCodes {\n id\n code\n discount\n }\n }\n"]))),Ig=er()(zf||(zf=Object(Kn.a)(["\n mutation deletePromoCode($codeId: ID!) {\n deletePromoCode(codeId: $codeId) {\n id\n }\n }\n"]))),Lg=er()(Mf||(Mf=Object(Kn.a)(["\n mutation createPromoCode($code: String!, $discount: Int!) {\n createPromoCode(code: $code, discount: $discount) {\n id\n code\n discount\n }\n }\n"]))),Fg=function(){var e=Sg(),t=Object(r.useState)(!1),n=Object(c.a)(t,2),a=n[0],i=n[1],o=Object(r.useState)(),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(!1),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(r.useState)(null),j=Object(c.a)(p,2),f=j[0],g=j[1],O=function(){return b(!h)},x=Object(Qn.c)(Eg),v=x.data,y=x.loading,w=Object(Qn.b)(Ig,{onError:function(e){var t=e.message;g(null!==t&&void 0!==t?t:"Error while deleting row")},onCompleted:function(){return i(!1)},refetchQueries:function(){return["promoCodes"]}}),C=Object(c.a)(w,1)[0],k=Object(Qn.b)(Lg,{refetchQueries:function(){return["promoCodes"]}}),S=Object(c.a)(k,1)[0],N=[{header:"Code",width:300,textAlign:"left",size:"sm",view:function(e){return e.code}},{header:"Discount",width:220,textAlign:"left",size:"sm",view:function(e){return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(dt,{inline:!0,children:e.discount})," % in commissions"]})}},{header:"Delete",width:100,textAlign:"center",size:"sm",view:function(e){return Object(qe.jsx)(cn,{onClick:function(){i(!0),d({variables:{codeId:e.id}})},children:Object(qe.jsx)(es,{})})}}];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Promo Codes"}),!y&&!ga.a(v.promoCodes)&&Object(qe.jsx)(Xe.a,{marginBottom:4,marginTop:-5,className:e.tableWidth,display:"flex",justifyContent:"flex-end",children:Object(qe.jsx)(mn,{color:"primary",onClick:O,children:"Add new code"})}),!y&&!ga.a(v.promoCodes)&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Nl,{elements:N,data:cr.a(["promoCodes"])(v)}),Object(qe.jsx)(Ec,{open:a,onDismissed:function(){i(!1),g(null)},onConfirmed:function(){g(null),C(s)},errorMessage:f})]}),!y&&ga.a(v.promoCodes)&&Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"left",flexDirection:"column",children:[Object(qe.jsx)(nt,{children:"Currently, there are no active promo codes on your network."}),Object(qe.jsx)(zt,{onClick:O,children:"Add Code"})]}),Object(qe.jsx)(kg,{showModal:h,onClose:function(){g(null),b(!1)},errorMsg:f,addCode:function(e,t){g(null),S({variables:{code:e,discount:t}}).then((function(e){if(!e.errors)return b(!1);var t=fo.a((function(e){return vu.a("duplicate",null===e||void 0===e?void 0:e.message)}))(e.errors);g(t?"There is already a promotion with that code!":Ng)})).catch((function(e){g(Ng),console.log(e)}))}})]})},Pg=n(311),Bg=n.n(Pg);function Dg(){return(Dg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rg(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Tg=r.createElement("desc",null,"Created with Sketch."),Ag=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-3",transform:"translate(-117.000000, -116.000000)",stroke:"#1B2559",strokeWidth:2},r.createElement("g",{id:"arrow-download-logs",transform:"translate(128.500000, 124.500000) rotate(-90.000000) translate(-128.500000, -124.500000) translate(121.000000, 114.000000)"},r.createElement("polyline",{id:"Path-3",points:"0 13.3571429 7.14285714 20.5 14.2857143 13.3571429"}),r.createElement("line",{x1:7.14285714,y1:.142857143,x2:7.14285714,y2:20.1428571,id:"Path-4"}))));function Wg(e,t){var n=e.title,a=e.titleId,i=Rg(e,["title","titleId"]);return r.createElement("svg",Dg({width:"23px",height:"17px",viewBox:"0 0 23 17",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),void 0===n?r.createElement("title",{id:a},"arrow download logs"):n?r.createElement("title",{id:a},n):null,Tg,Ag)}var zg=r.forwardRef(Wg);n.p;function Mg(){return(Mg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Hg(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var qg=r.createElement("desc",null,"Created with Sketch."),$g=r.createElement("g",{id:"icon/button/download/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"icon/sf-small/wizzard",stroke:"#FFFFFF"},r.createElement("polyline",{id:"Path-3",points:"3.6 5.4 6 7.8 8.4 5.4"}),r.createElement("line",{x1:6,y1:.5,x2:6,y2:7.4,id:"Path-4"}),r.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1"})));function Vg(e,t){var n=e.title,a=e.titleId,i=Hg(e,["title","titleId"]);return r.createElement("svg",Mg({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,qg,$g)}var Yg=r.forwardRef(Vg);n.p;function Xg(){return(Xg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ug(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Gg=r.createElement("desc",null,"Created with Sketch."),Zg=r.createElement("g",{id:"icon/button/download/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"icon/sf-small/wizzard",stroke:"#1B2559"},r.createElement("polyline",{id:"Path-3",points:"3.6 5.4 6 7.8 8.4 5.4"}),r.createElement("line",{x1:6,y1:.5,x2:6,y2:7.4,id:"Path-4"}),r.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1"})));function _g(e,t){var n=e.title,a=e.titleId,i=Ug(e,["title","titleId"]);return r.createElement("svg",Xg({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Gg,Zg)}var Kg=r.forwardRef(_g);n.p;function Qg(){return(Qg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Jg(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var eO=r.createElement("desc",null,"Created with Sketch."),tO=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-20.000000, -187.000000)"},r.createElement("g",{id:"icon/sf-contain-b-copy-5",transform:"translate(30.000000, 197.000000) rotate(-270.000000) translate(-30.000000, -197.000000) translate(20.000000, 187.000000)"},r.createElement("g",{id:"icon/sf-small/wizzard",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},r.createElement("g",null,r.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),r.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function nO(e,t){var n=e.title,a=e.titleId,i=Jg(e,["title","titleId"]);return r.createElement("svg",Qg({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,eO,tO)}var rO=r.forwardRef(nO);n.p;function aO(){return(aO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function iO(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var oO=r.createElement("desc",null,"Created with Sketch."),cO=r.createElement("g",{id:"Symbols",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"pop-up/action/download-logs/date-range-copy-2",transform:"translate(-20.000000, -187.000000)"},r.createElement("g",{id:"icon/sf-contain-b-copy-5",transform:"translate(30.000000, 197.000000) rotate(270.000000) translate(-30.000000, -197.000000) translate(20.000000, 187.000000)"},r.createElement("g",{id:"icon/sf-small/wizzard",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{transform:"translate(6.666667, 6.000000)",id:"Group"},r.createElement("g",null,r.createElement("polyline",{id:"Path-3",stroke:"#1B2559",strokeWidth:2,points:"0 4.83333333 3.33333333 8.16666667 6.66666667 4.83333333"}),r.createElement("line",{x1:3.33333333,y1:.25,x2:3.33333333,y2:6.5,id:"Path-4",stroke:"#1B2559",strokeWidth:2})))))));function lO(e,t){var n=e.title,a=e.titleId,i=iO(e,["title","titleId"]);return r.createElement("svg",aO({width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,oO,cO)}var sO,dO,uO,mO,hO,bO,pO=r.forwardRef(lO),jO=(n.p,{wrapper:{height:26,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},button:{outline:"none",extend:Re.label1,border:"none",cursor:"pointer",backgroundColor:"transparent",color:J,zIndex:2},lowerBound:{left:"50%"},upperBound:{right:"50%"},selected:{width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:$,borderRadius:"50%",position:"absolute",zIndex:1},between:{position:"absolute",width:"100%",height:"100%",zIndex:0,backgroundColor:V},disabled:{color:oe,cursor:"default"}}),fO=Object(b.a)(jO),gO=function(e){var t,n,r,a=e.isLowerBound,i=e.isUpperBound,o=e.isBetween,c=e.isDisabled,l=e.children,s=(Object(Ue.a)(e,["isLowerBound","isUpperBound","isBetween","isDisabled","children"]),fO()),d=a||i,u=(t={},Object(v.a)(t,s.between,o&&!(a&&i)),Object(v.a)(t,s.lowerBound,a&&!i),Object(v.a)(t,s.upperBound,i&&!a),t),m=(n={},Object(v.a)(n,s.wrapper,!0),Object(v.a)(n,s.selected,d),n),h=(r={},Object(v.a)(r,s.button,!0),Object(v.a)(r,s.disabled,c),r);return Object(qe.jsxs)("div",{className:s.wrapper,children:[Object(qe.jsx)("div",{className:w()(u)}),Object(qe.jsx)("div",{className:w()(m),children:Object(qe.jsx)("button",{className:w()(h),children:l})})]})},OO={wrapper:{display:"flex",flexDirection:"column",alignItems:"center"},button:{outline:"none"},navbar:{extend:Re.p,display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:[[15,15]],color:J,"& button":{display:"flex",alignItems:"center",padding:0,border:"none",backgroundColor:X,cursor:"pointer",borderRadius:"50%",width:20,height:20,position:"relative",overflow:"hidden","& svg":{position:"absolute",left:0}}},table:{borderCollapse:"collapse",width:"100%",color:J,"& tr":{"&:first-child":{paddingLeft:5},"&:last-child":{paddingRight:5}},"& th, & td":{margin:0,padding:[[3,0,3,0]]},"& th":{extend:Re.label2}}},xO=Object(b.a)(OO),vO=function(e){var t=e.minDate,n=e.maxDate,a=e.handleSelect,i=Object(Ue.a)(e,["minDate","maxDate","handleSelect"]),o=Object(r.useState)(ib()()),l=Object(c.a)(o,2),s=l[0],d=l[1],u=xO(),m=ib.a.weekdaysMin().map((function(e){return e.slice(0,1)})),h=function(e){var t=ib()(e).subtract(1,"month"),n=vd.a(0,ib()(e).startOf("month").weekday()).reverse(),r=ar.a((function(e){return ib()(t).endOf("month").subtract(e,"days")}))(n),a=vd.a(0,function(e){return Number.parseInt(ib()(e).endOf("month").format("D"))}(e)),i=ar.a((function(t){return ib()(e).startOf("month").add(t,"days")}))(a),o=ib()(e).add(1,"month"),c=vd.a(0,42-r.length-i.length),l=ar.a((function(e){return ib()(o).startOf("month").add(e,"days")}))(c);return jo.a(jo.a(r,i),l)},b=function(e,t){return h(e).slice(7*t-7,7*t)};return Object(qe.jsxs)("div",{className:u.wrapper,children:[Object(qe.jsxs)("div",{className:u.navbar,children:[Object(qe.jsx)("button",{className:u.button,onClick:function(){return function(e){var n=ib()(e).subtract(1,"month");d(t?n.isSameOrAfter(t,"month")?n:s:n)}(s)},children:Object(qe.jsx)(rO,{})}),Object(qe.jsx)("span",{children:"".concat(s.format("MMMM")," ").concat(s.format("YYYY"))}),Object(qe.jsx)("button",{className:u.button,onClick:function(){return function(e){var t=ib()(e).add(1,"month");d(n?t.isSameOrBefore(n,"month")?t:s:t)}(s)},children:Object(qe.jsx)(pO,{})})]}),Object(qe.jsxs)("table",{className:u.table,children:[Object(qe.jsx)("thead",{children:Object(qe.jsx)("tr",{children:m.map((function(e,t){return Object(qe.jsx)("th",{children:e},t)}))})}),Object(qe.jsx)("tbody",{children:vd.a(1,8).map((function(e,r){return Object(qe.jsx)("tr",{children:b(s,e).map((function(e,r){return Object(qe.jsx)("td",{onClick:function(){return a(e,t,n)},children:Object(qe.jsx)(gO,{isDisabled:n&&e.isAfter(n,"day")||t&&e.isBefore(t,"day"),isLowerBound:e.isSame(i.from,"day"),isUpperBound:e.isSame(i.to,"day"),isBetween:e.isBetween(i.from,i.to,"day",[]),children:e.format("D")})},r)}))},r)}))})]})]})},yO=Object(b.a)({wrapper:{backgroundColor:"white",borderRadius:10}}),wO=function(e){var t=e.minDate,n=e.maxDate,a=e.className,i=e.onRangeChange,o=Object(r.useState)(null),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(null),m=Object(c.a)(u,2),h=m[0],b=m[1];Object(r.useEffect)((function(){i(s,h)}),[s,i,h]);var p=yO();return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsx)("div",{className:w()(p.wrapper,a),children:Object(qe.jsx)(vO,{from:s,to:h,minDate:t,maxDate:n,handleSelect:function(e,t,n){if(!(n&&e.isAfter(n,"day")||t&&e.isBefore(t,"day")))return s&&!h&&e.isBefore(s,"day")?(b(s),void d(e)):void(s&&!h&&e.isSameOrAfter(s,"day")?b(e):(d(e),b(null)))}})})})},CO=Re.label1,kO=Re.h4,SO={wrapper:{height:46,width:99},container:{display:"flex"},monthWeekDayContainer:{display:"flex",flexDirection:"column"},label:{extend:CO,lineHeight:1.33,color:J},bigNumber:{extend:Re.info1,lineHeight:1,marginRight:7},monthYear:{extend:Re.label2,lineHeight:1.17,color:J},weekDay:{extend:CO,lineHeight:1.33,color:se}},NO=Object(b.a)(SO),EO=function(e){var t=e.date,n=e.children,r=(Object(Ue.a)(e,["date","children"]),NO());return Object(qe.jsxs)("div",{className:r.wrapper,children:[Object(qe.jsx)("div",{className:r.label,children:n}),t&&Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsxs)("div",{className:r.container,children:[Object(qe.jsx)("div",{className:r.bigNumber,children:t.format("D")}),Object(qe.jsxs)("div",{className:r.monthWeekDayContainer,children:[Object(qe.jsx)("span",{className:r.monthYear,children:"".concat(t.format("MMM")," ").concat(t.format("YYYY"))}),Object(qe.jsx)("span",{className:r.weekDay,children:t.format("dddd")})]})]})})]})},IO={popoverContent:{width:280},popoverHeader:{extend:kO,padding:[[15,15,0,15]]},radioButtonsContainer:{padding:[[5,15,5,15]]},radioButtons:{display:"flex",justifyContent:"space-between",flexDirection:"row",color:J},dateRangePickerShowing:{display:"block",height:"100%"},dateRangePickerHidden:{display:"none",height:0},download:{padding:[[10,15]]},dateContainerWrapper:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",backgroundColor:X,padding:[[0,15]],minHeight:70},arrowContainer:{position:"absolute",left:125,top:26},arrow:{margin:"auto"}},LO=Object(b.a)(IO),FO="all",PO="range",BO=function(e){var t,n=e.name,a=e.query,i=e.args,o=e.title,s=e.getLogs,d=Object(r.useState)(FO),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(r.useState)({from:null,until:null}),p=Object(c.a)(b,2),j=p[0],f=p[1],g=Object(r.useState)(null),O=Object(c.a)(g,2),x=O[0],y=O[1],C=Object(Qn.a)(a,{onCompleted:function(e){return I(s(e),j)}}),k=Object(c.a)(C,1)[0],S=LO(),N=(t={},Object(v.a)(t,S.dateRangePickerShowing,m===PO),Object(v.a)(t,S.dateRangePickerHidden,m===FO),t),E=Object(r.useCallback)((function(e,t){f({from:e,until:t})}),[f]),I=function(e,t){var r=function(e){return ib()(e).format("YYYY-MM-DD_HH-mm")},a=new window.Blob([e],{type:"text/plain;charset=utf-8"});Bg.a.saveAs(a,m===FO?"".concat(r(new Date),"_").concat(n,".csv"):"".concat(r(t.from),"_").concat(r(t.until),"_").concat(n,".csv"))},L=[{display:"All logs",code:FO},{display:"Date range",code:PO}],F=Boolean(x),P=F?"date-range-popover":void 0;return Object(qe.jsx)(Ut.a,{onClickAway:function(){y(null)},children:Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Xt,{Icon:Kg,InverseIcon:Yg,onClick:function(e){y(x?null:e.currentTarget)},variant:"contained"}),Object(qe.jsx)(Kt,{id:P,open:F,anchorEl:x,placement:"bottom",children:Object(qe.jsxs)("div",{className:S.popoverContent,children:[Object(qe.jsx)("div",{className:S.popoverHeader,children:o}),Object(qe.jsx)("div",{className:S.radioButtonsContainer,children:Object(qe.jsx)(Pa,{name:"logs-select",value:m,options:L,ariaLabel:"logs-select",onChange:function(e){var t=cr.a(["target","value"])(e);h(t),t===FO&&f({from:null,until:null})},className:S.radioButtons})}),m===PO&&Object(qe.jsxs)("div",{className:w()(N),children:[Object(qe.jsx)("div",{className:S.dateContainerWrapper,children:j&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(EO,{date:j.from,children:"From"}),Object(qe.jsx)("div",{className:S.arrowContainer,children:Object(qe.jsx)(zg,{className:S.arrow})}),Object(qe.jsx)(EO,{date:j.until,children:"To"})]})}),Object(qe.jsx)(wO,{maxDate:ib()(),onRangeChange:E})]}),Object(qe.jsx)("div",{className:S.download,children:Object(qe.jsx)(mn,{color:"primary",onClick:function(){return function(e,t,n){m===FO&&n({variables:Object(l.a)({},t)}),e&&e.from&&(e.from&&!e.until&&(e.until=ib()()),m===PO&&n({variables:Object(l.a)(Object(l.a)({},t),{},{from:e.from,until:e.until})}))}(j,i,k)},children:"Download"})})]})})]})})},DO=Object(b.a)(Tl),RO=er()(sO||(sO=Object(Kn.a)(["\n {\n machines {\n name\n deviceId\n }\n }\n"]))),TO=er()(dO||(dO=Object(Kn.a)(["\n query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) {\n machineLogsCsv(\n deviceId: $deviceId\n limit: $limit\n from: $from\n until: $until\n )\n }\n"]))),AO=er()(uO||(uO=Object(Kn.a)(["\n query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) {\n machineLogs(\n deviceId: $deviceId\n limit: $limit\n from: $from\n until: $until\n ) {\n logLevel\n id\n timestamp\n message\n }\n }\n"]))),WO=function(){var e,t,n=DO(),a=Object(r.useState)(null),i=Object(c.a)(a,2),o=i[0],l=i[1],s=Object(r.useState)(null),d=Object(c.a)(s,2),u=d[0],m=d[1],h=null===o||void 0===o?void 0:o.deviceId,b=Object(Qn.c)(RO).data,p=Object(Qn.c)(AO,{variables:{deviceId:h,limit:500},skip:!o,onCompleted:function(){return m("")}}),j=p.data,f=p.loading;(null===b||void 0===b||null===(e=b.machines)||void 0===e?void 0:e.length)&&!o&&l(null===b||void 0===b?void 0:b.machines[0]);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:n.titleWrapper,children:Object(qe.jsxs)("div",{className:n.titleAndButtonsContainer,children:[Object(qe.jsx)(xt,{children:"Machine Logs"}),j&&Object(qe.jsxs)("div",{className:n.buttonsWrapper,children:[Object(qe.jsx)(BO,{title:"Download logs",name:o.name,query:TO,args:{deviceId:h},getLogs:function(e){return cr.a(["machineLogsCsv"])(e)}}),Object(qe.jsx)(st,{children:u})]})]})}),Object(qe.jsxs)("div",{className:n.wrapper,children:[Object(qe.jsx)(Ve,{displayName:function(e){return e.name},data:(null===b||void 0===b?void 0:b.machines)||[],isSelected:function(e){return cr.a(["deviceId"])(o)===e.deviceId},onClick:l}),Object(qe.jsxs)("div",{className:n.tableWrapper,children:[Object(qe.jsxs)(el,{className:n.table,children:[Object(qe.jsx)(al,{children:Object(qe.jsxs)(ul,{header:!0,children:[Object(qe.jsx)(cl,{className:n.dateColumn,children:"Date"}),Object(qe.jsx)(cl,{className:n.levelColumn,children:"Level"}),Object(qe.jsx)(cl,{className:n.fillColumn})]})}),Object(qe.jsx)(tl,{children:j&&j.machineLogs.map((function(e,t){return Object(qe.jsxs)(ul,{size:"sm",children:[Object(qe.jsx)(rl,{children:(n=e.timestamp,ib()(n).format("YYYY-MM-DD HH:mm"))}),Object(qe.jsx)(rl,{children:e.logLevel}),Object(qe.jsx)(rl,{children:e.message})]},t);var n}))})]}),f&&Object(qe.jsx)(at,{children:"Loading..."}),!f&&!(null===j||void 0===j||null===(t=j.machineLogs)||void 0===t?void 0:t.length)&&Object(qe.jsx)(at,{children:"No activity so far"})]})]})]})},zO={cashbox:{width:80,height:36}},MO=Object(b.a)(zO),HO=ma.d().shape({name:ma.e().required("Required"),cashbox:ma.c().label("Cashbox").required().integer().min(0).max(1e3),cassette1:ma.c().required("Required").integer().min(0).max(500),cassette2:ma.c().required("Required").integer().min(0).max(500)}),qO=er()(mO||(mO=Object(Kn.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $cashbox: Int!\n $cassette1: Int!\n $cassette2: Int!\n ) {\n machineAction(\n deviceId: $deviceId\n action: $action\n cashbox: $cashbox\n cassette1: $cassette1\n cassette2: $cassette2\n ) {\n deviceId\n cashbox\n cassette1\n cassette2\n }\n }\n"]))),$O=function(e){var t=e.machine,n=e.config,r=e.refetchData,a={machine:t,config:n},i=MO(),o=(null===a||void 0===a?void 0:a.config)&&pc("cashOut")(a.config),l=(null===a||void 0===a?void 0:a.config)&&pc("locale")(a.config),s=null===l||void 0===l?void 0:l.fiatCurrency,d=function(e){return pc(e)(o)},u=function(e){var t=e.deviceId;return!d(t).active},m=[{name:"cashbox",header:"Cashbox",width:240,stripe:!1,view:function(e){return Object(qe.jsx)(Za,{currency:{code:s},notes:e,total:0})},input:Ja,inputProps:{decimalPlaces:0}},{name:"cassette1",header:"Cash-out 1",width:265,stripe:!0,view:function(e,t){var n,r=t.deviceId;return Object(qe.jsx)(_a,{className:i.cashbox,denomination:null===(n=d(r))||void 0===n?void 0:n.bottom,currency:{code:s},notes:e})},input:Ja,inputProps:{decimalPlaces:0}},{name:"cassette2",header:"Cash-out 2",width:265,stripe:!0,view:function(e,t){var n,r=t.deviceId;return Object(qe.jsx)(_a,{className:i.cashbox,denomination:null===(n=d(r))||void 0===n?void 0:n.top,currency:{code:s},notes:e})},input:Ja,inputProps:{decimalPlaces:0}}],h=Object(Qn.b)(qO,{refetchQueries:function(){return r()}}),b=Object(c.a)(h,2),p=b[0],j=b[1].error;return t.name?Object(qe.jsx)(sd,{error:null===j||void 0===j?void 0:j.message,stripeWhen:u,disableRowEdit:u,name:"cashboxes",elements:m,data:[t]||!1,save:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[1],a=r.deviceId,i=r.cashbox,o=r.cassette1,c=r.cassette2;return p({variables:{action:"setCassetteBills",deviceId:a,cashbox:i,cassette1:o,cassette2:c}})},validationSchema:HO}):null},VO=n(685),YO={marginLeft:6},XO=Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Bu,{}),Object(qe.jsx)("span",{style:YO,children:"Cash-in"})]}),UO=Object(qe.jsxs)("div",{children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)("span",{style:YO,children:"Cash-out"})]}),GO=function(e){return function(e){return[{name:"name",width:280,size:"sm",view:function(e){return"".concat(e)}},{header:XO,name:"cashIn",display:"Cash-in",width:130,textAlign:"right",suffix:"%"},{header:UO,name:"cashOut",display:"Cash-out",width:130,textAlign:"right",suffix:"%",inputProps:{decimalPlaces:3}},{name:"fixedFee",display:"Fixed fee",width:144,doubleHeader:"Cash-in only",textAlign:"right",suffix:e},{name:"minimumTx",display:"Minimun Tx",width:144,doubleHeader:"Cash-in only",textAlign:"right",suffix:e}]}(e)},ZO=er()(hO||(hO=Object(Kn.a)(["\n query getData {\n config\n cryptoCurrencies {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),_O=er()(bO||(bO=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),KO=function(e){var t=e.name,n=e.id,r=Object(Qn.c)(ZO),a=r.data,i=r.loading,o=Object(Qn.b)(_O,{refetchQueries:function(){return["getData"]}}),l=Object(c.a)(o,1)[0],s=(null===a||void 0===a?void 0:a.config)&&pc(t)(a.config),d=cr.a(["fiatCurrency"])(pc(cc)(null===a||void 0===a?void 0:a.config)),u=function(){if(i||!n||!s)return[];var e={};VO.a((function(t){return e[ir.a("code")(t)]={code:t.code,name:t.display,cashIn:s.cashIn,cashOut:s.cashOut,fixedFee:s.fixedFee,minimumTx:s.minimumTx}}))(a.cryptoCurrencies);var t=function(e){return sr.a("machine",e)},r=s.overrides?lr.a(t("ALL_MACHINES"))(s.overrides):[],o=function(t){e[t.cryptoCurrencies[0]].cashIn=t.cashIn,e[t.cryptoCurrencies[0]].cashOut=t.cashOut,e[t.cryptoCurrencies[0]].fixedFee=t.fixedFee,e[t.cryptoCurrencies[0]].minimumTx=t.minimumTx};VO.a(o)(r);var c=s.overrides?lr.a(t(n))(s.overrides):[];return VO.a(o)(c),Ts.a(e)}();return Object(qe.jsx)(sd,{name:"overrides",save:function(e){var n=jc(t)(e);return l({variables:{config:n}})},data:u,elements:GO(d)})},QO={grid:{flex:1,height:"100%"},content:{display:"flex",flexDirection:"column",flex:1,marginLeft:48,maxWidth:900},footer:{margin:[["auto",0,24,"auto"]]},modalTitle:{lineHeight:"120%",color:J,fontSize:14,fontFamily:pe,fontWeight:900},subtitle:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",color:q},label3:{color:q,marginTop:0},white:{color:_},deleteButton:{paddingLeft:13},addressRow:{marginLeft:8},row:{display:"flex",flexDirection:"row",justifyContent:"space-around"},rowItem:{flex:1,marginBottom:16},detailItem:{marginBottom:32},transactionsItem:{marginBottom:-32},actionButtonsContainer:{display:"flex",flexDirection:"row"},actionButton:{marginRight:8},breadcrumbsContainer:{marginTop:32},breadcrumbLink:{textDecoration:"none"},detailsMargin:{marginTop:24},sidebarContainer:{height:400,overflowY:"auto"}},JO=Object(b.a)(QO),ex=function(e){var t=e.data,n=JO();return Object(qe.jsxs)("div",{className:n.row,children:[Object(qe.jsxs)("div",{className:n.rowItem,children:[Object(qe.jsx)(bt,{className:n.label3,children:"Paired at"}),Object(qe.jsx)(ot,{children:t.pairedAt?ib()(t.pairedAt).format("YYYY-MM-DD HH:mm:ss"):""})]}),Object(qe.jsxs)("div",{className:n.rowItem,children:[Object(qe.jsx)(bt,{className:n.label3,children:"Machine model"}),Object(qe.jsx)(ot,{children:t.model})]}),Object(qe.jsxs)("div",{className:n.rowItem,children:[Object(qe.jsx)(bt,{className:n.label3,children:"Software version"}),Object(qe.jsx)(ot,{children:t.version})]})]})},tx=Object(b.a)({dialogContent:{width:434,padding:16,paddingRight:28},dialogTitle:{padding:16,paddingRight:12,display:"flex","justify-content":"space-between","& > h4":{margin:0},"& > button":{padding:0,marginTop:-4}},dialogActions:{padding:32,paddingTop:16}}),nx=function(e){var t=e.children,n=e.onClose,r=tx();return Object(qe.jsxs)("div",{className:r.dialogTitle,children:[t,n&&Object(qe.jsx)(cn,{size:16,"aria-label":"close",onClick:n,children:Object(qe.jsx)(si,{})})]})},rx=Object(r.memo)((function(e){var t=e.title,n=void 0===t?"Confirm action":t,a=e.errorMessage,i=void 0===a?"This action requires confirmation":a,o=e.open,s=e.toBeConfirmed,d=e.saveButtonAlwaysEnabled,u=void 0!==d&&d,m=e.message,h=e.confirmationMessage,b=void 0===h?"Write '".concat(s,"' to confirm this action"):h,p=e.onConfirmed,j=e.onDissmised,f=e.initialValue,g=void 0===f?"":f,O=e.disabled,x=void 0!==O&&O,v=Object(Ue.a)(e,["title","errorMessage","open","toBeConfirmed","saveButtonAlwaysEnabled","message","confirmationMessage","onConfirmed","onDissmised","initialValue","disabled"]),y=tx(),w=Object(r.useState)(g),C=Object(c.a)(w,2),k=C[0],S=C[1],N=Object(r.useState)(!1),E=Object(c.a)(N,2),I=E[0],L=E[1],F=!u&&s!==k||""===k;return Object(qe.jsxs)(aa.a,Object(l.a)(Object(l.a)({open:o,"aria-labelledby":"form-dialog-title"},v),{},{children:[Object(qe.jsx)(nx,{id:"customized-dialog-title",onClose:function(){S(""),L(!1),j()},children:Object(qe.jsx)(at,{children:n})}),i&&Object(qe.jsx)(nx,{children:Object(qe.jsx)(gt,{children:i.split(":").map((function(e){return Object(qe.jsxs)(qe.Fragment,{children:[e,Object(qe.jsx)("br",{})]})}))})}),Object(qe.jsxs)(ia.a,{className:y.dialogContent,children:[m&&Object(qe.jsx)(ot,{children:m}),Object(qe.jsx)(Ca,{disabled:x,label:b,name:"confirm-input",autoFocus:!0,id:"confirm-input",type:"text",size:"sm",fullWidth:!0,value:k,touched:{},error:I,InputLabelProps:{shrink:!0},onChange:function(e){return S(e.target.value)}})]}),Object(qe.jsx)(kc.a,{className:y.dialogActions,children:Object(qe.jsx)(zt,{color:"green",disabled:F,onClick:function(){return p(k)},children:"Confirm"})})]}))}));function ax(){return(ax=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ix(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ox=r.createElement("desc",null,"Created with Sketch."),cx=r.createElement("g",{id:"icon/button/reboot/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-3",stroke:"#FFFFFF"},r.createElement("g",{id:"Group-2"},r.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),r.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"})),r.createElement("line",{x1:5.92223784,y1:7.57277922,x2:5.92223784,y2:3.98212987,id:"Stroke-9"}),r.createElement("g",{id:"Group-2",transform:"translate(9.818105, 6.000000) scale(-1, -1) translate(-9.818105, -6.000000) translate(7.636287, 0.000000)"},r.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),r.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"}))));function lx(e,t){var n=e.title,a=e.titleId,i=ix(e,["title","titleId"]);return r.createElement("svg",ax({width:"12px",height:"12px",viewBox:"-0.493 -0.5 12.993 13",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,ox,cx)}var sx=r.forwardRef(lx);n.p;function dx(){return(dx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ux(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var mx=r.createElement("desc",null,"Created with Sketch."),hx=r.createElement("g",{id:"icon/button/reboot/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-3",stroke:"#1B2559"},r.createElement("g",{id:"Group-2"},r.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),r.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"})),r.createElement("line",{x1:5.92223784,y1:7.57277922,x2:5.92223784,y2:3.98212987,id:"Stroke-9"}),r.createElement("g",{id:"Group-2",transform:"translate(9.818105, 6.000000) scale(-1, -1) translate(-9.818105, -6.000000) translate(7.636287, 0.000000)"},r.createElement("path",{d:"M3.57419317,11.1560104 C2.91506589,10.8661403 2.29620875,10.4522182 1.75493083,9.91362078 C-0.568892549,7.60089351 -0.587250991,3.86936104 1.71406849,1.57845195 C2.03057585,1.26367293 2.37407977,0.992496226 2.73740775,0.764921841",id:"Stroke-1"}),r.createElement("polyline",{id:"Stroke-3",points:"3.37563213 1.84831169 3.36911784 0.595324675 2.18174122 4.15223411e-14"}))));function bx(e,t){var n=e.title,a=e.titleId,i=ux(e,["title","titleId"]);return r.createElement("svg",dx({width:"12px",height:"12px",viewBox:"-0.493 -0.5 12.993 13",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,mx,hx)}var px=r.forwardRef(bx);n.p;function jx(){return(jx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fx(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gx=r.createElement("desc",null,"Created with Sketch."),Ox=r.createElement("g",{id:"icon/button/shut-down/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",transform:"translate(1.000000, 0.000000)",stroke:"#FFFFFF"},r.createElement("path",{d:"M7.7735,2 C9.116,2.89710351 10,4.4271328 10,6.16330077 C10,8.92665975 7.7615,11.1666667 5,11.1666667 C2.2385,11.1666667 0,8.92665975 0,6.16330077 C0,4.43663919 0.8745,2.91361461 2.204,2.01450976",id:"Stroke-1"}),r.createElement("line",{x1:5,y1:.75,x2:5,y2:3.25,id:"Stroke-3"})));function xx(e,t){var n=e.title,a=e.titleId,i=fx(e,["title","titleId"]);return r.createElement("svg",jx({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,gx,Ox)}var vx=r.forwardRef(xx);n.p;function yx(){return(yx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wx(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Cx=r.createElement("desc",null,"Created with Sketch."),kx=r.createElement("g",{id:"icon/button/shut-down/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-5",transform:"translate(1.000000, 0.000000)",stroke:"#1B2559"},r.createElement("path",{d:"M7.7735,2 C9.116,2.89710351 10,4.4271328 10,6.16330077 C10,8.92665975 7.7615,11.1666667 5,11.1666667 C2.2385,11.1666667 0,8.92665975 0,6.16330077 C0,4.43663919 0.8745,2.91361461 2.204,2.01450976",id:"Stroke-1"}),r.createElement("line",{x1:5,y1:.75,x2:5,y2:3.25,id:"Stroke-3"})));function Sx(e,t){var n=e.title,a=e.titleId,i=wx(e,["title","titleId"]);return r.createElement("svg",yx({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Cx,kx)}var Nx=r.forwardRef(Sx);n.p;function Ex(){return(Ex=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ix(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Lx=r.createElement("desc",null,"Created with Sketch."),Fx=r.createElement("g",{id:"icon/button/unpair/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-12",stroke:"#FFFFFF"},r.createElement("g",{id:"Group-5"},r.createElement("polyline",{id:"Stroke-1",points:"3.75 6 2.25 6 0 3.75 3.75 0 6.75 3"}),r.createElement("polyline",{id:"Stroke-3",points:"8.25 6 9.75 6 12 8.25 8.25 12 5.25 9"})),r.createElement("line",{x1:8.25,y1:3,x2:8.25,y2:1.5,id:"Stroke-6"}),r.createElement("line",{x1:9.75,y1:3,x2:10.5,y2:2.25,id:"Stroke-7"}),r.createElement("line",{x1:9.75,y1:4.5,x2:11.25,y2:4.5,id:"Stroke-8"}),r.createElement("line",{x1:2.25,y1:7.5,x2:.75,y2:7.5,id:"Stroke-9"}),r.createElement("line",{x1:2.25,y1:9,x2:1.5,y2:9.75,id:"Stroke-10"}),r.createElement("line",{x1:3.75,y1:9,x2:3.75,y2:10.5,id:"Stroke-11"})));function Px(e,t){var n=e.title,a=e.titleId,i=Ix(e,["title","titleId"]);return r.createElement("svg",Ex({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Lx,Fx)}var Bx=r.forwardRef(Px);n.p;function Dx(){return(Dx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rx(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Tx=r.createElement("desc",null,"Created with Sketch."),Ax=r.createElement("g",{id:"icon/button/unpair/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("g",{id:"Group-12",stroke:"#1B2559"},r.createElement("g",{id:"Group-5"},r.createElement("polyline",{id:"Stroke-1",points:"3.75 6 2.25 6 0 3.75 3.75 0 6.75 3"}),r.createElement("polyline",{id:"Stroke-3",points:"8.25 6 9.75 6 12 8.25 8.25 12 5.25 9"})),r.createElement("line",{x1:8.25,y1:3,x2:8.25,y2:1.5,id:"Stroke-6"}),r.createElement("line",{x1:9.75,y1:3,x2:10.5,y2:2.25,id:"Stroke-7"}),r.createElement("line",{x1:9.75,y1:4.5,x2:11.25,y2:4.5,id:"Stroke-8"}),r.createElement("line",{x1:2.25,y1:7.5,x2:.75,y2:7.5,id:"Stroke-9"}),r.createElement("line",{x1:2.25,y1:9,x2:1.5,y2:9.75,id:"Stroke-10"}),r.createElement("line",{x1:3.75,y1:9,x2:3.75,y2:10.5,id:"Stroke-11"})));function Wx(e,t){var n=e.title,a=e.titleId,i=Rx(e,["title","titleId"]);return r.createElement("svg",Dx({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Tx,Ax)}var zx,Mx=r.forwardRef(Wx),Hx=(n.p,Object(b.a)(QO)),qx=er()(zx||(zx=Object(Kn.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $newName: String\n ) {\n machineAction(deviceId: $deviceId, action: $action, newName: $newName) {\n deviceId\n }\n }\n"]))),$x=function(e){if(!e)return null;var t=ib()().diff(e,"seconds");if(t<60)return"".concat(t," ").concat(1===t?"second":"seconds"," ago");if(t<3600){var n=Math.round(t/60);return"".concat(n," ").concat(1===n?"minute":"minutes"," ago")}if(t<86400){var r=Math.round(t/3600);return"".concat(r," ").concat(1===r?"hour":"hours"," ago")}var a=Math.round(t/3600/24);return"".concat(a," ").concat(1===a?"day":"days"," ago")},Vx=function(e){var t=e.data,n=e.onActionSuccess,a=Object(r.useState)(""),i=Object(c.a)(a,2),o=i[0],l=i[1],s=Object(r.useState)(!1),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(r.useState)(null),b=Object(c.a)(h,2),p=b[0],j=b[1],f=Hx(),g=Object(Qn.b)(qx,{onError:function(e){var t=e.message;j(null!==t&&void 0!==t?t:"An error ocurred")},onCompleted:function(){n&&n(),m(!1)}}),O=Object(c.a)(g,1)[0],x=function(e){return l(e)||m(!0)};return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:f.row,children:Object(qe.jsx)("div",{className:f.rowItem,children:Object(qe.jsx)(rt,{children:t.name})})}),Object(qe.jsx)("div",{className:f.row,children:Object(qe.jsxs)("div",{className:f.rowItem,children:[Object(qe.jsx)(bt,{className:f.label3,children:"Status"}),t&&t.statuses?Object(qe.jsx)(wm,{status:t.statuses[0]}):null]})}),Object(qe.jsx)("div",{className:f.row,children:Object(qe.jsxs)("div",{className:f.rowItem,children:[Object(qe.jsx)(bt,{className:f.label3,children:"Last ping"}),Object(qe.jsx)(ot,{children:$x(t.lastPing)})]})}),Object(qe.jsx)("div",{className:f.row,children:Object(qe.jsxs)("div",{className:f.rowItem,children:[" ",Object(qe.jsx)(bt,{className:f.label3,children:"Actions"}),t.name&&Object(qe.jsxs)("div",{className:f.actionButtonsContainer,children:[Object(qe.jsx)(Ct,{color:"primary",className:f.actionButton,Icon:Mx,InverseIcon:Bx,onClick:function(){return x("Unpair")},children:"Unpair"}),Object(qe.jsx)(Ct,{color:"primary",className:f.actionButton,Icon:px,InverseIcon:sx,onClick:function(){return x("Reboot")},children:"Reboot"}),Object(qe.jsx)(Ct,{className:f.actionButton,color:"primary",Icon:Nx,InverseIcon:vx,onClick:function(){return x("Shutdown")},children:"Shutdown"})]})]})}),Object(qe.jsx)(rx,{open:u,title:"".concat(o," this machine?"),errorMessage:p,toBeConfirmed:t.name,onConfirmed:function(){j(null),O({variables:{deviceId:t.deviceId,action:"".concat(o).toLowerCase()}})},onDissmised:function(){m(!1),j(null)}})]})},Yx=n(686),Xx=n(717);function Ux(){return(Ux=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gx(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Zx=r.createElement("desc",null,"Created with Sketch."),_x=r.createElement("g",{id:"icon/ID/card/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("polygon",{id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:1.6,points:"0 16 22 16 22 0 0 0"}),r.createElement("line",{x1:11.7857143,y1:4,x2:18.8571429,y2:4,id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:1.6}),r.createElement("line",{x1:11.7857143,y1:7.2,x2:18.8571429,y2:7.2,id:"Stroke-4",stroke:"#FFFFFF",strokeWidth:1.6}),r.createElement("polygon",{id:"Stroke-5",stroke:"#FFFFFF",strokeWidth:1.6,points:"3.14285714 11.2 8.64285714 11.2 8.64285714 4 3.14285714 4"}));function Kx(e,t){var n=e.title,a=e.titleId,i=Gx(e,["title","titleId"]);return r.createElement("svg",Ux({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Zx,_x)}var Qx=r.forwardRef(Kx);n.p;function Jx(){return(Jx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ev(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var tv=r.createElement("desc",null,"Created with Sketch."),nv=r.createElement("g",{id:"icon/ID/phone/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M6.47150618,12.52898 C9.939556,15.9970298 13.7804112,16.1146315 15.4756355,15.9586292 C16.0220434,15.9090285 16.5308507,15.6578249 16.9188563,15.2698193 L19.0004862,13.1881894 L17.0220577,11.210561 L15.0436293,10.5505516 L13.7244104,11.8697705 C13.7244104,11.8697705 12.4059914,13.1881894 9.10914407,9.89054208 C5.81229671,6.59449473 7.13071565,5.27527578 7.13071565,5.27527578 L8.4499346,3.95605683 L7.78992512,1.97842842 L5.81229671,0 L3.73066681,2.0816299 C3.34186123,2.46963548 3.09145763,2.97844279 3.04105691,3.52485063 C2.88585468,5.22007499 3.00345637,9.06013015 6.47150618,12.52898 Z",id:"Stroke-1-Copy",stroke:"#FFFFFF",strokeWidth:1.6}));function rv(e,t){var n=e.title,a=e.titleId,i=ev(e,["title","titleId"]);return r.createElement("svg",Jx({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,tv,nv)}var av=r.forwardRef(rv);n.p;function iv(){return(iv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ov(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var cv=r.createElement("desc",null,"Created with Sketch."),lv=r.createElement("g",{id:"icon/ID/phone/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M6.47150618,12.52898 C9.939556,15.9970298 13.7804112,16.1146315 15.4756355,15.9586292 C16.0220434,15.9090285 16.5308507,15.6578249 16.9188563,15.2698193 L19.0004862,13.1881894 L17.0220577,11.210561 L15.0436293,10.5505516 L13.7244104,11.8697705 C13.7244104,11.8697705 12.4059914,13.1881894 9.10914407,9.89054208 C5.81229671,6.59449473 7.13071565,5.27527578 7.13071565,5.27527578 L8.4499346,3.95605683 L7.78992512,1.97842842 L5.81229671,0 L3.73066681,2.0816299 C3.34186123,2.46963548 3.09145763,2.97844279 3.04105691,3.52485063 C2.88585468,5.22007499 3.00345637,9.06013015 6.47150618,12.52898 Z",id:"Stroke-1-Copy",stroke:"#1B2559",strokeWidth:1.6}));function sv(e,t){var n=e.title,a=e.titleId,i=ov(e,["title","titleId"]);return r.createElement("svg",iv({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,cv,lv)}var dv=r.forwardRef(sv);n.p;function uv(){return(uv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function mv(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var hv=r.createElement("desc",null,"Created with Sketch."),bv=r.createElement("g",{id:"icon/ID/photo/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11,13 C8.7912,13 7,11.2088 7,9 C7,6.7912 8.7912,5 11,5 C13.2088,5 15,6.7912 15,9 C15,11.2088 13.2088,13 11,13 Z M15.7142857,2.4 L13.3571429,0 L8.64285714,0 L6.28571429,2.4 L0,2.4 L0,16 L22,16 L22,2.4 L15.7142857,2.4 Z",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:1.6}));function pv(e,t){var n=e.title,a=e.titleId,i=mv(e,["title","titleId"]);return r.createElement("svg",uv({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,hv,bv)}var jv=r.forwardRef(pv);n.p;function fv(){return(fv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gv(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Ov=r.createElement("desc",null,"Created with Sketch."),xv=r.createElement("g",{id:"icon/ID/photo/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11,13 C8.7912,13 7,11.2088 7,9 C7,6.7912 8.7912,5 11,5 C13.2088,5 15,6.7912 15,9 C15,11.2088 13.2088,13 11,13 Z M15.7142857,2.4 L13.3571429,0 L8.64285714,0 L6.28571429,2.4 L0,2.4 L0,16 L22,16 L22,2.4 L15.7142857,2.4 Z",id:"Stroke-1",stroke:"#1B2559",strokeWidth:1.6}));function vv(e,t){var n=e.title,a=e.titleId,i=gv(e,["title","titleId"]);return r.createElement("svg",fv({width:"22px",height:"16px",viewBox:"0 0 22 16",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Ov,xv)}var yv,wv,Cv,kv,Sv=r.forwardRef(vv),Nv=(n.p,{wrapper:{display:"flex",flexDirection:"column",marginTop:24},row:{display:"flex",flexDirection:"row",marginBottom:36},secondRow:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:36},lastRow:{display:"flex",flexDirection:"row",marginBottom:32},label:{color:se,margin:[[0,0,6,0]]},txIcon:{marginRight:10},clipboardPopover:{height:164,width:215},idButton:{marginRight:4},idCardDataCard:{extend:Re.p,display:"flex",padding:[[11,8]],"& > div":{display:"flex",flexDirection:"column","& > div":{width:144,height:37,marginBottom:15,"&:last-child":{marginBottom:0}}}},bold:{fontWeight:700},direction:{width:233},availableIds:{width:232},exchangeRate:{width:250},commission:{width:217},address:{width:280},transactionId:{width:280},sessionId:{width:215},container:{display:"flex"},chip:{display:"flex",alignItems:"center",padding:"4px 8px 4px 8px",backgroundColor:q,color:_,height:24,marginBottom:-24,marginTop:-3,marginLeft:7,borderRadius:4},chipLabel:{color:_}}),Ev=function(e){return"cashOut"===e.txClass?function(e){return e.hasError?"Error":e.dispense?"Success":e.expired?"Expired":"Pending"}(e):function(e){return e.operatorCompleted?"Cancelled":e.hasError?"Error":e.sendConfirmed?"Sent":e.expired?"Expired":"Pending"}(e)},Iv=function(e){return e.hasError?e.hasError:null},Lv=Object(b.a)(Nv),Fv=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return mb(e,t).replace(/(.{5})/g,"$1 ")},Pv=function(e){var t=e.children,n=Lv();return Object(qe.jsx)(mt,{className:n.label,children:t})},Bv=function(e){var t=e.it,n=Lv(),r=Number.parseFloat(t.fiat),a=ub(new sb.a(t.cryptoAtoms),t.cryptoCode),i=Number.parseFloat(t.commissionPercentage,2),o=Number(r*i).toFixed(2),c=t.discount?"-".concat(t.discount,"%"):null,l=sb()(r/a).toFormat(2),s="1 ".concat(t.cryptoCode," = ").concat(l," ").concat(t.fiatCode),d=t.customerIdCardData&&{name:"".concat(Ls(t.customerIdCardData.firstName)," ").concat(Ls(t.customerIdCardData.lastName)),age:ib()().diff(ib()(t.customerIdCardData.dateOfBirth),"years"),country:t.customerIdCardData.country,idCardNumber:t.customerIdCardData.documentNumber,idCardExpirationDate:ib()(t.customerIdCardData.expirationDate).format("DD-MM-YYYY")},u=Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Pv,{children:"Transaction status"}),Object(qe.jsx)("span",{className:n.bold,children:Ev(t)})]});return Object(qe.jsxs)("div",{className:n.wrapper,children:[Object(qe.jsxs)("div",{className:n.row,children:[Object(qe.jsxs)("div",{className:n.direction,children:[Object(qe.jsx)(Pv,{children:"Direction"}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)("span",{className:n.txIcon,children:"cashOut"===t.txClass?Object(qe.jsx)(fd,{}):Object(qe.jsx)(Bu,{})}),Object(qe.jsx)("span",{children:"cashOut"===t.txClass?"Cash-out":"Cash-in"})]})]}),Object(qe.jsxs)("div",{className:n.availableIds,children:[Object(qe.jsx)(Pv,{children:"Available IDs"}),Object(qe.jsxs)(Xe.a,{display:"flex",flexDirection:"row",children:[t.customerPhone&&Object(qe.jsx)(nn,{className:n.idButton,name:"phone",Icon:dv,InverseIcon:av,children:t.customerPhone}),t.customerIdCardPhotoPath&&!t.customerIdCardData&&Object(qe.jsx)(nn,{popoverClassname:n.clipboardPopover,className:n.idButton,name:"card",Icon:Wh,InverseIcon:Qx,children:Object(qe.jsx)("img",{className:n.idCardPhoto,src:"".concat(Zn,"/id-card-photo/").concat(t.customerIdCardPhotoPath),alt:""})}),t.customerIdCardData&&Object(qe.jsx)(nn,{className:n.idButton,name:"card",Icon:Wh,InverseIcon:Qx,children:Object(qe.jsxs)("div",{className:n.idCardDataCard,children:[Object(qe.jsxs)("div",{children:[Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"Name"}),Object(qe.jsx)("div",{children:d.name})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"Age"}),Object(qe.jsx)("div",{children:d.age})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"Country"}),Object(qe.jsx)("div",{children:d.country})]})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"ID number"}),Object(qe.jsx)("div",{children:d.idCardNumber})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"Expiration date"}),Object(qe.jsx)("div",{children:d.idCardExpirationDate})]})]})]})}),t.customerFrontCameraPath&&Object(qe.jsx)(nn,{name:"cam",Icon:Sv,InverseIcon:jv,children:Object(qe.jsx)("img",{src:"".concat(Zn,"/front-camera-photo/").concat(t.customerFrontCameraPath),alt:""})})]})]}),Object(qe.jsxs)("div",{className:n.exchangeRate,children:[Object(qe.jsx)(Pv,{children:"Exchange rate"}),Object(qe.jsx)("div",{children:a>0?s:"-"})]}),Object(qe.jsxs)("div",{className:n.commission,children:[Object(qe.jsx)(Pv,{children:"Commission"}),Object(qe.jsxs)("div",{className:n.container,children:["".concat(o," ").concat(t.fiatCode," (").concat(100*i," %)"),c&&Object(qe.jsx)("div",{className:n.chip,children:Object(qe.jsx)(mt,{className:n.chipLabel,children:c})})]})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Pv,{children:"Fixed fee"}),Object(qe.jsx)("div",{children:"cashIn"===t.txClass?"".concat(Number.parseFloat(t.cashInFee)," ").concat(t.fiatCode):"N/A"})]})]}),Object(qe.jsxs)("div",{className:n.secondRow,children:[Object(qe.jsxs)("div",{className:n.address,children:[Object(qe.jsx)(Pv,{children:"Address"}),Object(qe.jsx)("div",{children:Object(qe.jsx)($l,{children:Fv(t.cryptoCode,t.toAddress)})})]}),Object(qe.jsxs)("div",{className:n.transactionId,children:[Object(qe.jsx)(Pv,{children:"Transaction ID"}),Object(qe.jsx)("div",{children:"cashOut"===t.txClass?"N/A":Object(qe.jsx)($l,{children:t.txHash})})]}),Object(qe.jsxs)("div",{className:n.sessionId,children:[Object(qe.jsx)(Pv,{children:"Session ID"}),Object(qe.jsx)($l,{children:t.id})]})]}),Object(qe.jsx)("div",{className:n.lastRow,children:Object(qe.jsx)("div",{children:Iv(t)?Object(qe.jsx)(Wo,{parentElements:u,width:200,children:Object(qe.jsx)(ot,{children:Iv(t)})}):u})})]})},Dv=Object(r.memo)(Bv,(function(e,t){return e.id===t.id})),Rv=Object(b.a)(Cl),Tv=function(e){var t,n=e.id,r=e.elements,a=e.data,i=e.width,o=e.Details,c=e.expanded,s=e.expandRow,d=e.expWidth,u=e.expandable,m=e.onClick,h=Rv(),b=m||u,p=(t={},Object(v.a)(t,h.pointer,b),Object(v.a)(t,h.row,!0),Object(v.a)(t,h.expanded,c),t);return Object(qe.jsxs)("div",{className:h.rowWrapper,children:[Object(qe.jsx)("div",{className:w()(Object(v.a)({},h.before,c&&0!==n)),children:Object(qe.jsxs)(Vc,{className:w()(p),onClick:function(){u&&s(n),m&&m(a)},error:a.error,errorMessage:a.errorMessage,children:[r.map((function(e,t){var n=e.view,r=void 0===n?function(e){return null===e||void 0===e?void 0:e.toString()}:n,i=Object(Ue.a)(e,["view"]);return Object(qe.jsx)(Hc,Object(l.a)(Object(l.a)({},i),{},{children:r(a)}),t)})),u&&Object(qe.jsx)(Hc,{width:d,textAlign:"center",children:Object(qe.jsxs)("button",{onClick:function(){return s(n)},className:h.expandButton,children:[c&&Object(qe.jsx)(wl,{}),!c&&Object(qe.jsx)(fl,{})]})})]})}),u&&c&&Object(qe.jsx)("div",{className:h.after,children:Object(qe.jsx)(Vc,{className:w()(Object(v.a)({},h.expanded,c)),children:Object(qe.jsx)(Hc,{width:i,children:Object(qe.jsx)(o,{it:a})})})})]})},Av=function(e){var t=e.elements,n=void 0===t?[]:t,a=e.data,i=void 0===a?[]:a,o=e.Details,s=(e.className,e.expandable),d=e.initialExpanded,u=e.onClick,m=e.loading,h=e.emptyText,b=e.extraHeight,p=Object(Ue.a)(e,["elements","data","Details","className","expandable","initialExpanded","onClick","loading","emptyText","extraHeight"]),j=Object(r.useState)(d),f=Object(c.a)(j,2),g=f[0],O=f[1];Object(r.useEffect)((function(){return O(d)}),[d]);var x=tr.a(Ic.a,ar.a(ir.a("width")))(n),v=850-x,y=x+(s?v:0),w=Rv({width:y}),C=function(e){O(e===g?null:e)},k=new Lc.c({defaultHeight:62,fixedWidth:!0});function S(e){var t=e.index,r=e.key,a=e.parent,c=e.style;return Object(qe.jsx)(Lc.b,{cache:k,columnIndex:0,parent:a,rowIndex:t,children:Object(qe.jsx)("div",{style:c,children:Object(qe.jsx)(Tv,{width:y,id:t,expWidth:v,elements:n,data:i[t],Details:o,expanded:t===g,expandRow:C,expandable:s,onClick:u})})},r)}return Object(qe.jsx)(Xe.a,{display:"flex",flex:"1",flexDirection:"column",children:Object(qe.jsxs)(Ac,{className:w.table,children:[Object(qe.jsxs)(Wc,{children:[n.map((function(e,t){var n=e.width,r=e.className,a=e.textAlign,i=e.header;return Object(qe.jsx)(qc,{width:n,className:r,textAlign:a,children:i},t)})),s&&Object(qe.jsx)(qc,{width:v})]}),Object(qe.jsxs)(Mc,{className:w.body,children:[m&&Object(qe.jsx)(at,{children:"Loading..."}),!m&&ga.a(i)&&Object(qe.jsx)(at,{children:h}),Object(qe.jsx)(Lc.a,{disableWidth:!0,disableHeight:!0,children:function(){return Object(qe.jsx)(Lc.d,Object(l.a)(Object(l.a)({style:{overflowX:"inherit",outline:"none"}},p),{},{height:62*i.length+b,width:y,rowCount:i.length,rowHeight:k.rowHeight,rowRenderer:S,overscanRowCount:50,deferredMeasurementCache:k}))}})]})]})})},Wv=Object(b.a)(Hl),zv=er()(yv||(yv=Object(Kn.a)(["\n query transactions($limit: Int, $from: Date, $until: Date, $deviceId: ID) {\n transactions(\n limit: $limit\n from: $from\n until: $until\n deviceId: $deviceId\n ) {\n id\n txClass\n txHash\n toAddress\n commissionPercentage\n expired\n machineName\n operatorCompleted\n sendConfirmed\n dispense\n hasError: error\n deviceId\n fiat\n cashInFee\n fiatCode\n cryptoAtoms\n cryptoCode\n toAddress\n created\n customerName\n customerIdCardData\n customerIdCardPhotoPath\n customerFrontCameraPath\n customerPhone\n discount\n customerId\n isAnonymous\n }\n }\n"]))),Mv=function(e){var t=e.id,n=Wv(),a=Object(r.useState)(0),i=Object(c.a)(a,2),o=i[0],l=i[1],s=Object(r.useState)(""),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(Qn.a)(zv,{variables:{limit:5,deviceId:t}}),b=Object(c.a)(h,2),p=b[0],j=b[1],f=j.data,g=j.loading;!g&&f&&(f.transactions=f.transactions.splice(0,5)),Object(r.useEffect)((function(){null!==t&&p()}),[p,t]);var O=[{header:"",width:0,size:"sm",view:function(e){return"cashOut"===e.txClass?Object(qe.jsx)(fd,{}):Object(qe.jsx)(Bu,{})}},{header:"Customer",width:122,size:"sm",view:function(e){return e.customerName?e.customerName:e.customerIdCardData?function(e){var t=e.firstName,n=e.lastName;return"".concat(Yx.a(vg.a,Xx.a)(t),". ").concat(n)}(e.customerIdCardData):e.customerPhone}},{header:"Cash",width:144,textAlign:"right",size:"sm",view:function(e){return"".concat(Number.parseFloat(e.fiat)," ").concat(e.fiatCode)}},{header:"Crypto",width:164,textAlign:"right",size:"sm",view:function(e){return"".concat(ub(new sb.a(e.cryptoAtoms),e.cryptoCode).toFormat(5)," ").concat(e.cryptoCode)}},{header:"Address",view:function(e){return mb(e.cryptoCode,e.toAddress)},className:n.overflowTd,size:"sm",textAlign:"left",width:140},{header:"Date (UTC)",view:function(e){return ib.a.utc(e.created).format("YYYY-MM-DD")},textAlign:"left",size:"sm",width:140},{header:"Status",view:function(e){return Ev(e)},size:"sm",width:20}];return Object(qe.jsx)(Av,{extraHeight:o,onClick:function(e){u===e.id?(m(""),l(0)):(m(e.id),l(310))},loading:g||null===t,emptyText:"No transactions so far",elements:O,data:cr.a(["transactions"])(f),Details:Dv,expandable:!0})},Hv=Object(b.a)(QO),qv=tr.a(ja.a,sr.a("name")),$v=er()(wv||(wv=Object(Kn.a)(["\n query getInfo {\n machines {\n name\n deviceId\n paired\n lastPing\n pairedAt\n version\n model\n cashbox\n cassette1\n cassette2\n statuses {\n label\n type\n }\n }\n config\n }\n"]))),Vv=cr.a(["machines"]),Yv=function(){var e,t,n,r,a,i,o,c=Object(Qn.c)($v),l=c.data,s=c.refetch,d=Object(O.i)(),m=Hv(),h=null!==(e=null!==(t=cr.a(["state","selectedMachine"])(d))&&void 0!==t?t:cr.a(["machines",0,"name"])(l))&&void 0!==e?e:"",b=null!==(n=Vv(l))&&void 0!==n?n:[],p=null!==(r=qv(h)(b))&&void 0!==r?r:{};return Object(qe.jsxs)(u.a,{container:!0,className:m.grid,children:[Object(qe.jsxs)(u.a,{item:!0,xs:3,children:[Object(qe.jsx)(u.a,{item:!0,xs:12,children:Object(qe.jsxs)("div",{className:m.breadcrumbsContainer,children:[Object(qe.jsxs)(pm.a,{separator:Object(qe.jsx)(fm.a,{fontSize:"small"}),children:[Object(qe.jsx)(x.b,{to:"/dashboard",className:m.breadcrumbLink,children:Object(qe.jsx)(bt,{noMargin:!0,className:m.subtitle,children:"Dashboard"})}),Object(qe.jsx)(ut,{noMargin:!0,className:m.subtitle,children:h})]}),Object(qe.jsx)(Vx,{data:p,onActionSuccess:s})]})}),Object(qe.jsx)(u.a,{item:!0,xs:12})]}),Object(qe.jsx)(u.a,{item:!0,xs:9,children:Object(qe.jsxs)("div",{className:m.content,children:[Object(qe.jsxs)("div",{className:w()(m.detailItem,m.detailsMargin),children:[Object(qe.jsx)(dt,{className:m.subtitle,children:"Details"}),Object(qe.jsx)(ex,{data:p})]}),Object(qe.jsxs)("div",{className:m.detailItem,children:[Object(qe.jsx)(dt,{className:m.subtitle,children:"Cash cassettes"}),Object(qe.jsx)($O,{refetchData:s,machine:p,config:null!==(a=null===l||void 0===l?void 0:l.config)&&void 0!==a&&a})]}),Object(qe.jsxs)("div",{className:m.transactionsItem,children:[Object(qe.jsx)(dt,{className:m.subtitle,children:"Latest transactions"}),Object(qe.jsx)(Mv,{id:null!==(i=null===p||void 0===p?void 0:p.deviceId)&&void 0!==i?i:null})]}),Object(qe.jsxs)("div",{className:m.detailItem,children:[Object(qe.jsx)(dt,{className:m.subtitle,children:"Commissions"}),Object(qe.jsx)(KO,{name:"commissions",id:null!==(o=null===p||void 0===p?void 0:p.deviceId)&&void 0!==o?o:null})]})]})})]})},Xv={footerLabel:{color:q,alignSelf:"center"},footerContent:{width:1200,maxHeight:64,display:"flex",justifyContent:"space-around",position:"fixed"},footerContainer:{position:"fixed",height:64,left:0,bottom:0,width:"100vw",backgroundColor:"white",display:"flex",justifyContent:"space-around",boxShadow:[[0,-1,10,0,"rgba(50, 50, 50, 0.1)"]]},flex:{display:"flex",marginLeft:-640},icon:{alignSelf:"center",height:20,width:20,marginRight:8},iconLabel:{alignSelf:"center",marginRight:8},valueDisplay:{alignSelf:"center"}},Uv=Object(b.a)(Xv),Gv=function(e){var t=e.machines,n=e.config,r=e.currencyCode,a=(e.bills,e.deviceIds,Uv()),i=n&&pc("cashOut")(n),o=function(e){return pc(e)(i)},c=Ic.a(ms.a((function(e,t){var n,r,a=t.cassette1,i=t.cassette2,c=t.id,l=null!==(n=o(c).top)&&void 0!==n?n:0,s=null!==(r=o(c).bottom)&&void 0!==r?r:0;return[e[0]+=a*l,e[1]+=i*s]}),[0,0],t));return Object(qe.jsx)("div",{className:a.footerContainer,children:Object(qe.jsxs)("div",{className:a.footerContent,children:[Object(qe.jsx)(st,{className:a.footerLabel,children:"Cash value in System"}),Object(qe.jsxs)("div",{className:a.flex,children:[Object(qe.jsx)(fd,{className:a.icon}),Object(qe.jsx)(lt,{className:a.iconLabel,children:"Cash-out:"}),Object(qe.jsxs)(ct,{className:a.valueDisplay,children:[c," ",r]})]})]})})},Zv=Object(b.a)({cashbox:{width:80,height:36},tableContainer:{flex:1,marginBottom:100},tBody:{maxHeight:"65vh",overflow:"auto"}}),_v=ma.d().shape({name:ma.e().required(),cashbox:ma.c().label("Cashbox").required().integer().min(0).max(1e3),cassette1:ma.c().label("Cassette 1 (top)").required().integer().min(0).max(500),cassette2:ma.c().label("Cassette 2 (bottom)").required().integer().min(0).max(500)}),Kv=er()(Cv||(Cv=Object(Kn.a)(["\n query getData {\n machines {\n name\n id: deviceId\n cashbox\n cassette1\n cassette2\n }\n config\n }\n"]))),Qv=er()(kv||(kv=Object(Kn.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $cashbox: Int!\n $cassette1: Int!\n $cassette2: Int!\n ) {\n machineAction(\n deviceId: $deviceId\n action: $action\n cashbox: $cashbox\n cassette1: $cassette1\n cassette2: $cassette2\n ) {\n deviceId\n cashbox\n cassette1\n cassette2\n }\n }\n"]))),Jv=function(){var e,t,n,r,a=Zv(),i=Object(Qn.c)(Kv).data,o=null!==(e=cr.a(["machines"])(i))&&void 0!==e?e:[],l=null!==(t=cr.a(["config"])(i))&&void 0!==t?t:{},s=Object(Qn.b)(Qv,{refetchQueries:function(){return["getData"]}}),d=Object(c.a)(s,2),u=d[0],m=d[1].error,h=Eo.a((function(e){return e.deviceId}))(null!==(n=cr.a(["bills"])(i))&&void 0!==n?n:[]),b=wu.a(ar.a(ir.a("deviceId"))(null!==(r=cr.a(["bills"])(i))&&void 0!==r?r:[])),p=(null===i||void 0===i?void 0:i.config)&&pc("cashOut")(i.config),j=(null===i||void 0===i?void 0:i.config)&&pc("locale")(i.config),f=null===j||void 0===j?void 0:j.fiatCurrency,g=function(e){return pc(e)(p)},O=[{name:"name",header:"Machine",width:254,view:function(e){return Object(qe.jsx)(qe.Fragment,{children:e})},input:function(e){var t=e.field.value;return Object(qe.jsx)(qe.Fragment,{children:t})}},{name:"cashbox",header:"Cashbox",width:240,view:function(e){return Object(qe.jsx)(Za,{currency:{code:f},notes:e,total:0})},input:Ja,inputProps:{decimalPlaces:0}},{name:"cassette1",header:"Cassette 1 (Top)",width:265,stripe:!0,view:function(e,t){var n,r=t.id;return Object(qe.jsx)(_a,{className:a.cashbox,denomination:null===(n=g(r))||void 0===n?void 0:n.top,currency:{code:f},notes:e})},input:Qa,inputProps:{decimalPlaces:0}},{name:"cassette2",header:"Cassette 2 (Bottom)",width:265,stripe:!0,view:function(e,t){var n,r=t.id;return Object(qe.jsx)(_a,{className:a.cashbox,denomination:null===(n=g(r))||void 0===n?void 0:n.bottom,currency:{code:f},notes:e})},input:Qa,inputProps:{decimalPlaces:0}}];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Cash Cassettes"}),Object(qe.jsxs)("div",{className:a.tableContainer,children:[Object(qe.jsx)(sd,{error:null===m||void 0===m?void 0:m.message,name:"cashboxes",enableEdit:!0,stripeWhen:function(e){var t=e.id;return!g(t).active},elements:O,data:o,save:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[1],a=r.id,i=r.cashbox,o=r.cassette1,c=r.cassette2;return u({variables:{action:"setCassetteBills",deviceId:a,cashbox:i,cassette1:o,cassette2:c}})},validationSchema:_v,tbodyWrapperClass:a.tBody}),i&&ga.a(o)&&Object(qe.jsx)(Qc,{message:"No machines so far"})]}),Object(qe.jsx)(Gv,{currencyCode:f,machines:o,config:l,bills:h,deviceIds:b})]})};function ey(){return(ey=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ty(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ny=r.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#ff7311"});function ry(e,t){var n=e.title,a=e.titleId,i=ty(e,["title","titleId"]);return r.createElement("svg",ey({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,ny)}var ay=r.forwardRef(ry);n.p;function iy(){return(iy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function oy(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var cy=r.createElement("rect",{width:12,height:12,rx:3,ry:3,fill:"#ff584a"});function ly(e,t){var n=e.title,a=e.titleId,i=oy(e,["title","titleId"]);return r.createElement("svg",iy({width:12,height:12,viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,cy)}var sy=r.forwardRef(ly);n.p;function dy(){return(dy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function uy(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var my=r.createElement("desc",null,"Created with Sketch."),hy=r.createElement("g",{id:"icon/button/edit/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1",stroke:"#FFFFFF"}),r.createElement("polygon",{id:"Stroke-3",stroke:"#FFFFFF",points:"3 6.86666667 8.86666667 1 11 3.13333333 5.13333333 9 3 9"}));function by(e,t){var n=e.title,a=e.titleId,i=uy(e,["title","titleId"]);return r.createElement("svg",dy({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,my,hy)}var py=r.forwardRef(by);n.p;function jy(){return(jy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function fy(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gy=r.createElement("desc",null,"Created with Sketch."),Oy=r.createElement("g",{id:"icon/button/edit/zodiac",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M0,10 L0,10 C0,10.9942 0.8058,11.8 1.8,11.8 L10.2,11.8 C11.1942,11.8 12,10.9942 12,10",id:"Stroke-1",stroke:"#1B2559"}),r.createElement("polygon",{id:"Stroke-3",stroke:"#1B2559",points:"3 6.86666667 8.86666667 1 11 3.13333333 5.13333333 9 3 9"}));function xy(e,t){var n=e.title,a=e.titleId,i=fy(e,["title","titleId"]);return r.createElement("svg",jy({width:"12px",height:"12px",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,gy,Oy)}var vy,yy,wy,Cy,ky,Sy,Ny,Ey,Iy,Ly=r.forwardRef(xy),Fy=(n.p,Object(l.a)(Object(l.a)({},zl),{},{colDivider:{width:1,margin:[[16,32]],backgroundColor:q,border:"none"},inlineChip:{marginInlineEnd:"0.25em"},stack:{display:"flex",flexDirection:"row"},wrapper:{display:"flex",marginTop:12,marginBottom:16,fontSize:xe},row:{display:"flex",flexDirection:"row"},list:{padding:0,margin:0,listStyle:"none"},item:{height:24,marginBottom:12},link:{color:J,textDecoration:"none"},divider:{margin:"0 1rem"},mr:{marginRight:8},separator:{width:1,height:170,zIndex:1,marginRight:60,marginLeft:"auto",background:Object(ln.fade)(q,.5)},warning:{color:me}})),Py=er()(vy||(vy=Object(Kn.a)(["\n mutation MachineAction(\n $deviceId: ID!\n $action: MachineAction!\n $newName: String\n ) {\n machineAction(deviceId: $deviceId, action: $action, newName: $newName) {\n deviceId\n }\n }\n"]))),By=er()(yy||(yy=Object(Kn.a)(["\n query getMachine($deviceId: ID!) {\n machine(deviceId: $deviceId) {\n latestEvent {\n note\n }\n }\n }\n"]))),Dy=Object(b.a)(Ml),Ry=function(e){var t=e.children,n=Dy();return Object(qe.jsx)("div",{className:n.label,children:t})},Ty=Object(b.a)(Fy),Ay=function(e){var t=e.children,n=Object(Ue.a)(e,["children"]);return Object(qe.jsx)(u.a,Object(l.a)(Object(l.a)({container:!0,spacing:4},n),{},{children:t}))},Wy=function(e){var t=e.children,n=Object(Ue.a)(e,["children"]);return Object(qe.jsx)(u.a,Object(l.a)(Object(l.a)({item:!0,xs:!0},n),{},{children:t}))},zy=function(e){var t=e.it,n=e.onActionSuccess,a=Object(r.useState)({command:null}),i=Object(c.a)(a,2),o=i[0],s=i[1],d=Object(r.useState)(null),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Ty(),p=Object(qe.jsx)("span",{className:b.warning,children:"A user may be in the middle of a transaction and they could lose their funds if you continue."}),j=Object(Qn.a)(By,{variables:{deviceId:t.deviceId},onCompleted:function(e){var t,n=(t=function(e){var t,n;return JSON.parse(null!==(t=null===(n=e.machine.latestEvent)||void 0===n?void 0:n.note)&&void 0!==t?t:'{"state": null}').state}(e))&&!["chooseCoin","idle","pendingIdle","dualIdle","networkDown","unpaired","maintenance","virgin","wifiList"].includes(t)?p:null;s((function(e){return Object(l.a)(Object(l.a)({},e),{},{message:n})}))}}),f=Object(c.a)(j,2),g=f[0],O=f[1].loading,x=Object(Qn.b)(Py,{onError:function(e){var t=e.message;h(null!==t&&void 0!==t?t:"An error ocurred")},onCompleted:function(){n&&n(),s({command:null})}}),v=Object(c.a)(x,2),y=v[0],w=v[1].loading,C=Boolean(o.command),k=!("restartServices"!==(null===o||void 0===o?void 0:o.command)||!O);return Object(qe.jsxs)(Ay,{className:b.wrapper,children:[Object(qe.jsx)(rx,{disabled:k,open:C,title:"".concat(null===o||void 0===o?void 0:o.display," this machine?"),errorMessage:m,toBeConfirmed:t.name,message:null===o||void 0===o?void 0:o.message,confirmationMessage:null===o||void 0===o?void 0:o.confirmationMessage,saveButtonAlwaysEnabled:"rename"===(null===o||void 0===o?void 0:o.command),onConfirmed:function(e){h(null),y({variables:Object(l.a)({deviceId:t.deviceId,action:"".concat(null===o||void 0===o?void 0:o.command)},"rename"===(null===o||void 0===o?void 0:o.command)&&{newName:e})})},onDissmised:function(){s({command:null}),h(null)}}),Object(qe.jsx)(Wy,{xs:!0,children:Object(qe.jsxs)(Ay,{className:b.row,children:[Object(qe.jsxs)(Wy,{xs:2,children:[Object(qe.jsx)(Ry,{children:"Machine Model"}),Object(qe.jsx)("span",{children:t.model})]}),Object(qe.jsxs)(Wy,{xs:4,children:[Object(qe.jsx)(Ry,{children:"Paired at"}),Object(qe.jsx)("span",{children:ib()(t.pairedAt).format("YYYY-MM-DD HH:mm:ss")})]}),Object(qe.jsxs)(Wy,{xs:6,children:[Object(qe.jsx)(Ry,{children:"Actions"}),Object(qe.jsxs)("div",{className:b.stack,children:[Object(qe.jsx)(Ct,{className:b.mr,disabled:w,color:"primary",Icon:Ly,InverseIcon:py,onClick:function(){return s({command:"rename",display:"Rename",confirmationMessage:"Write the new name for this machine"})},children:"Rename"}),Object(qe.jsx)(Ct,{color:"primary",className:b.mr,Icon:Mx,InverseIcon:Bx,disabled:w,onClick:function(){return s({command:"unpair",display:"Unpair"})},children:"Unpair"}),Object(qe.jsx)(Ct,{color:"primary",className:b.mr,Icon:px,InverseIcon:sx,disabled:w,onClick:function(){return s({command:"reboot",display:"Reboot"})},children:"Reboot"}),Object(qe.jsx)(Ct,{className:b.mr,disabled:w,color:"primary",Icon:Nx,InverseIcon:vx,onClick:function(){return s({command:"shutdown",display:"Shutdown",message:"In order to bring it back online, the machine will need to be visited and its power reset."})},children:"Shutdown"}),Object(qe.jsx)(Ct,{color:"primary",className:b.inlineChip,Icon:px,InverseIcon:sx,disabled:w,onClick:function(){g(),s({command:"restartServices",display:"Restart services for"})},children:"Restart Services"})]})]})]})})]})},My=er()(wy||(wy=Object(Kn.a)(["\n {\n machines {\n name\n deviceId\n lastPing\n pairedAt\n version\n paired\n cashbox\n cassette1\n cassette2\n version\n model\n statuses {\n label\n type\n }\n }\n }\n"]))),Hy=Object(b.a)(Hl),qy=function(){var e,t=Hy(),n=Object(O.i)().state,r=null===n||void 0===n?void 0:n.id,a=Object(Qn.c)(My),i=a.data,o=a.refetch,c=a.loading,l=[{header:"Machine Name",width:250,size:"sm",textAlign:"left",view:function(e){return e.name}},{header:"Status",width:350,size:"sm",textAlign:"left",view:function(e){return Object(qe.jsx)(Cm,{statuses:e.statuses})}},{header:"Last ping",width:200,size:"sm",textAlign:"left",view:function(e){return e.lastPing?ib()(e.lastPing).fromNow():"unknown"}},{header:"Software Version",width:200,size:"sm",textAlign:"left",view:function(e){return e.version||"unknown"}}],s=null!==(e=cr.a(["machines"])(i))&&void 0!==e?e:[],d=vo.a(sr.a("deviceId",r))(s);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:t.titleWrapper,children:[Object(qe.jsx)("div",{className:t.titleAndButtonsContainer,children:Object(qe.jsx)(xt,{children:"Machine Status"})}),Object(qe.jsxs)("div",{className:t.headerLabels,children:[Object(qe.jsxs)("div",{children:[Object(qe.jsx)(ay,{}),Object(qe.jsx)("span",{children:"Warning"})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(sy,{}),Object(qe.jsx)("span",{children:"Error"})]})]})]}),Object(qe.jsx)(Nl,{loading:c,elements:l,data:s,Details:function(e){var t=e.it;return Object(qe.jsx)(zy,{it:t,onActionSuccess:o})},initialExpanded:d,emptyText:"No machines so far",expandable:!0})]})},$y=a.a.createContext(),Vy=n(687),Yy=n(688),Xy=Zd.a(Vy.a(Number),Yy.a(js.a(NaN))),Uy=function(e){return Xy(e)?e:null},Gy=Object(b.a)({header:{display:"flex",alignItems:"center",marginBottom:16,height:26,margin:0},title:{flexShrink:2,margin:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},button:{border:"none",backgroundColor:"transparent",cursor:"pointer",marginLeft:8},editingButtons:{display:"flex",flexShrink:0,marginLeft:16,justifyContent:"space-between",width:110}}),Zy=function(e){var t=e.title,n=e.editing,r=e.disabled,a=e.setEditing,i=Gy();return Object(qe.jsxs)("div",{className:i.header,children:[Object(qe.jsx)(at,{className:i.title,children:t}),!n&&Object(qe.jsx)(cn,{onClick:function(){return a(!0)},className:i.button,disabled:r,children:r?Object(qe.jsx)(Gs,{}):Object(qe.jsx)(ed,{})}),n&&Object(qe.jsxs)("div",{className:i.editingButtons,children:[Object(qe.jsx)(mn,{color:"primary",type:"submit",children:"Save"}),Object(qe.jsx)(mn,{color:"secondary",type:"reset",children:"Cancel"})]})]})},_y=Object(b.a)({text:{margin:[[7,0,7,1]]},fieldWrapper:{height:53},valueWrapper:{display:"flex",alignItems:"baseline"},label:{margin:0},decoration:{margin:[[0,0,0,7]]}}),Ky=function(e){var t,n=e.label,r=e.name,a=e.editing,i=e.displayValue,o=e.decoration,c=e.className,l=e.decimalPlaces,s=void 0===l?0:l,d=e.width,u=void 0===d?80:d,m=_y({width:u,editing:a}),h=Object(ca.e)().values,b=(t={},Object(v.a)(t,m.fieldWrapper,!0),Object(v.a)(t,"className",c),t);return Object(qe.jsxs)("div",{className:w()(b),children:[n&&Object(qe.jsx)(mt,{className:m.label,children:n}),Object(qe.jsxs)("div",{className:m.valueWrapper,children:[!a&&Object(qe.jsx)(ct,{className:m.text,children:i(h[r])}),a&&Object(qe.jsx)(ca.b,{id:r,size:"lg",fullWidth:!0,name:r,component:Ja,textAlign:"right",width:u,decimalPlaces:s}),Object(qe.jsx)(ut,{className:m.decoration,children:o})]})]})},Qy=function(e){var t,n=e.title,a=e.label,i=e.width,o=void 0===i?80:i,l=e.min,s=void 0===l?0:l,d=e.max,u=void 0===d?9999999:d,m=e.name,h=e.section,b=e.className,p=Object(r.useState)(!1),j=Object(c.a)(p,2),f=j[0],g=j[1],O=function(){var e=Object(No.a)(So.a.mark((function e(t,n){return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=2;break}return e.abrupt("return");case 2:return g(!0),e.next=5,y(t,n);case 5:g(!1);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),x=Object(r.useContext)($y),y=x.save,w=x.data,C=x.currency,k=x.isEditing,S=x.isDisabled,N=x.setEditing,E=ma.d().shape(Object(v.a)({},m,ma.c().transform(Uy).integer().min(s).max(u).nullable()));return Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:Object(v.a)({},m,null!==(t=w&&w[m])&&void 0!==t?t:""),validationSchema:E,onSubmit:function(e){return O(h,E.cast(e))},onReset:function(){N(m,!1)},children:Object(qe.jsxs)(ca.c,{className:b,children:[Object(qe.jsx)(vs,{}),Object(qe.jsx)(Zy,{title:n,editing:k(m),disabled:S(m),setEditing:function(e){return N(m,e)}}),Object(qe.jsx)(Ky,{label:a,name:m,editing:k(m),width:o,displayValue:function(e){return""===e?"-":e},decoration:C})]})})},Jy="cryptoLowBalance",ew="cryptoHighBalance",tw=Object(b.a)({cryptoBalanceAlerts:{display:"flex",marginBottom:36,height:135,alignItems:"center"},cryptoBalanceAlertsForm:{width:222,marginRight:32},cryptoBalanceAlertsSecondForm:{marginLeft:50},vertSeparator:{width:1,height:"100%",borderRight:[[1,"solid","black"]]}}),nw=function(e){var t=e.section,n=e.fieldWidth,a=tw(),i=Object(r.useContext)($y),o=i.data,c=i.save,l=i.currency,s=i.setEditing,d=i.isEditing,u=i.isDisabled;return Object(qe.jsxs)("div",{className:a.cryptoBalanceAlerts,children:[Object(qe.jsx)(Qy,{name:Jy,data:o,save:c,section:t,decoration:l,className:a.cryptoBalanceAlertsForm,title:"Default (Low Balance)",label:"Alert me under",editing:d(Jy),disabled:u(Jy),setEditing:function(e){return s(Jy,e)},width:n}),Object(qe.jsx)("div",{className:a.vertSeparator}),Object(qe.jsx)(Qy,{name:ew,data:o,section:t,save:c,decoration:l,className:a.cryptoBalanceAlertsSecondForm,title:"Default (High Balance)",label:"Alert me over",editing:d(ew),disabled:u(ew),setEditing:function(e){return s(ew,e)},width:n})]})},rw="highBalance",aw="lowBalance",iw="cryptoCurrency",ow="cryptoBalanceOverrides",cw=function(e){var t,n,a,i=e.section,o=Object(r.useContext)($y),c=o.cryptoCurrencies,l=void 0===c?[]:c,s=o.data,d=o.save,u=o.error,m=o.currency,h=o.isDisabled,b=o.setEditing,p=null!==(t=null===s||void 0===s?void 0:s.cryptoBalanceOverrides)&&void 0!==t?t:[],j=ar.a(ir.a(iw))(p),f=lr.a((function(e){return!xo.a(e.code,j)}))(l),g=(n={},Object(v.a)(n,iw,null),Object(v.a)(n,aw,""),Object(v.a)(n,rw,""),n),O=9999999,x=ma.d().shape((a={},Object(v.a)(a,iw,ma.e().label("Cryptocurrency").nullable().required()),Object(v.a)(a,aw,ma.c().label("Low Balance").when(rw,{is:function(e){return!e},then:ma.c().required()}).transform(Uy).integer().min(0).max(O).nullable()),Object(v.a)(a,rw,ma.c().label("High Balance").when(aw,{is:function(e){return!e},then:ma.c().required()}).transform(Uy).integer().min(0).max(O).nullable()),a),[aw,rw]),y=[{name:iw,header:"Cryptocurrency",width:166,size:"sm",view:function(e){return tr.a(cr.a(["display"]),ja.a(sr.a("code",e)))(l)},input:Aa,inputProps:{options:function(e){return jo.a(f,function(e){var t=tr.a(ja.a(sr.a("code",null===e||void 0===e?void 0:e.cryptoCurrency)))(l);return t?[t]:[]}(e))},optionsLimit:null,valueProp:"code",labelProp:"display"}},{name:aw,width:155,textAlign:"right",bold:!0,input:Ja,suffix:m,inputProps:{decimalPlaces:2}},{name:rw,width:155,textAlign:"right",bold:!0,input:Ja,suffix:m,inputProps:{decimalPlaces:2}}];return Object(qe.jsx)(sd,{name:ow,title:"Overrides",error:null===u||void 0===u?void 0:u.message,enableDelete:!0,enableEdit:!0,enableCreate:!0,save:function(e){return d(i,e)},initialValues:g,validationSchema:x,forceDisable:h(ow)||!l,data:p,elements:y,disableAdd:!(null===f||void 0===f?void 0:f.length),onDelete:function(e){var t={cryptoBalanceOverrides:fs.a((function(t){return t.id===e}),p)};return d(t)},setEditing:function(e){return b(ow,e)}})},lw={wrapper:{display:"flex"},form:{marginBottom:36},first:{width:236},title:{marginTop:0},row:{width:183,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gridTemplateRows:"1fr",gridColumnGap:18,gridRowGap:0},col2:{width:136},cashboxLabel:{marginRight:4,fontSize:20},cashboxEmptyPart:{backgroundColor:"".concat(re)}},sw=Object(b.a)(lw),dw="fiatBalanceAlerts",uw=function(e){var t,n,a,i,o=e.section,c=e.min,l=void 0===c?0:c,s=e.max,d=void 0===s?Number.MAX_SAFE_INTEGER:s,u=e.fieldWidth,m=void 0===u?80:u,h=Object(r.useContext)($y),b=h.isEditing,p=h.isDisabled,j=h.setEditing,f=h.data,g=h.save,O=sw(),x=b(dw),v=ma.d().shape({fiatBalanceCassette1:ma.c().transform(Uy).integer().min(l).max(d).nullable(),fiatBalanceCassette2:ma.c().transform(Uy).integer().min(l).max(d).nullable()}),y=100*(null!==(t=null===f||void 0===f?void 0:f.fiatBalanceCassette1)&&void 0!==t?t:0)/d,w=100*(null!==(n=null===f||void 0===f?void 0:f.fiatBalanceCassette2)&&void 0!==n?n:0)/d;return Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:{fiatBalanceCassette1:null!==(a=null===f||void 0===f?void 0:f.fiatBalanceCassette1)&&void 0!==a?a:"",fiatBalanceCassette2:null!==(i=null===f||void 0===f?void 0:f.fiatBalanceCassette2)&&void 0!==i?i:""},validationSchema:v,onSubmit:function(e){return g(o,v.cast(e))},onReset:function(){j(dw,!1)},children:Object(qe.jsxs)(ca.c,{className:O.form,children:[Object(qe.jsx)(vs,{}),Object(qe.jsx)(Zy,{title:"Cash out (Empty)",editing:x,disabled:p(dw),setEditing:function(e){return j(dw,e)}}),Object(qe.jsxs)("div",{className:O.wrapper,children:[Object(qe.jsx)("div",{className:O.first,children:Object(qe.jsxs)("div",{className:O.row,children:[Object(qe.jsx)(Ga,{labelClassName:O.cashboxLabel,emptyPartClassName:O.cashboxEmptyPart,percent:y,cashOut:!0}),Object(qe.jsxs)("div",{className:O.col2,children:[Object(qe.jsx)(ut,{className:O.title,children:"Cassette 1 (Top)"}),Object(qe.jsx)(Ky,{label:"Alert me under",name:"fiatBalanceCassette1",editing:x,displayValue:function(e){return""===e?"-":e},decoration:"notes",width:m})]})]})}),Object(qe.jsxs)("div",{className:O.row,children:[Object(qe.jsx)(Ga,{labelClassName:O.cashboxLabel,emptyPartClassName:O.cashboxEmptyPart,percent:w,cashOut:!0}),Object(qe.jsxs)("div",{className:O.col2,children:[Object(qe.jsx)(ut,{className:O.title,children:"Cassette 2 (Bottom)"}),Object(qe.jsx)(Ky,{label:"Alert me under",name:"fiatBalanceCassette2",editing:x,displayValue:function(e){return""===e?"-":e},decoration:"notes",width:m})]})]})]})]})})},mw="fiatBalanceCassette1",hw="fiatBalanceCassette2",bw="machine",pw="fiatBalanceOverrides",jw=function(e){var t,n,a,i=e.section,o=Object(r.useContext)($y),c=o.machines,l=void 0===c?[]:c,s=o.data,d=o.save,u=o.isDisabled,m=o.setEditing,h=o.error,b=null!==(t=null===s||void 0===s?void 0:s.fiatBalanceOverrides)&&void 0!==t?t:[],p=ar.a((function(e){return e.machine}),b),j=lr.a((function(e){return!xo.a(e.deviceId,p)}))(l),f=(n={},Object(v.a)(n,bw,null),Object(v.a)(n,mw,""),Object(v.a)(n,hw,""),n),g=9999999,O=ma.d().shape((a={},Object(v.a)(a,bw,ma.e().label("Machine").nullable().required()),Object(v.a)(a,mw,ma.c().label("Cassette 1 (top)").when(hw,{is:function(e){return!e},then:ma.c().required()}).transform(Uy).integer().min(0).max(g).nullable()),Object(v.a)(a,hw,ma.c().label("Cassette 2 (bottom)").when(mw,{is:function(e){return!e},then:ma.c().required()}).transform(Uy).integer().min(0).max(g).nullable()),a),[mw,hw]),x=[{name:bw,width:238,size:"sm",view:function(e){return tr.a(cr.a(["name"]),ja.a(sr.a("deviceId",e)))(l)},input:Aa,inputProps:{options:function(e){return jo.a(j,function(e){var t=tr.a(ja.a(sr.a("deviceId",null===e||void 0===e?void 0:e.machine)))(l);return t?[t]:[]}(e))},valueProp:"deviceId",labelProp:"name"}},{name:mw,display:"Cash-out 1",width:155,textAlign:"right",doubleHeader:"Cash-out (Cassette Empty)",bold:!0,input:Ja,suffix:"notes",inputProps:{decimalPlaces:0}},{name:hw,display:"Cash-out 2",width:155,textAlign:"right",doubleHeader:"Cash-out (Cassette Empty)",bold:!0,input:Ja,suffix:"notes",inputProps:{decimalPlaces:0}}];return Object(qe.jsx)(sd,{name:pw,title:"Overrides",error:null===h||void 0===h?void 0:h.message,enableDelete:!0,enableEdit:!0,enableCreate:!0,save:function(e){return d(i,O.cast(e))},initialValues:f,validationSchema:O,forceDisable:u(pw)||!l,data:b,elements:x,disableAdd:!(null===j||void 0===j?void 0:j.length),setEditing:function(e){return m(pw,e)}})},fw={balance:152,transactions:184,compliance:178,errors:142,active:263},gw=Ic.a(Ts.a(fw))+129,Ow=function(e){var t=e.namespace,n=e.forceDisable,a=Object(r.useContext)($y),i=a.data,o=a.save,c=tr.a(o(null),jc(t)),l=pc(t)(i),s=n||!l||!l.active,d=function(e){var t=e.name,n=e.disabled,r=!(!l||!l[t]);return Object(qe.jsx)(Hc,{width:fw[t],textAlign:"center",children:Object(qe.jsx)(Ta,{disabled:n,checked:r,onChange:function(e){c(Object(v.a)({},t,e.target.checked))},value:r})})};return Object(qe.jsxs)(Vc,{children:[Object(qe.jsx)(Hc,{width:129,children:Ps(t)}),Object(qe.jsx)(d,{name:"balance",disabled:s}),Object(qe.jsx)(d,{name:"transactions",disabled:s}),Object(qe.jsx)(d,{name:"compliance",disabled:s}),Object(qe.jsx)(d,{name:"errors",disabled:s}),Object(qe.jsx)(d,{name:"active",disabled:n})]})},xw=Object(b.a)({mainTable:{width:gw},wizardTable:{width:930}}),vw=function(e){var t=e.wizard,n=e.forceDisable,r=t?20:0,a=xw();return Object(qe.jsxs)(Ac,{className:t?a.wizardTable:a.mainTable,children:[Object(qe.jsxs)(Wc,{children:[Object(qe.jsx)(qc,{width:129-r,children:"Channel"}),Object.keys(fw).map((function(e){return Object(qe.jsx)(qc,{width:fw[e]-r,textAlign:"center",children:Ps(e)},e)}))]}),Object(qe.jsxs)(Mc,{children:[Object(qe.jsx)(Ow,{namespace:"email",forceDisable:n}),Object(qe.jsx)(Ow,{namespace:"sms",forceDisable:n}),Object(qe.jsx)(Ow,{namespace:"notificationCenter",forceDisable:n})]})]})},yw=function(e){var t=e.section,n=e.fieldWidth;return Object(qe.jsx)(Qy,{section:t,title:"High value transaction",label:"Alert me over",name:"highValueTransaction",width:n})},ww=er()(Cy||(Cy=Object(Kn.a)(["\n query getData {\n config\n machines {\n name\n deviceId\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),Cw=er()(ky||(ky=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),kw=function(e){var t=e.name,n=e.displaySetup,a=void 0===n||n,i=e.displayTransactionAlerts,o=void 0===i||i,l=e.displayFiatAlerts,s=void 0===l||l,d=e.displayCryptoAlerts,u=void 0===d||d,m=e.displayOverrides,h=void 0===m||m,b=e.displayTitle,p=void 0===b||b,j=e.wizard,f=void 0!==j&&j,g=Object(r.useState)(null),O=Object(c.a)(g,2),x=O[0],v=O[1],y=Object(r.useState)(null),w=Object(c.a)(y,2),C=w[0],k=w[1],S=Object(r.useState)(null),N=Object(c.a)(S,2),E=N[0],I=N[1],L=Object(Qn.c)(ww).data,F=Object(Qn.b)(Cw,{refetchQueries:["getData"],onCompleted:function(){return I(null)},onError:function(e){return k(e)}}),P=Object(c.a)(F,1)[0],B=pc(t)(null===L||void 0===L?void 0:L.config),D=null===L||void 0===L?void 0:L.machines,R=null===L||void 0===L?void 0:L.cryptoCurrencies,T=cr.a(["fiatCurrency"])(pc(cc)(null===L||void 0===L?void 0:L.config)),A={save:Qo.a((function(e,n){var r=jc(t)(n);return v(e),k(null),P({variables:{config:r}})})),error:C,editingKey:E,data:B,currency:T,isEditing:function(e){return E===e},isDisabled:function(e){return E&&E!==e},setEditing:function(e,t){t||k(null),I(t?e:null)},setSection:v,machines:D,cryptoCurrencies:R};return Object(qe.jsxs)($y.Provider,{value:A,children:[p&&Object(qe.jsx)(qn,{title:"Notifications"}),a&&Object(qe.jsx)(gu,{title:"Setup",error:C&&!x,children:Object(qe.jsx)(vw,{forceDisable:!!E,wizard:f})}),o&&Object(qe.jsx)(gu,{title:"Transaction alerts",error:C&&"tx"===x,children:Object(qe.jsx)(yw,{section:"tx",fieldWidth:130})}),s&&Object(qe.jsxs)(gu,{title:"Fiat balance alerts",error:C&&"fiat"===x,children:[Object(qe.jsx)(uw,{section:"fiat",max:500,fieldWidth:50}),h&&Object(qe.jsx)(jw,{section:"fiat"})]}),u&&Object(qe.jsxs)(gu,{title:"Crypto balance alerts",error:C&&"crypto"===x,children:[Object(qe.jsx)(nw,{section:"crypto",fieldWidth:130}),h&&Object(qe.jsx)(cw,{section:"crypto",fieldWidth:130})]})]})},Sw={button:Tl.button,content:{display:"flex"},transparentButton:{"& > *":{margin:"auto 10px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},titleWrapper:{display:"flex",alignItems:"center",flex:"wrap"},rowWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between"},rowTextAndSwitch:{display:"flex",flex:"wrap",alignItems:"center",justifyContent:"space-between",width:285},popoverContent:{width:272,padding:[[10,15]]}},Nw=Object(b.a)(Sw),Ew=er()(Sy||(Sy=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),Iw=er()(Ny||(Ny=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Lw=Object(r.memo)((function(e){var t=e.title,n=e.disabled,r=void 0!==n&&n,a=e.checked,i=e.save,o=e.label,c=Nw();return Object(qe.jsxs)("div",{className:c.rowWrapper,children:[Object(qe.jsxs)("div",{className:c.rowTextAndSwitch,children:[Object(qe.jsx)(ot,{children:t}),Object(qe.jsx)(Ta,{disabled:r,checked:a,onChange:function(e){return i&&i(e.target.checked)}})]}),o&&Object(qe.jsx)(ht,{children:o})]})})),Fw=Object(r.memo)((function(){var e=Nw(),t=Object(Qn.c)(Ew).data,n=Object(Qn.b)(Iw,{refetchQueries:["getData"]}),r=Object(c.a)(n,1)[0],a=function(e){return r({variables:{config:jc(dc,e)}})},i=(null===t||void 0===t?void 0:t.config)&&pc(dc,t.config);return i?Object(qe.jsx)("div",{className:e.content,children:Object(qe.jsxs)("div",{children:[Object(qe.jsxs)("div",{className:e.titleWrapper,children:[Object(qe.jsx)(at,{children:"Coin ATM Radar share settings"}),Object(qe.jsx)(Ao,{width:304,children:Object(qe.jsxs)(ot,{children:["For details on configuring this panel, please read the relevant knowledgebase article"," ",Object(qe.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://support.lamassu.is/hc/en-us/articles/360023720472-Coin-ATM-Radar",children:"here"}),"."]})})]}),Object(qe.jsx)(Lw,{title:"Share information?",checked:i.active,save:function(e){return a({active:e})},label:i.active?"Yes":"No"}),Object(qe.jsx)(at,{children:"Machine info"}),Object(qe.jsx)(Lw,{title:"Commissions",disabled:!i.active,checked:i.commissions,save:function(e){return a({commissions:e})}}),Object(qe.jsx)(Lw,{title:"Limits and verification",disabled:!i.active,checked:i.limitsAndVerification,save:function(e){return a({limitsAndVerification:e})}})]})}):null})),Pw=n(312),Bw=Re.p,Dw=Object(Pw.a)({typography:{fontFamily:Se,body1:Object(l.a)({},Bw)},MuiButtonBase:{disableRipple:!0},palette:{primary:{light:ee,dark:ee,main:ee},secondary:{light:ee,dark:ee,main:ee},background:{default:re}},overrides:{MuiRadio:{colorSecondary:{color:ee}},MuiAutocomplete:{root:{color:le},noOptions:{padding:[[6,16]]},option:{'&[data-focus="true"]':{backgroundColor:ae}},paper:{color:le,margin:0},listbox:{padding:0},tag:{'&[data-tag-index="0"]':{marginLeft:0},margin:2,backgroundColor:ae,borderRadius:4,height:18}},MuiChip:{label:{paddingLeft:4,paddingRight:4,color:le,fontSize:ve}},MuiInput:{root:{color:le},underline:{"&:before":{borderBottom:[[2,"solid",le]]}}},MuiInputLabel:{root:{font:"inherit",fontSize:Oe,color:se},shrink:{color:le,transform:"translate(0, 1.7px) scale(0.83)"}},MuiFormLabel:{root:{"&$focused":{color:le}}},MuiListItem:{root:{"&:nth-of-type(odd)":{backgroundColor:re}}}}}),Rw=Re.p,Tw={header:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},transparentButton:{"& > *":{margin:"auto 12px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},section:{marginBottom:52},row:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:28,width:600,"&:last-child":{marginBottom:0}},switchRow:{display:"flex",alignItems:"center",marginBottom:28,width:600},switch:{display:"flex",alignItems:"center",marginLeft:120},submit:{justifyContent:"flex-start",alignItems:"center",height:19,padding:[[0,4,4,4]],"& > button":{marginRight:40}},singleButton:{marginTop:50,paddingLeft:0}},Aw={infoMessage:{display:"flex",marginBottom:52,"& > p":{width:330,color:se,marginTop:4,marginLeft:16}},radioButtonsRow:{height:60,marginBottom:14},radioButtons:{display:"flex",flexDirection:"row",paddingLeft:4},rowWrapper:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},transparentButton:{"& > *":{margin:"auto 12px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}}},Ww={enable:{display:"flex",alignItems:"center",marginBottom:22-Dw.spacing(1),"& > span:first-child":{extend:Rw,marginRight:116-Dw.spacing(1)},"& > span:last-child":{marginLeft:4}}},zw={field:{position:"relative",width:280,height:48,padding:[[0,4,4,0]]},notEditing:{display:"flex",flexDirection:"column","& > p:first-child":{height:16,lineHeight:"16px",fontSize:ve,transformOrigin:"left",paddingLeft:0,margin:[[3,0,3,0]]},"& > p:last-child":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",margin:0}}},Mw=Object(b.a)(zw),Hw=function(e){var t,n=e.editing,r=e.field,a=e.displayValue,i=Object(Ue.a)(e,["editing","field","displayValue"]),o=Mw(),c=(t={},Object(v.a)(t,o.field,!0),Object(v.a)(t,o.notEditing,!n),t);return Object(qe.jsxs)("div",{className:w()(c),children:[!n&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(bt,{children:r.label}),Object(qe.jsx)(st,{children:a(r.value)})]}),n&&Object(qe.jsx)(ca.b,Object(l.a)({id:r.name,name:r.name,component:r.component,placeholder:r.placeholder,type:r.type,label:r.label,width:280},i))]})},qw=er()(Ey||(Ey=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),$w=er()(Iy||(Iy=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Vw=_t.a(Tw,Aw),Yw=Object(b.a)(Vw),Xw=function(e){var t,n,a,i,o=e.wizard,l=Yw(),s=Object(r.useState)(o||!1),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(r.useState)(null),b=Object(c.a)(h,2),p=b[0],j=b[1],f=Object(Qn.b)($w,{onCompleted:function(){return m(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return j(e)}}),g=Object(c.a)(f,1)[0],O=Object(Qn.c)(qw).data,x=function(e){return g({variables:{config:jc(ic,e)}})},v=(null===O||void 0===O?void 0:O.config)&&pc(ic,O.config);if(!v)return null;var y=ma.d().shape({active:ma.b(),name:ma.e(),phone:ma.e(),email:ma.e().email("Please enter a valid email address").required(),website:ma.e(),companyNumber:ma.e()}),C=[{name:"name",label:"Full name",value:null!==(t=v.name)&&void 0!==t?t:"",component:ni},{name:"phone",label:"Phone number",value:v.phone,component:ni},{name:"email",label:"Email",value:null!==(n=v.email)&&void 0!==n?n:"",component:ni},{name:"website",label:"Website",value:null!==(a=v.website)&&void 0!==a?a:"",component:ni},{name:"companyNumber",label:"Company number",value:null!==(i=v.companyNumber)&&void 0!==i?i:"",component:ni}],k=function(e){return ja.a(sr.a("name",e))(C)},S=function(e){return k(e).value},N=function(e){return e},E={initialValues:{active:v.active,name:S("name"),phone:S("phone"),email:S("email"),website:S("website"),companyNumber:S("companyNumber")}};return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:l.rowWrapper,children:Object(qe.jsx)(at,{children:"Contact information"})}),Object(qe.jsxs)("div",{className:l.rowWrapper,children:[Object(qe.jsx)(ot,{children:"Info card enabled?"}),Object(qe.jsxs)("div",{className:l.switch,children:[Object(qe.jsx)(Ta,{checked:v.active,onChange:function(e){return x({active:e.target.checked})}}),Object(qe.jsx)(ht,{children:v.active?"Yes":"No"})]})]}),Object(qe.jsxs)("div",{className:l.section,children:[Object(qe.jsxs)("div",{className:l.rowWrapper,children:[Object(qe.jsx)(at,{children:"Info card"}),!u&&Object(qe.jsx)(cn,{className:l.transparentButton,onClick:function(){return m(!0)},children:Object(qe.jsx)(ed,{})})]}),Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:E.initialValues,validationSchema:y,onSubmit:function(e){return x(y.cast(e))},onReset:function(){m(!1),j(null)},children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsx)(vs,{}),Object(qe.jsxs)("div",{className:l.row,children:[Object(qe.jsx)(Hw,{field:k("name"),editing:u,displayValue:N,onFocus:function(){return j(null)}}),Object(qe.jsx)(Hw,{field:k("phone"),editing:u,displayValue:N,onFocus:function(){return j(null)}})]}),Object(qe.jsxs)("div",{className:l.row,children:[Object(qe.jsx)(Hw,{field:k("email"),editing:u,displayValue:N,onFocus:function(){return j(null)}}),Object(qe.jsx)(Hw,{field:k("website"),editing:u,displayValue:N,onFocus:function(){return j(null)}})]}),Object(qe.jsx)("div",{className:l.row,children:Object(qe.jsx)(Hw,{field:k("companyNumber"),editing:u,displayValue:N,onFocus:function(){return j(null)}})}),Object(qe.jsx)("div",{className:w()(l.row,l.submit),children:u&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(mn,{color:"primary",type:"submit",children:"Save"}),Object(qe.jsx)(mn,{color:"secondary",type:"reset",children:"Cancel"}),p&&Object(qe.jsx)(gt,{className:l.errorMessage,children:"Failed to save changes"})]})})]})})]}),!o&&Object(qe.jsxs)("div",{className:w()(l.section,l.infoMessage),children:[Object(qe.jsx)(wi,{}),Object(qe.jsx)(mt,{children:"Sharing your information with your customers through your machines allows them to contact you in case there's a problem with a machine in your network or a transaction."})]})]})};function Uw(){return(Uw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gw(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Zw=r.createElement("desc",null,"Created with Sketch."),_w=r.createElement("g",{id:"icon/table/false",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("g",{id:"Group-4",stroke:"#FF584A",strokeWidth:4},r.createElement("line",{x1:13.5,y1:.5,x2:.995667,y2:13.004333,id:"Line-7"}),r.createElement("line",{x1:13.5,y1:.5,x2:.995667,y2:13.004333,id:"Line-7",transform:"translate(7.000000, 7.000000) scale(-1, 1) translate(-7.000000, -7.000000) "})));function Kw(e,t){var n=e.title,a=e.titleId,i=Gw(e,["title","titleId"]);return r.createElement("svg",Uw({width:"14px",height:"14px",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,Zw,_w)}var Qw=r.forwardRef(Kw);n.p;function Jw(){return(Jw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var tC=r.createElement("desc",null,"Created with Sketch."),nC=r.createElement("g",{id:"icon/table/true",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M4.17451294,13.3251347 L0.599425104,9.29667256 C-0.199808368,8.3960844 -0.199808368,6.94040225 0.599425104,6.03981409 C1.39865858,5.13922593 2.69051421,5.13922593 3.48974768,6.03981409 L5.61967423,8.439847 L12.5102523,0.675441122 C13.3094858,-0.225147041 14.6033855,-0.225147041 15.4005749,0.675441122 C16.1998084,1.57372599 16.1998084,3.03171143 15.4005749,3.93229959 L7.06483552,13.3251347 C6.66624082,13.7742771 6.14295752,14 5.61967423,14 C5.09639093,14 4.57310763,13.7742771 4.17451294,13.3251347 Z",id:"Fill-1",fill:"#48F694"}));function rC(e,t){var n=e.title,a=e.titleId,i=eC(e,["title","titleId"]);return r.createElement("svg",Jw({width:"16px",height:"14px",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,tC,nC)}var aC,iC,oC,cC,lC,sC,dC=r.forwardRef(rC),uC=(n.p,{booleanPropertiesTableWrapper:{display:"flex",flexDirection:"column",width:396},tableRow:{display:"flex",alignItems:"center",justifyContent:"space-between","&:nth-child(even)":{backgroundColor:re},"&:nth-child(odd)":{backgroundColor:X},minHeight:32,height:"auto",padding:[[8,16,8,24]],boxShadow:"0 0 0 0 rgba(0, 0, 0, 0)"},leftTableCell:{display:"flex",alignItems:"center",justifyContent:"left",width:200,padding:[0]},rightTableCell:{display:"flex",alignItems:"center",justifyContent:"right",padding:[0]},transparentButton:{"& > *":{margin:"auto 12px"},"& button":{border:"none",backgroundColor:"transparent",cursor:"pointer"}},rowWrapper:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},rightAligned:{marginLeft:"auto"},radioButtons:{display:"flex",flexDirection:"row",margin:[-15]},rightLink:{marginLeft:"20px"},fillColumn:Tl.fillColumn,popoverContent:{width:272,padding:[[10,15]]}}),mC=Object(b.a)(uC),hC=function(e){var t=e.name;return"true"===Object(ca.e)().values[t]?Object(qe.jsx)(dC,{}):Object(qe.jsx)(Qw,{})},bC=Object(r.memo)((function(e){var t=e.title,n=e.disabled,a=e.data,i=e.elements,o=e.save,l=e.forcedEditing,s=void 0!==l&&l,d=Jo.a(i.map((function(e){var t;return[e.name,null!==(t=a[e.name])&&void 0!==t?t:null]}))),u=Jo.a(i.map((function(e){return[e.name,ma.b().required()]}))),m=Object(r.useState)(s),h=Object(c.a)(m,2),b=h[0],p=h[1],j=mC(),f=function(){var e=Object(No.a)(So.a.mark((function e(t){return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(lr.a(Yy.a(rr.a),t)),p(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=[{display:"Yes",code:"true"},{display:"No",code:"false"}];return Object(qe.jsx)("div",{className:j.booleanPropertiesTableWrapper,children:Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,onSubmit:f,initialValues:d,schemaValidation:u,children:function(e){var r=e.resetForm;return Object(qe.jsxs)(ca.c,{children:[Object(qe.jsxs)("div",{className:j.rowWrapper,children:[Object(qe.jsx)(at,{children:t}),b?Object(qe.jsxs)("div",{className:j.rightAligned,children:[Object(qe.jsx)(mn,{type:"submit",color:"primary",children:"Save"}),Object(qe.jsx)(mn,{type:"reset",className:j.rightLink,onClick:function(){r(),p(!1)},color:"secondary",children:"Cancel"})]}):Object(qe.jsx)(cn,{className:j.transparentButton,onClick:function(){return p(!0)},children:n?Object(qe.jsx)(Gs,{}):Object(qe.jsx)(ed,{})})]}),Object(qe.jsx)(vs,{}),Object(qe.jsx)(el,{className:j.fillColumn,children:Object(qe.jsx)(tl,{className:j.fillColumn,children:i.map((function(e,t){return Object(qe.jsxs)(ul,{size:"sm",className:j.tableRow,children:[Object(qe.jsx)(rl,{className:j.leftTableCell,children:e.display}),Object(qe.jsxs)(rl,{className:j.rightTableCell,children:[b&&Object(qe.jsx)(ca.b,{component:ei,name:e.name,options:g,className:w()(j.radioButtons,j.rightTableCell)}),!b&&Object(qe.jsx)(hC,{name:e.name})]})]},t)}))})})]})}})})})),pC=Object(b.a)({rowWrapper:{display:"flex",alignItems:"center",position:"relative",flex:"wrap"},switchWrapper:{display:"flex",marginLeft:120}}),jC=er()(aC||(aC=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),fC=er()(iC||(iC=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),gC=Object(r.memo)((function(e){var t=e.wizard,n=pC(),r=Object(Qn.c)(jC).data,a=Object(Qn.b)(fC,{refetchQueries:function(){return["getData"]}}),i=Object(c.a)(a,1)[0],o=(null===r||void 0===r?void 0:r.config)&&pc(sc,r.config);return o?Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:n.rowWrapper,children:Object(qe.jsx)(at,{children:"Receipt options"})}),Object(qe.jsxs)("div",{className:n.rowWrapper,children:[Object(qe.jsx)(ot,{children:"Enable receipt printing?"}),Object(qe.jsx)("div",{className:n.switchWrapper,children:Object(qe.jsx)(Ta,{checked:o.active,onChange:function(e){return i({variables:{config:jc(sc,_t.a(o,{active:e.target.checked}))}})}})}),Object(qe.jsx)(ht,{children:o.active?"Yes":"No"})]}),Object(qe.jsx)(bC,{editing:t,title:"Visible on the receipt (options)",data:o,elements:[{name:"operatorWebsite",display:"Operator website"},{name:"operatorEmail",display:"Operator email"},{name:"operatorPhone",display:"Operator phone"},{name:"companyNumber",display:"Company number"},{name:"machineLocation",display:"Machine location"},{name:"customerNameOrPhoneNumber",display:"Customer name or phone number (if known)"},{name:"exchangeRate",display:"Exchange rate"},{name:"addressQRCode",display:"Address QR code"}],save:function(e){return i({variables:{config:jc(sc,e)}})}})]}):null})),OC=Object(b.a)({field:{position:"relative",width:280,padding:[[0,4,4,0]]},notEditing:{display:"flex",flexDirection:"column"},notEditingSingleLine:{"& > p:first-child":{height:16,lineHeight:"16px",transform:"scale(0.75)",transformOrigin:"left",paddingLeft:0,margin:[[1,0,6,0]]},"& > p:last-child":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",height:25,margin:0}},notEditingMultiline:{"& > p:first-child":{height:16,lineHeight:"16px",transform:"scale(0.75)",transformOrigin:"left",paddingLeft:0,margin:[[1,0,5,0]]},"& > p:last-child":{width:502,height:121,overflowY:"auto",lineHeight:"19px",wordWrap:"anywhere",margin:0}}}),xC=function(e){var t,n=e.editing,r=e.name,a=e.width,i=e.placeholder,o=e.label,c=e.value,s=e.multiline,d=void 0!==s&&s,u=e.rows,m=e.onFocus,h=Object(Ue.a)(e,["editing","name","width","placeholder","label","value","multiline","rows","onFocus"]),b=OC(),p=(t={},Object(v.a)(t,b.field,!0),Object(v.a)(t,b.notEditing,!n),Object(v.a)(t,b.notEditingSingleLine,!n&&!d),Object(v.a)(t,b.notEditingMultiline,!n&&d),t);return Object(qe.jsxs)("div",{className:w()(p),children:[!n&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(bt,{children:o}),Object(qe.jsx)(st,{className:b.multiLineText,children:c})]}),n&&Object(qe.jsx)(ca.b,Object(l.a)({id:r,name:r,component:ni,width:a,placeholder:i,type:"text",label:o,multiline:d,rows:u,rowsMax:"6",onFocus:m},h))]})},vC=er()(oC||(oC=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),yC=er()(cC||(cC=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),wC=_t.a(Tw,Ww),CC=Object(b.a)(wC),kC=function(){var e,t,n,a,i,o=Object(r.useState)(null),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(!1),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(Qn.b)(yC,{onCompleted:function(){d(null),b(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return d(e)}}),j=Object(c.a)(p,1)[0],f=CC(),g=Object(Qn.c)(vC).data,O=(null===g||void 0===g?void 0:g.config)&&pc(uc,g.config),x=null!==O&&void 0!==O?O:{},v=null!==(e=null===O||void 0===O?void 0:O.active)&&void 0!==e&&e,y=function(e){return j({variables:{config:jc(uc,e)}})},C=[{name:"title",label:"Screen title",value:null!==(t=x.title)&&void 0!==t?t:"",width:282},{name:"text",label:"Text content",value:null!==(n=x.text)&&void 0!==n?n:"",width:502,multiline:!0,rows:6},{name:"acceptButtonText",label:"Accept button text",value:null!==(a=x.acceptButtonText)&&void 0!==a?a:"",placeholder:"I accept",width:282},{name:"cancelButtonText",label:"Cancel button text",value:null!==(i=x.cancelButtonText)&&void 0!==i?i:"",placeholder:"Cancel",width:282}],k=function(e){return function(e){return ja.a(sr.a("name",e))(C)}(e).value},S={title:k("title"),text:k("text"),acceptButtonText:k("acceptButtonText"),cancelButtonText:k("cancelButtonText")},N=ma.d().shape({title:ma.e().required().max(50,"Too long"),text:ma.e().required(),acceptButtonText:ma.e().required().max(50,"Too long"),cancelButtonText:ma.e().required().max(50,"Too long")});return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)("div",{className:f.rowWrapper,children:Object(qe.jsx)(at,{children:"Terms & Conditions"})}),Object(qe.jsxs)("div",{className:f.section,children:[Object(qe.jsxs)("div",{className:f.enable,children:[Object(qe.jsx)("span",{children:"Show on screen"}),Object(qe.jsx)(Ta,{checked:v,onChange:function(e){return y({active:e.target.checked})}}),Object(qe.jsx)(ht,{children:v?"Yes":"No"})]}),Object(qe.jsxs)("div",{className:f.header,children:[Object(qe.jsx)(lt,{children:"Info card"}),!h&&Object(qe.jsx)(cn,{className:f.transparentButton,onClick:function(){return b(!0)},children:Object(qe.jsx)(ed,{})})]}),Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:S,validationSchema:N,onSubmit:function(e){return y(e)},onReset:function(){b(!1),d(null)},children:Object(qe.jsxs)(ca.c,{children:[Object(qe.jsx)(vs,{}),C.map((function(e,t){return Object(qe.jsx)("div",{className:f.row,children:Object(qe.jsx)(xC,{editing:h,name:e.name,width:e.width,placeholder:e.placeholder,label:e.label,value:e.value,multiline:e.multiline,rows:e.rows,onFocus:function(){return d(null)}})},t)})),Object(qe.jsx)("div",{className:w()(f.row,f.submit),children:h&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(mn,{color:"primary",type:"submit",children:"Save"}),Object(qe.jsx)(mn,{color:"secondary",type:"reset",children:"Cancel"}),s&&Object(qe.jsx)(gt,{className:f.errorMessage,children:"Failed to save changes"})]})})]})})]})]})},SC={running:ne,notRunning:"#ffeceb"},NC={running:"#ecfbef",notRunning:me},EC={uptimeContainer:{display:"inline-block",minWidth:104,margin:[[0,20]]},name:{extend:Re.label1,paddingLeft:4,color:se}},IC=Object(b.a)(EC),LC=Object(b.a)({root:{borderRadius:4,marginTop:4,marginRight:2,marginBottom:4,marginLeft:2,height:24,backgroundColor:function(e){var t=e.type;return NC[t]}},label:{fontSize:ye,fontWeight:500,fontFamily:Se,padding:[[4,8]],color:function(e){var t=e.type;return SC[t]}}}),FC=function(e){var t,n=e.process,r=(Object(Ue.a)(e,["process"]),IC());return Object(qe.jsxs)("div",{className:r.uptimeContainer,children:[Object(qe.jsx)("div",{className:r.name,children:gc.a(n.name)}),Object(qe.jsx)(Wa.a,{label:"RUNNING"===n.state?"Running for ".concat((t=n.uptime,t<60?"".concat(t,"s"):t<3600?"".concat(Math.floor(t/60),"m"):t<86400?"".concat(Math.floor(t/60/60),"h"):"".concat(Math.floor(t/60/60/24),"d"))):Ls(n.state),classes:LC({type:"RUNNING"===n.state?"running":"notRunning"})})]})},PC={serverTableWrapper:{extend:Tl.tableWrapper,maxWidth:"100%",marginLeft:0},serverVersion:{extend:Re.p,color:se,margin:"auto 0 auto 0"},headerLine2:{display:"flex",justifyContent:"space-between",marginBottom:24},uptimeContainer:{margin:"auto 0 auto 0"}},BC=_t.a(Tl,PC),DC=Object(b.a)(BC),RC={code:"SHOW_ALL",display:"Show all"},TC=er()(lC||(lC=Object(Kn.a)(["\n query ServerData($limit: Int, $from: Date, $until: Date) {\n serverLogsCsv(limit: $limit, from: $from, until: $until)\n }\n"]))),AC=er()(sC||(sC=Object(Kn.a)(["\n query ServerData($limit: Int, $from: Date, $until: Date) {\n serverVersion\n uptime {\n name\n state\n uptime\n }\n serverLogs(limit: $limit, from: $from, until: $until) {\n logLevel\n id\n timestamp\n message\n }\n }\n"]))),WC=function(){var e,t,n=DC(),a=Object(r.useRef)(),i=Object(r.useState)(null),o=Object(c.a)(i,2),l=o[0],s=o[1],d=Object(r.useState)(RC),u=Object(c.a)(d,2),m=u[0],h=u[1],b=Object(Qn.c)(AC,{onCompleted:function(){return s("")},variables:{limit:500}}),p=b.data,j=b.loading,f=null===p||void 0===p?void 0:p.serverVersion,g=null!==(e=null===p||void 0===p?void 0:p.uptime)&&void 0!==e?e:[],O=tr.a(ps.a(RC),wu.a,jo.a([{code:"error",display:"Error"},{code:"info",display:"Info"},{code:"debug",display:"Debug"}]),ar.a((function(e){return{code:cr.a(["logLevel"])(e),display:Ps(cr.a(["logLevel"])(e))}})),cr.a(["serverLogs"]));return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:n.titleWrapper,children:[Object(qe.jsxs)("div",{className:n.titleAndButtonsContainer,children:[Object(qe.jsx)(xt,{children:"Server"}),p&&Object(qe.jsxs)("div",{className:n.buttonsWrapper,children:[Object(qe.jsx)(BO,{title:"Download logs",name:"server-logs",query:TC,logs:p.serverLogs,getLogs:function(e){return cr.a(["serverLogsCsv"])(e)}}),Object(qe.jsx)(st,{children:l})]})]}),Object(qe.jsx)("div",{className:n.serverVersion,children:f&&Object(qe.jsxs)("span",{children:["Server version: v",f]})})]}),Object(qe.jsxs)("div",{className:n.headerLine2,children:[p&&Object(qe.jsx)(Ko,{onSelectedItemChange:function(e){a.current&&a.current.scrollTo(0,0),h(e)},label:"Level",items:O(p),default:RC,selectedItem:m}),Object(qe.jsx)("div",{className:n.uptimeContainer,children:g&&g.map((function(e,t){return Object(qe.jsx)(FC,{process:e},t)}))})]}),Object(qe.jsx)("div",{className:n.wrapper,children:Object(qe.jsxs)("div",{ref:a,className:n.serverTableWrapper,children:[Object(qe.jsxs)(el,{className:n.table,children:[Object(qe.jsx)(al,{children:Object(qe.jsxs)(ul,{header:!0,children:[Object(qe.jsx)(cl,{className:n.dateColumn,children:"Date"}),Object(qe.jsx)(cl,{className:n.levelColumn,children:"Level"}),Object(qe.jsx)(cl,{className:n.fillColumn})]})}),Object(qe.jsx)(tl,{children:p&&p.serverLogs.filter((function(e){return m===RC||e.logLevel===m.code})).map((function(e,t){return Object(qe.jsxs)(ul,{size:"sm",children:[Object(qe.jsx)(rl,{children:(n=e.timestamp,ib()(n).format("YYYY-MM-DD HH:mm"))}),Object(qe.jsx)(rl,{children:e.logLevel}),Object(qe.jsx)(rl,{children:e.message})]},t);var n}))})]}),j&&Object(qe.jsx)(at,{children:"Loading..."}),!j&&!(null===p||void 0===p||null===(t=p.serverLogs)||void 0===t?void 0:t.length)&&Object(qe.jsx)(at,{children:"No activity so far"})]})})]})},zC=n(689);function MC(){return(MC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function HC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var qC=r.createElement("desc",null,"Created with Sketch."),$C=r.createElement("g",{id:"icon/action/edit/white",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M1,18 L1,18 C1,19.657 2.343,21 4,21 L18,21 C19.657,21 21,19.657 21,18",id:"Stroke-1",stroke:"#FFFFFF",strokeWidth:2}),r.createElement("polygon",{id:"Stroke-3",stroke:"#FFFFFF",strokeWidth:2,points:"6 12 17 1 21 5 10 16 6 16"}));function VC(e,t){var n=e.title,a=e.titleId,i=HC(e,["title","titleId"]);return r.createElement("svg",MC({width:"22px",height:"22px",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},i),n?r.createElement("title",{id:a},n):null,qC,$C)}var YC,XC,UC,GC,ZC,_C,KC,QC,JC,ek,tk,nk=r.forwardRef(VC),rk=(n.p,{tr:function(e){return{margin:0,height:e.height}},table:function(e){return{width:e.width}},head:{display:"flex",flex:1,justifyContent:"space-between",alignItems:"center",paddingRight:12},button:{marginBottom:1},itemWrapper:{display:"flex",flexDirection:"column",marginTop:16,minHeight:35},label:{extend:Re.label1,color:se,marginBottom:4},item:{extend:Re.p,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),ak=Object(b.a)(rk),ik=function(e){var t=e.width,n=void 0===t?378:t,r=e.height,a=void 0===r?128:r,i=e.title,o=e.items,c=e.onEdit,l=e.className,s=ak({width:n,height:a});return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsxs)(Ac,{className:w()(l,s.table),children:[Object(qe.jsx)(Wc,{children:Object(qe.jsxs)(qc,{className:s.head,children:[i,Object(qe.jsx)(cn,{onClick:c,className:s.button,children:Object(qe.jsx)(nk,{})})]})}),Object(qe.jsx)(Mc,{children:Object(qe.jsx)(Vc,{className:s.tr,children:Object(qe.jsx)(Hc,{width:n,children:o&&Object(qe.jsxs)(qe.Fragment,{children:[o[0]&&Object(qe.jsxs)("div",{className:s.itemWrapper,children:[Object(qe.jsx)("div",{className:s.label,children:o[0].label}),Object(qe.jsx)("div",{className:s.item,children:o[0].value})]}),o[1]&&Object(qe.jsxs)("div",{className:s.itemWrapper,children:[Object(qe.jsx)("div",{className:s.label,children:o[1].label}),Object(qe.jsx)("div",{className:s.item,children:o[1].value})]})]})})})})]})})},ok=er()(YC||(YC=Object(Kn.a)(["\n query getData {\n accounts\n }\n"]))),ck=er()(XC||(XC=Object(Kn.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),lk=Object(b.a)({wrapper:{marginLeft:1}}),sk=function(){var e,t=Object(r.useState)(null),n=Object(c.a)(t,2),a=n[0],i=n[1],o=Object(Qn.c)(ok).data,s=Object(Qn.b)(ck,{onCompleted:function(){return i(null)},refetchQueries:["getData"]}),d=Object(c.a)(s,1)[0],m=lk(),h=null!==(e=null===o||void 0===o?void 0:o.accounts)&&void 0!==e?e:{},b=function(e,t){var n=lr.a(ir.a("face"))(t),r=h[e]||{};return ar.a((function(e){var t,n=e.display,a=e.code;return{label:n,value:e.long?(t=r[a],!t||t.length<=20?t:"".concat(t.slice(0,8),"(...)").concat(t.slice(t.length-8,t.length))):r[a]}}))(n)};return Object(qe.jsxs)("div",{className:m.wrapper,children:[Object(qe.jsx)(qn,{title:"3rd Party Services"}),Object(qe.jsx)(u.a,{container:!0,spacing:4,children:Ts.a(Qj).map((function(e){return Object(qe.jsx)(u.a,{item:!0,children:Object(qe.jsx)(ik,{editMessage:"Configure "+e.title,title:e.title,onEdit:function(){return i(e)},items:b(e.code,e.elements)})},e.code)}))}),a&&Object(qe.jsx)(vc,{title:"Edit ".concat(a.name),width:478,handleClose:function(){return i(null)},open:!0,children:Object(qe.jsx)(Xf,{save:function(e){return d({variables:{accounts:Object(v.a)({},a.code,e)}})},elements:function(e){var t=e.code,n=e.elements;return ar.a((function(e){return e.component!==ti?e:Object(l.a)(Object(l.a)({},e),{},{inputProps:{isPasswordFilled:!rr.a(h[t])&&!rr.a(cr.a([e.code],h[t]))}})}),n)}(a),validationSchema:function(e){var t=e.code,n=e.getValidationSchema;return n(h[t])}(a),value:function(e){var t=e.elements,n=e.code,r=h[n],a=lr.a(sr.a("component",ti)),i=ar.a(ir.a(["code"])),o=tr.a(i,a)(t);return zC.a((function(e,t){return vu.a(t,o)?"":e}),r)}(a)})})]})},dk=Object(b.a)(Hl),uk=er()(UC||(UC=Object(Kn.a)(["\n query transactions($limit: Int, $from: Date, $until: Date) {\n transactionsCsv(limit: $limit, from: $from, until: $until)\n }\n"]))),mk=er()(GC||(GC=Object(Kn.a)(["\n query transactions($limit: Int, $from: Date, $until: Date) {\n transactions(limit: $limit, from: $from, until: $until) {\n id\n txClass\n txHash\n toAddress\n commissionPercentage\n expired\n machineName\n operatorCompleted\n sendConfirmed\n dispense\n hasError: error\n deviceId\n fiat\n cashInFee\n fiatCode\n cryptoAtoms\n cryptoCode\n toAddress\n created\n customerName\n customerIdCardData\n customerIdCardPhotoPath\n customerFrontCameraPath\n customerPhone\n discount\n customerId\n isAnonymous\n }\n }\n"]))),hk=function(){var e=dk(),t=Object(O.h)(),n=Object(Qn.c)(mk,{variables:{limit:1e3},pollInterval:1e4}),r=n.data,a=n.loading,i=function(e){return e.customerName?e.customerName:e.customerIdCardData?function(e){var t=e.firstName,n=e.lastName;return"".concat(Yx.a(vg.a,Xx.a)(t),". ").concat(n)}(e.customerIdCardData):e.customerPhone},o=[{header:"",width:32,size:"sm",view:function(e){return"cashOut"===e.txClass?Object(qe.jsx)(fd,{}):Object(qe.jsx)(Bu,{})}},{header:"Machine",name:"machineName",width:160,size:"sm",view:cr.a(["machineName"])},{header:"Customer",width:202,size:"sm",view:function(n){return Object(qe.jsxs)("div",{className:e.flexWrapper,children:[Object(qe.jsx)("div",{className:e.overflowTd,children:i(n)}),!n.isAnonymous&&Object(qe.jsx)("div",{onClick:function(){return e=n.customerId,t.push("/compliance/customer/".concat(e));var e},children:Object(qe.jsx)(uj,{className:e.customerLinkIcon})})]})}},{header:"Cash",width:144,textAlign:"right",size:"sm",view:function(e){return"".concat(Number.parseFloat(e.fiat)," ").concat(e.fiatCode)}},{header:"Crypto",width:150,textAlign:"right",size:"sm",view:function(e){return"".concat(ub(new sb.a(e.cryptoAtoms),e.cryptoCode)," ").concat(e.cryptoCode)}},{header:"Address",view:function(e){return mb(e.cryptoCode,e.toAddress)},className:e.overflowTd,size:"sm",width:140},{header:"Date (UTC)",view:function(e){return ib.a.utc(e.created).format("YYYY-MM-DD HH:mm:ss")},textAlign:"right",size:"sm",width:195},{header:"Status",view:function(e){return Ev(e)},textAlign:"left",size:"sm",width:80}];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:e.titleWrapper,children:[Object(qe.jsxs)("div",{className:e.titleAndButtonsContainer,children:[Object(qe.jsx)(xt,{children:"Transactions"}),r&&Object(qe.jsx)("div",{className:e.buttonsWrapper,children:Object(qe.jsx)(BO,{title:"Download logs",name:"transactions",query:uk,getLogs:function(e){return cr.a(["transactionsCsv"])(e)}})})]}),Object(qe.jsxs)("div",{className:e.headerLabels,children:[Object(qe.jsxs)("div",{children:[Object(qe.jsx)(fd,{}),Object(qe.jsx)("span",{children:"Cash-out"})]}),Object(qe.jsxs)("div",{children:[Object(qe.jsx)(Bu,{}),Object(qe.jsx)("span",{children:"Cash-in"})]})]})]}),Object(qe.jsx)(Nl,{loading:a,emptyText:"No transactions so far",elements:o,data:cr.a(["transactions"])(r),Details:Dv,expandable:!0,rowSize:"sm"})]})},bk=n(690),pk=Object(b.a)({radioLabel:{height:40,padding:[[0,10]]},radio:{padding:4,margin:4},radioGroup:{flexDirection:"row"},error:{color:me},specialLabel:{height:40,padding:0},specialGrid:{display:"grid",gridTemplateColumns:[[182,162,141]]},directionIcon:{marginRight:2},directionName:{marginLeft:6},thresholdWrapper:{display:"flex",flexDirection:"column"},thresholdTitle:{marginTop:50},thresholdContentWrapper:{display:"flex",flexDirection:"row"},thresholdField:{marginRight:6,width:75},description:{marginTop:7},space:{marginLeft:6,marginRight:6},lastSpace:{marginLeft:6},suspensionDays:{width:34},input:{marginTop:-2},limitedInput:{width:50},daysInput:{width:60}}),jk=ma.e().required(),fk=ma.d().shape({threshold:ma.c().nullable().transform(Uy).label("Invalid threshold"),thresholdDays:ma.c().transform(Uy).nullable().label("Invalid threshold days")}),gk=ma.d().shape({requirement:ma.e().required(),suspensionDays:ma.c().transform(Uy).nullable()}),Ok=ma.d().shape({triggerType:jk,requirement:gk,threshold:fk}).test((function(e,t){var n=e.threshold,r=e.triggerType;if(!r||!{txAmount:function(e){return e.threshold>=0},txVolume:function(e){return e.threshold>=0&&e.thresholdDays>0},txVelocity:function(e){return e.threshold>0&&e.thresholdDays>0},consecutiveDays:function(e){return e.thresholdDays>0}}[r](n))return t.createError({path:"threshold",message:{txAmount:function(e){return"Amount must be greater than or equal to 0"},txVolume:function(e){var t=[];return e.threshold<0&&t.push("Volume must be greater than or equal to 0"),e.thresholdDays<=0&&t.push("Days must be greater than 0"),t.join(", ")},txVelocity:function(e){var t=[];return e.threshold<=0&&t.push("Transactions must be greater than 0"),e.thresholdDays<=0&&t.push("Days must be greater than 0"),t.join(", ")},consecutiveDays:function(e){return"Days must be greater than 0"}}[r](n)})})).test((function(e,t){var n=e.requirement;if(!n||!function(e){return"suspend"!==e.requirement||e.suspensionDays>0}(n))return t.createError({path:"requirement",message:"Suspension days must be greater than 0"})})),xk=ma.d().shape({triggerType:ma.e().required(),threshold:ma.d({threshold:ma.c().transform(Uy).nullable(),thresholdDays:ma.c().transform(Uy).nullable()})}).test("are-fields-set","All fields must be set.",(function(e,t){var n=e.triggerType,r=e.threshold,a={txAmount:function(e){return e.threshold>=0},txVolume:function(e){return e.threshold>=0&&e.thresholdDays>0},txVelocity:function(e){return e.threshold>0&&e.thresholdDays>0},consecutiveDays:function(e){return e.thresholdDays>0}};return n&&(null===a||void 0===a?void 0:a[n](r))||t.createError({path:"threshold"})})),vk=[{display:"Transaction amount",code:"txAmount"},{display:"Transaction volume",code:"txVolume"},{display:"Transaction velocity",code:"txVelocity"},{display:"Consecutive days",code:"consecutiveDays"}],yk=function(e){var t,n,r=Object.assign({},e),a=pk(),i=Object(ca.e)(),o=i.errors,c=i.touched,l=i.values,s=Object(v.a)({},a.error,o.triggerType&&c.triggerType),d=xo.a(null===l||void 0===l?void 0:l.triggerType),u=d(["txAmount","txVolume"]),m=d(["txVelocity"]),h=d(["txVolume","txVelocity"]),b=d(["consecutiveDays"]),p=Object(v.a)({},a.error,o.threshold&&(!d(["consecutiveDays"])&&(null===(t=c.threshold)||void 0===t?void 0:t.threshold)||!d(["txAmount"])&&(null===(n=c.threshold)||void 0===n?void 0:n.thresholdDays)));return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Xe.a,{display:"flex",alignItems:"center",children:Object(qe.jsx)(at,{className:w()(s),children:"Choose trigger type"})}),Object(qe.jsx)(ca.b,{component:ei,name:"triggerType",options:vk,labelClassName:a.radioLabel,radioClassName:a.radio,className:a.radioGroup}),Object(qe.jsxs)("div",{className:a.thresholdWrapper,children:[(u||m||h||b)&&Object(qe.jsx)(at,{className:w()(p,a.thresholdTitle),children:"Threshold"}),Object(qe.jsxs)("div",{className:a.thresholdContentWrapper,children:[u&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(ca.b,{className:a.thresholdField,component:Ja,size:"lg",name:"threshold.threshold"}),Object(qe.jsx)(ct,{className:w()(a.description),children:r.currency})]}),m&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(ca.b,{className:a.thresholdField,component:Ja,size:"lg",name:"threshold.threshold"}),Object(qe.jsx)(ct,{className:w()(a.description),children:"transactions"})]}),h&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(ct,{className:w()(s,a.space,a.description),children:"in"}),Object(qe.jsx)(ca.b,{className:a.thresholdField,component:Ja,size:"lg",name:"threshold.thresholdDays"}),Object(qe.jsx)(ct,{className:w()(a.description),children:"days"})]}),b&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(ca.b,{className:a.thresholdField,component:Ja,size:"lg",name:"threshold.thresholdDays"}),Object(qe.jsx)(ct,{className:w()(a.description),children:"consecutive days"})]})]})]})]})},wk=ma.d().shape({requirement:ma.d({requirement:ma.e().required(),suspensionDays:ma.c().when("requirement",{is:function(e){return"suspend"===e},then:ma.c().required().min(1),otherwise:ma.c().nullable().transform((function(){return null}))})}).required()}),Ck=[{display:"SMS verification",code:"sms"},{display:"ID card image",code:"idCardPhoto"},{display:"ID data",code:"idCardData"},{display:"Customer camera",code:"facephoto"},{display:"Sanctions",code:"sanctions"},{display:"US SSN",code:"usSsn"},{display:"Suspend",code:"suspend"},{display:"Block",code:"block"}],kk={schema:wk,options:Ck,Component:function(){var e,t=pk(),n=Object(ca.e)(),r=n.touched,a=n.errors,i=n.values,o=Object(v.a)({},t.error,!ga.a(us.a(["suspensionDays"],a.requirement))||a.requirement&&r.requirement&&a.requirement.suspensionDays&&r.requirement.suspensionDays),c="suspend"===(null===i||void 0===i||null===(e=i.requirement)||void 0===e?void 0:e.requirement);return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(Xe.a,{display:"flex",alignItems:"center",children:Object(qe.jsx)(at,{className:w()(o),children:"Choose a requirement"})}),Object(qe.jsx)(ca.b,{component:ei,name:"requirement.requirement",options:Ck,labelClassName:t.specialLabel,radioClassName:t.radio,className:w()(t.radioGroup,t.specialGrid)}),c&&Object(qe.jsx)(ca.b,{className:t.thresholdField,component:Ja,label:"Days",size:"lg",name:"requirement.suspensionDays"})]})},initialValues:{requirement:{requirement:"",suspensionDays:""}}},Sk=function(e,t,n){return function(r){return e?tr.a(ir.a(t),ja.a(sr.a(null!==n&&void 0!==n?n:"code",r)))(e):""}},Nk=function(){var e,t=Object(ca.e)().values,n=pk(),r=null===t||void 0===t||null===(e=t.requirement)||void 0===e?void 0:e.requirement,a="suspend"===r,i=Sk(Ck,"display")(r);return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",children:["".concat(i," ").concat(a?"for":""),a&&Object(qe.jsx)(ca.b,{bold:!0,className:n.suspensionDays,name:"requirement.suspensionDays",component:Ja,textAlign:"center"}),a&&"days"]})},Ek=function(e){var t=e.requirement,n=e.suspensionDays,r=pk(),a=Sk(Ck,"display")(t),i="suspend"===t;return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",children:["".concat(a," ").concat(i?"for":""),i&&Object(qe.jsx)(lt,{className:r.space,noMargin:!0,children:n}),i&&"days"]})},Ik=function(e){var t,n,r,a=e.config,i=e.currency,o=e.isEdit,c=pk(),l=(t={},Object(v.a)(t,c.input,!0),Object(v.a)(t,c.limitedInput,"txVelocity"===(null===a||void 0===a?void 0:a.triggerType)),Object(v.a)(t,c.daysInput,"consecutiveDays"===(null===a||void 0===a?void 0:a.triggerType)),t),s=null===a||void 0===a||null===(n=a.threshold)||void 0===n?void 0:n.threshold,d=null===a||void 0===a||null===(r=a.threshold)||void 0===r?void 0:r.thresholdDays,u=o?Object(qe.jsx)(ca.b,{bold:!0,className:w()(l),name:"threshold.threshold",component:Ja,textAlign:"right"}):Object(qe.jsx)(lt,{noMargin:!0,children:s}),m=o?Object(qe.jsx)(ca.b,{bold:!0,className:w()(l),name:"threshold.thresholdDays",component:Ja,textAlign:"right"}):Object(qe.jsx)(lt,{noMargin:!0,children:d});switch(null===a||void 0===a?void 0:a.triggerType){case"txAmount":return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(qe.jsx)(ht,{noMargin:!0,className:c.lastSpace,children:i})]});case"txVolume":return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(qe.jsx)(ht,{noMargin:!0,className:c.lastSpace,children:i}),Object(qe.jsx)(mt,{noMargin:!0,className:c.space,children:"in"}),m,Object(qe.jsx)(mt,{noMargin:!0,className:c.lastSpace,children:"days"})]});case"txVelocity":return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[u,Object(qe.jsx)(mt,{className:c.space,noMargin:!0,children:"transactions in"}),m,Object(qe.jsx)(mt,{className:c.lastSpace,noMargin:!0,children:"days"})]});case"consecutiveDays":return Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"baseline",justifyContent:"right",children:[m,Object(qe.jsx)(mt,{className:c.lastSpace,noMargin:!0,children:"days"})]});default:return""}},Lk=Object(r.memo)((function(e){var t=e.currency,n=Object(ca.e)().values;return Object(qe.jsx)(Ik,{isEdit:!0,config:n,currency:t})})),Fk=function(e){var t=e.config,n=e.currency;return Object(qe.jsx)(Ik,{config:t,currency:n})},Pk=function(e,t){return[{name:"triggerType",size:"sm",width:230,input:function(e){var t=e.field.value;return Object(qe.jsx)(qe.Fragment,{children:Sk(vk,"display")(t)})},view:Sk(vk,"display"),inputProps:{options:vk,valueProp:"code",labelProp:"display",optionsLimit:null}},{name:"requirement",size:"sm",width:230,bypassField:!0,input:Nk,view:function(e){return Object(qe.jsx)(Ek,Object(l.a)({},e))}},{name:"threshold",size:"sm",width:284,textAlign:"left",input:function(){return Object(qe.jsx)(Lk,{currency:e})},view:function(t,n){return Object(qe.jsx)(Fk,{config:n,currency:e})}}]},Bk=ar.a(ir.a("code"))(vk),Dk=[bk.a((function(e,t){return Bk.indexOf(e.triggerType)<Bk.indexOf(t.triggerType)}))],Rk=function(e){return ar.a((function(e){var t=e.requirement,n=e.threshold,r=Object(Ue.a)(e,["requirement","threshold"]);return Object(l.a)({requirement:t.requirement,suspensionDays:t.suspensionDays,threshold:n.threshold,thresholdDays:n.thresholdDays},r)}))(e)},Tk={stepper:{margin:[[16,0,14,0]]},submit:{display:"flex",flexDirection:"row",margin:[["auto",0,24]]},button:{marginLeft:"auto"},form:{height:"100%",display:"flex",flexDirection:"column"},infoTitle:{margin:[[18,0,20,0]]},infoCurrentText:{color:q},blankSpace:{padding:[[0,30]],margin:[[0,4,0,2]],borderBottom:"1px solid ".concat(q),display:"inline-block"}},Ak=Object(b.a)(Tk),Wk=function(e,t){switch(e){case 1:return function(e){return{schema:xk,options:vk,Component:yk,props:{currency:e},initialValues:{triggerType:"",threshold:{threshold:"",thresholdDays:""}}}}(t);case 2:return kk;default:return r.Fragment}},zk=function(e,t,n,r){switch(e){case 1:return Object(qe.jsxs)(qe.Fragment,{children:["If the user ",Hk(t,n,r)]});case 2:return Object(qe.jsxs)(qe.Fragment,{children:["the user will be ",qk(t,r),"."]});default:return Object(qe.jsx)(qe.Fragment,{})}},Mk=function(e,t){var n=Object(qe.jsx)("span",{className:t.blankSpace});return ga.a(e)||rr.a(e)?n:e},Hk=function(e,t,n){switch(e.triggerType){case"txAmount":return Object(qe.jsxs)(qe.Fragment,{children:["makes a single transaction over"," ",Mk(e.threshold.threshold,n)," ",t]});case"txVolume":return Object(qe.jsxs)(qe.Fragment,{children:["makes ",Mk(e.threshold.threshold,n)," ",t," ","worth of transactions within"," ",Mk(e.threshold.thresholdDays,n)," ",Bs(e.threshold.thresholdDays,"day","days")]});case"txVelocity":return Object(qe.jsxs)(qe.Fragment,{children:["makes ",Mk(e.threshold.threshold,n)," ",Bs(e.threshold.threshold,"transaction","transactions")," ","in ",Mk(e.threshold.thresholdDays,n)," ",Bs(e.threshold.thresholdDays,"day","days")]});case"consecutiveDays":return Object(qe.jsxs)(qe.Fragment,{children:["at least one transaction every day for"," ",Mk(e.threshold.thresholdDays,n)," ",Bs(e.threshold.thresholdDays,"day","days")]});default:return Object(qe.jsx)(qe.Fragment,{})}},qk=function(e,t){var n;switch(null===(n=e.requirement)||void 0===n?void 0:n.requirement){case"sms":return Object(qe.jsx)(qe.Fragment,{children:"asked to enter code provided through SMS verification"});case"idCardPhoto":return Object(qe.jsx)(qe.Fragment,{children:"asked to scan a ID with photo"});case"idCardData":return Object(qe.jsx)(qe.Fragment,{children:"asked to scan a ID"});case"facephoto":return Object(qe.jsx)(qe.Fragment,{children:"asked to have a photo taken"});case"usSsn":return Object(qe.jsx)(qe.Fragment,{children:"asked to input his social security number"});case"sanctions":return Object(qe.jsx)(qe.Fragment,{children:"matched against the OFAC sanctions list"});case"superuser":return Object(qe.jsx)(qe.Fragment,{});case"suspend":return Object(qe.jsxs)(qe.Fragment,{children:["suspended for"," ",Mk(e.requirement.suspensionDays,t)," ",Bs(e.requirement.suspensionDays,"day","days")]});case"block":return Object(qe.jsx)(qe.Fragment,{children:"blocked"});default:return Mk(null,t)}},$k=function(e){var t=e.step,n=e.config,r=void 0===n?{}:n,a=e.liveValues,i=void 0===a?{}:a,o=e.currency,c=Ak(),l=vd.a(1,t).map((function(e){return zk(e,r,o,c)})),s=zk(t,i,o,c),d=2===t;return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(it,{className:c.infoTitle,children:"Trigger overview so far"}),Object(qe.jsxs)(st,{noMargin:!0,className:c.infoText,children:[l,1!==t&&", ",s,!d&&"..."]})]})},Vk=function(e){var t=e.setValues,n=Object(ca.e)().values;return Object(r.useEffect)((function(){t&&n&&t(n)}),[t,n]),null},Yk=function(e){var t=e.onClose,n=e.save,a=e.error,i=e.currency,o=Ak(),s=Object(r.useState)({}),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(r.useState)({step:1}),b=Object(c.a)(h,2),p=b[0],j=p.step,f=p.config,g=b[1],O=2===j,x=Wk(j,i),v=function(){var e=Object(No.a)(So.a.mark((function e(t){var r;return So.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_t.a(f,x.schema.cast(t)),!O){e.next=3;break}return e.abrupt("return",n(r));case 3:g({step:j+1,config:r});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(qe.jsx)(qe.Fragment,{children:Object(qe.jsxs)(vc,{title:"New compliance trigger",handleClose:t,width:520,height:520,infoPanel:Object(qe.jsx)($k,{currency:i,step:j,config:f,liveValues:u}),infoPanelHeight:172,open:!0,children:[Object(qe.jsx)(Pd,{className:o.stepper,steps:2,currentStep:j}),Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,onSubmit:v,initialValues:x.initialValues,validationSchema:x.schema,children:Object(qe.jsxs)(ca.c,{className:o.form,children:[Object(qe.jsx)(Vk,{setValues:m}),Object(qe.jsx)(x.Component,Object(l.a)({},x.props)),Object(qe.jsxs)("div",{className:o.submit,children:[a&&Object(qe.jsx)(gt,{children:"Failed to save"}),Object(qe.jsx)(zt,{className:o.button,type:"submit",children:O?"Finish":"Next"})]})]})})]})})},Xk=Object(b.a)({switchLabel:{margin:6,width:24},tableRadioGroup:{flexDirection:"row",justifyContent:"space-between"},tableRadioLabel:{marginRight:0},tableWidth:{width:918}}),Uk=er()(ZC||(ZC=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"]))),Gk=er()(_C||(_C=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),Zk=function(){var e,t,n,a=Xk(),i=Object(r.useState)(!1),o=Object(c.a)(i,2),s=o[0],d=o[1],u=Object(Qn.c)(Gk),m=u.data,h=u.loading,b=function(e){return ar.a((function(e){var t=e.requirement,n=e.suspensionDays,r=e.threshold,a=e.thresholdDays,i=Object(Ue.a)(e,["requirement","suspensionDays","threshold","thresholdDays"]);return Object(l.a)({requirement:{requirement:t,suspensionDays:n},threshold:{threshold:r,thresholdDays:a}},i)}))(e)}(null!==(e=null===m||void 0===m||null===(t=m.config)||void 0===t?void 0:t.triggers)&&void 0!==e?e:[]),p=(null===m||void 0===m?void 0:m.config)&&pc("compliance")(m.config),j=null!==(n=null===p||void 0===p?void 0:p.rejectAddressReuse)&&void 0!==n&&n,f=Object(r.useState)(null),g=Object(c.a)(f,2),O=g[0],x=g[1],v=Object(Qn.b)(Uk,{onCompleted:function(){return d(!1)},refetchQueries:function(){return["getData"]},onError:function(e){return x(e)}}),y=Object(c.a)(v,1)[0],w=cr.a(["fiatCurrency"])(pc(cc)(null===m||void 0===m?void 0:m.config));return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Compliance Triggers",className:a.tableWidth,children:Object(qe.jsx)(Xe.a,{display:"flex",alignItems:"center",children:Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"center",justifyContent:"end",mr:"-5px",children:[Object(qe.jsx)(ot,{children:"Reject reused addresses"}),Object(qe.jsx)(Ta,{checked:j,onChange:function(e){!function(e){var t=jc("compliance")(e);y({variables:{config:t}})}({rejectAddressReuse:e.target.checked})},value:j}),Object(qe.jsx)(ht,{className:a.switchLabel,children:j?"On":"Off"}),Object(qe.jsx)(Ao,{width:304,children:Object(qe.jsx)(ot,{children:"This option requires a user to scan a different cryptocurrency address if they attempt to scan one that had been previously used for a transaction in your network"})})]})})}),Object(qe.jsx)(Xe.a,{marginBottom:2,className:a.tableWidth,display:"flex",justifyContent:"flex-end",children:!h&&!ga.a(b)&&Object(qe.jsx)(mn,{color:"primary",onClick:function(){return d(!0)},children:"+ Add new trigger"})}),Object(qe.jsx)(sd,{data:b,name:"triggers",enableEdit:!0,sortBy:Dk,groupBy:"triggerType",enableDelete:!0,error:null===O||void 0===O?void 0:O.message,save:function(e){return x(null),y({variables:{config:{triggers:Rk(e.triggers)}}})},validationSchema:Ok,elements:Pk(w)}),s&&Object(qe.jsx)(Yk,{currency:w,error:null===O||void 0===O?void 0:O.message,save:function(e){var t=jo.a([Object(l.a)({id:Object(Os.a)(),direction:"both"},e)])(b);return y({variables:{config:{triggers:Rk(t)}}})},onClose:function(){return d(null)}}),!h&&ga.a(b)&&Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"center",flexDirection:"column",mt:15,children:[Object(qe.jsx)(nt,{children:"It seems there are no active compliance triggers on your network"}),Object(qe.jsx)(zt,{onClick:function(){return d(!0)},children:"Add first trigger"})]})]})},_k=er()(KC||(KC=Object(Kn.a)(["\n mutation Save($config: JSONObject, $accounts: JSONObject) {\n saveConfig(config: $config)\n saveAccounts(accounts: $accounts)\n }\n"]))),Kk=er()(QC||(QC=Object(Kn.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),Qk=er()(JC||(JC=Object(Kn.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n deprecated\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),Jk=function(e){var t,n,a,i=e.name,o=Object(r.useState)(null),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(null),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(r.useState)(!1),j=Object(c.a)(p,2),f=j[0],g=j[1],O=Object(Qn.c)(Qk).data,x=Object(Qn.b)(_k,{onCompleted:function(){return g(!1)},refetchQueries:function(){return["getData"]}}),y=Object(c.a)(x,2),w=y[0],C=y[1].error,k=Object(Qn.b)(Kk,{onCompleted:function(){return d(null)},refetchQueries:function(){return["getData"]}}),S=Object(c.a)(k,1)[0],N=function(e,t){var n=jc(i)(e);return w({variables:{config:n,accounts:t}})},E=(null===O||void 0===O?void 0:O.config)&&pc(i)(O.config),I=null===O||void 0===O?void 0:O.accountsConfig,L=null!==(t=null===O||void 0===O?void 0:O.cryptoCurrencies)&&void 0!==t?t:[],F=null!==(n=null===O||void 0===O?void 0:O.accounts)&&void 0!==n?n:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(qn,{title:"Wallet Settings"}),Object(qe.jsx)(dd,{name:"test",namespaces:ar.a(cr.a(["code"]))(L),data:E,error:null===C||void 0===C?void 0:C.message,stripeWhen:function(e){return!ag.isValidSync(e)},enableEdit:!0,shouldOverrideEdit:function(e){var t=pc(e)(E);return!ag.isValidSync(t)},editOverride:g,editWidth:174,save:N,validationSchema:ag,elements:ig(L,I,(function(e,t,n){return t?!F[t]&&Qj[t]?(d(Qj[t]),void b((function(){return function(){return n(t)}}))):void n(t):n(t)}))}),f&&Object(qe.jsx)(tg,{coin:ja.a(sr.a("code",f))(L),onClose:function(){return g(!1)},save:N,error:null===C||void 0===C?void 0:C.message,cryptoCurrencies:L,userAccounts:null===O||void 0===O||null===(a=O.config)||void 0===a?void 0:a.accounts,accounts:F,accountsConfig:I}),s&&Object(qe.jsx)(vc,{title:"Edit ".concat(s.name),width:478,handleClose:function(){return d(null)},open:!0,children:Object(qe.jsx)(Xf,{save:function(e){return S({variables:{accounts:Object(v.a)({},s.code,e)}}).then((function(e){return h(),b(null),e}))},elements:s.elements,validationSchema:s.validationSchema,value:F[s.code]})})]})},eS=n(298),tS=Object(b.a)(Si),nS=er()(ek||(ek=Object(Kn.a)(["\n query getData {\n config\n }\n"]))),rS=er()(tk||(tk=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"])));var aS,iS,oS=function(e){var t=e.isActive,n=e.doContinue,r=tS(),a=Object(Qn.c)(nS).data,i=Object(Qn.b)(rS,{onCompleted:n}),o=Object(c.a)(i,1)[0],l=cr.a(["fiatCurrency"])(pc(cc)(null===a||void 0===a?void 0:a.config));return Object(qe.jsxs)("div",{className:r.wrapper,children:[Object(qe.jsx)(qn,{title:"Commissions"}),Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{title:"Default setup",rowSize:"lg",titleLg:!0,name:"commissions",initialValues:Zu,enableEdit:!0,forceAdd:t,save:function(e){var t=jc("commissions")(e.commissions[0]);return o({variables:{config:t}})},validationSchema:Uu,data:[],elements:$u(l)})})]})},cS=Object(b.a)(Si),lS=er()(aS||(aS=Object(Kn.a)(["\n query getData {\n config\n accounts\n currencies {\n code\n display\n }\n countries {\n code\n display\n }\n cryptoCurrencies {\n code\n display\n }\n languages {\n code\n display\n }\n machines {\n name\n deviceId\n }\n }\n"]))),sS=er()(iS||(iS=Object(Kn.a)(["\n mutation Save($config: JSONObject) {\n saveConfig(config: $config)\n }\n"])));var dS,uS,mS=function(e){var t=e.isActive,n=e.doContinue,r=cS(),a=Object(Qn.c)(lS).data,i=Object(Qn.b)(sS,{onCompleted:n}),o=Object(c.a)(i,1)[0],l=mN((null===a||void 0===a?void 0:a.config)||{},(null===a||void 0===a?void 0:a.cryptoCurrencies)||[]);return Object(qe.jsxs)("div",{className:r.wrapper,children:[Object(qe.jsx)(qn,{title:"Locales"}),Object(qe.jsx)(gu,{children:Object(qe.jsx)(sd,{title:"Default settings",rowSize:"lg",titleLg:!0,name:"locale",initialValues:hg,forceAdd:t,enableEdit:!0,save:function(e){var t=jc("locale")(e.locale[0]);return o({variables:{config:t}})},validationSchema:ug,data:[],elements:sg(_t.a(a,{cryptoCurrencies:l}),(function(e,t,n){return n(t)}))})})]})},hS=Object(b.a)({message:function(e){return{width:e.width,marginTop:4,marginLeft:16}}}),bS=function(e){var t=e.children,n=e.width,r=void 0===n?330:n,a=e.className,i=hS({width:r});return Object(qe.jsxs)(Xe.a,{display:"flex",className:a,children:[Object(qe.jsx)(wi,{}),Object(qe.jsx)(mt,{className:i.message,children:t})]})},pS={radioGroup:{flexDirection:"row",width:600},radioLabel:{width:150,height:48},mdForm:{width:385},infoMessage:{display:"flex",marginBottom:20,"& > p":{width:330,marginTop:4,marginLeft:16}},actionButton:{marginBottom:32},actionButtonLink:{textDecoration:"none",color:J},error:{color:me},button:{marginTop:40},formButton:{margin:[[24,0,0]]}},jS=er()(dS||(dS=Object(Kn.a)(["\n {\n config\n accounts\n }\n"]))),fS=er()(uS||(uS=Object(Kn.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),gS=Object(b.a)(Object(l.a)(Object(l.a)({},pS),{},{content:{width:820},radioLabel:Object(l.a)(Object(l.a)({},pS.radioLabel),{},{width:280}),wrapper:{width:1200,height:100,margin:[[0,"auto"]]},title:{marginLeft:8,marginBottom:5},info:{marginTop:20,marginBottom:20}})),OS=[{code:"enable",display:"Yes, I will"},{code:"disable",display:"No, not for now"}];var xS,vS,yS,wS,CS,kS,SS,NS,ES,IS,LS=function(e){var t,n,a=e.doContinue,i=gS(),o=Object(r.useState)(null),l=Object(c.a)(o,2),s=l[0],d=l[1],u=Object(r.useState)(!1),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(Qn.c)(jS),j=p.data,f=p.refetch,g=Object(Qn.b)(fS,{onCompleted:a}),O=Object(c.a)(g,1)[0],x=null!==(t=null===j||void 0===j?void 0:j.accounts)&&void 0!==t?t:[],y=(n={},Object(v.a)(n,i.title,!0),Object(v.a)(n,i.error,h),n);return Object(qe.jsx)("div",{className:i.wrapper,children:Object(qe.jsxs)("div",{className:i.content,children:[Object(qe.jsx)(tt,{children:"Twilio (SMS service)"}),Object(qe.jsxs)(Xe.a,{display:"flex",alignItems:"end",children:[Object(qe.jsx)(at,{noMargin:!0,className:w()(y),children:"Will you setup a two way machine or compliance?"}),Object(qe.jsxs)(Ao,{width:304,children:[Object(qe.jsx)(ot,{children:"Two-way machines allow your customers not only to buy (cash-in) but also sell cryptocurrencies (cash-out)."}),Object(qe.jsx)(ot,{children:"You\u2019ll need an SMS service for cash-out transactions and for any compliance triggers"})]})]}),Object(qe.jsx)(Pa,{labelClassName:i.radioLabel,className:i.radioGroup,options:OS,value:s,onChange:function(e){d(e.target.value),b(!1)}}),Object(qe.jsx)(bS,{className:i.info,children:"To set up Twilio please read the instructions from our support portal."}),Object(qe.jsx)(zn,{link:"https://support.lamassu.is/hc/en-us/articles/115001203951-Twilio-for-SMS",label:"Twilio for SMS"}),"enable"===s&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(at,{noMargin:!0,children:"Enter credentials"}),Object(qe.jsx)(Xf,{xs:6,save:function(e){return O({variables:{accounts:{twilio:e}}}).then((function(){return f()}))},value:x.twilio,elements:Kj.elements,validationSchema:Kj.validationSchema,buttonLabel:"Continue",buttonClass:i.formButton})]}),"enable"!==s&&Object(qe.jsx)(zt,{size:"lg",onClick:function(){if(!s)return b(!0);a()},className:i.button,children:"Continue"})]})})},FS=n(691),PS=Object(b.a)(pS),BS=er()(xS||(xS=Object(Kn.a)(["\n query getData {\n config\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),DS=er()(vS||(vS=Object(Kn.a)(["\n mutation Save($config: JSONObject, $accounts: JSONObject) {\n saveConfig(config: $config)\n saveAccounts(accounts: $accounts)\n }\n"]))),RS=function(e){var t,n=e.data,a=e.doContinue,i=PS(),o=Object(Qn.c)(BS).data,l=Object(Qn.b)(DS,{onCompleted:a}),s=Object(c.a)(l,1)[0],d=Object(r.useState)(!1),u=Object(c.a)(d,2),m=u[0],h=u[1],b=null===n||void 0===n?void 0:n.coin,p=null===o||void 0===o?void 0:o.accountsConfig,j=null!==(t=null===o||void 0===o?void 0:o.cryptoCurrencies)&&void 0!==t?t:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(at,{className:m&&i.error,children:"All set"}),Object(qe.jsx)(ot,{children:"These are your wallet settings. You can later edit these and add additional coins."}),Object(qe.jsx)(dd,{rowSize:"lg",titleLg:!0,name:"All set",namespaces:[b],data:jc(b,us.a("coin",n)),elements:ig(j,p,!0)}),Object(qe.jsx)(zt,{size:"lg",onClick:function(){if(!ag.isValidSync(n))return h(!0);var e=jc(b,us.a("coin",n)),t=jc(ac)(e);return h(!1),s({variables:{config:t}})},className:i.button,children:"Continue"})]})},TS=Object(b.a)(Object(l.a)(Object(l.a)({},pS),{},{radioGroup:pS.radioGroup,radioLabel:Object(l.a)(Object(l.a)({},pS.radioLabel),{},{width:200})})),AS=er()(yS||(yS=Object(Kn.a)(["\n {\n accounts\n }\n"]))),WS=er()(wS||(wS=Object(Kn.a)(["\n mutation SaveAccountsBC($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),zS=[{code:"enable",display:"I will enable cash-out"},{code:"disable",display:"I won't enable cash-out"}],MS=function(e){var t,n=e.addData,a=TS(),i=Object(Qn.c)(AS).data,o=Object(Qn.b)(WS,{onCompleted:function(){return n({zeroConf:"blockcypher"})}}),l=Object(c.a)(o,1)[0],s=Object(r.useState)(null),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(r.useState)(!1),b=Object(c.a)(h,2),p=b[0],j=b[1],f=null!==(t=null===i||void 0===i?void 0:i.accounts)&&void 0!==t?t:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(at,{className:p&&a.error,children:"Blockcypher"}),Object(qe.jsx)(ot,{children:"If you are enabling cash-out services, create a Blockcypher account."}),Object(qe.jsx)(zn,{link:"https://support.lamassu.is/hc/en-us/articles/115001209472-Blockcypher",label:"Configuring Blockcypher"}),Object(qe.jsx)(Pa,{labelClassName:a.radioLabel,className:a.radioGroup,options:zS,value:u,onChange:function(e){m(e.target.value),j(!1)}}),Object(qe.jsxs)("div",{className:a.mdForm,children:["disable"===u&&Object(qe.jsx)(zt,{size:"lg",onClick:function(){return n({zeroConf:"all-zero-conf"})},className:a.button,children:"Continue"}),"enable"===u&&Object(qe.jsx)(Xf,{value:f.blockcypher,save:function(e){return l({variables:{accounts:{blockcypher:e}}})},elements:Qj.blockcypher.elements,validationSchema:Qj.blockcypher.validationSchema,buttonLabel:"Continue",buttonClass:a.formButton})]})]})},HS=Object(b.a)(pS),qS=er()(CS||(CS=Object(Kn.a)(["\n {\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),$S=ma.d().shape({coin:ma.e().required()}),VS=function(e){var t,n=e.addData,a=HS(),i=Object(r.useState)(!1),o=Object(c.a)(i,2),l=o[0],s=o[1],d=Object(Qn.c)(qS).data,u=null!==(t=null===d||void 0===d?void 0:d.cryptoCurrencies)&&void 0!==t?t:[];return Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(at,{className:l&&a.error,children:"Choose your first cryptocurrency"}),Object(qe.jsx)(ca.d,{validateOnBlur:!1,validateOnChange:!1,enableReinitialize:!0,initialValues:{coin:""},onSubmit:function(e){return $S.isValidSync(e)?"BTC"!==e.coin?n({coin:e.coin,zeroConf:"all-zero-conf"}):void n(e):s(!0)},children:Object(qe.jsxs)(ca.c,{onChange:function(){return s(!1)},children:[Object(qe.jsx)(vs,{}),Object(qe.jsx)(ca.b,{component:ei,name:"coin",labelClassName:a.radioLabel,className:a.radioGroup,options:u}),Object(qe.jsx)(zt,{size:"lg",type:"submit",className:a.button,children:"Continue"})]})})]})},YS=function(e,t){return lr.a((function(n){return function(e){return sr.a("class",e)}(t)(n)&&function(e){return tr.a(xo.a(e),ir.a("cryptos"))}(e)(n)}))},XS=function(e,t,n,r){var a=YS(r,n)(e),i=ws.a((function(e){var n=e.code,r=function(e){return t&&t[e]}(n);return!Qj[n]||(0,Qj[n].getValidationSchema)(r).isValidSync(r)}))(a),o=Object(c.a)(i,2);return{filled:o[0],unfilled:o[1]}},US=Object(b.a)(pS),GS=er()(kS||(kS=Object(Kn.a)(["\n {\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),ZS=er()(SS||(SS=Object(Kn.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),_S=function(e){return xo.a(e)(["kraken","itbit","bitstamp"])},KS=function(e){var t,n,a,i=e.data,o=e.addData,l=US(),s=Object(Qn.c)(GS).data,d=Object(Qn.b)(ZS,{onCompleted:function(){return k()}}),u=Object(c.a)(d,1)[0],m=Object(r.useState)(null),h=Object(c.a)(m,2),b=h[0],p=h[1],j=Object(r.useState)(!1),f=Object(c.a)(j,2),g=f[0],O=f[1],x=null!==(t=null===s||void 0===s?void 0:s.accounts)&&void 0!==t?t:[],y=null!==(n=null===s||void 0===s?void 0:s.accountsConfig)&&void 0!==n?n:[],w=i.coin,C=XS(y,x,"exchange",w),k=function(){if(!b)return O(!0);o({exchange:b})};return Object(qe.jsxs)("div",{className:l.mdForm,children:[Object(qe.jsx)(at,{className:g&&l.error,children:"Choose your exchange"}),Object(qe.jsx)(Pa,{labelClassName:l.radioLabel,className:l.radioGroup,options:fa.a(C.filled,C.unfilled),value:b,onChange:function(e){p(e.target.value),O(!1)}}),!_S(b)&&Object(qe.jsx)(zt,{size:"lg",onClick:k,className:l.button,children:"Continue"}),_S(b)&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:l.infoMessage,children:[Object(qe.jsx)(wi,{}),Object(qe.jsxs)(st,{children:["Make sure you set up ",Qj[b].name," to enter the necessary information below. Please follow the instructions on our support page if you haven\u2019t."]})]}),Object(qe.jsx)(zn,{link:{kraken:"https://support.lamassu.is/hc/en-us/articles/115001206891-Kraken-trading",itbit:"https://support.lamassu.is/hc/en-us/articles/360026195032-itBit-trading",bitstamp:"https://support.lamassu.is/hc/en-us/articles/115001206911-Bitstamp-trading"}[b],label:"".concat(Qj[b].name," trading")}),Object(qe.jsx)(at,{noMargin:!0,children:"Enter exchange information"}),Object(qe.jsx)(Xf,{value:x[b],save:(a=b,function(e){var t=Object(v.a)({},a,e);return u({variables:{accounts:t}})}),elements:Qj[b].elements,validationSchema:Qj[b].validationSchema,buttonLabel:"Continue",buttonClass:l.formButton})]})]})},QS=Object(b.a)(pS),JS=er()(NS||(NS=Object(Kn.a)(["\n {\n accountsConfig {\n code\n display\n class\n cryptos\n }\n }\n"]))),eN=function(e){var t,n,a=e.data,i=e.addData,o=QS(),l=Object(Qn.c)(JS).data,s=Object(r.useState)(null),d=Object(c.a)(s,2),u=d[0],m=d[1],h=Object(r.useState)(!1),b=Object(c.a)(h,2),p=b[0],j=b[1],f=null!==(t=null===l||void 0===l?void 0:l.accounts)&&void 0!==t?t:[],g=null!==(n=null===l||void 0===l?void 0:l.accountsConfig)&&void 0!==n?n:[],O=a.coin,x=XS(g,f,"ticker",O);return Object(qe.jsxs)("div",{className:o.mdForm,children:[Object(qe.jsx)(at,{className:p&&o.error,children:"Choose your ticker"}),Object(qe.jsx)(Pa,{labelClassName:o.radioLabel,className:o.radioGroup,options:fa.a(x.filled,x.unfilled),value:u,onChange:function(e){m(e.target.value),j(!1)}}),Object(qe.jsx)(zt,{size:"lg",onClick:function(){if(!u)return j(!0);i({ticker:u})},className:o.button,children:"Continue"})]})},tN=function(e){var t;return{code:"bitgo",name:"BitGo",title:"BitGo (Wallet)",elements:[{code:"token",display:"API Token",component:ni,face:!0,long:!0},{code:"environment",display:"Environment",component:Aa,inputProps:{options:[{code:"prod",display:"prod"},{code:"test",display:"test"}],labelProp:"display",valueProp:"code"},face:!0},{code:"".concat(e,"WalletId"),display:"".concat(e," Wallet ID"),component:ni},{code:"".concat(e,"WalletPassphrase"),display:"".concat(e," Wallet Passphrase"),component:ti}],validationSchema:ma.d().shape((t={token:ma.e().max(100,"Too long").required(),environment:ma.e().matches(/(prod|test)/).required()},Object(v.a)(t,"".concat(e,"WalletId"),ma.e().max(100,"Too long").required()),Object(v.a)(t,"".concat(e,"WalletPassphrase"),ma.e().max(100,"Too long").required()),t))}},nN=Object(b.a)(pS),rN=er()(ES||(ES=Object(Kn.a)(["\n {\n accounts\n accountsConfig {\n code\n display\n class\n cryptos\n }\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),aN=er()(IS||(IS=Object(Kn.a)(["\n mutation Save($accounts: JSONObject) {\n saveAccounts(accounts: $accounts)\n }\n"]))),iN=function(e){return xo.a(e)(["infura","bitgo"])},oN=function(e){var t,n,a,i=e.data,o=e.addData,l=nN(),s=Object(Qn.c)(rN).data,d=Object(Qn.b)(aN,{onCompleted:function(){return S()}}),u=Object(c.a)(d,1)[0],m=Object(r.useState)(null),h=Object(c.a)(m,2),b=h[0],p=h[1],j=Object(r.useState)(!1),f=Object(c.a)(j,2),g=f[0],O=f[1],x=null!==(t=null===s||void 0===s?void 0:s.accounts)&&void 0!==t?t:[],y=null!==(n=null===s||void 0===s?void 0:s.accountsConfig)&&void 0!==n?n:[],w=i.coin,C=XS(y,x,"wallet",w),k=function(e){return function(t){var n=Object(v.a)({},e,t);return u({variables:{accounts:n}})}},S=function(){if(!b)return O(!0);o({wallet:b})};return Object(qe.jsxs)("div",{className:l.mdForm,children:[Object(qe.jsx)(at,{className:g&&l.error,children:"Choose your wallet"}),Object(qe.jsx)(Pa,{labelClassName:l.radioLabel,className:l.radioGroup,options:fa.a(C.filled,C.unfilled),value:b,onChange:function(e){p(e.target.value),O(!1)}}),(a=b,xo.a(a)(["bitcoind","geth","litecoind","dashd","zcashd","bitcoincashd"])&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:l.infoMessage,children:[Object(qe.jsx)(wi,{}),Object(qe.jsxs)(st,{children:["To set up ",b," please read the node wallet instructions from our support portal."]})]}),Object(qe.jsx)(zn,{link:"https://support.lamassu.is/hc/en-us/articles/115001209552-Setting-up-your-node-wallets",label:"Support article"})]})),!iN(b)&&Object(qe.jsx)(zt,{size:"lg",onClick:S,className:l.button,children:"Continue"}),"bitgo"===b&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsxs)("div",{className:l.infoMessage,children:[Object(qe.jsx)(wi,{}),Object(qe.jsx)(st,{children:"Make sure you set up a BitGo wallet to enter the necessary information below. Please follow the instructions on our support page if you haven\u2019t."})]}),Object(qe.jsx)(zn,{link:"https://support.lamassu.is/hc/en-us/articles/360024455592-Setting-up-BitGo",label:"Support article"}),Object(qe.jsx)(at,{noMargin:!0,children:"Enter wallet information"}),Object(qe.jsx)(Xf,{value:x.bitgo,save:k(b),elements:tN(w).elements,validationSchema:tN(w).validationSchema,buttonLabel:"Continue",buttonClass:l.formButton})]}),"infura"===b&&Object(qe.jsxs)(qe.Fragment,{children:[Object(qe.jsx)(at,{noMargin:!0,children:"Enter wallet information"}),Object(qe.jsx)(Xf,{value:x.infura,save:k(b),elements:Qj.infura.elements,validationSchema:Qj.infura.getValidationSchema(x.infura),buttonLabel:"Continue",buttonClass:l.formButton})]})]})},cN=Object(b.a)(Si),lN=[{label:"Choose cryptocurrency",component:VS},{label:"Choose wallet",component:oN},{label:"Choose ticker",component:eN},{label:"Exchange",component:KS},{label:"Blockcypher",component:MS},{label:"All set",component:RS}],sN=function(e){var t=e.doContinue,n=Object(r.useState)(0),a=Object(c.a)(n,2),i=a[0],o=a[1],l=Object(r.useState)({}),s=Object(c.a)(l,2),d=s[0],u=s[1],m=cN(),h="BTC"===(null===d||void 0===d?void 0:d.coin)?lN:FS.a(4,1,lN),b=h[i].component;return Object(qe.jsxs)("div",{className:m.wrapper,children:[Object(qe.jsx)("div",{className:m.headerDiv,children:Object(qe.jsx)(qn,{title:"Wallet settings"})}),Object(qe.jsxs)("div",{className:m.contentDiv,children:[Object(qe.jsx)(Ve,{children:h.map((function(e,t){return Object(qe.jsx)(Ye,{step:i,it:e,idx:t,steps:h},t)}))}),Object(qe.jsx)("div",{className:m.contentWrapper,children:Object(qe.jsx)(b,{data:d,addData:function(e){u(_t.a(d,e)),o(i+1)},doContinue:t})})]})]})},dN={welcome:{textAlign:"center",paddingTop:256},title:{lineHeight:1,fontSize:48},getStarted:{fontSize:24,fontWeight:500,marginBottom:54,color:q}},uN=Object(b.a)(dN);var mN=function(e,t){var n=pc(ac,e);return lr.a((function(e){return ag.isValidSync(pc(e.code,n))}))(t)},hN=function(e,t){return e?function(e,t){var n=pc(ac,e),r=ar.a((function(e){return pc(e.code,n)}))(t);return tr.a(fo.a(eS.a),ar.a((function(e){return ag.isValidSync(e)})))(r)}(e,t)?function(e){var t=pc(cc,e);return ug.isValidSync(t)}(e)?function(e){var t=pc(lc,e);return Uu.isValidSync(t)}(e)?0:3:2:1:0},bN=[{id:"welcome",Component:function(e){var t=e.doContinue,n=uN();return Object(qe.jsxs)("div",{className:n.welcome,children:[Object(qe.jsx)(tt,{className:n.title,children:"Welcome to the Lamassu Admin"}),Object(qe.jsxs)(ot,{className:n.getStarted,children:["To get you started, we\u2019ve put together a wizard that will",Object(qe.jsx)("br",{}),"help set up what you need before pairing your machines."]}),Object(qe.jsx)(zt,{size:"xl",onClick:t,children:"Get started"})]})}},{id:"wallet",Component:sN,exImage:"/assets/wizard/fullexample.wallet.png",subtitle:"Wallet settings",text:"Your wallet settings are the first step for this wizard. \n We'll start by setting up one of cryptocurrencies to get you up and running,\n but you can later set up as many as you want."},{id:"locale",Component:mS,exImage:"/assets/wizard/fullexample.locale.png",subtitle:"Locales",text:"From the Locales panel, you can define default settings\n that will be applied to all machines you add to your network later on.\n These settings may be overridden for specific machines in the Overrides section."},{id:"twilio",Component:LS,exImage:"/assets/wizard/fullexample.twilio.png",subtitle:"Twilio (SMS service)",text:Object(qe.jsxs)(qe.Fragment,{children:["Twilio is used for SMS operator notifications, phone number collection for compliance, and 1-confirmation redemptions on cash-out transactions.",Object(qe.jsx)("br",{}),"You'll need to configure Twilio if you're offering cash-out or any compliance options"]})},{id:"commissions",Component:oS,exImage:"/assets/wizard/fullexample.commissions.png",subtitle:"Commissions",text:"From the Commissions page, you can define all the commissions of your\n machines. The values set here will be default values of all machines\n you'll later add to your network. Default settings keep you from\n having to enter the same values everytime you add a new machine. Once\n a machine is added, you may override these values per machine and per\n cryptocurrency in the overrides section."}],pN=n(692),jN=Object(b.a)((function(){return{drawer:{borderTop:"none",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.08)"},wrapper:{padding:"32px 0",flexGrow:1,height:264},smallWrapper:{height:84},title:{margin:[[0,32,0,0]]},subtitle:{marginTop:8,marginBottom:6,lineHeight:1.25,display:"inline"},modal:{background:"none",boxShadow:"none"}}}));var fN,gN,ON=function(e){var t,n=e.currentStep,a=e.steps,i=e.subtitle,o=e.text,l=e.exImage,s=e.open,d=e.start,m=jN(),h=Object(r.useState)(!1),b=Object(c.a)(h,2),p=b[0],j=b[1],f=(t={},Object(v.a)(t,m.wrapper,!0),Object(v.a)(t,m.smallWrapper,!s),t);return Object(qe.jsxs)(pN.a,{anchor:"bottom",open:!0,variant:"persistent",classes:{paperAnchorDockedBottom:m.drawer},children:[Object(qe.jsxs)("div",{className:w()(f),children:[Object(qe.jsxs)(u.a,{container:!0,direction:"row",justify:"center",alignItems:"baseline",children:[Object(qe.jsxs)(u.a,{item:!0,xs:5,container:!0,direction:s?"column":"row",justify:"flex-start",alignItems:"baseline",children:[Object(qe.jsx)(nt,{className:m.title,children:"Setup Lamassu Admin"}),Object(qe.jsx)(lt,{className:m.subtitle,children:i}),s&&Object(qe.jsx)(ot,{children:o})]}),Object(qe.jsx)(u.a,{item:!0,xs:4,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-end",spacing:5,children:Object(qe.jsx)(u.a,{item:!0,xs:12,children:a&&n&&Object(qe.jsx)(Pd,{currentStep:n,steps:a})})})]}),s&&Object(qe.jsxs)(u.a,{container:!0,direction:"row",justify:"center",alignItems:"baseline",children:[Object(qe.jsx)(u.a,{item:!0,xs:5,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-start",children:Object(qe.jsx)(mn,{onClick:function(){j(!0)},children:"See full example"})}),Object(qe.jsx)(u.a,{item:!0,xs:4,container:!0,direction:"column",justify:"flex-start",alignItems:"flex-end",spacing:5,children:Object(qe.jsx)(u.a,{item:!0,children:Object(qe.jsx)(zt,{size:"lg",onClick:d,children:"Get Started"})})})]})]}),Object(qe.jsx)(vc,{closeOnEscape:!0,closeOnBackdropClick:!0,className:m.modal,xl:!0,width:1328,handleClose:function(){j(!1)},open:p,children:Object(qe.jsx)("img",{width:1152,src:l,alt:""})})]})},xN=Object(b.a)({wrapper:{display:"flex",padding:[[16,0]],flexDirection:"column",justifyContent:"space-between",backgroundColor:re},welcomeBackground:{background:"url(/wizard-background.svg) no-repeat center center fixed",backgroundColor:re,backgroundSize:"cover"},blurred:{filter:"blur(4px)",pointerEvents:"none"}}),vN=er()(fN||(fN=Object(Kn.a)(["\n query getData {\n config\n accounts\n cryptoCurrencies {\n code\n display\n }\n }\n"]))),yN=function(e){e.fromAuthRegister;var t,n,a=xN(),i=Object(Qn.c)(vN),o=i.data,l=i.loading,s=Object(O.h)(),d=Object(r.useContext)(AN).setWizardTested,u=Object(r.useState)(0),m=Object(c.a)(u,2),h=m[0],b=m[1],p=Object(r.useState)(!0),j=Object(c.a)(p,2),f=j[0],g=j[1],x=Object(r.useState)(!1),y=Object(c.a)(x,2),C=y[0],k=y[1];if(l)return Object(qe.jsx)(qe.Fragment,{});var S=hN(null===o||void 0===o?void 0:o.config,null===o||void 0===o?void 0:o.cryptoCurrencies),N=s.length&&!(null===(t=s.location.state)||void 0===t?void 0:t.fromAuthRegister);0===S&&(d(!0),N?s.goBack():s.push("/"));var E=0===h,I=(n={},Object(v.a)(n,a.blurred,C),Object(v.a)(n,a.wrapper,!0),Object(v.a)(n,a.welcomeBackground,E),n),L=bN[h];return Object(qe.jsxs)(aa.a,{fullScreen:!0,open:f,children:[Object(qe.jsx)(ia.a,{className:w()(I),children:Object(qe.jsx)(L.Component,{doContinue:function(){h>=bN.length-1&&(g(!1),s.push("/"));var e=0===h&&S?S:h+1;k(!0),b(e)},isActive:!C})}),!E&&Object(qe.jsx)(ON,{currentStep:h,steps:bN.length-1,exImage:L.exImage,subtitle:L.subtitle,text:L.text,open:C,start:function(){k(!1)}})]})},wN=Object(b.a)({wrapper:{flex:1,display:"flex",flexDirection:"column",height:"100%"}}),CN=[{key:"transactions",label:"Transactions",route:"/transactions",component:hk},{key:"maintenance",label:"Maintenance",route:"/maintenance",get component(){var e=this;return function(){return Object(qe.jsx)(O.b,{to:e.children[0].route})}},children:[{key:"cash_cassettes",label:"Cash Cassettes",route:"/maintenance/cash-cassettes",component:Jv},{key:"funding",label:"Funding",route:"/maintenance/funding",component:Mj},{key:"logs",label:"Machine Logs",route:"/maintenance/logs",component:WO},{key:"machine-status",label:"Machine Status",route:"/maintenance/machine-status",component:qy},{key:"server-logs",label:"Server",route:"/maintenance/server-logs",component:WC}]},{key:"settings",label:"Settings",route:"/settings",get component(){var e=this;return function(){return Object(qe.jsx)(O.b,{to:e.children[0].route})}},children:[{key:lc,label:"Commissions",route:"/settings/commissions",component:bm},{key:cc,label:"Locales",route:"/settings/locale",component:Og},{key:rc,label:"Cash-out",route:"/settings/cash-out",component:Xd},{key:oc,label:"Notifications",route:"/settings/notifications",component:kw},{key:"services",label:"3rd party services",route:"/settings/3rd-party-services",component:sk},{key:ac,label:"Wallet",route:"/settings/wallet-settings",component:Jk},{key:ic,label:"Operator Info",route:"/settings/operator-info",title:"Operator Information",get component(){var e=this;return function(){var t;return Object(qe.jsx)(O.b,{to:{pathname:e.children[0].route,state:{prev:null===(t=e.state)||void 0===t?void 0:t.prev}}})}},children:[{key:"contact-info",label:"Contact information",route:"/settings/operator-info/contact-info",component:Xw},{key:"receipt-printing",label:"Receipt",route:"/settings/operator-info/receipt-printing",component:gC},{key:"coin-atm-radar",label:"Coin ATM Radar",route:"/settings/operator-info/coin-atm-radar",component:Fw},{key:"terms-conditions",label:"Terms & Conditions",route:"/settings/operator-info/terms-conditions",component:kC}]}]},{key:"compliance",label:"Compliance",route:"/compliance",get component(){var e=this;return function(){return Object(qe.jsx)(O.b,{to:e.children[0].route})}},children:[{key:"triggers",label:"Triggers",route:"/compliance/triggers",component:Zk},{key:"customers",label:"Customers",route:"/compliance/customers",component:Sb},{key:"blacklist",label:"Blacklist",route:"/compliance/blacklist",component:ds},{key:"promo-codes",label:"Promo Codes",route:"/compliance/loyalty/codes",component:Fg},{key:"customer",route:"/compliance/customer/:id",component:yb}]}],kN=ar.a(ho.a(bo.a("children"),ir.a("children"))),SN=tr.a(po.a,kN)(CN),NN=lr.a(bo.a("children"))(SN).concat(lr.a(bo.a("children"))(CN)),EN=tr.a(po.a,kN)(SN),IN=jo.a(EN,NN),LN=function(){var e=wN(),t=Object(O.h)(),n=Object(O.i)();Object(r.useContext)(AN).wizardTested||xo.a(n.pathname)(["/404","/register","/wizard"])||t.push("/wizard");var a=n.state?m.a:mo.a,i=a===m.a?{direction:vo.a(sr.a("route",n.state.prev))(EN)>vo.a(sr.a("route",n.pathname))(EN)?"right":"left"}:{timeout:400};return Object(qe.jsxs)(O.e,{children:[Object(qe.jsx)(O.c,{exact:!0,path:"/",children:Object(qe.jsx)(O.b,{to:{pathname:"/dashboard"}})}),Object(qe.jsx)(O.c,{path:"/dashboard",children:Object(qe.jsx)(a,Object(l.a)(Object(l.a)({className:e.wrapper},i),{},{in:!0,mountOnEnter:!0,unmountOnExit:!0,children:Object(qe.jsx)("div",{className:e.wrapper,children:Object(qe.jsx)(Cj,{})})}))}),Object(qe.jsx)(O.c,{path:"/machines",component:Yv}),Object(qe.jsx)(O.c,{path:"/wizard",component:yN}),Object(qe.jsx)(O.c,{path:"/register",component:Co}),IN.map((function(t){var r=t.route,o=t.component,c=t.key;return Object(qe.jsx)(O.c,{path:r,children:Object(qe.jsx)(a,Object(l.a)(Object(l.a)({className:e.wrapper},i),{},{in:!!Object(O.g)(n.pathname,{path:r}),mountOnEnter:!0,unmountOnExit:!0,children:Object(qe.jsx)("div",{className:e.wrapper,children:Object(qe.jsx)(o,{name:c})})}))},c)})),Object(qe.jsx)(O.c,{path:"/404"}),Object(qe.jsx)(O.c,{path:"*",children:Object(qe.jsx)(O.b,{to:{pathname:"/404"}})})]})},FN="100%",PN={"@global":Object(l.a)(Object(l.a)({},{"@font-face":[{fontFamily:"Mont",src:['url("/fonts/MontHeavy/mont-heavy-webfont.woff2") format("woff2")','url("/fonts/MontHeavy/mont-heavy-webfont.woff") format("woff")'],fontWeight:900,fontStyle:"normal"},{fontFamily:"Mont",src:['url("/fonts/MontHeavy/mont-bold-webfont.woff2") format("woff2")','url("/fonts/MontHeavy/mont-bold-webfont.woff") format("woff")'],fontWeight:700,fontStyle:"normal"},{fontFamily:"MuseoSans",src:['url("/fonts/MuseoSans/MuseoSans_500-webfont.woff2") format("woff2")','url("/fonts/MuseoSans/MuseoSans_500-webfont.woff") format("woff")'],fontWeight:500,fontStyle:"normal"},{fontFamily:"MuseoSans",src:['url("/fonts/MuseoSans/MuseoSans_700-webfont.woff2") format("woff2")','url("/fonts/MuseoSans/MuseoSans_700-webfont.woff") format("woff")'],fontWeight:700,fontStyle:"normal"},{fontFamily:"BPmono",src:'url("/fonts/BPmono/BPmono.ttf") format("truetype")',fontWeight:500,fontStyle:"normal"}]}),{},(gN={"#root":{width:FN,minHeight:FN},".root-notifcenter-open":{overflowY:"auto",position:"absolute",top:0,bottom:0,left:0},".body-notifcenter-open":{overflow:"hidden"},html:{height:FN},body:{width:he,display:"flex",minHeight:FN,"@media screen and (min-width: 1200px)":{width:"auto"}}},Object(v.a)(gN,'a::-moz-focus-inner,\n \'input[type="submit"]::-moz-focus-inner,\n input[type="button"]::-moz-focus-inner',{border:0}),Object(v.a)(gN,'a::-moz-focus-inner,\n input[type="submit"]::-moz-focus-inner,\n input[type="button"]::-moz-focus-inner',{border:0}),Object(v.a)(gN,"a,\n a:visited,\n a:focus,\n a:active,\n a:hover",{outline:"0 none"}),Object(v.a)(gN,"button::-moz-focus-inner",{border:0}),Object(v.a)(gN,".ReactVirtualized__Grid__innerScrollContainer",{overflow:"inherit !important"}),gN))},BN=Object(f.b)({plugins:[Object(g.a)()].concat(Object(s.a)(Object(h.a)().plugins))}),DN="100%",RN="column",TN=Object(b.a)(Object(l.a)(Object(l.a)({},PN),{},{root:{backgroundColor:re,width:DN,minHeight:DN,display:"flex",flexDirection:RN},wrapper:{width:he,height:DN,margin:"0 auto",flex:1,display:"flex",flexDirection:RN},grid:{flex:1,height:"100%"},contentWithSidebar:{flex:1,marginLeft:48,paddingTop:15},contentWithoutSidebar:{width:he}})),AN=Object(r.createContext)(),WN=function(){var e=TN(),t=Object(O.i)(),n=Object(O.h)(),a=Object(r.useContext)(AN).wizardTested,i=t.pathname,o=function(e){return fo.a((function(t){return t.route===e}))(tr.a(po.a,ar.a(ir.a("children")),lr.a(bo.a("children")))(SN))}(i),c=o?function(e){return ja.a(sr.a("route",go.a(1,Oo.a((function(e){return"/"!==e}),e))))(IN)}(i):{},l="/404"===t.pathname,s=o?e.contentWithSidebar:e.contentWithoutSidebar;return Object(qe.jsxs)("div",{className:e.root,children:[!l&&a&&Object(qe.jsx)(uo,{tree:CN}),Object(qe.jsxs)("main",{className:e.wrapper,children:[o&&!l&&a&&Object(qe.jsx)(m.a,{direction:"left",in:!0,mountOnEnter:!0,unmountOnExit:!0,children:Object(qe.jsx)("div",{children:Object(qe.jsx)(qn,{title:c.title})})}),Object(qe.jsxs)(u.a,{container:!0,className:e.grid,children:[o&&!l&&a&&Object(qe.jsx)(Ve,{data:c.children,isSelected:function(e){return t.pathname===e.route},displayName:function(e){return e.label},onClick:function(e){return n.push(e.route)}}),Object(qe.jsx)("div",{className:s,children:Object(qe.jsx)(LN,{})})]})]})]})},zN=function(){var e=Object(r.useState)(!1),t=Object(c.a)(e,2),n=t[0],a=t[1];return Object(qe.jsx)(AN.Provider,{value:{wizardTested:n,setWizardTested:a},children:Object(qe.jsx)(x.a,{children:Object(qe.jsx)(_n,{children:Object(qe.jsx)(p.b,{jss:BN,children:Object(qe.jsxs)(j.a,{theme:Dw,children:[Object(qe.jsx)(d.a,{}),Object(qe.jsx)(WN,{})]})})})})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));o.a.render(Object(qe.jsx)(zN,{}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[573,1,2]]]);
|
|
//# sourceMappingURL=main.97c892a5.chunk.js.map
|