File: /disk001/machen/public_html/_wildcard_.machen.ai/static/js/main.cf886e28.chunk.js
/*! For license information please see main.cf886e28.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[0],{1:function(e,t,r){"use strict";r.d(t,"r",(function(){return _})),r.d(t,"l",(function(){return $})),r.d(t,"t",(function(){return Y})),r.d(t,"a",(function(){return z})),r.d(t,"b",(function(){return I})),r.d(t,"c",(function(){return j})),r.d(t,"d",(function(){return O})),r.d(t,"e",(function(){return E})),r.d(t,"f",(function(){return L})),r.d(t,"g",(function(){return D})),r.d(t,"h",(function(){return k})),r.d(t,"i",(function(){return M})),r.d(t,"j",(function(){return F})),r.d(t,"k",(function(){return P})),r.d(t,"m",(function(){return x})),r.d(t,"n",(function(){return S})),r.d(t,"o",(function(){return T})),r.d(t,"p",(function(){return v})),r.d(t,"q",(function(){return C})),r.d(t,"s",(function(){return A})),r.d(t,"u",(function(){return y})),r.d(t,"v",(function(){return w}));var n=r(8),a=r(7),o=r(2),i=r(0),c=r.n(i),l=r(178),s=r(73),u=r.n(s),d=r(9),p=r.n(d),f=r(3),h=r(20),m=r(39);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var b=window.location.hostname.indexOf("a1b2c3d4")>-1||window.location.hostname.indexOf("localhost")>-1,y=function(e,t){if(e){var r=f.a.getState().languages||{},n=f.a.getState().session,a=n&&n.language?n.language:"pt-BR",o=e;if(!(e&&e.indexOf("$__")>-1))return e;e.split(" ").forEach((function(e,t){if(e&&e.indexOf("$__")>-1){var n=e.replace("$__","").trim().toLowerCase();if(b&&!r[n])try{m.a.post("language/add",{name:n})}catch(i){console.log(i)}r[n]&&r[n].locales.filter((function(e){return e.locale===a})).length>0&&r[n].locales.filter((function(e){return e.locale===a}))[0].name&&(o=o.replace("".concat(e),"".concat(t>0?" ":"").concat(r[n].locales.filter((function(e){return e.locale===a}))[0].name)))}}));var i=o;if(!i)return"";if(!t)return i;if("*"===t)return i.toUpperCase();if(1===t)return i.substring(0,1).toUpperCase().concat(i.substring(1))}};function v(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"<br/>",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"<br>";if("undefined"===typeof e||null===e)return"";var a=t||"undefined"===typeof t?r:n;return(e+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+a+"$2")}function x(e,t){if(/^#([0-9a-f]{3}|[0-9a-f]{6})$/gi.test(e)){var r=e.substr(1);r=3===r.length?r.replace(/(.)/g,"$1$1"):r;var n=parseInt(r,16);return"rgba(".concat([n>>16&255,n>>8&255,255&n],", ").concat(t||1,")")}return t&&e&&e.indexOf("rgb")>-1&&-1===e.indexOf("rgba")?e.replace(")",", ".concat(t,")")).replace("rgb(","rgba("):e}var _=function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""};function O(e,t){if(f.a)return x(f.a.getState().session.custom[e],t)||e}function w(e){return!!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u()(JSON.stringify(e)).toString(),r=e.content?e.content:e.message;e.confirm&&(r=c.a.createElement("div",{style:{minWidth:"300px"}},r,c.a.createElement("div",{style:{display:"flex",width:"100%",marginTop:15,justifyContent:"center"}},c.a.createElement(h.a,{shadow:!0,title:y("$__confirm"),text:y("$__confirm"),color:"green",icon:"check",size:"25px",onClick:function(){e.confirm(),l.b.dismiss(t)}}),c.a.createElement(h.a,{shadow:!0,title:y("$__cancel"),text:y("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){l.b.dismiss(t)},style:{marginLeft:15}})))),e.buttons&&e.buttons.length>0&&(r=c.a.createElement("div",{style:{minWidth:"300px"}},r,c.a.createElement("div",{style:{width:"100%",marginTop:15,justifyContent:"center"}},e.buttons.map((function(r,n){return c.a.createElement(h.a,Object.assign({key:n},r,{style:Object(o.a)(Object(o.a)({},e&&e.style?e.style:{}),{},{marginBottom:10}),onClick:function(){r.onClick&&r.onClick(),l.b.dismiss(t)}}))})))));var n=Object(o.a)(Object(o.a)(Object(o.a)({toastId:t,position:l.b.POSITION.BOTTOM_RIGHT},e.options?e.options:{}),e.persist?{}:{autoClose:e.autoClose?e.autoClose:2e3}),{},{style:{minWidth:"300px"}});return"left"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_LEFT})),"right"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_RIGHT})),"center"===e.horizontal&&(n=Object(o.a)(Object(o.a)({},n),{},{position:l.b.POSITION.BOTTOM_CENTER})),l.b.isActive(t)||("info"!==e.variant&&e.variant||l.b.info(r,n),"success"===e.variant&&l.b.success(r,n),"warning"===e.variant&&l.b.warn(r,n),"error"===e.variant&&l.b.error(r,n)),!0}var E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!e)return"";var r=e.replace(/\D/g,"");if((r.match(/./g)||[]).length>1){var n=(r=e.replace(",",".")).split(".");if(1===n.length)return parseFloat(r);r=r.replaceAll(".".concat(n[n.length-1]),""),r=String(r).replaceAll(".","");var a=n[n.length-1].substring(0,t);r="".concat(r,".").concat(a)}return r},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decimal",r=arguments.length>2?arguments[2]:void 0;if(!e)return"";var n=f.a.getState(),a=n.session,o=String(e).replace(",","."),i=t;if("number"===i||"time"===i||"decimal"===i)i="decimal";else{if("percent"===i)return"".concat(o,"%");if("currency"!==i)return String(e)}var c=new Intl.NumberFormat(a.custom.locale,{style:i,currency:r||(a.custom.currency?a.custom.currency:"BRL")});return c.setMaximumFractionDigits="number"===t?0:2,c.format(o)},S=function(e,t){var r=f.a.getState().languages[t.alias]&&f.a.getState().languages[t.alias].locales?Array.from(f.a.getState().languages[t.alias].locales):[];r.flatMap((function(e){if(e.locale===t.locale)return[e.name=t.text]})),0===r.filter((function(e){return e.locale===t.locale})).length&&r.push({_id:t._id,locale:t.locale,name:t.text}),e.reduxFunction("ASYNC","SET_LANGUAGE",Object(o.a)(Object(o.a)({},f.a.getState().languages),{},Object(a.a)({},t.alias,Object(o.a)(Object(o.a)({},f.a.getState().languages[t.alias]&&f.a.getState().languages[t.alias]),{},{locales:r}))))},L=function(){var e=Object(n.a)(g().mark((function e(t,r){var n,i,c;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=f.a.getState(),i=n.db,c="cards",i.cards[r._id]?c="cards":i.users[r._id]&&(c="users"),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},f.a.getState().db),{},Object(a.a)({},c,Object(o.a)(Object(o.a)({},f.a.getState().db[c]),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},f.a.getState().db[c][r._id]),{},{deleted:!0}))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),C=function(e){for(var t="\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\u0154\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff\u0155",r="",n=0;n<e.length;n++){for(var a=!1,o=0;o<t.length;o++)if(e.substr(n,1)===t.substr(o,1)){r+="AAAAAAACEEEEIIIIDNOOOOOOUUUUYRsBaaaaaaaceeeeiiiionoooooouuuuybyr".substr(o,1),a=!0;break}!1===a&&(r+=e.substr(n,1))}return r},I=function(e,t,r){if(!t||t&&!t.trim())return c.a.createElement("span",{style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:v(e)}});var n=v(e).split(new RegExp("(".concat(t.replace("*.","."),")"),"gi"));return c.a.createElement("span",null," ",n.map((function(e,n){return c.a.createElement("span",{key:n,style:e.toLowerCase()===t.toLowerCase()?{fontWeight:"bold",paddingTop:"3px",paddingBottom:"3px",backgroundColor:"#ffff00b3",color:r?"#000000 !important":""}:{},dangerouslySetInnerHTML:{__html:v(e)}})}))," ")},T=function(e){var t=v(e).split("\n"),r="";return t.forEach((function(e){e.split(" ").forEach((function(e){var t=e.split("\n");if(t.length>0)t.forEach((function(e){if(e.indexOf(".youtube.com/watch?")>-1){var t=e.split("?")[1].split("v=")[1].split("&")[0];t&&(r+='<iframe title="outModule" width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(t,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else if(e.indexOf("//youtu.be/")>-1){var n=e.split(".be/")[1];n&&(r+='<iframe title="outModule" width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else e.indexOf("http://")>-1||e.indexOf("https://")>-1?r+='<a style="word-break:break-all" href="'.concat(e.replace("<br/>",""),'" target="_blank" rel="noopener noreferrer">').concat(e,"</a>"):r+=e})),r+=" ";else if(t[0].indexOf(".youtube.com/watch?")>-1&&t[0].split("?").length>1&&t[0].split("?")[1].split("v=").length>1){var n=t[0].split("?")[1].split("v=")[1].split("&")[0];n&&(r+='<iframe title="outModule" width="560" height="315" style="width:100%; max-width:500px" src="https://www.youtube.com/embed/'.concat(n,'" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'))}else t[0].indexOf("http://")>-1||t[0].indexOf("https://")>-1?r+='<a href="'.concat(t[0].replace("<br/>",""),'" target="_blank" rel="noopener noreferrer">').concat(t[0]," </a>"):r+="".concat(e," ")})),r+=""})),r},F=function(){var e=f.a.getState().session,t={};return e&&e._access&&(t=e._access),t},D=function(){var e=Object(n.a)(g().mark((function e(t,r){var n=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length>2&&void 0!==n[2]&&n[2])try{m.a.delete("/node/favorite/".concat(r))}catch(t){console.log(t)}else try{m.a.put("/node/favorite",{_id:r})}catch(t){console.log(t)}case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),N=function(e){for(var t=e;1===t.length;)t="0"+t;return t},A=function(e,t){var r,n,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FFFFFF",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#000000",c=e;if(c.indexOf("rgba")>-1){var l=(c=c.replace("rgba(","")).split(",");r=l[0],n=l[1],a=l[2]}else 0===c.indexOf("#")&&(c=c.slice(1)),3===c.length&&(c=c[0]+c[0]+c[1]+c[1]+c[2]+c[2]),c.length,r=parseInt(c.slice(0,2),16),n=parseInt(c.slice(2,4),16),a=parseInt(c.slice(4,6),16);return t?.299*r+.587*n+.114*a>186?i:o:(r=(255-r).toString(16),n=(255-n).toString(16),a=(255-a).toString(16),"#"+N(r)+N(n)+N(a))},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;return r=(null===e||void 0===e?void 0:e.low)?parseInt(e.low):parseInt(e),t?p()(1e3*r).tz("America/Sao_Paulo").format(t):p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("H:mm"):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM H:mm"):p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")};function $(e){function t(e){return e<=9&&(e="0"+e),e}return t(Math.round(e/3600))+":"+t(Math.round(e%3600/60))+":"+t(e%3600%60)}function M(e){return e>=1073741824?e=(e/1073741824).toFixed(2)+" GB":e>=1048576?e=(e/1048576).toFixed(2)+" MB":e>=1024?e=(e/1024).toFixed(2)+" KB":e>1?e+=" bytes":1===e?e+=" byte":e="0 bytes",e}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var r=1024,n=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(n))+" "+a[o]}function Y(e){var t=e,r="",n=0,a=0,o=0;return e<60?r="".concat(t," ").concat(y("$__seconds",1)):e>3600?(t-=3600*(n=Math.ceil(Math.trunc(t/3600))),t-=60*(a=Math.ceil(Math.trunc(t/60)>0?Math.trunc(t/60):0)),o=Math.ceil(t>0?t:0),r="".concat(n," hora").concat(n>1?"s":""," ").concat(a," ").concat(y("$__minutes",1)," ").concat(o," ").concat(y("$__seconds",1))):(t-=60*(a=Math.ceil(Math.trunc(t/60)>0?Math.trunc(t/60):0)),o=Math.ceil(t>0?t:0),r="".concat(a," ").concat(y("$__minutes",1)," ").concat(o," ").concat(y("$__seconds",1))),{total:r,hours:n,minutes:a,seconds:o}}},10:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(2),a=r(0),o=r.n(a),i=r(884),c=r(129),l=r(1);function s(e){return o.a.createElement(c.a,{title:e.title?Object(l.u)(e.title,1):""},"string"===typeof e.icon||"string"===typeof e.children?o.a.createElement(i.a,{className:e.className?e.className:"",style:Object(n.a)({position:"".concat(e.static?"static":""),display:"flex",justifyContent:"center",alignItems:"center",height:e.size||"22px",width:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(l.d)("medium"),opacity:e.disabled?"0.5":"1",cursor:e.onClick?"pointer":""},e.style),onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null},e.icon||e.children):o.a.createElement(e.icon,{className:e.className?e.className:"",style:Object(n.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(l.d)("medium"),opacity:e.disabled?"0.5":"1",cursor:e.onClick?"pointer":"",margin:"auto"},e.style),onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null}))}},104:function(e,t,r){"use strict";var n=r(7),a=r(2),o=r(8),i=r(0),c=r.n(i),l=r(14),s=r(13),u=r(15),d=r(3),p=r(1883),f=r(39);function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}t.a=Object(l.b)(null,(function(e){return Object(s.b)(u,e)}))((function(e){var t=function(){var t=Object(o.a)(h().mark((function t(r,i){var c,l,s;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=i,l=d.a.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,c.map(function(){var t=Object(o.a)(h().mark((function t(r,o){var i,s,u,p;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.value||!e.dbNode||0!==l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length){t.next=7;break}return t.next=3,f.a.post(e.api?e.api:"node/add/".concat(e.dbNode),{name:r.trim(),secondaryParent:e.secondaryParent?e.secondaryParent:null});case 3:(i=t.sent)&&(s=i&&i.data&&i.data.id?i.data.id:i.data.value,0===l.filter((function(e){return e.value===s})).length&&(l.push({value:s,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},d.a.getState().db),{},Object(n.a)({},e.dbNode,l)))),0===c.filter((function(e){return e.value===s})).length&&(c.splice(o,1),c.push({value:s,label:r}))),t.next=8;break;case 7:l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length>0&&(u=l.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label}))[0])&&0===c.filter((function(e){return e.value===u.value})).length&&(c.splice(o,1),c.push({value:u.value,label:u.label}));case 8:return p=[],c.forEach((function(e){e&&e.value&&p.push(e)})),c=Array.from(p),t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:s=t.sent,Promise.all(s).then((function(){e.onChange&&e.onChange(r,c)})),t.next=10;break;case 9:e.onChange&&e.onChange(r,c);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),r=Object(a.a)({},e);return String(e.dbNode)&&delete r.dbNode,String(e.onChange)&&delete r.onChange,String(e.store)&&delete r.store,String(e.ownProps)&&delete r.ownProps,String(e.reduxFunction)&&delete r.reduxFunction,String(e.ws)&&delete r.ws,String(e.add)&&delete r.add,(e.inNode||"undefined"===String(e.inNode)||"null"===String(e.inNode))&&delete r.inNode,(e.InputProps||"undefined"===String(e.InputProps)||"null"===String(e.InputProps))&&delete r.InputProps,(e.dark||"undefined"===String(e.dark)||"null"===String(e.dark))&&delete r.dark,(e.endAdornment||"undefined"===String(e.endAdornment)||"null"===String(e.endAdornment))&&delete r.endAdornment,(e.startAdornment||"undefined"===String(e.startAdornment)||"null"===String(e.startAdornment))&&delete r.startAdornment,(e.secondaryParent||"undefined"===String(e.secondaryParent)||"null"===String(e.secondaryParent))&&delete r.secondaryParent,c.a.createElement(p.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))}))},106:function(e,t,r){"use strict";var n=r(5),a=r(0),o=r.n(a);t.a=function(e){var t=e.children,r=Object(a.useState)(!1),i=Object(n.a)(r,2),c=i[0],l=i[1],s=Object(a.useRef)(null);return Object(a.useEffect)((function(){var e=s.current;if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e){var t=Object(n.a)(e,1)[0];l(t.isIntersecting)}),{threshold:.2});return s.current&&t.observe(s.current),function(){e&&t.unobserve(e)}}l(!0)}),[]),o.a.createElement("div",{style:{width:"100%",height:"100%"},ref:s},t(c))}},1085:function(e,t,r){},1092:function(e,t,r){},1120:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},1121:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},1122:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},1123:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M0 5.22H6.6V6.32H0z"}),a.default.createElement("path",{d:"M8.8 5.22H15.4V6.32H8.8z"}),a.default.createElement("path",{d:"M17.6 5.22H24.200000000000003V6.32H17.6z"}),a.default.createElement("path",{d:"M26.4 5.22H33V6.32H26.4z"}),a.default.createElement("path",{d:"M0 0H6.6V3.03H0z"}),a.default.createElement("path",{d:"M8.8 0H15.4V3.03H8.8z"}),a.default.createElement("path",{d:"M17.6 0H24.200000000000003V3.03H17.6z"}),a.default.createElement("path",{d:"M26.4 0H33V3.03H26.4z"}),a.default.createElement("path",{d:"M0 7.58H6.6V8.68H0z"}),a.default.createElement("path",{d:"M8.8 7.58H15.4V8.68H8.8z"}),a.default.createElement("path",{d:"M17.6 7.58H24.200000000000003V8.68H17.6z"}),a.default.createElement("path",{d:"M26.4 7.58H33V8.68H26.4z"}),a.default.createElement("path",{d:"M0 9.94H6.6V11.04H0z"}),a.default.createElement("path",{d:"M8.8 9.94H15.4V11.04H8.8z"}),a.default.createElement("path",{d:"M17.6 9.94H24.200000000000003V11.04H17.6z"}),a.default.createElement("path",{d:"M26.4 9.94H33V11.04H26.4z"}),a.default.createElement("path",{d:"M0 12.3H6.6V13.4H0z"}),a.default.createElement("path",{d:"M8.8 12.3H15.4V13.4H8.8z"}),a.default.createElement("path",{d:"M26.4 12.3H33V13.4H26.4z"}),a.default.createElement("path",{d:"M0 14.65H6.6V15.75H0z"}),a.default.createElement("path",{d:"M8.8 14.65H15.4V15.75H8.8z"}),a.default.createElement("path",{d:"M26.4 14.65H33V15.75H26.4z"}),a.default.createElement("path",{d:"M0 17.01H6.6V18.110000000000003H0z"}),a.default.createElement("path",{d:"M8.8 17.01H15.4V18.110000000000003H8.8z"}),a.default.createElement("path",{d:"M26.4 17.01H33V18.110000000000003H26.4z"}),a.default.createElement("path",{d:"M0 19.37H6.6V20.470000000000002H0z"}),a.default.createElement("path",{d:"M26.4 19.37H33V20.470000000000002H26.4z"})),"SWOT");t.default=o},1124:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},1125:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},1142:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},1143:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},1146:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAG2YAABzjgAA+swAAIT6AAB5gQAA/RMAADBtAAASKQ0eJk4AAAMAUExURevr7Jydn5manJucnuPj5JiZm9vb3PT09MvLzMLCw5GSlPr6+qeoqdXV1tHR0rW1trW2uKusrbi4urO0tLq6vKiqq7e4uLW2tqGipLm6ury8vr6+vr+/wLu8vM7OztDQ0cjJytjY2dTU1aipqqqrrMXGxqanqKmqq6Wmp9LT062usKSlprS0ta2trra2t6ytrqWmqK2ur66vsK6ur7CwsbOztK+vsK+wsbKys7GxsqOkpqOkpZ6foampq6qqrJ2eoKenqaysraKjpZqbnbi4uaKjpKSlp5eYmqioqqurrKChory8vKGio6amqKCho7Gys7CxsrGysrKzs5+gop+gobS1tbq6u7e3uLCxsbKztLi4uJWWmJaXmba3t7i5ub29vZWXmZSWmLq6upOVl5SVl7m5up6foLq7u7u7vJqcnZOUlpeZm5aYmpKUlry8vZKTlpGTlZCRlJCRk6ytr9bX197e3q+vsb2+v8DAweDh4bOztebm5ujp6e/v756eoP///4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///zfARREAAAeqSURBVHja7N3xVxJZFMBxQAQVilzPSTslBxcDdwdtBQRBDQUFBYNMDTcoNLAMM7QD23JozvvX94cJZBhQZ+bdO2/26F/Q59wv8K48JwP5n/wY7iH3kHvIPYT6D89bLBazfiF8Y+T09PT09MOHzc3Nd+8yeoTwb99+/PjkSbfj8eN83qYPSCOTOTs7O3veEP69UkcegEIdMpPJCI6zz5/f9p9HPp9//97KMsTwLZO5o2Nh4RmrkHrpmxzHwsICzyLEWSq1IXd1TE6aWYNYSqVSqSRzHpOTDsdDliC2ksBQ4HA4zOxA6iURRJ7DccizAbE9fVpyNXhlXTkcjsNDHxMQKyGEWBV35Tg89Pl8rKTVUtHVoc/n89mYgPBK3686Dt8EIcQwMzOjKUTF+1XHMbG0tLT095s3y8vL77WCqHq/Ehy+Lsdybm9aC4irRKGrLkcut7cXiUTQIS1588jfPo/cXiQSibxGhtTpdyU4kCElyq/zXMdx9AwT0qI+j1zbEQwiQmyUX+fXXR0Fg0EXGsQK1dXRUTAYDIbRIJBdBYNhNIgFsqtgOBx2IkFguwqHQyEcSAu2q3AICwLcVSjEh1oYEPCuQgbix4A4obsK+QmPAwHtKhTy+3+gvEacsF2F/H5/wIAIAevK7/cHAhgQgPNuzzwCgcAiFgSoK3/bgQWhuUdJuwosYkGgu1pcnDdgQCju5wPmMY8CAeyqPY/5+To8BKErPAjY50fb8QIHAnIu6Z7HCxwI0Lmk24ECge8KB4LQ1YuNDYS3X4SuNjbGESAIXW2M40DAuxofH0c4ayF0hQNB6AoJAt8VDgShq/GdHQwIYFfteezMIkCgzrsiBwZkhPp+LulqFgXyB/X9XDoPFEgTviscCE99P+/+/PjlwIAQ6vu5dB4vX2JAALvaaTu8OBCoc0m7q5deHAjYuaQzD68fAwJ3Luk4vC4MyAh4V17vAwxIE7orr9fLY0AIdFde7xpBg8B09cuBCAHtyrvmxoLAdrXm/h0DUgfvas3tdvPQEBdCV2632+3eHgWFwL9ftR12+yYg5CfIfi7pyu3ettvtdkAI2B4lnYfdbndBQiD28wGO9XUwiAFmP5e8zu0CxGOFgrgQu1pf93hcUJA84HlX/DoXIDkoCNB+3r8rj8fjgYIA7ef9u4KGoHXl8XheAUKAzyXdXXlezcFBwM8lXV29moODoHY1BwfB7QoSgtoVIARuj+rXFTAEtCvxPJKPoCBm1K6SyZ9gx3jorrodc0kObh/B7CrJzQJCELviZA1EJsQAtp9LuwKFENA9SjwPbhoSYgbbzwVGl0PeQGT/gg5sP+/tipuFhRCkruQORD5kFPa8qzAsJb/Ehj3v/uqKM8NDSANmPxd11cD5fgS8K5Q/3yOE2L7l9vYWALpKPuI4jsP7M3DhB+JcovyBbmoeJ0K/K45oASG0u0py09pAND7v0oM0qe7nSU4zCKG7R2kJofw5yGsFcVLcz1UOROXztah2pSWE6vkqatUO0qS2n3McFyXaQYiP2h6l0qH6qYCU9nMuGmUBon6P4qLRh9pCrJS6UjsQ9Q+cXKKwR3HRaPQfrSGESlfRFaI5pK7284OKg8aDiyl0tcIEpKV4j6LooPIoaYParlZ4NiBE2X5+7fiXMAIh6rpaIcxAeDVdUXHQem78A/n7ecfRYAlCphXsURTnQfG/JJC/RwkO9iCy9yjBEWcNoqyrlTiTEPldxZmEKOgqHt9iDyL782MlHo9vsQeRtZ9fO5iDyNyjOg72IIq62tqaYg0ib4+6drAJkd3VFJMQBV1NTe2yC5HTFZOQO+9R3fPYZQ4iu6spwcEq5PY9StTV7m6WLYjtVFlXu9nsCDMQi9+ruKtsNptOp9N/WTWHmJ/I2s8l88im0+n0/v7+Qc6mHcSiZI8a4Dg4OFhdVXGnRjHks9I9StpVx7G6uvrpU8yJCHmudD+/cR6CIxaLxR5gQJT/3ufOjljMaDQ6ASHN18q+P5fRVcdhNBqNQ9tWAEhL+ffnCuZhNBqNQ0NDQ0N+qpCmyu85lTu+fEkkEnYLDcio6u/PFXbVcSQSiYTJ5FQFeU7le0518xAcJpPJNKMMUqL0/Tk1h2l4eHh4RB6kPkHlHvKA827HsS/bMXx+nvqtdUcItfvt9OcxfH6eSqVSqa8/boU06d2/AnR8LRaLN0Pq9O6339aVckfqa7FYLB7fBKF0DxlhHsXj42PjQEgIqqspCEehUBgA8dG5347S1fFxoVAo2PpCWrrqqlAoFE5OWn0gBr11VTg5Oan0gdC63w45j1Svo2KVQujdQ8bq6qRSqVQkkAlq95DxuqpUKmUJhNb9dsyuKpVyeVQC0WNX5XK52gOx6LKrcrlabYghE5Tut+N2VS5Xq3YxhNo9ZNyuqtXqhQhipXS/HburavVCDKkzvUcN7qp60QPZ1GtXFxc1EYTV/fwaMmgetV4Iu/v5jV3VarW6CML2fj64q1qt9mc3hPX9fPA8ape9ED3sUX3mcXl5KYboY4/q5xgTQdjfz/t31QvRb1djYz0QvXYlhbC/n/ftqgeinz1KMo8eiG72KKlDBNHPHtXbVT+ILrsaG7vqgei0q6ur770QfXZ19V2A/DcAHpmC7NcZ4/wAAAAASUVORK5CYII="},1156:function(e,t,r){"use strict";(function(e){var n,a=r(2),o=r(86),i=r(0),c=r.n(i),l=r(9),s=r.n(l),u=r(71),d=r(15),p=r(3),f=r(13),h=r(14),m=r(95),g=r(188),b=r(659),y=r(129),v=r(10),x=r(331),_=r(33),O=r(661),w=r(1),j=(r(63),u.b.div(n||(n=Object(o.a)(["\n","\n","\n","\n","\n","\n","\n width:calc(100%) !important;\n margin-top:7px;\n margin-right:7px;\n padding:15px;\n"])),(function(e){return e.selectable&&e.selected?"\n opacity:1;":e.selectable?"\n opacity:0.5;":""}),(function(e){return e.locked?"cursor:no-drop !important;":"cursor:pointer;"}),(function(e){return e.priority?"border-left:5px solid ".concat(e.priority,";"):""}),(function(e){return!e.selectable&&e.selected?"border-bottom:solid 5px ".concat(Object(w.d)("color"),";"):""}),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88;\n max-width:320px;":""}),(function(e){return e.inLine?"position:relative;\n float:left;\n margin:1px;\n width:calc(20% - 7px);\n // maxWidth:320px;\n ":"\n width:calc(100%) !important;\n margin:1px 0px 1px 0px;\n "})));t.a=Object(h.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(f.b)(d,e)}))(Object(_.a)(O.a)((function(t){var r,n,o=t.classes,i=p.a.getState().db,l=c.a.useRef(!0);c.a.useEffect((function(){return l.current=!0,function(){l.current=!1}}),[]);var u=t.data&&t.data._id?p.a.getState().db.cards[t.data._id]:{};"Teste - MKT GJP"===u.name&&console.log(u,p.a.getState().db.cards[u._parent]);var d=Object.keys(p.a.getState().db.cards).filter((function(e){return p.a.getState().db.cards[e]&&u&&u._parent&&p.a.getState().db.cards[u._parent]&&p.a.getState().db.cards[e]._parent===p.a.getState().db.cards[u._parent]._parent&&"step"===p.a.getState().db.cards[e].type&&!p.a.getState().db.cards[e].deleted})).sort((function(e,t){var r=parseInt(p.a.getState().db.cards[e].step),n=parseInt(p.a.getState().db.cards[t].step);return r<n?-1:r>n?1:0})).map((function(e){return p.a.getState().db.cards[e]}));return c.a.createElement(j,Object.assign({},(null===t||void 0===t||null===(r=t.provided)||void 0===r?void 0:r.draggableProps)||{},{ref:(null===t||void 0===t?void 0:t.provided)&&(null===(n=t.provided)||void 0===n?void 0:n.innerRef)||null,isDragging:t.snapshot&&t.snapshot.isDragging||!1,isDragDisable:u.isDragDisable||t.isDragDisable||!1,inLine:t.inLine||null,className:o.container,selectable:t.showSelected||!1,selected:u._selected||!1,priority:u.priority?i.priority.filter((function(e){return String(e.value)===String(u.priority)}))[0].color:null,locked:t.locked||!1,onClick:function(){t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},p.a.getState().sideModule),{},{db:"cards",id:u._id,module:"cardEdit",activeModule:p.a.getState().db.dataType.filter((function(e){return e.name===u.type}))[0].iniModule||e,data:u}))}}),c.a.createElement("div",t.provided&&t.provided.dragHandleProps||{},c.a.createElement("div",{style:{position:"relative",alignItems:"center"}},c.a.createElement("div",{style:{width:"100%",padding:"7px",display:"flex",justifyContent:"space-between"}},u.name?u.name:Object(w.u)("$__new",1),c.a.createElement("div",{style:{fontSize:10,color:"gray"}},Object(w.u)("$__createdAt"),":",Object(w.k)(u.created_at)),c.a.createElement(b.a,{nodeId:u._id})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},c.a.createElement("div",null,Object(w.u)("$__step","*")," ",d.findIndex((function(e){return e._id===u._parent}))+1," ",Object(w.u)("$__of")," ",d.length),c.a.createElement("div",{style:{position:"relative",width:"100%",border:"solid 1px rgba(0,0,0,0.1)",justifyContent:"space-between",display:"flex",alignItems:"center",borderRadius:7}},d.map((function(e,t){return c.a.createElement(y.a,{arrow:!0,key:e._id,title:c.a.createElement("div",null,e.name," (",d.findIndex((function(e){return e._id===u._parent}))>t?Object(w.u)("$__completed"):d.findIndex((function(e){return e._id===u._parent}))===t?Object(w.u)("$__".concat(u.status)):Object(w.u)("$__waitingForPreviousStep"),")")},c.a.createElement("div",{key:e._id,style:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({height:7},d.findIndex((function(e){return e._id===u._parent}))>t?{backgroundColor:"#02b915"}:{}),d.findIndex((function(e){return e._id===u._parent}))===t?{backgroundColor:"#00a2e9"}:{}),d.findIndex((function(e){return e._id===u._parent}))<t?{backgroundColor:"#e9e9e9"}:{}),{},{width:"-webkit-fill-available",border:"solid 1px #FFFFFF"})}))})),c.a.createElement(y.a,{arrow:!0,title:c.a.createElement("div",null,Object(w.u)("$__".concat(u.status),"*"))},c.a.createElement("div",null,c.a.createElement(v.a,{color:u.status&&p.a.getState().db.status.filter((function(e){return e.value===u.status}))[0].color||null},p.a.getState().db.status.filter((function(e){return e.value===u.status}))[0].icon))))),c.a.createElement("div",{style:{width:"100%",padding:"7px",clear:"both"}},(u.startDate||u.endDate||u.startDate||u.endDate)&&c.a.createElement("div",{className:o.dates},u.startDate&&c.a.createElement("div",{className:o.dateInfo},c.a.createElement(m.a,{overlap:"rectangular",className:o.dateIco,icon:"insert_invitation",title:"startDate",size:"14px",disabled:!0}),new Date(1e3*u.startDate)instanceof Date&&!isNaN(new Date(1e3*u.startDate))?s()(new Date(1e3*u.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(u.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),u.endDate&&c.a.createElement("div",{className:o.dateInfo},c.a.createElement(m.a,{overlap:"rectangular",className:o.dateIco,icon:"event_available",title:"endDate",size:"14px",disabled:!0}),new Date(1e3*u.endDate)instanceof Date&&!isNaN(new Date(1e3*u.endDate))?s()(new Date(1e3*u.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(u.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))),u&&u._users&&Object.keys(u._users).length>1&&c.a.createElement("div",{className:o.usersContent},c.a.createElement("div",{className:o.users},c.a.createElement(x.a,{_id:u._id,data:u,transparent:!0,myDay:!0,limit:3})))),c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},c.a.createElement(g.a,{options:u._tags,showOptions:!0})))))})))}).call(this,r(605)(e))},1157:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},1158:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},1160:function(e,t,r){e.exports=r.p+"static/media/sample.ab31b41d.xlsx"},1161:function(e,t,r){e.exports=r.p+"static/media/sampleoptions.65339041.xlsx"},1171:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},119:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M5.9,12.6C5.9,12.6,5.8,12.6,5.9,12.6l-0.1-0.1c0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H3.1c0,0-0.1,0-0.1,0l-0.1,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l8.8,8.8v-1.2l-7.4-7.4h1.3l6.1,6.1v-1.2L5.9,12.6L5.9,12.6z M2.9,12.7\n\t\t\tL2.9,12.7L2.9,12.7L2.9,12.7z M2.8,13L2.8,13L2.8,13L2.8,13z M2.9,13.1L2.9,13.1L2.9,13.1L2.9,13.1z"}),a.default.createElement("path",{d:"M5.9,12.6C5.9,12.6,5.8,12.6,5.9,12.6l-0.1-0.1c0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H3.1c0,0-0.1,0-0.1,0l-0.1,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l8.8,8.8v-1.2l-7.4-7.4h1.3l6.1,6.1v-1.2L5.9,12.6L5.9,12.6z M2.9,12.7\n\t\t\tL2.9,12.7L2.9,12.7L2.9,12.7z M2.8,13L2.8,13L2.8,13L2.8,13z M2.9,13.1L2.9,13.1L2.9,13.1L2.9,13.1z"}),a.default.createElement("path",{d:"M18.9,13C18.9,13,18.9,13,18.9,13c0-0.1,0-0.1,0-0.2l-0.1-0.2c0,0,0,0,0,0v0l-0.1,0c0,0,0,0-0.1-0.1l0,0\n\t\t\tc0,0,0,0,0,0l0,0c0,0-0.1,0-0.1,0H16c0,0-0.1,0-0.1,0l0,0c0,0,0,0,0,0l-0.1,0c0,0,0,0,0,0l-3.2,3.2l0,0v1.2l3.7-3.7h1.2l-4.8,4.8\n\t\t\tl0,0v1.2l6.2-6.2l0,0v0c0,0,0,0,0,0l0,0l-0.1-0.1L18.9,13L18.9,13z M18.7,12.8L18.7,12.8L18.7,12.8L18.7,12.8z"}),a.default.createElement("path",{d:"M18.1,11.3L18.1,11.3c0.1,0,0.1,0.1,0.1,0.1l0,0c0,0,0,0,0,0l0,0c0,0,0.1,0,0.1,0h2.5c0,0,0.1,0,0.1,0\n\t\t\tl0.2-0.1c0,0,0,0,0.1,0l0,0c0,0,0,0,0-0.1l0.1-0.2c0,0,0-0.1,0-0.1c0,0,0-0.1,0-0.1l0-0.1c0,0,0,0,0-0.1c0,0,0,0,0-0.1L12.5,2v1.2\n\t\t\tl7.4,7.4h-1.3l-6.1-6.1v1.2L18.1,11.3L18.1,11.3z M18.3,11.3L18.3,11.3L18.3,11.3L18.3,11.3z"}),a.default.createElement("path",{d:"M12.9,11.5H16c0,0,0.1,0,0.1,0l0.1-0.1c0,0,0,0,0,0l0.1,0v0c0,0,0,0,0,0c0,0,0,0,0,0l0,0c0,0,0,0,0,0l0,0\n\t\t\tc0,0,0-0.1,0-0.1c0,0,0-0.1,0-0.1l0-0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l-3.8-3.9l0,4.1C12.5,11.3,12.7,11.5,12.9,11.5z"}),a.default.createElement("path",{d:"M5.2,10.8C5.2,10.8,5.2,10.8,5.2,10.8C5.2,10.8,5.2,10.9,5.2,10.8l-0.1,0.2L5.3,11l-0.2,0c0,0,0,0.1,0,0.1\n\t\t\tc0,0,0,0.1,0,0.1l0,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0.1,0.1l0,0c0,0,0,0,0,0l0.1-0.1h0l0,0.1l0.1-0.1l0,0.1c0,0,0,0,0.1,0\n\t\t\tc0,0,0.1,0,0.1,0H8c0,0,0.1,0,0.1,0l0,0c0,0,0,0,0,0l0.1,0c0,0,0,0,0,0l3.2-3.2V6.9l-3.7,3.7H6.6l4.9-4.9V4.5L5.2,10.8L5.2,10.8z\n\t\t\t M5.3,11.1L5.3,11.1L5.3,11.1L5.3,11.1z"}),a.default.createElement("path",{d:"M11.1,12.5H8c0,0-0.1,0-0.1,0l-0.1,0c0,0,0,0,0,0l0,0c0,0,0,0-0.1,0.1c0,0,0,0-0.1,0.1l0,0.1l0.1,0.1l-0.2,0\n\t\t\tl0,0c0,0,0,0.1,0,0.1c0,0,0,0.1,0,0.1l0.1,0.1c0,0,0,0,0.1,0.1l3.8,3.8v-4.1C11.5,12.7,11.3,12.5,11.1,12.5z M7.8,12.8\n\t\t\tC7.8,12.8,7.8,12.8,7.8,12.8L7.8,12.8L7.8,12.8z M7.7,12.9L7.7,12.9L7.7,12.9L7.7,12.9z"}),a.default.createElement("path",{d:"M21.3,12.6L21.3,12.6c-0.2-0.2-0.4-0.2-0.6,0l-8.1,8.1l0,0V22l8.8-8.8c0.1-0.1,0.1-0.2,0.1-0.3\n\t\t\tC21.4,12.8,21.3,12.7,21.3,12.6z"}),a.default.createElement("path",{d:"M2.7,11.4L2.7,11.4c0.1,0.1,0.2,0.1,0.3,0.1c0.1,0,0.2,0,0.3-0.1l8.2-8.2V2l-8.8,8.8\n\t\t\tC2.6,10.9,2.6,11.2,2.7,11.4z"})),"Matrix");t.default=o},1232:function(e,t,r){e.exports=r(1838)},1242:function(e,t){},129:function(e,t,r){"use strict";var n=r(33),a=r(147),o=Object(n.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9",borderRadius:"7px",boxShadow:"0 0 3px 3px rgba(0,0,0,0.03)",display:"flex",alignItems:"center",justifyContent:"center"}}}))(a.a);t.a=o},132:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(10),l=r(142),s=r(392),u=r(477),d=r(546),p=r(545),f=r(345),h=r(285),m=r(722),g=r(346),b=r(544),y=r(147),v=r(157),x=r(1);t.a=Object(o.memo)((function(e){var t=Object(v.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"}},iconButtonStyleWhite:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"},border:"solid 1px rgb(130,130,130)"},active:{padding:"3px 3px 3px 3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.33)"},border:"solid 1px ".concat(Object(x.d)("color")),backgroundColor:"#FFFFFF"}}}))(),r=i.a.useState(!1),o=Object(a.a)(r,2),_=o[0],O=o[1],w=i.a.useRef(null),j=function(t){t&&t.target&&t.target.className&&"string"===typeof t.target.className&&t.target.className.indexOf("ignoreClickAway")>-1||document.getElementById("MuiDialog-container")&&document.getElementById("MuiDialog-container").querySelectorAll("div.ignoreClickAway")||setTimeout((function(){O(!1),e.onClose&&e.onClose()}),100)};function E(t){"Tab"===t.key&&(t.preventDefault(),O(!1),e.onClose&&e.onClose())}return i.a.createElement("div",{style:Object(n.a)(Object(n.a)({},e.style?e.style:{}),e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},i.a.createElement("div",{style:Object(n.a)({display:"flex",alignItems:"center"},e.onClick?{pointerEvents:"none"}:{})},i.a.createElement(y.a,{title:Object(x.u)("$__options",1)},e.hideText?i.a.createElement(f.a,{ref:w,"aria-controls":_?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){O((function(e){return!e})),!_&&e.onOpen&&e.onOpen(),_&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(c.a,{usePropagation:!0,size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement(u.a,{ref:w,"aria-controls":_?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){O((function(e){return!e})),!_&&e.onOpen&&e.onOpen(),_&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement("div",{style:Object(n.a)({display:"flex",alignItems:"center",pointerEvents:"none"},e.icon?{}:{paddingLeft:7})},e.icon?i.a.createElement("div",{style:{marginTop:-2,marginRight:7}},i.a.createElement(c.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon})):i.a.createElement(i.a.Fragment,null),i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(x.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text||"BUTTON_NAME"),e.popper||e.options?i.a.createElement(c.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:"arrow_drop_down"}):i.a.createElement(i.a.Fragment,null)))))),e.popper||e.options?i.a.createElement(b.a,{open:_,anchorEl:w.current,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps,a=t.placement;return i.a.createElement(p.a,Object.assign({},r,{style:Object(n.a)(Object(n.a)({},"bottom"===a?{transformOrigin:"center top"}:{transformOrigin:"center bottom"}),{},{zIndex:"100 !important"})}),i.a.createElement(g.a,{style:{marginTop:5}},i.a.createElement(d.a,{onClickAway:function(e){j(e)}},e.popper?e.popper:e.options&&e.options.length>0?i.a.createElement(m.a,{autoFocusItem:_,id:"menu-list-grow",onKeyDown:E,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return i.a.createElement(h.a,{key:r,style:{color:t&&t.color?t.color:Object(x.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.stopPropagation&&j(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},i.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?i.a.createElement(l.a,{alt:t.name,src:t.avatar||null,style:{width:e.size?e.size:"20px",height:e.size?e.size:"20px"}},t.name.substr(0,1)):i.a.createElement(s.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},i.a.createElement(c.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(x.d)("menu")})),!t.render&&i.a.createElement("span",{style:{marginLeft:"7px"}},Object(x.u)(t.name,1))))}))):i.a.createElement(i.a.Fragment,null))))})):i.a.createElement(i.a.Fragment,null))}))},137:function(e,t,r){"use strict";var n=r(7),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(9),s=r.n(l),u=r(428),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(50),b=r(188),y=r(20),v=r(64),x=r(10),_=r(45),O=r(137),w=r(145),j=r(153),E=r(27),k=r(291),S=r(142),L=r(723),C=r(1189),I=r(147),T=r(157),F=r(34),D=r(21),N=r(663),A=r(1),P=r(78),$=r(144),M=r.n($),z=r(646),Y=r.n(z),B=Object(T.a)(N.a);t.a=Object(p.b)(null,(function(e){return Object(f.b)(h,e)}))(Object(i.memo)((function(e){var t,r=B(),l=m.a.getState(),u=l.db,p=l.session,f=l.functions,h=l.timeline,T=f.socket,N=c.a.useState(!1),$=Object(o.a)(N,2),z=$[0],R=$[1],G=c.a.useState(!1),H=Object(o.a)(G,2),W=H[0],U=H[1],q=c.a.useState(null),V=Object(o.a)(q,2),J=V[0],X=V[1],K=c.a.useState(null),Z=Object(o.a)(K,2),Q=Z[0],ee=Z[1],te=c.a.useState(!1),re=Object(o.a)(te,2),ne=re[0],ae=re[1],oe=c.a.useState(!1),ie=Object(o.a)(oe,2),ce=ie[0],le=ie[1],se=c.a.useState(null),ue=Object(o.a)(se,2),de=ue[0],pe=ue[1],fe=e.storie,he=c.a.useRef(!0);c.a.useEffect((function(){return he.current=!0,function(){he.current=!1}}),[]);var me=c.a.createRef(),ge=c.a.useRef(0);Object(i.useEffect)((function(){var t;he.current&&e.onResize&&(null===me||void 0===me||null===(t=me.current)||void 0===t?void 0:t.clientHeight)&&ge.current!==me.current.clientHeight&&(ge.current=me.current.clientHeight,e.onResize(me.current.clientHeight||83))}),[me]);var be=null;if(fe.filesCount&&fe.filesCount>0&&fe.user&&fe.user._id&&fe.user._id!==p._id&&(!fe.files||fe.files&&fe.files.length<fe.filesCount))return c.a.createElement(c.a.Fragment,null);var ye=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];he.current&&(U(!0),e&&clearTimeout(be))},ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;be=setTimeout((function(){he.current&&U(!1)}),e)},xe=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:m.a.getState().chat.id,react:t,user:p._id,db:e.db,nodeId:r,message:e.storie._id};Object(P.e)(e,n),T.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!fe)return null;var _e="";"timer"===fe.type&&String(fe.ini)&&String(fe.fin)&&(_e=fe.fin-fe.ini);var Oe=null;fe.urlPreview&&(Oe=JSON.parse(fe.urlPreview));var we,je=Object(A.u)(Object(P.g)(fe.message,fe));fe._reactions&&Object.keys(fe._reactions).length>0&&Object.keys(fe._reactions).forEach((function(e){Object.keys(fe._reactions[e]).length>0&&Object.keys(fe._reactions[e]).forEach((function(t){t===p._id&&(we=e)}))}));var Ee=!1;e.storie&&e.storie.user&&e.storie.user._id===p._id&&(Ee=!0);var ke=function(){Object(A.c)({message:Object(A.u)("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(P.c)(e,{id:fe._id,idRel:fe.idRel,deletedReason:J,deleted:!0}),fe.deleted=!0,ee(!1),X(null)}})};if(!fe.filesCount&&""===fe.message&&fe.cardId&&fe.cardId!==e.nodeId&&!m.a.getState().db.cards[fe.cardId])return c.a.createElement(c.a.Fragment,null);if(fe.deleted&&fe.user._id!==p._id)return c.a.createElement(c.a.Fragment,null);var Se=function(t){var r=t.name.split("."),n=r[r.length-1],o="attachment";u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&(o=u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].icon||"https://fl.machen.ai/?arq=".concat(t.file.replace("&","||MCH-ECOM||"),"&name=").concat(t.name.replace("&","||MCH-ECOM||")));var i="img";return u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer&&(i=u.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer),c.a.createElement("div",{key:t._id,style:Object(a.a)({position:"relative",display:"flex",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",alignItems:"center",justifyContent:"center"},"audio"===i?{width:"350px",height:"50px"}:"movie"===i?{width:"350px",height:"280px"}:{width:"150px",height:"150px"}),onClick:function(r){e.openLightBox&&e.openLightBox(t._id),r.preventDefault()},title:t.name},("img"===i||"movie"!==i&&"audio"!==i&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")||"movie"!==i&&"audio"!==i&&!("img"===i&&o&&o.indexOf("svg")>-1))&&c.a.createElement(I.a,{title:t.name},c.a.createElement("div",{style:{position:"absolute",bottom:"7px",left:"7px",right:"7px",padding:"3px",background:"rgba(0,0,0,0.8)",color:"#FFFFFF",borderRadius:"0px 0px 15px 15px",overflow:"hidden",textOverflow:"ellipsis"}},t.name)),"img"===i&&"attachment"===o&&c.a.createElement(x.a,{icon:o,size:"50px"}),"img"===i&&"string"===typeof o&&o.indexOf("https")>-1&&-1===o.indexOf("svg")&&c.a.createElement("img",{alt:"altImage",src:"".concat(o),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){fe.created_at&&"string"===typeof fe.created_at&&parseInt(fe.created_at)>s()().unix("X")-60&&(e.target.src=o)}}),"movie"!==i&&"img"!==i&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?c.a.createElement(x.a,{icon:o,size:"50px"}):"movie"===i||"img"===i||"img"===i&&o&&o.indexOf("svg")>-1?c.a.createElement(c.a.Fragment,null):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:o,style:{width:"100%",height:"100%"}}),"img"===i&&o&&o.indexOf(".svg")>-1?c.a.createElement("img",{alt:"altImage",src:Y.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}):c.a.createElement(c.a.Fragment,null),"movie"===i&&c.a.createElement("video",{style:{width:"100%"},controlsList:"nodownload",src:"https://machen.azureedge.net/".concat(t.file)}),"audio"===i&&c.a.createElement(d.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),c.a.createElement("div",{style:{clear:"both"}}))};return c.a.createElement("div",{style:Object(a.a)(Object(a.a)({maxWidth:"calc(100% - 15px)",marginLeft:"7px"},e.messageClick?{cursor:"pointer"}:{}),e.boxStyle?e.boxStyle:{}),onClick:e.messageClick?function(t){e.messageClick(),t.preventDefault()}:null,ref:me},c.a.createElement("div",{className:"message",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(88% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){ve(1e3)},onMouseOver:function(){e.isReply||ye(!0)},onClick:function(){e.isReply||ye(!0)}},e.showUserName&&!Ee&&c.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Object(A.d)("menu")}},(!p.GlobalData.hideDeletedUsers||p&&p.GlobalData&&p.GlobalData.hideDeletedUsers&&fe.user&&!fe.user.deleted&&(!m.a.getState().db.users[fe.user._id]||m.a.getState().db.users[fe.user._id]&&!m.a.getState().db.users[fe.user._id].deleted))&&fe.user.name?fe.user.name:Object(A.u)("$__deletedUser")),c.a.createElement("div",{style:Object(a.a)({position:"relative",float:Ee?"right":"left",padding:"7px 15px",width:"100%",background:Ee?"linear-gradient(33deg, rgba(237, 237, 237, 1), rgba(196, 196, 196, 1))":"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(240,240,240, 1))",borderRadius:"15px",boxShadow:"rgb(0 0 0 / 5%) 0px 2px 2px 2px"},fe.approval?{border:"solid 4px ".concat(fe.message.indexOf("$__approved")>-1?"green":"red")}:{})},fe&&fe.filesCount&&fe&&fe.user&&fe.user._id===p._id&&parseInt(fe.filesCount)>0&&fe.files&&0===Object.keys(fe.files).length?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},Object(A.u)("$__transferringFile".concat(parseInt(fe.filesCount)>1?"s":""))),c.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},(parseInt(fe.created_at),s()().unix("x"),c.a.createElement(c.a.Fragment,null)))):c.a.createElement(c.a.Fragment,null),fe.files&&Object.keys(fe.files).length>0?c.a.createElement("div",{className:"files",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:Ee?"flex-end":"none",flexWrap:"wrap"})},Object.keys(fe.files).map((function(e,t){return c.a.createElement("div",{key:"".concat(e,"-").concat(t)},Se(fe.files[e]))}))):fe.files&&fe.files.length>0?c.a.createElement("div",{className:"files",style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:Ee?"right":"left"},Ee?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:Ee?"flex-end":"none",flexWrap:"wrap"})},fe.files.map((function(e,t){return Se(e)}))):c.a.createElement(c.a.Fragment,null),!e.isReply&&e.storie&&e.storie.reply&&h&&(h[e.nodeId]&&h[e.nodeId][e.storie.reply]||h[p._id]&&h[p._id][e.storie.reply])&&c.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},c.a.createElement(O.a,{isReply:!0,storie:h[e.nodeId]&&h[e.nodeId][e.storie.reply]?h[e.nodeId][e.storie.reply]:h[p._id][e.storie.reply],db:e.db,nodeId:e.nodeId,openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},messageClick:function(){e.replyClick&&e.replyClick()}})),fe.deleted&&"timer"!==fe.type?c.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},Object(A.u)("$__removed","*"),"*"):function(){if("comment"===fe.type&&fe.message)return c.a.createElement("div",null,fe.urlPreview&&Oe.img&&Oe.title&&Oe.contentSnippet?c.a.createElement(F.a,{style:{marginBottom:15}},!z&&Oe.img&&c.a.createElement(D.a,{xs:12,sm:6,md:4,lg:3,xl:2},c.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(Oe.img),onError:function(e){he.current&&R(!0)},alt:Oe.title||Oe.link})),c.a.createElement(D.a,{xs:12,sm:6,md:8,lg:9,xl:10},c.a.createElement("div",{style:{fontSize:"14px",color:Object(A.d)("menu"),fontWeight:"bold"}},Oe.title),Oe.site&&c.a.createElement("div",{style:{fontSize:"12px"}},Oe.site),Oe.contentSnippet&&c.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},Oe.contentSnippet),c.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:Oe.link,target:"_blank",rel:"noopener noreferrer"},Object(A.u)("$__openLink","*")))):c.a.createElement(c.a.Fragment,null),c.a.createElement(D.a,{xs:12,sm:12,md:12,lg:12,xl:12},Object(A.b)(Object(A.o)(je),e.searchText)),c.a.createElement("div",{style:{clear:"both"}}));if("comment"===fe.type&&!fe.message&&fe.cardId!==e.nodeId&&m.a.getState().db.cards[fe.cardId])return c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===fe.type){var t={};if("$__stepChangeListPosition"===fe.message&&fe.newData){var n=JSON.parse(fe.newData);return c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.message.indexOf("$__")>-1?Object(A.u)(fe.message,1):fe.message," "),c.a.createElement("ul",{style:{listStyle:"decimal"}},n.filter((function(e){return m.a.getState().db.cards[e]})).map((function(e){return c.a.createElement("li",null,m.a.getState().db.cards[e].name)}))))}return"$__updated"===fe.message?(t=JSON.parse(fe.newData),c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.message.indexOf("$__")>-1?Object(A.u)(fe.message,1):fe.message," "),fe.newData&&c.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(t).map((function(r,n){if("icon"===r)return c.a.createElement("li",{key:n,style:{display:"flex"}},Object(A.u)("$__icon",1),":",c.a.createElement(x.a,{icon:t[r],color:Object(A.d)("color"),size:"17px"}));if("customColumns"===r){var a=JSON.parse(t[r]);return c.a.createElement("li",{key:n},Object(A.u)("$__customColumns",1),":",c.a.createElement("ul",null,Object.keys(a).map((function(e,t){return c.a.createElement("li",{key:t},Object(A.u)("$__".concat(e)),"=>"," ",c.a.createElement("span",{style:{color:Object(A.d)("menu"),fontWeight:"bold"}},Object(A.u)("".concat(a[e].name))))}))))}return"customDashboard"===r?c.a.createElement("li",{key:n},Object(A.u)("$__customDashboard",1),": ",Object(A.u)("$__updated",1)):"_id"!==r&&"id"!==r&&"client"!==r&&"planId"!==r&&"_parent"!==r&&"owner"!==r&&"image"!==r?"status"===r?c.a.createElement("li",{key:n},Object(A.u)("$__status",1),": ",Object(A.u)("$__".concat(t[r]),1)):"note"===r?c.a.createElement("li",{key:n},Object(A.u)("$__note",1),": ",c.a.createElement("div",null,Object(A.b)(Object(A.o)(t[r]),e.searchText))):"kpi_type"===r||"priority"===r||"risk"===r||"complexity"===r||"impact"===r?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",Object(A.u)("$__".concat(t[r]),1)):"name"===r||"description"===r?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",t[r]):"url"===r?c.a.createElement("li",{key:n},"url",":",c.a.createElement("a",{href:t[r],target:"blank",style:{}},Object(A.b)(Object(A.o)(t[r]),e.searchText))):"_tags"!==r&&"string"===typeof t[r]&&"kpi_ini"!==r&&"kpi_fin"!==r&&"startDate"!==r&&"endDate"!==r&&"updated_at"!==r&&"created_at"!==r&&"content"!==r?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",t[r].indexOf("$__")>-1?Object(A.u)("$__".concat(t[r]),1):t[r]):"kpi_ini"===r||"kpi_fin"===r?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",Object(A.h)(t[r],fe.kpi_type?fe.kpi_type:"decimal")):"startDate"===r||"endDate"===r||"updated_at"===r||"created_at"===r?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",t[r]?s()(new Date(1e3*t[r])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Object(A.u)("$__removed")):"boolean"===typeof t[r]?c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),": ",t[r]?Object(A.u)("$__enable",1):Object(A.u)("$__disable",1)):"_tags"===r?c.a.createElement("li",{key:n},"TAGS: ",c.a.createElement(b.a,{options:t[r],showOptions:!0})):c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),"::UPDATED_VALUE"):c.a.createElement("li",{key:n},Object(A.u)("$__".concat(r),1),"::UPDATED_VALUE")})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement("div",{style:{position:"relative",width:"100%"}},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},c.a.createElement(x.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),fe.approval&&fe.message.indexOf("$__approved")>-1?c.a.createElement(x.a,{icon:"verified",color:"green"}):fe.approval&&fe.message.indexOf("$__rejected")>-1?c.a.createElement(x.a,{icon:"gpp_bad",color:"red"}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{wordBreak:"break-word"}},Object(A.b)(Object(A.o)(je),e.searchText)),c.a.createElement("div",{style:{clear:"both"}})),fe.cardId?c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],ignoreList:!0,onlyOption:!0,notGlobalExpanded:!0,noExpanding:!0,disabled:!0})):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}}))}if("timer"===fe.type){var o=_e,i="";if(_e<60)i="".concat(o," ").concat(Object(A.u)("$__seconds",1));else if(_e>3600){var l=Math.trunc(o/3600);o-=3600*l;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,d=(o-=60*u)>0?o:0;i="".concat(l," hora").concat(l>1?"s":""," ").concat(u," ").concat(Object(A.u)("$__minutes",1)," ").concat(d," ").concat(Object(A.u)("$__seconds",1))}else{var p=Math.trunc(o/60)>0?Math.trunc(o/60):0,f=(o-=60*p)>0?o:0;i="".concat(p," ").concat(Object(A.u)("$__minutes",1)," ").concat(f," ").concat(Object(A.u)("$__seconds",1))}return Q?c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},c.a.createElement(E.a,{label:Object(A.u)("$__cancelReason",1),variant:Object(A.d)("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){he.current&&X(e.target.value)}},placeholder:Object(A.u)("$__cancelReason_placeholder",1)})),c.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},c.a.createElement(y.a,{transparent:!0,title:Object(A.u)("$__cancel","*"),color:Object(A.d)("lightgrey"),icon:"cancel",onClick:function(){he.current&&(ee(!1),X(null))},size:"25px"}),c.a.createElement(y.a,{transparent:!0,title:Object(A.u)("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){he.current&&ke()},size:"25px"})),c.a.createElement("div",{style:{clear:"both"}})):c.a.createElement("div",null,c.a.createElement("div",{style:{position:"relative"}},fe&&fe._toUser&&Object.keys(fe._toUser).length>0&&c.a.createElement("div",{className:r.timeInfo},c.a.createElement(L.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(fe._toUser).map((function(e){return c.a.createElement(I.a,{key:e,title:fe._toUser[e].displayName?fe._toUser[e].displayName:fe._toUser[e].name},c.a.createElement(S.a,{alt:fe._toUser[e].name,src:fe._toUser[e].image||null,style:{width:27,height:27,border:"none"}},fe._toUser[e].name.substr(0,1)))})))),fe.manualEntry?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.ini).tz("America/Sao_Paulo").format("DD/MM/YYYY"))):c.a.createElement(c.a.Fragment,null,parseInt(s()(1e3*fe.ini).tz("America/Sao_Paulo").format("YYYY"))>2021?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):c.a.createElement(c.a.Fragment,null),parseInt(s()(1e3*fe.fin).tz("America/Sao_Paulo").format("YYYY"))>2021?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"watch_later"}),c.a.createElement("div",{className:"text"},s()(1e3*fe.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):c.a.createElement(c.a.Fragment,null)),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(x.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},i)),c.a.createElement("div",{style:{clear:"both"}}),fe.deleted?c.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255,255,255,0.66)",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",color:Object(A.d)("menu")}},Object(A.u)("$__cancelled")):c.a.createElement(c.a.Fragment,null)),c.a.createElement("div",null,je),fe.deleted&&fe.deletedReason&&c.a.createElement("div",{style:{color:"red"}},Object(A.u)("$__cancelReason",1),": ",fe.deletedReason),c.a.createElement("div",{style:{clear:"both"}}),fe.deleted||!W&&!s()(fe.created_at).unix("x")?c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},c.a.createElement(w.a,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){ee(!0)},show:"hover"}]}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))}if("kpi"===fe.type){var h=fe&&fe.balance?fe.balance:0;return c.a.createElement("div",null,fe.cardId?c.a.createElement(g.a,{db:"cards",data:m.a.getState().db.cards[fe.cardId],ignoreList:!0,noOptions:!0}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",null,je),c.a.createElement("div",{className:parseFloat(fe.value)>0?r.valuePositive:r.valueNegative},Object(A.h)(fe.value,fe.kpi_type?fe.kpi_type:"decimal")),!e.stories&&c.a.createElement("div",{className:r.lastValue},Object(A.u)("$__balance",1),": ",Object(A.h)(h,fe.kpi_type?fe.kpi_type:"decimal")),c.a.createElement("div",{style:{clear:"both"}}))}}()),fe.user&&fe.user._id&&c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"absolute"},Ee?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},c.a.createElement(k.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:fe.user._id},c.a.createElement(S.a,Object.assign({},fe.user._id&&!(null===(t=m.a.getState().db.users[fe.user._id])||void 0===t?void 0:t.deleted)?{alt:fe.user.displayName?fe.user.displayName:fe.user.name,src:"".concat(fe.user.image)}:{alt:Object(A.u)("$__deletedUser"),src:null},{style:{width:"22px",height:"22px"}})))),c.a.createElement("div",{style:Object(a.a)(Object(a.a)({position:"absolute"},Ee?{left:"15px"}:{right:"15px"}),{},{bottom:"-26px",color:"rgba(0,0,0,0.77)",background:"linear-gradient(33deg, rgba(233, 233, 233, 1), rgba(211,211,211, 1))",display:"flex",padding:"1px 7px",alignItems:"center",borderRadius:"0 0 7px 7px",fontSize:"10px",width:"fit-content"})},s()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("H:mm")):s()(new Date).tz("America/Sao_Paulo").format("YYYY")===s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(s()(1e3*fe.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),fe.readedBy&&Object.keys(fe.readedBy).length>0&&c.a.createElement(I.a,{title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe.readedBy).sort((function(e,t){return fe&&fe.readedBy[e]&&fe.readedBy[e].readedDate&&fe.readedBy[t]&&fe.readedBy[t].readedDate&&String(fe.readedBy[e].readedDate.low)&&String(fe.readedBy[t].readedDate.low)&&parseInt(fe.readedBy[e].readedDate.low)<parseInt(fe.readedBy[t].readedDate.low)?-1:fe&&fe.readedBy[e]&&fe.readedBy[e].readedDate&&fe.readedBy[t]&&fe.readedBy[t].readedDate&&String(fe.readedBy[e].readedDate.low)&&String(fe.readedBy[t].readedDate.low)&&parseInt(fe.readedBy[e].readedDate.low)>parseInt(fe.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return fe.user._id!==e&&fe.readedBy&&fe.readedBy[e]&&fe.readedBy[e].name&&c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe.readedBy[e].name,src:fe.readedBy[e].image||null}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe.readedBy[e].displayName?fe.readedBy[e].displayName:fe.readedBy[e].name,fe.readedBy[e].readedDate&&fe.readedBy[e].readedDate.low&&" (".concat(s()(1e3*fe.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))},c.a.createElement("div",null,c.a.createElement(x.a,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all"))),!fe.deleted&&fe._reactions&&Object.keys(fe._reactions).length>0&&c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},fe&&fe._reactions.like&&Object.keys(fe._reactions.like).length>0&&c.a.createElement(_.a,{icon:"thumb_up",iconColor:Object(A.d)("menu"),title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.like).sort((function(e,t){return fe._reactions.like[e].reactDate&&String(fe._reactions.like[e].reactDate.low)&&fe._reactions.like[t].reactDate&&String(fe._reactions.like[t].reactDate.low)&&parseInt(fe._reactions.like[e].reactDate.low)<parseInt(fe._reactions.like[t].reactDate.low)?-1:fe._reactions.like[e].reactDate&&String(fe._reactions.like[e].reactDate.low)&&fe._reactions.like[t].reactDate&&String(fe._reactions.like[t].reactDate.low)&&parseInt(fe._reactions.like[e].reactDate.low)>parseInt(fe._reactions.like[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.like[e].name,src:fe._reactions.like[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.like[e].displayName?fe._reactions.like[e].displayName:fe._reactions.like[e].name,fe._reactions.like[e].reactDate&&fe._reactions.like[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),fe&&fe._reactions&&fe._reactions.nolike&&Object.keys(fe._reactions.nolike).length>0&&c.a.createElement(_.a,{icon:"thumb_down",iconColor:Object(A.d)("medium"),style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.nolike).sort((function(e,t){return fe._reactions.nolike[e].reactDate&&String(fe._reactions.nolike[e].reactDate.low)&&fe._reactions.nolike[t].reactDate&&String(fe._reactions.nolike[t].reactDate.low)&&parseInt(fe._reactions.nolike[e].reactDate.low)<parseInt(fe._reactions.nolike[t].reactDate.low)?-1:fe._reactions.nolike[e].reactDate&&String(fe._reactions.nolike[e].reactDate.low)&&fe._reactions.nolike[t].reactDate&&String(fe._reactions.nolike[t].reactDate.low)&&parseInt(fe._reactions.nolike[e].reactDate.low)>parseInt(fe._reactions.nolike[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.nolike[e].name,src:fe._reactions.nolike[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.nolike[e].displayName?fe._reactions.nolike[e].displayName:fe._reactions.nolike[e].name,fe._reactions.nolike[e].reactDate&&fe._reactions.nolike[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.love&&Object.keys(fe._reactions.love).length>0&&c.a.createElement(_.a,{icon:"favorite",iconColor:Object(A.d)("medium"),style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.love).sort((function(e,t){return fe._reactions.love[e].reactDate&&String(fe._reactions.love[e].reactDate.low)&&fe._reactions.love[t].reactDate&&String(fe._reactions.love[t].reactDate.low)&&parseInt(fe._reactions.love[e].reactDate.low)<parseInt(fe._reactions.love[t].reactDate.low)?-1:fe._reactions.love[e].reactDate&&String(fe._reactions.love[e].reactDate.low)&&fe._reactions.love[t].reactDate&&String(fe._reactions.love[t].reactDate.low)&&parseInt(fe._reactions.love[e].reactDate.low)>parseInt(fe._reactions.love[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.love[e].name,src:fe._reactions.love[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.love[e].displayName?fe._reactions.love[e].displayName:fe._reactions.love[e].name,fe._reactions.love[e].reactDate&&fe._reactions.love[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.approve&&Object.keys(fe._reactions.approve).length>0&&c.a.createElement(_.a,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.approve).sort((function(e,t){return fe._reactions.approve[e].reactDate&&String(fe._reactions.approve[e].reactDate.low)&&fe._reactions.approve[t].reactDate&&String(fe._reactions.approve[t].reactDate.low)&&parseInt(fe._reactions.approve[e].reactDate.low)<parseInt(fe._reactions.approve[t].reactDate.low)?-1:fe._reactions.approve[e].reactDate&&String(fe._reactions.approve[e].reactDate.low)&&fe._reactions.approve[t].reactDate&&String(fe._reactions.approve[t].reactDate.low)&&parseInt(fe._reactions.approve[e].reactDate.low)>parseInt(fe._reactions.approve[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.approve[e].name,src:fe._reactions.approve[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.approve[e].displayName?fe._reactions.approve[e].displayName:fe._reactions.approve[e].name,fe._reactions.approve[e].reactDate&&fe._reactions.approve[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),fe&&fe._reactions&&fe._reactions.attention&&Object.keys(fe._reactions.attention).length>0&&c.a.createElement(_.a,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.users},Object.keys(fe._reactions.attention).sort((function(e,t){return fe._reactions.attention[e].reactDate&&String(fe._reactions.attention[e].reactDate.low)&&fe._reactions.attention[t].reactDate&&String(fe._reactions.attention[t].reactDate.low)&&parseInt(fe._reactions.attention[e].reactDate.low)<parseInt(fe._reactions.attention[t].reactDate.low)?-1:fe._reactions.attention[e].reactDate&&String(fe._reactions.attention[e].reactDate.low)&&fe._reactions.attention[t].reactDate&&String(fe._reactions.attention[t].reactDate.low)&&parseInt(fe._reactions.attention[e].reactDate.low)>parseInt(fe._reactions.attention[t].reactDate.low)?1:0})).map((function(e,t){return c.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},c.a.createElement(S.a,{alt:fe._reactions.attention[e].name,src:fe._reactions.attention[e].image||M.a}),c.a.createElement("span",{style:{paddingLeft:"7px"}},fe._reactions.attention[e].displayName?fe._reactions.attention[e].displayName:fe._reactions.attention[e].name,fe._reactions.attention[e].reactDate&&fe._reactions.attention[e].reactDate.low&&" (".concat(s()(1e3*fe._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),c.a.createElement("div",{style:{clear:"both"}})))}),c.a.createElement("div",{style:{clear:"both"}})),!e.isReply&&c.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},W&&!e.noReactions&&!fe.deleted&&c.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){ye(!0)},onMouseLeave:ve,onMouseOut:ve},c.a.createElement(x.a,{icon:we&&"like"===we?"thumb_up":"thumb_up_off_alt",iconColor:we&&"like"===we?Object(A.d)("menu"):Object(A.d)("medium"),title:Object(A.u)("$__like",1),size:"18px",onClick:function(){xe("like")},onMouseLeave:ve}),c.a.createElement(x.a,{icon:we&&"nolike"===we?"thumb_down":"thumb_down_off_alt",title:Object(A.u)("$__notlike",1),iconColor:we&&"nolike"===we?Object(A.d)("menu"):Object(A.d)("medium"),size:"18px",onClick:function(){xe("nolike")},onMouseLeave:ve}),c.a.createElement(x.a,{icon:we&&"love"===we?"favorite":"favorite_border",title:Object(A.u)("$__love",1),iconColor:we&&"love"===we?Object(A.d)("menu"):Object(A.d)("medium"),size:"18px",onClick:function(){xe("love")},onMouseLeave:ve}),c.a.createElement(x.a,{icon:"verified",title:Object(A.u)("$__approve",1),iconColor:we&&"approve"===we?"green":Object(A.d)("medium"),size:"18px",onClick:function(){xe("approve")},onMouseLeave:ve}),c.a.createElement(x.a,{icon:"report_problem",title:Object(A.u)("$__attention",1),iconColor:we&&"attention"===we?"red":Object(A.d)("medium"),size:"18px",onClick:function(){xe("attention")},onMouseLeave:ve}),fe&&fe.user&&fe.user._id===p._id&&c.a.createElement(x.a,{icon:"forward",title:Object(A.u)("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){ae(!0)},onMouseLeave:ve}),c.a.createElement(x.a,{icon:"reply",title:Object(A.u)("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(a.a)(Object(a.a)({},m.a.getState().chats),{},{drafts:Object(a.a)(Object(a.a)({},m.a.getState().chats.drafts||{}),{},Object(n.a)({},e.nodeId,Object(a.a)(Object(a.a)({},m.a.getState().chats.drafts&&m.a.getState().chats.drafts[e.nodeId]?m.a.getState().chats.drafts[e.nodeId]:{}),{},{reply:fe._id})))}))},onMouseLeave:ve}),!fe.deleted&&"comment"===fe.type&&fe.user&&fe.user._id&&fe.user._id===p._id&&parseInt(fe.created_at)>parseInt(s()().unix("x"))-180?c.a.createElement(y.a,{id:"chat_message_delete",title:Object(A.u)("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){ke()},size:"18px",transparent:!0}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),ne?c.a.createElement(C.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:ne},c.a.createElement("div",{className:"forwardMessage"},c.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},c.a.createElement(v.a,{title:Object(A.u)("$__forwardMessage",1),icon:"forward",onCancel:function(){ae(!1)}})),c.a.createElement("div",{style:{padding:15}},c.a.createElement(j.a,{hideSelected:!0,avatarSize:"33px",permission:e.permission,noLimit:!0,ignoreId:e.nodeId?e.nodeId:e.storie.idRel?e.storie.idRel:null,nodeId:e.nodeId,onSelect:function(e){pe(e)}})),c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},c.a.createElement(y.a,{shadow:!0,title:Object(A.u)("$__cancel"),text:Object(A.u)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){ae(!1),pe(null)}}),de&&c.a.createElement("div",{style:{marginLeft:"15px"}},c.a.createElement(y.a,{shadow:!0,title:Object(A.u)("$__forward"),text:Object(A.u)("$__forward"),icon:"forward",size:"25px",load:!!ce,onClick:function(){le(!0),Object(P.d)(e,Object(a.a)(Object(a.a)({},fe),{},{_forwardToId:de})),setTimeout((function(){ae(!1),pe(null),e.reduxFunction("ASYNC","SET_CHAT",Object(a.a)(Object(a.a)({},m.a.getState().chat),{},{db:"users",nodeId:de[0],loading:!1})),le(!1)}),6e3)}}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}}))})))},144:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},145:function(e,t,r){"use strict";var n=r(5),a=r(2),o=r(0),i=r.n(o),c=r(10),l=r(142),s=r(392),u=r(477),d=r(546),p=r(545),f=r(345),h=r(285),m=r(722),g=r(346),b=r(544),y=r(147),v=r(157),x=r(1),_=Object(v.a)((function(e){return{iconButtonStyleTransaparent:Object(a.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(a.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));t.a=Object(o.memo)((function(e){var t=_(),r=i.a.useState(!1),v=Object(n.a)(r,2),O=v[0],w=v[1],j=i.a.useRef(null),E=Object(o.useRef)();Object(o.useEffect)((function(){return E.current={mounted:!0},function(){E&&E.current&&E.current.mounted&&(E.current.mounted=!1)}}),[]);var k=function(t){t.preventDefault(),t.stopPropagation(),j.current&&j.current.contains(t.target)||setTimeout((function(){var t;(null===E||void 0===E||null===(t=E.current)||void 0===t?void 0:t.mounted)&&w(!1),e.onClose&&e.onClose()}),150)};function S(t){var r;"Tab"===t.key&&(t.preventDefault(),(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&w(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?i.a.createElement("div",{style:Object(a.a)({zIndex:"100 !important"},e.style?e.style:{}),className:O?"ignoreCardClickAway":""},i.a.createElement(y.a,{title:e.title?e.title:Object(x.u)("$__options",1)},e.text?i.a.createElement(u.a,{ref:j,"aria-controls":O?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&w((function(e){return!e})),!O&&e.onOpen&&e.onOpen(),O&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(x.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),i.a.createElement(c.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):i.a.createElement(f.a,{ref:j,"aria-controls":O?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===E||void 0===E||null===(r=E.current)||void 0===r?void 0:r.mounted)&&w((function(e){return!e})),!O&&e.onOpen&&e.onOpen(),O&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},i.a.createElement(c.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(x.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),i.a.createElement(b.a,{open:O,anchorEl:j.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return i.a.createElement(p.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),i.a.createElement(g.a,null,i.a.createElement(d.a,{onClickAway:k},i.a.createElement(m.a,{autoFocusItem:O,id:"menu-list-grow",onKeyDown:S,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return i.a.createElement(h.a,{key:r,style:{color:t&&t.color?t.color:Object(x.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.forceStopPropagation||k(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},i.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?i.a.createElement(l.a,{alt:t.name,src:t.avatar||null,style:{width:e.size?e.size:"20px",height:e.size?e.size:"20px"}},t.name.substr(0,1)):i.a.createElement(s.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},i.a.createElement(c.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(x.d)("menu")})),!t.render&&i.a.createElement("span",{style:{marginLeft:"7px"}},Object(x.u)(t.name,1))))}))))))}))):i.a.createElement(i.a.Fragment,null)}))},1479:function(e,t,r){},148:function(e,t,r){"use strict";var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(1),l=r(129),s=r(10);t.a=function(e){var t=e.legend,r=Object(o.useRef)(),u=Object(o.useState)([]),d=Object(a.a)(u,2),p=d[0],f=d[1],h=Object(o.useState)([]),m=Object(a.a)(h,2),g=m[0],b=m[1],y=t;return Object(o.useEffect)((function(){if(r.current){var e=new ResizeObserver((function(){var e=r.current.clientWidth,t=Object(n.a)(y),a=[];[510,420,350].forEach((function(r,o){if(e<r){var i;switch(o){case 0:i=4;break;case 1:i=3;break;case 2:i=2;break;default:i=5}t=Object(n.a)(y),a=t.splice(i,5)}})),f(t),b(a)}));return e.observe(r.current),function(){return e.disconnect()}}}),[t]),i.a.createElement("div",{ref:r,style:{marginLeft:"20px",display:"block",alignSelf:"center",width:"100%",overflow:"hidden"}},i.a.createElement("div",{style:{display:"flex",width:"500px"}},p.map((function(e){var t=e.id,r=e.color,n=e.name,a=e.label,o=e.key,l=Object(c.u)(n||(a||t)),s=l.charAt(0)+l.slice(1).toLowerCase();return i.a.createElement("div",{key:o,style:{display:"flex",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center"}},i.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,marginTop:"2px"}}),i.a.createElement("p",{style:{margin:"0px",marginTop:"-0.8px",marginLeft:"6px",fontSize:"14px",display:"block"}},s))})),g.length>0&&i.a.createElement(l.a,{title:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{marginBottom:"10px",fontSize:"16px",marginTop:"10px",justifyContent:"center"}},g.map((function(e){var t=e.id,r=e.color,n=e.name,a=e.label,o=e.key,l=Object(c.u)(n||(a||t)),s=l.charAt(0)+l.slice(1).toLowerCase();return i.a.createElement("div",{key:o,style:{display:"flex",marginTop:"4px",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center",width:"100%"}},i.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,alignSelf:"center"}}),i.a.createElement("p",{style:{margin:"0px",marginLeft:"6px",display:"block",fontSize:"16px"}},s))}))))},i.a.createElement("div",{style:{alignSelf:"center",border:"1px solid #D3D3D3 ",fontSize:"16px",borderRadius:"5px",display:"flex",backgroundColor:"#f5f5f5",cursor:"pointer"}},i.a.createElement(s.a,{style:{alignSelf:"center"},size:16},"add"),i.a.createElement("p",{style:{margin:"0px"}},g.length),i.a.createElement(s.a,{style:{alignSelf:"center"},size:16},"expand_more")))))}},15:function(e,t,r){"use strict";function n(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;return{type:e,action:t,value:r,next:n,preLoader:a,redirect:o}}r.r(t),r.d(t,"reduxFunction",(function(){return n}))},150:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M3,19.77a1,1,0,0,1,.29-.7l2.43-2.43a1,1,0,0,1,1.41,0,1,1,0,0,1,0,1.42L4.65,20.48a1,1,0,0,1-1.41,0A1,1,0,0,1,3,19.77Z"}),a.default.createElement("path",{d:"M3,19.77a1,1,0,0,1,.29-.7l2.43-2.43a1,1,0,0,1,1.41,0,1,1,0,0,1,0,1.42L4.65,20.48a1,1,0,0,1-1.41,0A1,1,0,0,1,3,19.77Z"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M3.15,4.67A1,1,0,0,1,4.86,4L7.28,6.38a1,1,0,0,1,0,1.42,1,1,0,0,1-1.41,0L3.44,5.37A1,1,0,0,1,3.15,4.67Z"}),a.default.createElement("path",{d:"M15.67,17.18a1,1,0,0,1,.29-.7,1,1,0,0,1,1.41,0L19.8,18.9a1,1,0,0,1-1.42,1.42L16,17.89A1,1,0,0,1,15.67,17.18Z"}),a.default.createElement("path",{d:"M15.67,7.09A1,1,0,0,1,16,6.38L18.38,4A1,1,0,0,1,19.8,4a1,1,0,0,1,0,1.41L17.37,7.8A1,1,0,0,1,16,7.8,1,1,0,0,1,15.67,7.09Z"}),a.default.createElement("path",{d:"M.73,12a1,1,0,0,1,1-1H6.58a5.26,5.26,0,0,1,4.13-4.13V1.44a1,1,0,1,1,2,0V7.78a1,1,0,0,1-1,1A3.23,3.23,0,0,0,8.48,12a1,1,0,0,1-1,1H1.73A1,1,0,0,1,.73,12Z"}),a.default.createElement("path",{d:"M10.71,22.56V16.22a1,1,0,0,1,1-1A3.22,3.22,0,0,0,14.93,12a1,1,0,0,1,1-1h6.34a1,1,0,0,1,0,2H16.83a5.23,5.23,0,0,1-4.12,4.13v5.43a1,1,0,0,1-2,0Z"}))),"Brigth");t.default=o},153:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(15),s=r(3),u=r(13),d=r(14),p=r(10),f=r(27),h=r(142),m=r(723),g=r(546),b=r(477),y=r(285),v=r(722),x=r(1189),_=r(147),O=r(157),w=r(724),j=r(24),E=r(1),k=r(77);function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var L=Object(O.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));t.a=Object(d.b)(null,(function(e){return Object(u.b)(l,e)}))((function(e){var t,r,i,l,u,d=L(),O=c.a.useRef(null),C=c.a.useState(!1),I=Object(o.a)(C,2),T=I[0],F=I[1],D=e.data,N=s.a.getState(),A=N.db,P=N.session,$=N.sideModule,M=c.a.useState(e.selected?e.selected:[]),z=Object(o.a)(M,2),Y=z[0],B=z[1],R=c.a.useState(""),G=Object(o.a)(R,2),H=G[0],W=G[1],U=c.a.useState(!e.selectedShow||!String(null===(t=e.selectedShow)||void 0===t?void 0:t.internal)||(null===(r=e.selectedShow)||void 0===r?void 0:r.internal)),q=Object(o.a)(U,2),V=q[0],J=q[1],X=c.a.useState(!(!e.selectedShow||!String(null===(i=e.selectedShow)||void 0===i?void 0:i.external))&&(null===(l=e.selectedShow)||void 0===l?void 0:l.external)),K=Object(o.a)(X,2),Z=K[0],Q=K[1],ee=c.a.useRef();c.a.useEffect((function(){return ee.current=!0,function(){ee.current=!1}}),[]),c.a.useEffect((function(){e.selected&&JSON.stringify(e.selected)!==JSON.stringify(Y)&&ee.current&&B(e.selected)}),[e.selected]);var te=e.admins?Object(k.i)(D&&D._id?D._id:null,null,{onlyCard:!(!D||!D._id)}):Object(j.u)(D&&D._id?D._id:null,{onlyCard:!(!D||!D._id),all:!0,allPlataform:e.allPlataform||!1}),re=$&&$.id?Object(j.t)($.id):0,ne=function(){var t=Object(a.a)(S().mark((function t(r){var n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=Array.from(Y),e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],ee.current&&B(n),e.onSelect&&e.onSelect(n),e.multiple||ee.current&&F(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ae=function(t){var r=t.pr,a=t.selected,o=te[r];return o?c.a.createElement(y.a,{autoFocus:!1,onClick:function(e){ne(r),e.preventDefault(),e.stopPropagation()},className:"ignoreClickAway"},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer",pointerEvents:"none"}},c.a.createElement(h.a,{alt:o.name||null,src:o.image||null,style:Object(n.a)({},e.avatarSize?{width:e.avatarSize,height:e.avatarSize}:{})},o&&o.name?o.name.substr(0,1):""),c.a.createElement("div",{style:{marginLeft:"15px",color:"black"}},c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},className:"ignoreClickAway"},o.name||o.name),c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center"}},o._parent&&A.users[o._parent]&&A.users[o._parent].image?c.a.createElement("div",{style:{position:"relative",bottom:-4,right:-7,width:17,height:17,borderRadius:"50%",backgroundImage:"url(".concat(A.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):c.a.createElement(c.a.Fragment,null),o._parent&&A.users[o._parent]&&A.users[o._parent].name?c.a.createElement("div",{style:{position:"relative",float:"left",fontSize:11,color:"lightgray",marginLeft:7}},A.users[o._parent].name):c.a.createElement(c.a.Fragment,null)),a?c.a.createElement("div",{style:{position:"absolute",right:0,top:0,bottom:0,alignItems:"center",justifyContent:"center",display:"flex"}},0===Y.indexOf(o._id)?c.a.createElement("div",null,c.a.createElement(p.a,{icon:"admin_panel_settings",color:"lightgray"})):c.a.createElement(c.a.Fragment,null),c.a.createElement(p.a,{icon:"check",color:"green"})):c.a.createElement(c.a.Fragment,null)))):c.a.createElement(c.a.Fragment,null)};return c.a.createElement("div",null,c.a.createElement(b.a,{ref:O,"aria-controls":T?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!D||e.permission||D&&te&&te[P._id]&&te[P._id].access&&parseInt(te[P._id].access)>2||re>3)&&F(!0)},className:e.transparent?d.iconButtonStyleTransaparent:d.iconButtonStyleWhite},Y&&0===Y.length?Object(E.u)(e.text||"$__selectUser"):c.a.createElement("div",null,c.a.createElement(m.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},null===Y||void 0===Y||null===(u=Y.filter((function(e){return e&&s.a.getState().db.users[e]})))||void 0===u?void 0:u.map((function(t){var r,n,a,o;return c.a.createElement(_.a,{key:t,title:s.a.getState().db.users[t]&&s.a.getState().db.users[t].displayName?s.a.getState().db.users[t].displayName:(null===(r=s.a.getState().db.users[t])||void 0===r?void 0:r.name)||""},c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},c.a.createElement(h.a,{alt:s.a.getState().db.users[t].name||"",src:s.a.getState().db.users[t].image||null,style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"}},(null===(n=s.a.getState().db.users[t])||void 0===n||null===(a=n.name)||void 0===a?void 0:a.substr(0,1))||""),!e.multiple&&c.a.createElement("span",{style:{marginLeft:15}},s.a.getState().db.users[t].displayName?s.a.getState().db.users[t].displayName:(null===(o=s.a.getState().db.users[t])||void 0===o?void 0:o.name)||"")))})),e.multiple&&c.a.createElement(_.a,{title:Object(E.u)(e.text||"$__selectUser")},c.a.createElement(h.a,{style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"},alt:"ADD",src:null},"+"))))),c.a.createElement(x.a,{open:T},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"space-between"}},c.a.createElement(g.a,{onClickAway:function(e){O.current&&O.current.contains(e.target)||ee.current&&F(!1)}},c.a.createElement("div",{style:{position:"relative"}},c.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative"}},c.a.createElement(f.a,{id:"quickUser_Search",label:Object(E.u)("$__searchByName",1),variant:Object(E.d)("fieldVariant"),name:"searchValue",InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(w.a,{position:"end",style:{cursor:"pointer"},onClick:function(){W(""),F(!1)}},c.a.createElement(p.a,{icon:"close"})),onChange:function(e){W(e.target.value)}},value:H,placeholder:Object(E.u)("$__searchByName",1),autoFocus:!0})),c.a.createElement("div",{style:{display:"flex",padding:"0px 15px",fontSize:12,marginTop:-5}},c.a.createElement("div",{style:{border:"solid 1px ".concat(V?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",borderRadius:10,backgroundColor:"".concat(V?"#585858":"lightGray"),color:Object(E.s)(V?"#585858":"#d3d3d3",!0)},onClick:function(){J((function(e){return!e}))}},Object(E.u)("$__showInternal")),c.a.createElement("div",{style:{border:"solid 1px ".concat(Z?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",marginLeft:7,borderRadius:10,backgroundColor:"".concat(Z?"#585858":"lightGray"),color:Object(E.s)(Z?"#585858":"#d3d3d3",!0)},onClick:function(){Q((function(e){return!e}))}},Object(E.u)("$__showExternals"))),c.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative",maxHeight:250,overflowY:"auto"}},c.a.createElement(v.a,{id:"menu-list-grow",autoFocusItem:!1,autoFocus:!1,onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),ee.current&&F(!1))}},Object.keys(te).filter((function(e){return!(te[e].deleted||!(""===H||H&&te[e].name&&te[e].name.toLowerCase().indexOf(H.toLowerCase())>-1)||!(!Z&&"external"!==te[e].type||Z&&"external"===te[e].type||!V&&"user"!==te[e].type||V&&"user"===te[e].type))})).sort((function(e,t){return te[e].name<te[t].name?-1:te[e].name>te[t].name?1:0})).filter((function(e){return te&&te[e]&&te[e]._id})).map((function(e){return c.a.createElement(ae,{pr:e,key:e,selected:-1!==Y.indexOf(te[e]._id)})})))))))))}))},155:function(e,t,r){"use strict";var n=r(1885),a=r(33),o=r(1),i=Object(a.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Object(o.d)("color")}})(n.a);t.a=i},1582:function(e,t){},1584:function(e,t){},1595:function(e,t){},1597:function(e,t){},1622:function(e,t){},1624:function(e,t){},1625:function(e,t){},1630:function(e,t){},1632:function(e,t){},1638:function(e,t){},164:function(e,t,r){},1640:function(e,t){},1659:function(e,t){},167:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n,a,o=r(86),i=r(0),c=r.n(i),l=r(71),s=r(721),u=l.b.div(n||(n=Object(o.a)(["\n position: relative;\n width: 100%;\n height: 100%;\n padding-top: 20px;\n padding-bottom: 20px;\n"]))),d=l.b.div(a||(a=Object(o.a)(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffffeb;\n z-index: 7000;\n display:flex;\n align-items:center;\n justify-content:center;\n"])));function p(e){return c.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?c.a.createElement(d,null,c.a.createElement(s.a,{size:50|e.size})):c.a.createElement(u,null,c.a.createElement(s.a,null)))}},1671:function(e,t){},1674:function(e,t){},172:function(e,t,r){"use strict";r.d(t,"e",(function(){return m})),r.d(t,"c",(function(){return b})),r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return f})),r.d(t,"d",(function(){return v})),r.d(t,"f",(function(){return h}));var n=r(7),a=r(2),o=r(8),i=r(39),c=r(479),l=r(9),s=r.n(l),u=r(3),d=r(77);function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var f=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,l,s,d;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Object(a.a)({},t),Object.keys(o).forEach((function(e){o[e]||delete o[e]})),l={},s={},o.users&&o.users.length>0&&o.users.forEach((function(e,t){var r=u.a.getState().db.users[e];s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},e,Object(a.a)({_id:e,name:r.name,image:r.image||null},0===t?{isResponsible:!0}:{})))})),d=Object(c.a)(),i.a.post("card/add",Object(a.a)({_id:d},o)),l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},d,Object(a.a)(Object(a.a)({_id:d},o),{},{_users:s}))),(null===(r=l[d])||void 0===r?void 0:r.users)&&delete l[d].users,e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=Object(o.a)(p().mark((function e(t){var r,n,a=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"order",n=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=2,i.a.post("kanban/reorder",{cards:t,orderBy:r}),e.abrupt("return",!0);case 7:e.prev=7,e.t0=e.catch(2),n<3&&setTimeout((function(){h(t,r,n+1)}),3e3);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t){return e.apply(this,arguments)}}(),m=function(e,t){var r=Object(a.a)({},u.a.getState().db.cards);t.cards&&t.cards.length>0&&t.cards.forEach((function(e,t){r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,Object(a.a)(Object(a.a)({},r[e]),{},{step:"".concat(t+1)})))})),e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},u.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().db.cards),r)}))},g=function(){var e=Object(o.a)(p().mark((function e(t){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.a.put("card/link",t);case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),setTimeout((function(){g(t)}),3e3);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),b=function(e,t,r,n){var o=u.a.getState().db.cards[r],c=u.a.getState().db.cards[t],l={};o&&o.automationDueDateType&&"add"===o.automationDueDateType&&(l=Object(a.a)({endDate:s()("".concat(s()().format("YYYY-MM-DD")," 23:59:59")).add((null===o||void 0===o?void 0:o.automationDueDate)||1,"days").unix("X")},c.startDate?{}:{startDate:s()().unix("X")})),o&&o.automationStatusType&&"replace"===o.automationStatusType&&(l=Object(a.a)(Object(a.a)({},l),{},{status:o.automationStatus||"notStarted"},o.automationStatus&&"completed"===o.automationStatus?{completed_at:s()().unix("x")}:{}));var p,f=[];if(o&&o.automationUsers&&"add"===o.automationUsers&&o._users&&Object.keys(o._users).filter((function(e){return e})).length>0&&Object.keys(o._users).filter((function(e){return e})).forEach((function(t){if(o._users[t].isResponsible&&(p=t),c&&(!c._users||c._users&&!c._users[t])){var r=!(!c._users||!c._users[t]);Object(d.b)(e,t,o._users[t].access,c._id,r)}})),o&&o.automationTags&&"doNotChange"!==o.automationTags&&o._tags&&o._tags.length>0){var h=c._tags?Array.from(c._tags):[];if("replace"===o.automationTags){var m=[],b=[];o._tags.forEach((function(e){h.findIndex((function(t){return t.value===e.value}))>-1&&(m.push(e.value),h.splice(h.findIndex((function(t){return t.value===e.value})),1))})),o._tags.forEach((function(e){-1===h.findIndex((function(t){return t.value===e.value}))&&(h.push(e),-1===b.indexOf(e.value)&&b.push(e.value))})),l=Object(a.a)(Object(a.a)(Object(a.a)({},l),m.length>0?{removeTags:m}:{}),b.length>0?{addTags:b}:{}),h=Array.from(o._tags)}if("add"===o.automationTags){var v=[];o._tags.forEach((function(e){0===h.filter((function(t){return t.value===e.value})).length&&(v.push(e.value),h.push(e))})),l=Object(a.a)(Object(a.a)({},l),{},{addTags:v})}if("remove"===o.automationTags){var x=[];o._tags.forEach((function(e){h.findIndex((function(t){return t.value===e.value}))>-1&&(x.push(e.value),h.splice(h.findIndex((function(t){return t.value===e.value})),1))})),l=Object(a.a)(Object(a.a)({},l),{},{removeTags:x})}l=Object(a.a)(Object(a.a)({},l),{},{_tags:h})}return o&&o.automationUsers&&"remove"===o.automationUsers&&o._users&&Object.keys(o._users).filter((function(e){return e})).length>0&&Object.keys(o._users).filter((function(e){return e})).forEach((function(e){c&&c._users&&c._users[e]&&-1===f.indexOf(e)&&f.push(e)})),o&&o.automationUsers&&"removeAll"===o.automationUsers&&(c&&c._users&&Object.keys(c._users).filter((function(e){return e})).length>0&&Object.keys(c._users).filter((function(e){return e})).forEach((function(e){-1===f.indexOf(e)&&e!==n&&f.push(e)})),p=n),o&&o.automationUsers&&"replace"===o.automationUsers&&(o._users&&Object.keys(o._users).length>0&&Object.keys(o._users).filter((function(e){return e})).forEach((function(t){if(o._users[t].isResponsible&&(p=t),c&&(!c._users||c._users&&!c._users[t])){var r=!(!c._users||!c._users[t]);Object(d.b)(e,t,o._users[t].access,c._id,r)}})),c&&c._users&&Object.keys(c._users).filter((function(e){return e})).length>0&&Object.keys(c._users).filter((function(e){return e})).forEach((function(e){o._users[e]||-1!==f.indexOf(e)||f.push(e)}))),o&&o.keepUserWhoCreatedActivity&&n&&f.indexOf(n)>-1&&f.splice(f.indexOf(n),1),f.length>0&&i.a.put("cards/removeAccess/",{cardId:c._id,userIds:f}),p&&Object(d.l)(e,{cardId:c._id,userId:p}),o.setIcon&&(l=Object(a.a)(Object(a.a)({},l),{},{icon:o.setIcon})),"{}"!==JSON.stringify(l)&&y(Object(a.a)({_id:t},l)),t&&r&&u.a.getState().db.cards[r]&&u.a.getState().db.cards[t]&&36===r.length&&g({idRel:t,destination:r}),l&&l.status&&"completed"===l.status&&!l.completed_at&&(l=Object(a.a)(Object(a.a)({},l),{},{completed_at:s()().unix("x")})),l},y=function(){var e=Object(o.a)(p().mark((function e(t){var r,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(a.a)({},t),e.next=3,i.a.post("kanban/automation",r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a.getState().db.cards,o={},i=[];return r&&Object.keys(r).length>0&&Object.keys(r).filter((function(t){return r[t]._parent===e&&"step"===r[t].type&&!r[t].deleted})).length>0&&Object.keys(r).filter((function(t){return r[t]._parent===e&&"step"===r[t].type&&!r[t].deleted})).sort((function(e,t){var n=r[e].step||1,a=r[t].step||1;return parseInt(n)<parseInt(a)?-1:parseInt(n)>parseInt(a)?1:0})).forEach((function(c,l){var s=[];Object.keys(r).length>0&&Object.keys(r).filter((function(n){return r[n]._parent===c&&(!t.deleted&&!r[n].deleted||t.deleted)||0===l&&r[n]._parent===e&&!r[n].deleted&&"objective"!==r[n].type&&"goal"!==r[n].type&&"step"!==r[n].type&&-1===r[n].type.indexOf("guideline")&&"link"!==r[n].type&&"insight"!==r[n].type&&"threat"!==r[n].type&&"strength"!==r[n].type&&"weakness"!==r[n].type&&"opportunity"!==r[n].type&&"chatGroup"!==r[n].type})).sort((function(e,t){var n,a,o,i,c,l,s,u,d,p,f,h,m=0,g=0;return(null===(n=r[e])||void 0===n?void 0:n.order)&&(m=String((null===(a=r[e])||void 0===a||null===(o=a.order)||void 0===o?void 0:o.low)?null===(i=r[e])||void 0===i||null===(c=i.order)||void 0===c?void 0:c.low:null===(l=r[e])||void 0===l?void 0:l.order)),(null===(s=r[t])||void 0===s?void 0:s.order)&&(g=String((null===(u=r[t])||void 0===u||null===(d=u.order)||void 0===d?void 0:d.low)?null===(p=r[t])||void 0===p||null===(f=p.order)||void 0===f?void 0:f.low:null===(h=r[t])||void 0===h?void 0:h.order)),parseInt(m)<parseInt(g)?-1:parseInt(m)>parseInt(g)?1:0})).forEach((function(e,t){r[e].deleted&&console.log(r[e]),s.push(Object(a.a)(Object(a.a)({},r[e]),{},{order:String(t)}))})),o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},c,{id:c,name:r[c].name,icon:r[c].icon||null,items:s})),-1===i.indexOf(c)&&i.push(c)})),{columns:o,columnOrder:i}},x=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,l,s,d,f,h,m,y,v,x,_,O,w;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.nodeId,o=t.reason,l=void 0===o?null:o,s=t.approval,d=void 0!==s&&s,f=t.approved,h=void 0!==f&&f,m=u.a.getState().db.cards[r],y=u.a.getState().db.cards[m._parent],v=y.onConcludedStepMoveTo?y.onConcludedStepMoveTo:Object.keys(u.a.getState().db.cards).filter((function(e){return u.a.getState().db.cards[e]._parent===y._parent&&"step"===u.a.getState().db.cards[e].type&&parseInt(u.a.getState().db.cards[e].step)===parseInt(y.step)+1}))[0],x=u.a.getState().db.cards[v],d&&y._id&&(_={_id:Object(c.a)(),idRel:r,cardId:y._id,message:"".concat(h?"$__approved":"$__rejected"," - ").concat(l?"$__reason: ".concat(l):""),type:"log",filesCount:0,approval:!0,db:"cards"},i.a.post("timeline/add",_),!h&&y._parent&&(y._parent&&g({idRel:r,destination:y._parent}),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},u.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().db.cards),{},Object(n.a)({},r,Object(a.a)(Object(a.a)({},u.a.getState().db.cards[r]),{},{_parent:y._parent,requireApproval:null})))})))),(!d||d&&h)&&(O=u.a.getState().db.cards[r]&&u.a.getState().db.cards[r]._createdBy&&u.a.getState().db.cards[r]._createdBy._id?u.a.getState().db.cards[r]._createdBy._id:null,w=b(t,r,v,O),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},u.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().db.cards),{},Object(n.a)({},r,Object(a.a)(Object(a.a)(Object(a.a)({},u.a.getState().db.cards[r]),w),{},{_parent:y.onConcludedStepMoveTo},(null===x||void 0===x?void 0:x.requireApproval)?{requireApproval:!0}:{requireApproval:null})))})));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},1735:function(e,t,r){},1736:function(e,t,r){},1751:function(e,t,r){},1752:function(e,t,r){var n={"./AboutPlan.jsx":[457],"./Actions.jsx":[833],"./ActionsDetailed.jsx":[834],"./ActionsDough.jsx":[516],"./DayTasks.jsx":[517],"./Funnel.jsx":[518],"./Goal.jsx":[835],"./GoalsDetailed.jsx":[836],"./GoalsDough.jsx":[519],"./Guideline.jsx":[837],"./LastCompleted.jsx":[520],"./LateTask.jsx":[521],"./MatrixDough.jsx":[522],"./MatrixDoughDetailed.jsx":[838],"./Meta.jsx":[191],"./Modal.jsx":[481],"./NextTask.jsx":[523],"./Notes.jsx":[696],"./Objective.jsx":[839],"./ObjectiveDetailed.jsx":[840],"./ObjetiveDough.jsx":[524],"./TaskByPerson.jsx":[458],"./TaskDoneBar copy.jsx":[1891,3],"./TaskDoneBar.jsx":[841],"./TaskDoneBarMonth.jsx":[843],"./TaskDoneBarMonthENEVAAAAA.jsx":[1892,4],"./TaskDoneBar_ENEVAAAA.jsx":[1893,5],"./TaskDoneByTime.jsx":[459],"./TaskDoneDoughTable.jsx":[842],"./TaskDoneDoughTableENEVAAAA.jsx":[1894,6],"./TimeLine.jsx":[460],"./Timesheet.jsx":[461]};function a(e){if(!r.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],a=t[0];return Promise.all(t.slice(1).map(r.e)).then((function(){return r(a)}))}a.keys=function(){return Object.keys(n)},a.id=1752,e.exports=a},176:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(157),i=r(721),c=r(1),l=Object(o.a)((function(e){return{root:{position:"relative"},bottom:{color:e.palette.grey["light"===e.palette.type?200:700],position:"absolute",left:0},top:{color:Object(c.d)("ColumnTitleColor"),animationDuration:"550ms",position:"absolute",left:0},circle:{strokeLinecap:"round"}}}));t.a=function(e){var t=l();return a.a.createElement("div",{className:t.root,style:{width:e.size?e.size:"25px",height:e.size?e.size:"25px"}},a.a.createElement(i.a,Object.assign({variant:"determinate",className:t.bottom,size:e.size?e.size:25,thickness:4},e,{value:100})),a.a.createElement(i.a,Object.assign({variant:"indeterminate",disableShrink:!0,className:t.top,classes:{circle:t.circle},size:e.size?e.size:25,thickness:4},e)))}},1831:function(e,t,r){},1833:function(e,t,r){},1837:function(e,t,r){},1838:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(49),i=r.n(o),c=r(47),l=r(3),s=r(1967),u=r(14),d=r(86),p=r(2),f=r(8),h=r(7),m=r(5),g=r(323),b=r(73),y=r.n(b),v=r(94),x=r.n(v),_=r(9),O=r.n(_),w=r(178),j=(r(1245),r(71)),E=r(1185),k=r(20),S=r(1);function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function C(e){var t=a.a.useState(!!l.a.getState().session.consent),r=Object(m.a)(t,1)[0],n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!0),b=Object(m.a)(g,2),y=b[0],v=b[1];a.a.useEffect((function(){setTimeout((function(){v(!1)}),6e3)}),[i]);var x=function(){var e=Object(f.a)(L().mark((function e(){var t;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0),h(!0),t={accepted_at:"".concat(O()().unix("X")),privacy:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022",terms:"Data de cria\xe7\xe3o: 31 de dezembro de 2021, \xdaltima atualiza\xe7\xe3o: 06 de janeiro de 2022"},l.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"consent"},{version:JSON.stringify(t)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return d?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"policyAndTermsConsent"},a.a.createElement(E.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!r,onClick:function(e){}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden",backgroundColor:"#FFFFFF"})},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(S.d)("color"),fontWeight:"bold"}},Object(S.u)("$__TermsOfUseAndPrivacyPolicy")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},i?a.a.createElement("iframe",{title:"outModule",id:"terms",style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://sonne.global/SONNE-Termos-de-Servicos-2022-01-07.pdf"}):a.a.createElement("iframe",{title:"outModule",id:"policy",style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",onScroll:function(){console.log("scroll")},src:"https://sonne.global/SONNE-Politica-de-Privacidade-2022-01-07.pdf"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:40,display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:33}},a.a.createElement(k.a,{id:"policyButtonConsent",title:Object(S.u)(i?"$__accepted":"$__IReadAndIAgree","*"),text:i?null:Object(S.u)("$__IReadAndIAgree","*"),color:i?"green":Object(S.d)("menu"),icon:"verified",onClick:i?null:function(){c(!0)},size:"25px"}),i?Object(S.u)("$__PrivacyPolicy","*"):a.a.createElement(a.a.Fragment,null)),i&&!y?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(k.a,{id:"termsofuseButtonConsent",title:Object(S.u)("$__IReadAndIAgreeTheTermsOfUse","*"),text:Object(S.u)("$__IReadAndIAgreeTheTermsOfUse","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){x()},size:"25px"})):a.a.createElement(a.a.Fragment,null)))))}var I=r(15),T=r(13);function F(){F=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var D=Object(u.b)((function(e){return{session:e.session}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useRef();if(t&&(!t.require||t.require&&!t.require.licensingAgreement))return a.a.createElement(a.a.Fragment,null);var n=function(){var e=Object(f.a)(F().mark((function e(){var t;return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={accepted_at:"".concat(O()().unix("X")),version:"2022-10-24"},l.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"agreement"},{version:JSON.stringify(t)});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{id:"licensingAgreement"},a.a.createElement(E.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!0},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden",backgroundColor:"#FFFFFF"})},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(S.d)("color"),fontWeight:"bold"}},Object(S.u)("$__licensingAgreement")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("iframe",{title:"outModule",id:"licensing",ref:r,onLoad:function(){console.log("licensing")},style:{position:"absolute",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",src:"https://machen.ai/contracts/MACHEN-Termos-e-Condicoes-Gerais-de-Uso-de-Software-2022-10-24.pdf"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:40,display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:33}},a.a.createElement(k.a,{id:"agreementButtonConsent",title:Object(S.u)("$__IReadAndIAgree","*"),text:Object(S.u)("$__IReadAndIAgree","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){n()},size:"25px"}))))))})),N=r(38),A=r(22),P=r(884),$=r(253),M=r.n($),z=r(105),Y=r(254),B=(r(960),r(752),r(509),r(1883),r(157)),R=r(546),G=(r(1184),r(285)),H=(r(1973),r(1853)),W=r(1849),U=r(1886),q=r(1850),V=(Object(B.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px",fontSize:"14px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& .MuiInput-underline:before:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),Object(B.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& +:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),Object(B.a)({TextField:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px",fontSize:"14px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& .MuiInput-underline:after":{border:"1px solid rgb(192,178,131)"},"& .MuiInput-underline:before:before":{borderBottom:"1px solid rgb(192,178,131)"}}}),r(145)),J=r(392),X=r(1970),K=r(1851),Z=r(6),Q={block:{},left:{float:"left!important",display:"block"},right:{margin:"0",fontSize:"12px",float:"right!important",padding:"15px"},footer:Object(p.a)(Object(p.a)({bottom:"0",borderTop:"1px solid "+Z.p[15],padding:"15px 0"},Z.k),{},{zIndex:4}),container:Object(p.a)(Object(p.a)({zIndex:3},Z.e),{},{position:"relative"}),containerFluid:Object(p.a)(Object(p.a)({zIndex:3},Z.f),{},{position:"relative"}),a:{color:Z.w[0],textDecoration:"none",backgroundColor:"transparent"},list:{marginBottom:"0",padding:"0",marginTop:"0"},inlineBlock:{display:"inline-block",padding:"0",width:"auto"},whiteColor:{"&,&:hover,&:focus":{color:Z.I}}},ee=Object(B.a)(Q);function te(e){var t,r,n=ee(),o=e.fluid,i=e.white,c=(e.rtlActive,x()((t={},Object(h.a)(t,n.container,!o),Object(h.a)(t,n.containerFluid,o),Object(h.a)(t,n.whiteColor,i),t))),l=n.a+x()(Object(h.a)({}," "+n.whiteColor,i));x()((r={},Object(h.a)(r,n.block,!0),Object(h.a)(r,n.whiteColor,i),r));return a.a.createElement("footer",{className:n.footer},a.a.createElement("div",{className:c,style:{display:"flex",justifyContent:"center"}},a.a.createElement("div",{className:n.left},a.a.createElement(K.a,{className:n.list})),a.a.createElement("p",{className:n.center},"\xa9 ",1900+(new Date).getYear()," ",a.a.createElement("a",{href:"https://sonne.global",className:l,target:"_blank",rel:"noopener noreferrer"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==Object(S.u)("$__footerDescription",1)?Object(S.u)("$__footerDescription",1):""))))}var re=r(10),ne=r(1127),ae=r.n(ne),oe=r(428),ie=r.n(oe),ce=r(721),le=r(33),se=function(e){return{backdrop:{zIndex:4e3},header:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"50px"},btClose:{position:"absolute",right:"15px",top:"15px"},content:{position:"absolute",top:"50px",bottom:"50px",left:"30px",right:"30px",display:"flex",justifyContent:"center",alignItems:"center"},loader:{position:"absolute",top:"calc(50% - 20px)",left:"calc(50% - 20px)",width:"40px",height:"40px","& .MuiCircularProgress-root":{color:"".concat(Object(S.d)("color")," !important")}},img:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"center center",display:"flex",alignItems:"center",justifyContent:"center","& img":{width:"auto",height:"auto",maxWidth:"100%",maxHeight:"100%"}},movie:{position:"absolute",width:"-webkit-fill-available",height:"-webkit-fill-available"},embed:{position:"absolute",width:"-webkit-fill-available",height:"-webkit-fill-available"},leftButtom:{position:"absolute",top:"50px",bottom:"50px",left:"0px",width:"30px",display:"flex",alignItems:"center"},rightButtom:{position:"absolute",top:"50px",bottom:"50px",width:"30px",right:"0px",display:"flex",alignItems:"center"},footer:{position:"absolute",bottom:"0px",left:"0px",right:"0px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center"}}},ue=r(646),de=r.n(ue);var pe=Object(u.b)((function(e){return{lightbox:e.lightBox}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(se)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.lightBox,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),f=Object(m.a)(d,2),h=f[0],g=f[1],b=a.a.useState(null),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(null),O=Object(m.a)(_,2),w=O[0],j=O[1],k=a.a.useState(!0),L=Object(m.a)(k,2),C=L[0],I=L[1];a.a.useEffect((function(){return window.addEventListener("keydown",(function(e){T(e)}),!1),function(){window.removeEventListener("keydown")}}),[]),a.a.useEffect((function(){if(o.open&&o.files.length>0&&o.file&&o.file!==v){u(!0),x(o.file);var e=l.a.getState().lightBox.files.filter((function(e){return e._id===o.file}))[0],t=e&&e.name?e.name.split("."):null,r=e&&e.file?"https://machen.azureedge.net/".concat(encodeURIComponent(e.file)):null,a=t.length>0?t[t.length-1]:null;"pdf"===(a?n.fileExtensions.filter((function(e){return e.ext.indexOf(a.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(a.toLowerCase())>-1}))[0].viewer:"file":null)&&(I(!0),j(r)),setTimeout((function(){u(!1),j(r)}),1e3)}}),[o]);var T=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===l.a.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(l.a.getState().lightBox.open){var t;if(l.a.getState().lightBox.files.forEach((function(e,r){e._id===l.a.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===l.a.getState().lightBox.files.length?t=0:t+=1,D("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void F();0===t?t=l.a.getState().lightBox.files.length-1:t-=1,D("L")}u(!0),setTimeout((function(){u(!1)}),1e3)}},F=function(){setTimeout((function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}),500),window.removeEventListener("keydown",(function(e){T(e)}),!1)},D=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l.a.getState().lightBox.open&&(u(!0),l.a.getState().lightBox.files.forEach((function(e,r){e._id===l.a.getState().lightBox.file&&(t=r)})),"R"===h||"R"===r?t+1===l.a.getState().lightBox.files.length?t=0:t+=1:"L"!==h&&"L"!==r||(0===t?t=l.a.getState().lightBox.files.length-1:t-=1),l.a.getState().lightBox.files.length>0&&l.a.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(p.a)(Object(p.a)({},l.a.getState().lightBox),{},{file:l.a.getState().lightBox.files[t]._id})),setTimeout((function(){u(!1),g(!1)}),700))};if(!l.a.getState().lightBox.open&&0===l.a.getState().lightBox.files.length)return null;var A=l.a.getState().lightBox.files.filter((function(e){return e._id===v}))[0];if(!A||!A.file)return a.a.createElement(a.a.Fragment,null);var P=A&&A.name?A.name.split("."):null,$=P.length>0?P[P.length-1]:null,M=$?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].viewer:"file":null,z=w,Y=A&&A.file?"https://fl.machen.ai/?arq=".concat(A.file.replace("&","||MCH-ECOM||"),"&name=").concat(A.name.replace("&","||MCH-ECOM||")):null,B="https://fls.machen.ai/".concat(encodeURIComponent(A.file),"/name/").concat(encodeURIComponent(A.name));return n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0&&(z=n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf($.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(A.file)),a.a.createElement(N.a,null,a.a.createElement(ae.a,{onSwipeMove:function(e,t){e.x>100?g("L"):e.x<-100?g("R"):e.y<-100&&F()},onSwipeEnd:function(e){!1!==h&&D()}},a.a.createElement(E.a,{className:t.backdrop,open:l.a.getState().lightBox.open,onClick:function(e){F()}},a.a.createElement("div",{id:"lightBox",className:t.header,style:{zIndex:"9999 !important"},onClick:function(e){F(),e.stopPropagation()}},a.a.createElement("div",{className:t.btClose},a.a.createElement(re.a,{title:Object(S.u)("$__close","*"),color:Object(S.d)("light"),onClick:function(){F()}},"close"))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{className:t.content,style:{zIndex:1e3},onClick:function(e){e.stopPropagation()}},s?a.a.createElement("div",{className:t.loader},a.a.createElement(ce.a,null)):"img"===M?a.a.createElement("div",{className:t.img},"string"===typeof w&&(-1===w.indexOf("https://")||w.indexOf("svg")>-1)?a.a.createElement(a.a.Fragment,null,"img"===M&&z&&z.indexOf("svg")>-1&&a.a.createElement("a",{href:Y},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:de.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Object(S.u)("$__clickHereToDownload",1)))):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:"".concat(z),onError:function(e){return e.target.src=z}})):s||"movie"!==M?s||"microsoft"!==M?s||"text"!==M?!s&&"pdf"===M&&w?a.a.createElement("div",{className:t.embed},C&&a.a.createElement("div",{className:t.loader},a.a.createElement(ce.a,null)),a.a.createElement("div",{className:t.embed},a.a.createElement("div",{className:t.embed,style:{overflow:"auto"}},a.a.createElement("div",{className:t.embed,style:{zoom:"".concat(50,"%")}},a.a.createElement(N.a,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"".concat(B),d:!0})))))):s||"audio"!==M?s||"file"!==M?s?null:a.a.createElement("embed",{className:t.embed,id:"embed-pdf",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"https://drive.google.com/viewerng/viewer?embedded=true&url=".concat(w)}):a.a.createElement("a",{href:Y},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},Object(S.u)("$__clickHereToDownload",1))):a.a.createElement(ie.a,{src:w,autoPlay:!0,controls:!0}):a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",style:{backgroundColor:"#FFFFFF",padding:15},onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"".concat(B)}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,null,a.a.createElement("embed",{className:t.embed,id:"embed-docs",onLoad:function(e){e.target.style.display="none",e.target.style.display="flex"},onError:function(e){e.target.style.display="none",e.target.style.display="flex"},src:"https://view.officeapps.live.com/op/embed.aspx?src=".concat(B)}))):a.a.createElement("video",{className:t.movie,src:w,controls:!0})),l.a.getState().lightBox.files.length>1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.leftButtom},a.a.createElement(re.a,{title:Object(S.u)("$__previous","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){D("L")}},"keyboard_arrow_left")),a.a.createElement("div",{className:t.rightButtom},a.a.createElement(re.a,{title:Object(S.u)("$__next","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){D("R")}},"keyboard_arrow_right"))),a.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},a.a.createElement("a",{href:Y},a.a.createElement(re.a,{title:Object(S.u)("$__download","*"),color:Object(S.d)("light"),size:"33px"},"get_app")))))))}))),fe=r(167);var he=function(){return a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},a.a.createElement("div",{style:{width:"100%",maxWidth:"250px",height:"150px",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(fe.a,null)))};var me=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(se)((function(e){var t=e.classes;return l.a.getState().lightBox.miro||l.a.getState().lightBox.miroBoard?l.a.getState().lightBox.miro||l.a.getState().lightBox.miroBoard?a.a.createElement(E.a,{className:t.backdrop,open:l.a.getState().lightBox.miro},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.btClose},a.a.createElement(re.a,{title:Object(S.u)("$__close","*"),color:Object(S.d)("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),a.a.createElement("div",{className:t.content,style:{zIndex:1e3}},a.a.createElement("iframe",{title:"outModule",style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(l.a.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:a.a.createElement(a.a.Fragment,null)}))),ge=r(58),be=r(176);var ye=function(e){return a.a.createElement("div",{id:"sideModule_closeButton",style:Object(p.a)({position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"},e.style?e.style:{})},e.saveLoader&&a.a.createElement(a.a.Fragment,null,a.a.createElement(be.a,{size:"25px"})),!e.saveLoader&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{id:"sideModule_saveOptions",style:{display:"flex"}},e.save&&a.a.createElement(k.a,{id:"sideModule_saveButton",title:Object(S.u)("$__save",1),color:Object(S.d)("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&a.a.createElement(k.a,{id:"sideModule_saveAndCloseButton",title:Object(S.u)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&a.a.createElement(k.a,{title:Object(S.u)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},ve=function(){return{lock:{position:"fixed",top:"0px",left:"0px",right:"0px",bottom:"0px",height:"100vh",zIndex:"3000 !important"},backdrop:{position:"fixed",top:"0px",left:"0px",right:"440px",bottom:"0px",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)"},module:Object(p.a)(Object(p.a)({},Z.k),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"30%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(p.a)(Object(p.a)({},Z.k),{},{width:"70vw",position:"absolute",zIndex:"1100",left:"calc(50% - 35vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",top:"calc(50% - 40vh)",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleExpanded:Object(p.a)(Object(p.a)({},Z.k),{},{width:"90vw",position:"absolute",zIndex:"1100",left:"calc(50% - 45vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleFullScreen:Object(p.a)(Object(p.a)({},Z.k),{},{width:"100vw",position:"absolute",zIndex:"1100",left:"0px",backgroundColor:"rgba(255,255,255,1)",height:"100vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),menu:{position:"absolute",left:"0px",width:"45px",top:"0px",bottom:"0px",textAlign:"center"},content:{position:"absolute",top:"80px",left:"45px",bottom:"0px",right:"0px",padding:"0px",overflowY:"auto",overflowX:"hidden",zIndex:1},menuButtons_resume:{margin:"0px auto 27px auto",height:"40px"},MenuButton:{margin:"auto auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},MenuButton_arrow:{position:"absolute",right:"-8px",fontSize:"16px",transform:"rotate(180deg)"},subTitle:{position:"absolute",left:"45px",right:"0px",padding:"4px 10px",top:"47px",backgroundColor:Object(S.d)("color"),color:Object(S.d)("light")}}},xe=r(249),_e=r(250),Oe=r(27),we=r(292),je=r(724),Ee=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",display:"flex"},root:{position:"absolute",top:"0px",bottom:"0px",left:"0px",right:"0px",overflowX:"auto"},image:{width:"100%",paddingTop:"48%",backgroundPosition:"center",backgroundSize:"cover"},data:{marginTop:"10px",padding:"10px",overflowX:"auto","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")},accessDescription:{fontSize:"14px",color:Object(S.d)("medium")}}},ke=r(77);function Se(){Se=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Le=Object(u.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=r.session,s=i.users,u=i.dataType,d=o.data,g=Object(n.useState)(d),b=Object(m.a)(g,1)[0],y=a.a.useState(!Object(S.v)(d&&d.email?d.email:"")),v=Object(m.a)(y,2),x=v[0],_=v[1],O=Object(S.j)(),w=JSON.stringify(b)!==JSON.stringify(d),j=function(t){var r=t.value,n=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},t.name,r));!r&&n[t.name]&&delete n[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:n}))},E=function(t){w&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},k=function(){var t=Object(f.a)(Se().mark((function t(r){var n;return Se().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.e)(d.email);case 2:if(n=t.sent,d.name){t.next=7;break}Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 7:if(-1!==u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")||!x){t.next=11;break}Object(S.c)({message:x,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 11:if(-1!==u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")||!(!Object(S.v)(o.data.email)||s[d._id]&&d.email!==s[d._id].email&&n)){t.next=15;break}_(Object(S.u)("$__invalidEmail",1)),t.next=19;break;case 15:return t.next=17,Object(ke.o)(e);case 17:t.sent&&(Object(S.c)({message:Object(S.u)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&E(!0));case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),L=!1;return(d._id===c._id||O&&O.user&&(O.userAdmin||O.userEdit))&&(L=!0),a.a.createElement("div",null,a.a.createElement(ye,{save:L&&w?function(){return k()}:null,saveClose:L&&w?function(){return k(!0)}:null,close:function(){return E(!0)}}),L||!L&&o.data.image,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(_e.a,{maxWidthOrHeight:600,img:o.data&&o.data.image?o.data.image:null,onChange:L?function(e,t){j({name:"file",value:t})}:null,avatar:!0,avatarIcon:d.type&&"user"!==d.type?d.type&&"group"!==d.type?"business":"groups":"person"})),a.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},a.a.createElement(Oe.a,{id:"sideModule_user_fullName",label:Object(S.u)("$__fullName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"person"})),onChange:function(e){j(e.target)},onBlur:function(e){if(d&&!d.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";j({name:"name",value:t.trim()})}}},value:d&&d.fullName?d.fullName:"",placeholder:Object(S.u)("$__fullName",1),autoFocus:!0,disabled:!L}),a.a.createElement(Oe.a,{id:"sideModule_user_displayName",label:Object(S.u)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){j(e.target)},onBlur:function(e){j(e.target)}},value:d&&d.name?d.name:"",placeholder:Object(S.u)("$__displayName",1),disabled:!L}),-1===u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")&&a.a.createElement(Oe.a,{id:"sideModule_user_email",label:Object(S.u)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",helperText:x,InputProps:{autoComplete:"new-password",className:!x&&d.email&&Object(S.v)(d&&d.email?d.email:"")?"":"invalid",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"alternate_email"})),onChange:function(e){_(null),j(e.target)},onBlur:function(){var e=Object(f.a)(Se().mark((function e(t){var r;return Se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(d._id&&"new"!==d._id&&s[d._id]&&s[d._id].email!==t.target.value||!d._id||"new"===d._id)){e.next=9;break}if(!Object(S.v)(t.target.value)||s[d._id]&&t.target.value===s[d._id].email){e.next=8;break}return e.next=4,Object(ke.e)(t.target.value);case 4:r=e.sent,_(r?Object(S.u)("$__emailAlreadyExists",1):null),e.next=9;break;case 8:_(Object(S.u)("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:d&&d.email?d.email:"",placeholder:Object(S.u)("$__email",1),disabled:!L}),L&&O&&O.user&&(O.userAdmin||O.userEdit)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},a.a.createElement(we.a,{data:{values:d.tags||[],_id:d._id},options:l.a.getState().db.tag?l.a.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){j({name:"tags",value:e})},secondaryParent:d._parent,colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(we.a,{data:{values:d.groups||[],_id:d._id},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){j({name:"groups",value:e})},secondaryParent:d._parent,colorPickerCallBack:function(e){}}))):a.a.createElement(a.a.Fragment,null)))}))),Ce=r(45);function Ie(e){var t=a.a.useState({cPassword:"",password:""}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(0),d=Object(m.a)(u,2),f=d[0],h=d[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.u)("$__passwordTip_1")),a.a.createElement("p",null,Object(S.u)("$__passwordTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.u)("$__passwordTip_3")),a.a.createElement("li",null,Object(S.u)("$__passwordTip_4")),a.a.createElement("li",null,Object(S.u)("$__passwordTip_5")),a.a.createElement("li",null,Object(S.u)("$__passwordTip_6")),a.a.createElement("li",null,Object(S.u)("$__passwordTip_7")))),a.a.createElement(Oe.a,{label:Object(S.u)("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{password:e.target.value})),function(e){var t=[];t.push("[$@$!%*#?&]"),t.push("[A-Z]"),t.push("[0-9]"),t.push("[a-z]");for(var r=0,n=0;n<t.length;n++)new RegExp(t[n]).test(e)&&r++;switch(r){case 0:h(0);break;case 1:h(1);break;case 2:h(2);break;case 3:h(3);break;case 4:h(4)}e.length<8&&h(0)}(e.target.value),f>2&&n.password===e.target.value?s(!0):s(!1)}},value:n.password}),a.a.createElement(Oe.a,{label:Object(S.u)("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{color:l?"green":"lightgray"},l?"verified":"check")),autoComplete:"new-password",onChange:function(t){o(Object(p.a)(Object(p.a)({},n),{},{cPassword:t.target.value})),f>2&&n.password===t.target.value?(s(!0),e.onConfirmed(t.target.value)):(s(!1),e.onConfirmed(null))}},value:n.cPassword}),n.password&&f>0&&a.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",marginBottom:"7px",padding:"3px 0"}},1===f?Object(S.u)("$__passwordTooWeak",1):2===f?Object(S.u)("$__weakPassword",1):3===f?Object(S.u)("$__goodPassword",1):4===f?Object(S.u)("$__veryGoodPassword",1):null),n.password&&a.a.createElement("div",{style:{position:"relative",width:"100%",margin:"auto",height:"13px",padding:"3px 0",border:"1px solid rgba(0,0,0,0.1)"}},f>=0&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"red",margin:"0 3px"}}),f>=1&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(129,153,179)",margin:"0 3px"}}),f>=2&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(95,151,254)",margin:"0 3px"}}),f>=3&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(42,66,255)",margin:"0 3px"}}),4===f&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(20% - 6px)",height:"5px",backgroundColor:"rgb(38,165,45)",margin:"0 3px"}})))}var Te=r(60),Fe=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},image:{width:"100%",backgroundColor:"rgb(0,88,0)",paddingTop:"45%"},data:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",marginTop:"10px",padding:"10px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}},De=r(39);function Ne(){Ne=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ae=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=e.classes,r=l.a.getState(),n=r.sideModule,o=r.session,i=r.functions,s=r.db,u=i.socket,d=n.data,g=a.a.useState(d),b=Object(m.a)(g,1)[0],y=a.a.useState(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(null),w=Object(m.a)(O,2),j=w[0],E=w[1],k=a.a.useState(0),L=Object(m.a)(k,2),C=L[0],I=L[1],T=Object(S.j)(),F=function(t){return _(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},{_access:Object(p.a)(Object(p.a)({},n.data._access),{},Object(h.a)({},t.name,t.value))})})),!0},D=function(t){var r={_id:d._id,isAdmin:t};try{l.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}},N=function(t){!t&&x?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},A=function(){var t=Object(f.a)(Ne().mark((function t(r){return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _(!1),t.next=3,Object(ke.p)(e);case 3:t.sent&&(Object(S.c)({message:Object(S.u)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),D(!d._access.admin||null),r&&N(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),P=function(){var e=Object(f.a)(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:l.a.getState().sideModule.data._id,name:l.a.getState().sideModule.data.name,email:l.a.getState().sideModule.data.email},(function(){Object(S.c)({message:Object(S.u)("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=Object(f.a)(Ne().mark((function e(){return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,De.a.post("/user/new-password",{userId:d._id,password:j});case 3:e.sent&&(E(null),Object(S.c)({message:Object(S.u)("$__passwordChanged",1),variant:null,persist:!1,horizontal:"right",confirm:null})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Object(S.c)({message:"".concat(Object(S.u)("$__invalidRequest",1)," | ").concat(Object(S.u)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:I(C+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),M=s.plans[0];o&&o.GlobalData&&String(o.GlobalData.plan)&&s.plans.filter((function(e){return e.value===o.GlobalData.plan})).length>0&&s.plans.filter((function(e){return e.value===o.GlobalData.plan}))[0].settings&&(M=s.plans.filter((function(e){return e.value===o.GlobalData.plan}))[0]);var z=1;M&&M.settings&&M.settings.admins&&(z=parseInt(M.settings.admins)),o&&o.GlobalData&&o.GlobalData.customAdmins&&(z=parseInt(o.GlobalData.customAdmins));var Y=Object.keys(s.users).filter((function(e){return s.users[e]&&e!==d._id&&s.users[e]._access&&s.users[e]._access.admin&&(!s.users[e]._parent||s.users[e]._parent&&s.users[s.users[e]._parent]&&!s.users[s.users[e]._parent].independentAccount)})).length||0;return d._access&&d._access.owner&&o._id!==d._id||o._id===d._id?a.a.createElement("div",null,a.a.createElement(ye,{save:x?function(){return A()}:null,saveClose:x?function(){return A(!0)}:null,close:function(){return N(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Ie,{onConfirmed:function(e){E(e)},clear:C})),j&&a.a.createElement("div",{style:{padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){$()}},a.a.createElement(Ce.a,{icon:"save",text:Object(S.u)("$__save","*"),title:!Object(S.u)("$__save","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")})))):(console.log(z,Y),a.a.createElement("div",null,a.a.createElement(ye,{save:x?function(){return A()}:null,saveClose:x?function(){return A(!0)}:null,close:function(){return N(!0)}}),a.a.createElement("div",{className:t.data},a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.enabled),onChange:function(e){F({name:"enabled",value:!d._access||!d._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__permitPlataformAccess",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__userAccess_PlataformAccessDescription",1)))),d._access&&"owner"===d._access?a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null," ",Object(S.u)("$__youAreAccountOwner",1)))):Y<z||d&&d._access&&d._access.admin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{display:"flex"}},a.a.createElement("div",{style:{padding:7,width:"calc(50% - 4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:d&&d._access&&d._access.admin?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:d&&d._access&&d._access.admin?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){F({name:"admin",value:!1})}},a.a.createElement(re.a,{icon:"supervised_user_circle",size:"33px",color:d&&d._access&&d._access.admin?null:"#FFFFFF"}),Object(S.u)("$__guest"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:d&&d._access&&d._access.admin?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:d&&d._access&&d._access.admin?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){F({name:"admin",value:!0})}},a.a.createElement(re.a,{icon:"supervisor_account",size:"33px",color:d&&d._access&&d._access.admin?"#FFFFFF":null}),Object(S.u)("$__supervisorAccount")))),a.a.createElement("fieldset",null,a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)(d&&d._access&&d._access.admin?"$__adminAccess_PlataformDescription":"$__guestAccess_PlataformDescription",1))))):a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__adminLimitReached")),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__adminLimitReachedDescription",1)),a.a.createElement("div",{style:{position:"relative",marginTop:7,color:"red",fontWeight:"bolder"}},Object(S.u)("$__usedUsers","*")," ",Y," ",Object(S.u)("$__of","*")," ",z,a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("acc#tab/subscriptionUpgrade")}},Object(S.u)("$__upgradeSubscription")))))),d._access&&d._access.enabled&&d._access.admin&&a.a.createElement(a.a.Fragment,null,a.a.createElement(a.a.Fragment,null,d._token&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.u)("$__unregisteredUserAlert",1)),a.a.createElement(Ce.a,{text:Object(S.u)("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){P()}})),d._token&&d._token._id&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.u)("$__urlToActivate",1)),a.a.createElement("input",{type:"text",value:"".concat("https://software.machen.ai","/activate?token=").concat(d._token._id),onClick:function(e){e.target.select()},onChange:function(e){console.log("a")}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(Te.a,{checked:!(!d._access||!d._access.user),onChange:function(e){F({name:"user",value:!d._access||!d._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__users",1)),d._access&&(!d._access||d._access.user&&!1!==d._access.user)?a.a.createElement(a.a.Fragment,null,!d._access.userAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userRead),onChange:function(e){F({name:"userRead",value:!d._access||!d._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__read",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userInteract),onChange:function(e){F({name:"userInteract",value:!d._access||!d._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__interact",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userEdit),onChange:function(e){F({name:"userEdit",value:!d._access||!d._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__edit",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.userAdmin),onChange:function(e){F({name:"userAdmin",value:!d._access||!d._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__userAccess_UserAccessDescription",1)))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(Te.a,{checked:!(!d._access||!d._access.plan),onChange:function(e){F({name:"plan",value:!d._access||!d._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__plan",1)),d._access&&(!d._access||d._access.plan&&!1!==d._access.plan)?a.a.createElement(a.a.Fragment,null,!d._access.planAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planRead),onChange:function(e){F({name:"planRead",value:!d._access||!d._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__read",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planEdit),onChange:function(e){F({name:"planEdit",value:!d._access||!d._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__edit",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.createTemplate),onChange:function(e){F({name:"createTemplate",value:!d._access||!d._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__createTemplate",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planModerate),onChange:function(e){F({name:"planModerate",value:!d._access||!d._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__moderate",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.planAdmin),onChange:function(e){F({name:"planAdmin",value:!d._access||!d._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__userAccess_StrategyAndPlansAccessDescription")))),T&&T.master&&d._isAdmin?a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feed),onChange:function(e){F({name:"feed",value:!d._access||!d._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__feed",1)),d._access&&(!d._access||d._access.feed&&!1!==d._access.feed)?a.a.createElement(a.a.Fragment,null,!d._access.feedAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedEdit),onChange:function(e){F({name:"feedEdit",value:!d._access||!d._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__edit",1)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedModerate),onChange:function(e){F({name:"feedModerate",value:!d._access||!d._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__moderate",1))),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.feedAdmin),onChange:function(e){F({name:"feedAdmin",value:!d._access||!d._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__admin",1))):a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__feedAccess_StrategyAndPlansAccessDescription")))):a.a.createElement(a.a.Fragment,null),T&&T.masterAdmin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.masterAdmin),onChange:function(e){F({name:"masterAdmin",value:!d._access||!d._access.masterAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__accountAdministrator",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__accountAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null),T&&T.masterAdmin&&o&&(o.email.indexOf("@sonne.global")>-1||o.email.indexOf("@machen.ai")>-1)&&(d.email.indexOf("@sonne.global")>-1||d.email.indexOf("@machen.ai")>-1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(Te.a,{checked:!(!d._access||!d._access.machenAdmin),onChange:function(e){F({name:"machenAdmin",value:!d._access||!d._access.machenAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__machenAdministrator",1)),a.a.createElement("div",{className:t.accessDescription},a.a.createElement("i",null,Object(S.u)("$__machenAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null)),b&&b._access&&b._access.admin&&d&&d._access&&!d._access.admin?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:"red",fontSize:12}},"Ao remover a permiss\xe3o de administrador do usu\xe1rio, o mesmo perder\xe1 acesso \xe0 todas as atividades que administra atualmente e passar\xe1 a ter acesso restrito \xe0s atividades da plataforma.")):a.a.createElement(a.a.Fragment,null))))}))),Pe=r(57);function $e(){$e=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Me=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,1)[0],o=a.a.useState({image:null,status:!1}),i=Object(m.a)(o,2),c=i[0],l=i[1],s=a.a.useState(null),u=Object(m.a)(s,2),d=u[0],h=u[1];Object(n.useEffect)((function(){g()}),[]);var g=function(){var e=Object(f.a)($e().mark((function e(){var t,r;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}l(Object(p.a)(Object(p.a)(Object(p.a)({},c),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,Pe.a.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&l(Object(p.a)(Object(p.a)(Object(p.a)({},c),r.data.result),{},{status:!1}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=Object(f.a)($e().mark((function e(){var t;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"verify",code:d});case 2:(t=e.sent)&&t.data&&t.data.result?l(Object(p.a)(Object(p.a)({},c),{},{status:!0})):(Object(S.c)({message:Object(S.u)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),l(Object(p.a)(Object(p.a)({},c),{},{status:!1}))),h(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=Object(f.a)($e().mark((function e(){var t;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("/M_User_TwoFactor",{action:"disable",code:d});case 2:(t=e.sent)&&t.data&&t.data.result?(l({image:null,status:!1}),g()):Object(S.c)({message:Object(S.u)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),h(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(ye,{close:function(){r?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),c.status?a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.u)("$__disableTokenTip_1")),a.a.createElement("p",null,Object(S.u)("$__disableTokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.u)("$__disableTokenTip_3")),a.a.createElement("li",null,Object(S.u)("$__disableTokenTip_4")),a.a.createElement("li",null,Object(S.u)("$__disableTokenTip_5")),a.a.createElement("li",null,Object(S.u)("$__disableTokenTip_6")),a.a.createElement("li",null,Object(S.u)("$__disableTokenTip_7")))),a.a.createElement(Oe.a,{label:Object(S.u)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:d,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){h(e.target.value)}},autoComplete:"new-password",value:d,max:6}),a.a.createElement("div",{style:{display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){y()}},a.a.createElement(Ce.a,{icon:"toggle_on",text:Object(S.u)("$__disableToken","*"),title:Object(S.u)("$__disableToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))):a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},c.image&&a.a.createElement("img",{alt:"MACHEN_IMAGE",src:c.image})),a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.u)("$__tokenTip_1")),a.a.createElement("p",null,Object(S.u)("$__tokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.u)("$__tokenTip_3")),a.a.createElement("li",null,Object(S.u)("$__tokenTip_4")),a.a.createElement("li",null,Object(S.u)("$__tokenTip_5")),a.a.createElement("li",null,Object(S.u)("$__tokenTip_6")),a.a.createElement("li",null,Object(S.u)("$__tokenTip_7")))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__token",1)),a.a.createElement(Oe.a,{label:Object(S.u)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:d,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){h(e.target.value)}},placeholder:Object(S.u)("$__token","*"),autoComplete:"new-token",value:d,max:6})),!c.status&&d&&6===d.length&&a.a.createElement("div",{style:{padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"7px"},onClick:function(){b()}},a.a.createElement(Ce.a,{icon:"check",text:Object(S.u)("$__activeToken","*"),title:!Object(S.u)("$__activeToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))))}))),ze=r(104);function Ye(){Ye=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Be=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=a.a.useState(o.data),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(n.useState)(o.data),b=Object(m.a)(g,1)[0],y=a.a.useState(o.data&&o.data.language?o.data.language:"pt-BR"),v=Object(m.a)(y,2),x=v[0],_=v[1],O=JSON.stringify(b)!==JSON.stringify(u),w=function(t){var r=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t.name,t.value));"language"===t.name&&_(t.value),!t.value&&r[t.name]&&delete r[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:r})),d(r)},j=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];O&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},E=function(){var t=Object(f.a)(Ye().mark((function t(r){return Ye().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.o)(e);case 2:t.sent&&(Object(S.c)({message:Object(S.u)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u.language!==x&&e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{language:x})),r&&(j(!0),u.language!==x&&setTimeout((function(){window.location.reload()}),1500)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();console.log(b,u);var k=Object(S.j)(),L=!1;return k&&k.user&&(k.userAdmin||k.userEdit)&&(L=!0),a.a.createElement("div",null,a.a.createElement(ye,{save:O?function(){return E()}:null,saveClose:O?function(){return E(!0)}:null,close:function(){return j(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__language",1)),a.a.createElement(ze.a,{id:"combo-box-demo",options:i.languages,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:u&&u.language&&i.languages?i.languages.filter((function(e){return String(e.value)===String(u.language)}))[0]:i.languages[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__language",1),variant:Object(S.d)("fieldVariant"),value:u&&u.language&&i.languages?i.languages.filter((function(e){return String(e.value)===String(u.language)}))[0]:i.languages[0]}))},onChange:function(e,t){w({name:"language",value:t.value})}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__sessionDuration",1)),a.a.createElement("div",null,Object(S.u)("$__sessionDurationDescription",1)),a.a.createElement(ze.a,{id:"combo-box-demo",options:i.expiresIn,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:u&&u.expiresIn&&i.expiresIn?i.expiresIn.filter((function(e){return String(e.value)===String(u.expiresIn)}))[0]:i.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:u&&u.expiresIn&&i.expiresIn?i.expiresIn.filter((function(e){return String(e.value)===String(u.expiresIn)}))[0]:i.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){w({name:"expiresIn",value:t.value})}})),l.a.getState().session.isResale&&"user"!==u.type?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},l.a.getState().db.users[u._id].independentAccount?a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.u)("$__thisIsAIndependentAccountExplain",1)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!u.independentAccount,onChange:function(e){L&&w({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.u)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null)))}))),Re=r(87),Ge=r.n(Re),He=r(267);function We(){We=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ue=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=e.classes,r=l.a.getState(),o=r.sideModule,i=r.db,c=Object(n.useState)(o.data),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(n.useState)(o.data),b=Object(m.a)(g,2),y=b[0],v=b[1],x=JSON.stringify(u)!==JSON.stringify(y),_=function(t){var r=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t.name,t.value));e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:Object(p.a)(Object(p.a)({},o.data),{},Object(h.a)({},t.name,t.value))})),!t.value&&r[t.name]&&delete r[t.name],d(r)},O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},w=function(){var t=Object(f.a)(We().mark((function t(r){return We().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.o)(e);case 2:t.sent&&(Object(S.c)({message:Object(S.u)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),v(u),r&&O(!0));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=Object(S.j)(),E=!1;return j&&j.user&&(j.userAdmin||j.userEdit)&&(E=!0),a.a.createElement("div",null,a.a.createElement(ye,{save:x?function(){return w()}:null,saveClose:x?function(){return w(!0)}:null,close:function(){return O(!0)}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__limitNumberOfUsers",1)),a.a.createElement("div",null,Object(S.u)("$__limitAdminUsersExplain",1),a.a.createElement(Oe.a,{label:Object(S.u)("$__numberOfUsers"),variant:"outlined",name:"customAdmins",type:"number",min:0,max:99999,InputLabelProps:{shrink:!0},InputProps:{type:"number",onChange:function(e){0===e.target.value?_({name:"customAdmins",value:null}):_({name:"customAdmins",value:e.target.value>0?e.target.value:0})}},value:u.customAdmins||0}))),l.a.getState().session.isResale?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},l.a.getState().db.users[u._id].independentAccount?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:"gray",fontSize:11,width:"100%"}},Object(S.u)("$__thisIsAIndependentAccountExplain",1)),a.a.createElement("ul",{style:{color:"gray",fontSize:12,width:"100%",textAlign:"initial"}},u.plan?a.a.createElement("li",null,Object(S.u)("$__signaturePlan",1),": ",Object(S.u)(i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0].label,1)):a.a.createElement(a.a.Fragment,null),u.expireAccountDate?a.a.createElement("li",null,Object(S.u)("$__expireAccountDate",1),": ",Ge()(1e3*u.expireAccountDate).format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!u.independentAccount,onChange:function(e){E&&_({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.u)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null),(!y.independentAccount&&u.plan||!u.plan)&&u.independentAccount?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:u&&u.plan&&i.plans?i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__demoPlanSignature",1),variant:Object(S.d)("fieldVariant"),value:u&&u.plan&&i.plans?i.plans.filter((function(e){return String(e.value)===String(u.plan)}))[0]:i.plans[0]}))},onChange:function(e,t){E&&_({name:"plan",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),u.independentAccount&&u.plan&&"p0"!==u.plan&&!y.expireAccountDate?a.a.createElement(He.a,{placeholder:Object(S.u)("$__dueDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){_({name:"expireAccountDate",value:String(Ge()(e).unix("X"))})},maxDate:new Date(1e3*Ge()().add("days",30).unix("X")),startDate:u&&u.expireAccountDate?new Date(1e3*u.expireAccountDate):null}):a.a.createElement(a.a.Fragment,null)))}))),qe=r(1142),Ve=r.n(qe),Je=r(1143),Xe=r.n(Je);var Ke=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,1)[0];return a.a.createElement("div",null,a.a.createElement(ye,{close:function(){r?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.u)("$__mobileTokenTip_1")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.u)("$__mobileTokenTip_2")),a.a.createElement("li",null,Object(S.u)("$__mobileTokenTip_3")),a.a.createElement("li",null,Object(S.u)("$__mobileTokenTip_4")))),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Xe.a,style:{width:"52%"}}),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Ve.a,style:{width:"52%",marginTop:"33px"}})))}))),Ze=function(){return{lock:{position:"fixed",top:"0px",left:"0px",right:"0px",bottom:"0px",height:"100vh",zIndex:"3000 !important"},backdrop:{position:"fixed",top:"0px",left:"0px",right:"440px",bottom:"0px",height:"100vh",backgroundColor:"rgba(0,0,0,0.7)"},module:Object(p.a)(Object(p.a)({},Z.k),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"25%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(p.a)(Object(p.a)({},Z.k),{},{width:"70vw",position:"absolute",zIndex:"1100",left:"calc(50% - 35vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",top:"calc(50% - 40vh)",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleExpanded:Object(p.a)(Object(p.a)({},Z.k),{},{width:"90vw",position:"absolute",zIndex:"1100",left:"calc(50% - 45vw)",backgroundColor:"rgba(255,255,255,1)",height:"80vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),moduleFullScreen:Object(p.a)(Object(p.a)({},Z.k),{},{width:"100vw",position:"absolute",zIndex:"1100",left:"0px",backgroundColor:"rgba(255,255,255,1)",height:"100vh",bottom:"0px",boxShadow:"0px 0px 20px rgba(0,0,0,0.2)",padding:"0px 5px",border:"solid 2px #ffffff"}),menu:{position:"absolute",left:"0px",width:"45px",top:"0px",bottom:"0px",textAlign:"center"},content:{position:"absolute",top:"80px",left:"45px",bottom:"0px",right:"0px",padding:"0px",overflowY:"auto",overflowX:"hidden",zIndex:1},menuButtons_resume:{margin:"0px auto 27px auto",height:"40px"},MenuButton:{margin:"auto auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},MenuButton_arrow:{position:"absolute",right:"-8px",fontSize:"16px",transform:"rotate(180deg)"},subTitle:{position:"absolute",left:"45px",right:"0px",padding:"4px 10px",top:"47px",backgroundColor:Object(S.d)("color"),color:Object(S.d)("light")}}},Qe=r(345),et=r(24),tt=Object(u.b)((function(e){return{timeline:e.timeline&&e.sideModule.id&&e.timeline[e.sideModule.id]?e.timeline[e.sideModule.id]:{},card:e.db.cards&&e.db.cards[e.sideModule.id]?e.db.cards[e.sideModule.id]:{},sideModule:e.sideModule}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ze)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Object(et.j)(r.id)),a.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},a.a.createElement(Qe.a,{onClick:function(){e.openModule(e.module)}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},a.a.createElement(re.a,{icon:e.icon,size:e.size,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),title:e.title})),r.activeModule===e.module&&a.a.createElement(re.a,{className:t.MenuButton_arrow,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),icon:"play_arrow"})))}))),rt=r(477);function nt(e){var t=Object(B.a)({root:{boxShadow:"0 2px 2px 0px rgba(0,0,0,0.2)",textTransform:"none",padding:"6px 12px",border:"1px solid",lineHeight:1.5,backgroundColor:Object(S.d)(e.color?e.color:"color"),borderColor:Object(S.d)(e.color?e.color:"color"),color:Object(S.d)("lightText"),"&:hover":{backgroundColor:Object(S.d)(e.color?e.color:"color",.8),borderColor:Object(S.d)(e.color?e.color:"color"),boxShadow:"0 0 0 0.2rem ".concat(Object(S.d)(e.color?e.color:"color",.2))},"&:active":{boxShadow:"none",backgroundColor:Object(S.d)(e.color?e.color:"color"),borderColor:Object(S.d)(e.color?e.color:"color")},"&:focus":{boxShadow:"0 0 0 0.2rem ".concat(Object(S.d)(e.color?e.color:"color",.2))}}})();return!e.color||e.color&&-1===["default","inherit","primary","secondary"].indexOf(e.color)?a.a.createElement(rt.a,{className:t.root,variant:"contained",color:e.color?e.color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children):a.a.createElement(rt.a,{variant:e.variant?e.variant:"contained",color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children)}var at=r(142);function ot(){ot=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var it=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.sideModule,n=t.db,o=t.functions.socket,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],g=a.a.useState(!1),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useState(null),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),E=Object(m.a)(j,2),k=E[0],L=E[1],C=a.a.useState(0),I=Object(m.a)(C,2),T=I[0],F=I[1],D=a.a.useState(""),N=Object(m.a)(D,2),A=N[0],P=N[1],$=r.data||{},M=0;$&&"step"===$.type&&(M=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===$._id&&!l.a.getState().db.cards[e].deleted})).length);var z=window.location.hash.split("/");z[0]=z[0].replace("#",""),a.a.useEffect((function(){return"user"===$.type?G():v(!1),function(){}}),[]),a.a.useEffect((function(){Y()}),[$._id]);var Y=function(){var e=Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(et.s)($._id);case 2:(t=e.sent)&&L(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var t=Object(f.a)(ot().mark((function t(){return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(M>0)){t.next=3;break}return Object(S.c)({message:Object(S.u)("$__beforeRemovingYouneedToMoveAllActivitiesInTheColumn",1),variant:"warning",persist:!1,horizontal:"center"}),t.abrupt("return");case 3:Object(S.c)({message:Object(S.u)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.o)(e,{_id:$._id},!1),Object(S.f)(e,{_id:$._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&z.length>0&&z[0]&&36===z[0].length&&c.a.push("sp")}});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Object(f.a)(ot().mark((function t(){return ot().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.o)(e,{_id:$._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&z.length>0&&z[0]&&36===z[0].length&&c.a.push("sp")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var e=Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!1),e.next=3,Pe.a.post("/Card_Count",{id:$._id,all:!0,rel:"INN"});case 3:(t=e.sent)&&(v(!0),F(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=Object(f.a)(ot().mark((function e(){return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(!0),o.emit("data",{module:"user",method:"post",action:"migrate"},{from:$._id,fromData:$,to:O,toData:n.users[O]},Object(f.a)(ot().mark((function e(){var t;return ot().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),t=Object(p.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[$._id]})).forEach((function(e){t[e]._users&&!t[e]._users[O]&&(t[e]._users=Object(p.a)(Object(p.a)({},t[e]._users||{}),{},Object(h.a)({},O,{access:t[e]._users[$._id].access,_id:O}))),delete t[e]._users[$._id]})),v(!0);case 4:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ye,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),$._id&&n.cards[$._id]&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deleteOptions",1)),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},"chatGroup"===$.type?Object(S.u)("$__deleteThisChatGroup",1):Object(S.u)("$__deleteThisActivity",1)),a.a.createElement(nt,{onClick:function(){B()}},Object(S.u)("$__delete",1))),"step"!==$.type&&Object.keys(k).length>0&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__thisActivityHasOtherLinkedsActivities",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Object(S.u)("$__deleteAllActiviesLinkedAlert",1)),a.a.createElement(nt,{onClick:function(){R()}},Object(S.u)("$__deleteAll",1))))),$._id&&n.users[$._id]&&("client"===n.users[$._id].type||"group"===n.users[$._id].type||"sic"===n.users[$._id].type||"unity"===n.users[$._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===$._id})).length>0?Object(S.u)("$__delete".concat(n.users[$._id].type,"WithUsersDescription"),1):Object(S.u)("$__delete".concat(n.users[$._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deleteThisDescription",1)),a.a.createElement(nt,{onClick:function(){B()}},Object(S.u)("$__deleteThis",1))),$._id&&n.users[$._id]&&"client"!==n.users[$._id].type&&"group"!==n.users[$._id].type&&"sic"!==n.users[$._id].type&&"unity"===n.users[$._id].type&&a.a.createElement(a.a.Fragment,null,y?a.a.createElement(a.a.Fragment,null,T>0&&!u?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},T," ",Object(S.u)("$__items"),a.a.createElement("br",null),Object(S.u)("$__deleteCountCardsExplain"))),O?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){w(null)}},a.a.createElement(at.a,{alt:n.users[O].name,src:n.users[O].image||null,style:{marginRight:"15px"}},n.users[O].name.substr(0,1)),a.a.createElement("span",null,n.users[O].name)),a.a.createElement(nt,{onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.u)("$__confirm"),text:Object(S.u)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){H()}},{shadow:!0,title:Object(S.u)("$__cancel"),text:Object(S.u)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.u)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.u)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(Oe.a,{label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:A,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){P(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==$._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!$._parent&&!n.users[e]._parent||$._parent&&n.users[e]._parent===$._parent)&&(!A||A&&n.users[e].name.toLowerCase().indexOf(A.toLowerCase().trim())>-1)})).sort((function(e,t){var r=n.users[e].name.toLowerCase(),a=n.users[t].name.toLowerCase();return r<a?-1:r>a?1:0})).map((function(e){return a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){w(e)},key:e},a.a.createElement(at.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),a.a.createElement("span",null,n.users[e].name))}))),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deactivateWhithoutMigration",1)),a.a.createElement(nt,{onClick:function(){B()}},Object(S.u)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deactivateUserDescription",1)),a.a.createElement(nt,{onClick:function(){B()}},Object(S.u)("$__deactivateThis",1)))):a.a.createElement(a.a.Fragment,null),y?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(be.a,null)):a.a.createElement(a.a.Fragment,null)))})),ct=r(74),lt=r(172);var st=Object(u.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px"}},a.a.createElement("div",{style:{width:"100%",backgroundColor:"#FFFFFF",padding:3,borderRadius:7}},a.a.createElement(Oe.a,{label:Object(S.u)("$__ApprovalOrRejectReason",1),variant:Object(S.d)("fieldVariant"),name:"reason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){o(e.target.value)}},value:n,placeholder:Object(S.u)("$__ApprovalOrRejectReason",1)})),l?a.a.createElement(ct.a,null):a.a.createElement("div",{style:{display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(k.a,{reverse:!0,title:Object(S.u)("$__indorse"),text:Object(S.u)("$__indorse"),color:"green",textColor:"green",icon:"approval",onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmApproveItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(lt.a)(Object(p.a)(Object(p.a)({},e),{},{reason:n,approval:!0,approved:!0})),s(!0),e.onAction&&e.onAction()}})},size:"25px",style:{padding:12}}),a.a.createElement(k.a,{reverse:!0,title:Object(S.u)("$__reject"),text:Object(S.u)("$__reject"),color:"red",textColor:"red",icon:"backspace",onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmRejectItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(lt.a)(Object(p.a)(Object(p.a)({},e),{},{reason:n,approval:!0})),e.onAction&&e.onAction()}})},size:"25px",style:{padding:12}}))))})),ut=r(50),dt=r(188),pt=r(441),ft=r(59),ht=r(30),mt=r(31),gt=r(130),bt=r(40),yt=r(41),vt=r(851),xt=r.n(vt),_t=["currencySymbol"],Ot=function(e){Object(bt.a)(r,e);var t=Object(yt.a)(r);function r(e){var n;return Object(ht.a)(this,r),(n=t.call(this,e)).getValue=n.getValue.bind(Object(gt.a)(n)),n.callEventHandler=n.callEventHandler.bind(Object(gt.a)(n)),n}return Object(mt.a)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.currencySymbol,Object(ft.a)(e,_t));this.autonumeric=new xt.a(this.input,this.props.value,Object(p.a)(Object(p.a)(Object(p.a)({},this.props.preDefined),t),{},{digitGroupSeparator:".",decimalCharacter:",",decimalCharacterAlternative:".",onChange:void 0,onFocus:void 0,onBlur:void 0,onKeyPress:void 0,onKeyUp:void 0,onKeyDown:void 0,watchExternalChanges:!1}))}},{key:"UNSAFE_componentWillUnmount",value:function(){this.autonumeric.remove()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.props.value!==e.value&&this.getValue()!==e.value&&this.autonumeric.set(e.value)}},{key:"getValue",value:function(){if(this.autonumeric){return{string:function(e){return e.getNumericString()},number:function(e){return e.getNumber()}}[this.props.outputFormat](this.autonumeric)}}},{key:"callEventHandler",value:function(e,t){this.props[t]&&this.props[t](e,this.getValue())}},{key:"render",value:function(){var e=this,t=this.props,r=t.currencySymbol,n=t.inputProps,o=t.InputProps,i={};return["id","label","className","autoFocus","variant","style","error","disabled","type","name","defaultValue","tabIndex","fullWidth","rows","rowsMax","select","required","helperText","unselectable","margin","SelectProps","multiline","size","FormHelperTextProps","placeholder"].forEach((function(t){return i[t]=e.props[t]})),a.a.createElement(H.a,Object.assign({inputRef:function(t){return e.input=t},onChange:function(t){return e.callEventHandler(t,"onChange")},onFocus:function(t){return e.callEventHandler(t,"onFocus")},onBlur:function(t){return e.callEventHandler(t,"onBlur")},onKeyPress:function(t){return e.callEventHandler(t,"onKeyPress")},onKeyUp:function(t){return e.callEventHandler(t,"onKeyUp")},onKeyDown:function(t){return e.callEventHandler(t,"onKeyDown")},InputProps:Object(p.a)({startAdornment:a.a.createElement(je.a,{position:"start"},r)},o),inputProps:Object(p.a)({},n)},i))}}]),r}(a.a.Component);Ot.defaultProps={type:"text",variant:"standard",currencySymbol:"$",outputFormat:"number",textAlign:"right",maximumValue:"10000000000000",minimumValue:"-10000000000000"};var wt=Ot,jt=(xt.a.getPredefinedOptions(),function(e){var t=Object(n.useState)(e.values||{}),r=Object(m.a)(t,2),o=r[0],i=r[1];a.a.useEffect((function(){e.onChange&&e.onChange(o,s())}),[o]);var c=JSON.parse(l.a.getState().forms[e.formId].elements)||[],s=function(e){var t;return c.forEach((function(e){e.required&&(!e.depends&&(!o[e.id]||o[e.id]&&"undefined"===typeof o[e.id])||e.depends&&e.dependsOn&&!o[e.id]&&o[e.dependsOn]&&("object"===typeof e.dependsValue&&e.dependsValue.filter((function(t){return o[e.dependsOn].indexOf(t)>-1})).length>0||"object"!==typeof e.dependsValue&&o[e.dependsOn]===e.dependsValue))&&(t="".concat(Object(S.u)("$_fillAllRequiredAsks")))})),t||null},u=function(e,t){o[e]?o[e].includes(t)?i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,o[e].filter((function(e){return e!==t}))))):i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,[].concat(Object(A.a)(o[e]),[t])))):i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,[t])))};return a.a.createElement("div",{style:Object(p.a)({width:"100%"},e.style?e.style:{})},null===c||void 0===c?void 0:c.map((function(t,r){return!t.depends||t.depends&&(Array.isArray(t.dependsValue)&&JSON.stringify(o[t.dependsOn])===JSON.stringify(t.dependsValue)||!Array.isArray(t.dependsValue)&&o[t.dependsOn]===t.dependsValue)?a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",alignItems:"center",marginBottom:"10px",width:"100%"},key:"item_".concat(t.id,"_").concat(r)},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},a.a.createElement("label",{htmlFor:t.id,style:{marginBottom:"5px"}},t.name,t.required?"*":null,":"),"radio"===t.type||"checkbox"===t.type?null===t||void 0===t?void 0:t.items.map((function(r,n){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:"op_".concat(t.id,"_").concat(r),onClick:function(e){"radio"===t.type&&i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},t.id,r))),"checkbox"===t.type&&u(t.id,r)}},a.a.createElement("div",{style:{pointerEvents:"none"}},a.a.createElement("input",Object.assign({id:"op_".concat(t.id,"_").concat(r),name:"op_".concat(t.id),type:t.type,required:!!t.required},"radio"===t.type?{checked:!(!o[t.id]||o[t.id]!==r)}:{},"checkbox"===t.type?{checked:!!(o&&o[t.id]&&o[t.id].length>0&&o[t.id].indexOf(r)>-1)}:{},e.disabled?{disabled:!0}:{},{onClick:function(e){"radio"===t.type&&i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},t.id,r))),"checkbox"===t.type&&u(t.id,r)}})),a.a.createElement("label",{htmlFor:"op_".concat(t.id,"_").concat(r),style:{color:"#aaa"}},r)))})):"textarea"===t.type?a.a.createElement("textarea",Object.assign({rows:4,id:t.id,required:!!t.required,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)"},onChange:function(e){return i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},t.id,e.target.value)))},value:o[t.id]||""},e.disabled?{disabled:!0}:{})):a.a.createElement("input",Object.assign({type:t.type,id:t.id,required:!!t.required,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)"},value:o[t.id]||"",onChange:function(e){return i(Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},t.id,e.target.value)))}},e.disabled?{disabled:!0}:{})))):null})))}),Et=r(1942),kt=r(1144),St=r.n(kt),Lt=r(545),Ct=r(346),It=r(544),Tt=r(722);function Ft(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useRef(null),c=a.a.useState(0),l=Object(m.a)(c,2),s=l[0],u=l[1];a.a.useEffect((function(){u(e.value?e.value:e.defaultValue?e.defaultValue:0)}),[e.value]);var d=function(){o((function(e){return!e}))},p=function(e){i.current&&i.current.contains(e.target)||o(!1)};return a.a.createElement(a.a.Fragment,null,a.a.createElement(Et.a,{variant:"text",ref:i,"aria-label":"split button"},a.a.createElement(rt.a,{onClick:function(){u(s),e.onChange&&e.onChange(s)}},e.options.filter((function(e){return e.value===s})).length>0&&e.options.filter((function(e){return e.value===s}))[0].label),a.a.createElement(rt.a,{size:"small","aria-controls":n?"split-button-menu":void 0,"aria-expanded":n?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:d},a.a.createElement(St.a,null))),a.a.createElement(It.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Lt.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:p},a.a.createElement(Tt.a,{id:"split-button-menu"},e.options.map((function(t,r){return a.a.createElement(G.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var Dt=r(376),Nt=Object(B.a)((function(e){return{root:{position:"relative",width:"100%"},options:{position:"relative",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"solid 1px rgba(0,0,0,0.05)",marginTop:"7px"},custom:{position:"relative",width:"100%",padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",marginTop:"7px"},margin:{height:e.spacing(3)}}})),At={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var Pt=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({recurrence:"0"}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=Nt();a.a.useEffect((function(){o({recurrence:e.data&&e.data.recurrence?e.data.recurrence:"0",recurrenceRepeatDays:e.data&&e.data.recurrenceRepeatDays?e.data.recurrenceRepeatDays:null,recurrenceEndDate:e.data&&e.data.recurrenceEndDate?e.data.recurrenceEndDate:null,recurrenceLimit:e.data&&e.data.recurrenceLimit?e.data.recurrenceLimit:null,recurrenceMyDay:e.data&&e.data.recurrenceMyDay?e.data.recurrenceMyDay:null,recurrenceOnlyCompleted:e.data&&e.data.recurrenceOnlyCompleted?e.data.recurrenceOnlyCompleted:null,recurrenceDuplicateCard:e.data&&e.data.recurrenceDuplicateCard?e.data.recurrenceDuplicateCard:null})}),[]),a.a.useEffect((function(){}),[e.data.startDate]);var c=function(t){var r=t;isNaN(t.recurrence)&&"custom"!==t.recurrence||(r=function(t){var r=t.recurrence;"custom"===t.recurrence&&(r=t.recurrenceRepeatDays);var n=O()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD");return O()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").unix("X")<O()().tz("America/Sao_Paulo").unix("X")&&(n=O()().tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD")),Object(p.a)(Object(p.a)({},t),{},{recurrenceNextDate:n})}(t)),t.recurrence&&parseInt(t.recurrence)>0&&parseInt(t.recurrence)<31&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:O()().tz("America/Sao_Paulo").add(parseInt(t.recurrence),"days").format("YYYY-MM-DD")})),"everyFriday"===t.recurrence&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:O()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(5).format("YYYY-MM-DD")})),"everyMonday"===t.recurrence&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:O()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(1).format("YYYY-MM-DD")})),"everyFirstMonthDay"===t.recurrence&&(r=Object(p.a)(Object(p.a)({},r),{},{recurrenceNextDate:O()().tz("America/Sao_Paulo").add(1,"month").format("YYYY-MM-01")})),o(r),e.onChange&&e.onChange(r)};return a.a.createElement("div",{id:"RecurrencySettings",className:i.root},a.a.createElement("div",{className:i.options},Object(S.u)("$__recurrence"),a.a.createElement(Ft,{options:[{value:"0",label:Object(S.u)("$__nonrecurrence")},{value:"1",label:Object(S.u)("$__everyDay")},{value:"7",label:Object(S.u)("$__weekly")},{value:"15",label:Object(S.u)("$__every15days")},{value:"30",label:Object(S.u)("$__every30days")},{value:"everyFirstMonthDay",label:Object(S.u)("$__everyFirstMonthDay")},{value:"everyMonday",label:Object(S.u)("$__everyMonday")},{value:"everyFriday",label:Object(S.u)("$__everyFriday")},{value:"custom",label:Object(S.u)("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(p.a)(Object(p.a)({},At),{},{recurrence:null,recurrenceRepeatDays:null}):"custom"!==e?{recurrence:"".concat(e),recurrenceRepeatDays:null}:Object(p.a)(Object(p.a)({},n),{},{recurrence:"".concat(e),recurrenceNextDate:null,recurrenceRepeatDays:1}))}})),n&&n.recurrence&&"0"!==String(n.recurrence)&&a.a.createElement("div",{className:i.custom},Object(S.u)("$__preffers",1),n&&"custom"===n.recurrence&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__repeatEvery",1),a.a.createElement(Oe.a,{style:{width:"100px"},variant:Object(S.d)("standard"),name:"recurrenceRepeatDays",type:"number",min:"1",InputLabelProps:{shrink:!0},InputProps:{min:1,autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"replay_10"}),Object(S.u)("$__days").toLowerCase()),onChange:function(e){parseInt(e.target.value)>0&&c(Object(p.a)(Object(p.a)({},n),{},{recurrenceRepeatDays:e.target.value}))}},defaultValue:n.recurrenceRepeatDays?n.recurrenceRepeatDays:1})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__limitDate",1),a.a.createElement(Oe.a,{style:{width:"200px"},variant:Object(S.d)("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"clear",onClick:function(){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceEndDate:null}))}})):null,autoComplete:"new-password",onBlur:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceEndDate:e.target.value?O()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))},onChange:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceEndDate:e.target.value?O()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))}},defaultValue:e.data.recurrenceEndDate?e.data.recurrenceEndDate:null})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__recurrenceDuplicateCard",1),a.a.createElement(Te.a,{checked:!!n.recurrenceDuplicateCard,onChange:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceDuplicateCard:!n.recurrenceDuplicateCard},n.recurrenceDuplicateCard?{recurrenceCopyCatenation:!1}:{}))},name:"duplicate",inputProps:{"aria-label":"secondary checkbox"}})),n.recurrenceDuplicateCard&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__copyCatenation",1),a.a.createElement(Te.a,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))})),$t=r(271),Mt=r(442);function zt(){zt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Yt=Object(u.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Mt.a)((function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=Object(S.j)();a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.forEach((function(e){l.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var c=function(){var t=Object(f.a)(zt().mark((function t(r){return zt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),o(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement($t.a,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:l.a.getState().db.tag?l.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(S.u)("$__tags"),api:"tag/add",add:!0,filterSelectedOptions:!0,colorPicker:!(!i||!i.plan||!i.planAdmin&&!i.planModerate),multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){c(e)},colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)},groupByParent:!0}))}))),Bt=r(332),Rt=r(63),Gt=r(119),Ht=r.n(Gt);function Wt(){Wt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ut=Object(u.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t,r=e.classes,n=e.sideModule,o=l.a.getState(),i=o.db,s=o.session,u=i.planType,d=a.a.useState({}),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useState({}),x=Object(m.a)(v,2),_=x[0],w=x[1],j=a.a.useState(!1),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(m.a)(N,2),$=P[0],M=P[1],z=a.a.useState(!1),Y=Object(m.a)(z,2),B=Y[0],R=Y[1],G=a.a.useState(null),H=Object(m.a)(G,2),W=H[0],U=H[1],q=a.a.useState(null),V=Object(m.a)(q,2),J=V[0],X=V[1],K=a.a.useState(!1),Z=Object(m.a)(K,2),Q=Z[0],ee=Z[1],te=a.a.useState(0),ne=Object(m.a)(te,2),ae=ne[0],oe=ne[1],ie=a.a.useState(!1),ce=Object(m.a)(ie,2),le=ce[0],se=ce[1],ue=Object(S.j)(),de=Object(et.t)(n.id);a.a.useEffect((function(){b._id!==n.data._id&&(y(n.data),C(!1)),B||(n.data.startDate&&U(n.data&&n.data.startDate?n.data.startDate:null),n.data.endDate&&X(n.data&&n.data.endDate?n.data.endDate:null),y(n.data),C(!1),"link"!==b.type||b.name||ge(),R(!0),pe()),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(C(!0),e.reqSave&&e.reqSave(!0))}),[n.data,b]),a.a.useEffect((function(){!b.name||b.name&&""===b.name.trim?C(!1):C(!0)}),[_]),a.a.useEffect((function(){e.cards[b._id]&&(e.cards[b._id]._requireApproval&&!b._requireApproval||!e.cards[b._id]._requireApproval&&b._requireApproval)&&y(Object(p.a)(Object(p.a)({},b),{},{_requireApproval:!e.cards[b._id]._requireApproval}))}),[e.cards]);var pe=function(){var t=Object(f.a)(Wt().mark((function t(){return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 2:t.sent&&se(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),fe=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!b[t.name]||n.data[t.name]&&n.data[t.name]!==t.value||a)&&e.reqSave&&e.reqSave(!0);var o=Object(p.a)(Object(p.a)({},b),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(p.a)(Object(p.a)(Object(p.a)({},b),o),{},Object(h.a)({},r.name,r.value))),y(o),w(Object(p.a)(Object(p.a)({},_),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},he=function(t){L&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},me=function(){var t=Object(f.a)(Wt().mark((function t(){var r,a=arguments;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],F){t.next=19;break}if(C(!1),e.reqSave&&e.reqSave(!1),b.status||(b.status="notStarted"),"new"===n.id&&n.data&&y(Object(p.a)(Object(p.a)({},b),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:b})),b.name&&(!b.name||""!==b.name.trim())){t.next=12;break}D(!1),Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(et.F)(Object(p.a)(Object(p.a)({},e),{},{store:Object(p.a)(Object(p.a)({},e.store),{},{db:Object(p.a)({},l.a.getState().db)})}),r,b);case 14:t.sent&&(_&&_.status&&(Object(et.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:b._id}}),{status:_.status}),Object(et.e)(e,b._id,_.status)),D(!1),Object(S.c)({message:Object(S.u)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),C(!1),e.reqSave&&e.reqSave(!1),r&&he(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ge=function(){var t=Object(f.a)(Wt().mark((function t(){var r;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,De.a.post("/link/content",{url:b.url});case 2:r=t.sent,y(Object(p.a)(Object(p.a)({},b),{},{content:r.data.article})),C(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),be=n.data&&n.data.type?i.dataType.filter((function(e){return e.name===n.data.type}))[0]:{},ve=null;if(b._parent&&(ve=l.a.getState().db.cards[b._parent]),!b)return null;var xe=l.a.getState().db.cards[b._id]&&l.a.getState().db.cards[b._id]._users&&l.a.getState().db.cards[b._id]._users[s._id]&&l.a.getState().db.cards[b._id]._users[s._id].myDay?l.a.getState().db.cards[b._id]._users[s._id].myDay:null,we=!!(!xe||xe&&xe&&O()(new Date(1e3*xe)).format("YYYY/MM/DD")!==O()().format("YYYY/MM/DD")),Ee=b.isTemplate?b.isTemplate:Object(et.Q)(b._id),ke=!!e.permission&&e.permission;!b||!b._planId||i.cards[b._planId]&&Object(et.B)(b._planId)||(ke=!1),!ke&&parseInt(de)>=4&&(ke=!0),!ke&&Object(et.B)(b._planId)&&ue&&ue.admin&&ue.plan&&(ue.planAdmin||ue.planModerate)&&(ke=!0),b._requireApproval&&b._parent&&(l.a.getState().db.cards[b._parent]&&l.a.getState().db.cards[b._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[b._id]._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[b._id]._parent]._users[s._id]&&l.a.getState().db.cards[l.a.getState().db.cards[b._id]._parent]._users[s._id].approvalResponsible||b._users&&1===Object.keys(b._users).length&&b._users[s._id])&&(ke=!1);var Se=!1,Le=a.a.createElement(a.a.Fragment,null);if(b&&b.url&&b.url.indexOf(".youtube.com/watch?")>-1){var Ie=b.url.split("?")[1].split("v=")[1].split("&")[0];Ie&&(Le=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(Ie),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Se=!0)}if(b&&b.url&&b.url.indexOf("//youtu.be/")>-1){var Fe=b.url.split(".be/")[1];Fe&&(Le=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(Fe),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),Se=!0)}var Ne=b.formId?JSON.parse(l.a.getState().forms[b.formId].elements):[],Ae={};return Ne.forEach((function(e){b[e.id]&&(Ae=Object(p.a)(Object(p.a)({},Ae),{},Object(h.a)({},e.id,b[e.id])))})),a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{save:L&&ke?function(){D(!0),me()}:null,saveClose:L&&ke?function(){D(!0),me(!0)}:null,saveLoader:F,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:r.root},b._requireApproval&&b._parent&&(l.a.getState().db.cards[b._parent]&&l.a.getState().db.cards[b._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[b._id]._parent]._users[s._id]&&l.a.getState().db.cards[l.a.getState().db.cards[b._id]._parent]._users[s._id].approvalResponsible||b._users&&1===Object.keys(b._users).length&&b._users[s._id])?a.a.createElement("div",{style:{position:"relative",width:"100%",background:Object(S.d)("ColumnTitleColor"),padding:7,display:"grid"}},a.a.createElement("div",{style:{color:"red",fontWeight:"bold",fontSize:14}},Object(S.u)("$__attention",1),": ",a.a.createElement("span",{style:{color:"#FFFFFF"}},Object(S.u)("$__thisActivityRequireApproval",1))),a.a.createElement(st,{nodeId:b._id,onAction:function(){e.onClose()}})):a.a.createElement(a.a.Fragment,null),Se?a.a.createElement("div",{style:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",clear:"both"}},Le):a.a.createElement(a.a.Fragment,null),ke&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("imageUpload"))&&a.a.createElement(_e.a,{img:b?b.image:null,onChange:function(e,t){fe({name:"image",value:e}),fe({name:"file",value:t})},files:b._files?b._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===b.type,aspectRatio:"chatGroup"===b.type?null:16/9,onDelete:function(){fe({name:"image",value:null},{name:"file",value:null},!0)}}),!ke&&b.image&&a.a.createElement("div",{className:r.image,style:{backgroundImage:"url(".concat(b.image,")")}}),"plan"!==b.type||b._id?a.a.createElement(a.a.Fragment,null):a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(ze.a,{id:"combo-box-demo",options:u,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"planType",disableClearable:!0,value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0]}))},onChange:function(e,t){fe({name:"planType",value:t.value})}}),u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType&&!0===e.swot})).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",color:Object(S.d)("color")}},a.a.createElement(re.a,{icon:Ht.a,color:Object(S.d)("color"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},"MATRIX SWOT"))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,Object(S.u)(u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType}))[0].description,1))),a.a.createElement("div",{className:r.data},(b._parent||b._planId)&&le?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"auto"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.u)("$__loadingdata")),a.a.createElement(ct.a,null)):(b._parent&&i.cards[b._parent]||b._planId&&i.cards[b._planId])&&a.a.createElement(pt.a,{id:b._parent?b._parent:b._planId?b._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:t},"step"===l.a.getState().db.cards[t].type?{module:"columnEdit",activeModule:"columnEdit"}:{module:"cardEdit",activeModule:"cardEdit"}),{},{data:l.a.getState().db.cards[t]}))}}),a.a.createElement("div",{style:{position:"relative",alignItems:"center",clear:"both",justifyContent:"space-between",display:"flex"}},b._id&&i.cards[b._id]&&i.cards[b._id]._users&&a.a.createElement(Dt.a,{_id:b._id,noLimit:!0,avatarSize:"33px",permission:ke}),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===b.type&&b._id&&ke?a.a.createElement(k.a,{title:Object(S.u)("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){c.a.push("sp#".concat(b._id,"/dashboard")),he(!0)},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.card&&e.card._id&&"plan"===e.card.type?a.a.createElement(k.a,{title:Object(S.u)(e.card&&e.card._isFavorite?"$__removeFromFavorite":"$__addToFavorite",1),icon:e.card&&e.card._isFavorite?"favorite":"favorite_border",color:e.card&&e.card._isFavorite?"red":"lightgray",onClick:function(){Object(S.g)(e,b._id,!(!e.card||!e.card._isFavorite)),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},b._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[b._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):a.a.createElement(a.a.Fragment,null),b._id&&36===b._id.length&&"chatGroup"!==b.type&&"plan"!==b.type&&a.a.createElement(k.a,{title:Object(S.u)(xe&&O()(new Date(1e3*xe)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:xe&&O()(new Date(1e3*xe)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"red":"lightblue",icon:xe&&O()(new Date(1e3*xe)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Object(et.J)(e,{_id:b._id,userId:s._id,option:we}),e.myDayClick&&e.myDayClick()},size:"25px"}))),a.a.createElement("div",null,e.card&&"plan"!==b.type&&"chatGroup"!==b.type&&e.card._id&&e.card._users[s._id]&&"completed"!==b.status&&de>0?a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Bt.a,{data:e.card})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===b.type&&b._id?Object(S.u)("$__plan ".concat(b.planType?u[1].label:u[0].label),1):Object(S.u)("$__data",1)),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:7}},a.a.createElement("div",{style:{color:"gray"}},b._cardCode?"#".concat(b._cardCode," "):""),b.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",textAlign:"right",marginLeft:10}},Object(S.u)("$__createdAt"),": ",Object(S.k)(b.created_at)):a.a.createElement(a.a.Fragment,null)),a.a.createElement(Oe.a,{label:Object(S.u)(be&&be.fieldsTitle&&be.fieldsTitle.name?be.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"edit_693",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){fe(e.target)}},value:b&&b.name?b.name:"",placeholder:Object(S.u)(be&&be.fieldsTitle&&be.fieldsTitle.placeholder&&be.fieldsTitle.placeholder.name?be.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("name")>-1))}),de>3||b.description||ke?a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){fe(e.target)}},value:b&&b.description?b.description:"",placeholder:Object(S.u)("$__descriptionOfCard_placeholder",1),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),"task"===b.type||"iniciative"===b.type?a.a.createElement(wt,{label:Object(S.u)("$__price",1),variant:"standard",currencySymbol:"$",outputFormat:"string",style:{width:"100%",marginBottom:10},value:b&&b.value?b.value:"",onChange:function(e,t){return fe({name:"value",value:t})}}):a.a.createElement(a.a.Fragment,null),(de>3||b.url||ke)&&"chatGroup"!==b.type?a.a.createElement(Oe.a,{label:Object(S.u)("$__URL",1),variant:Object(S.d)("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){fe(e.target)}},value:b&&b.url?b.url:"",placeholder:"https://domain.com",disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("name")>-1))}):a.a.createElement(a.a.Fragment,null),b.url?a.a.createElement("div",{style:{width:"100%",textAlign:"right"}},a.a.createElement("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",style:{color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.u)("$__openlink","*"))):a.a.createElement(a.a.Fragment,null)),b.formId&&"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(t=l.a.getState().session)||void 0===t?void 0:t.account)?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__formAnswers")),a.a.createElement(jt,{formId:b.formId,values:Ae,onChange:function(e,t){},disabled:!0})):a.a.createElement(a.a.Fragment,null),(de>3||b.client||ke)&&!Ee&&ke&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("client"))&&(!b.client||b.client&&i.users[b.client])&&a.a.createElement(ze.a,{id:"combo-box-demo",options:Object.keys(i.users).filter((function(e){return"client"===i.users[e].type||"group"===i.users[e].type||"sic"===i.users[e].type})).sort((function(e,t){return i.users[e].name<i.users[t].name?-1:i.users[e].name>i.users[t].name?1:0})).map((function(e){return{label:i.users[e].name,value:String(i.users[e]._id)}})),getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"client",value:b&&b.client?Object.keys(i.users).filter((function(e){return b.client&&i.users[e]._id===b.client})).map((function(e){return{label:i.users[e].name,value:String(i.users[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__account",1),variant:Object(S.d)("fieldVariant"),value:b&&b.client?Object.keys(i.users).filter((function(e){return b.client&&i.users[e]._id===b.client})).map((function(e){return{label:i.users[e].name,value:String(i.users[e]._id)}}))[0]:null}))},onChange:function(e,t){fe({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("client")>-1))}),((de>2||b.endDate||b.startDate||ke)&&!Ee&&"chatGroup"!==b.type||!(!ke&&!b.startDate&&!b.endDate)&&!Ee&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("deadline")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__deadline",1)),b.endDate||b.startDate||$?a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:null,autoComplete:"start-date",onChange:function(e){O()(e.target.value).isValid()&&U(O()(e.target.value).unix("X"));var t={startDate:O()(e.target.value).unix("X")};U(O()(e.target.value).unix("X")),(!J||J<O()(e.target.value).unix("X"))&&(t=Object(p.a)(Object(p.a)({},t),{},{endDate:O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),X(O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),y(Object(p.a)(Object(p.a)({},b),t)),C(!0)}},value:W?O()(1e3*W).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement(Oe.a,{label:Object(S.u)("$__endDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:!J||W?O()(1e3*W).format("YYYY-MM-DDTHH:mm"):null,autoComplete:"end-date",onChange:function(e){var t={endDate:O()(e.target.value).unix("X")};X(O()(e.target.value).unix("X")),W||(t=Object(p.a)(Object(p.a)({},t),{},{startDate:O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),U(O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),y(Object(p.a)(Object(p.a)({},b),t)),C(!0)}},value:J?O()(1e3*J).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"flex-end"}},a.a.createElement(k.a,{color:Object(S.d)("lightgray"),icon:"clear",onClick:function(){U(null),X(null),y(Object(p.a)(Object(p.a)({},b),{},{startDate:null,endDate:null,recurrence:null})),M(!1),C(!0)},size:"15px",title:Object(S.u)("$__clearDate","*"),text:Object(S.u)("$__clearDate","*")})),a.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},a.a.createElement(Ft,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Object(S.u)("$__days").toLowerCase())},{value:15,label:"15 ".concat(Object(S.u)("$__days").toLowerCase())},{value:30,label:"30 ".concat(Object(S.u)("$__days").toLowerCase())},{value:60,label:"60 ".concat(Object(S.u)("$__days").toLowerCase())},{value:90,label:"90 ".concat(Object(S.u)("$__days").toLowerCase())},{value:180,label:"180 ".concat(Object(S.u)("$__days").toLowerCase())},{value:365,label:"365 ".concat(Object(S.u)("$__days").toLowerCase())}].concat(Object(A.a)(ve&&ve.startDate&&ve.endDate?[{value:"parent",label:"".concat(Object(S.u)("$__useParentDate")," ").concat(O()(1e3*ve.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(O()(1e3*ve.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:ae||"",onChange:function(e){"parent"!==e&&0!==e?(X(O()(new Date(1e3*W)).tz("America/Sao_Paulo").add(e,"days").unix("X")),fe({name:"endDate",value:O()(new Date(1e3*W)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(ve.startDate&&(U(ve.startDate),fe({name:"startDate",value:ve.startDate},ve.endDate?{name:"endDate",value:ve.endDate}:null,!0),ve.endDate&&X(ve.endDate)),!ve.startDate&&ve.endDate&&(X(ve.endDate),fe({name:"endDate",value:ve.endDate},null,!0))),oe(e)}})),a.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__freeChildrenDate",1),a.a.createElement(Te.a,{checked:!!b.freeChildrenDate,onChange:function(e){fe({name:"freeChildrenDate",value:!b.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("freeChildrenDate")>-1))})),b.startDate&&O()(b.startDate).isValid()&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("recurrence"))&&a.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},b._recurrenceId?a.a.createElement("div",{style:{marginTop:"15px"}},Object(S.u)("$__recurrentActivityFrom"),":",a.a.createElement(ut.a,{db:"cards",cardId:i.cards[b._recurrenceId]._id,Avatar:!0,ignoreList:!0,onlyOption:!0})):a.a.createElement("div",null,a.a.createElement(Pt,{data:b,onChange:function(e){y(Object(p.a)(Object(p.a)(Object(p.a)({},b),e),{},{recurrenceNextDate:O()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),C(!0)}}),b.recurrence&&"0"!==b.recurrence&&b.recurrenceNextDate&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",null,Object(S.u)("$__NextRecurrenceDate")),a.a.createElement(He.a,{placeholder:Object(S.u)("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:O()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};y(Object(p.a)(Object(p.a)({},b),t)),C(!0)},startDate:b.recurrenceNextDate&&O()(b.recurrenceNextDate).isValid()?new Date(1e3*O()("".concat(b.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){y(Object(p.a)(Object(p.a)({},b),{},{recurrenceNextDate:null})),C(!0)}}))))):ke||(de>2||b.endDate||b.startDate||ke)&&!Ee?a.a.createElement(Ce.a,{text:Object(S.u)("$__addDeadline",1),icon:"timer",onClick:function(){M(!0),U(O()("".concat(O()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),fe({name:"startDate",value:O()("".concat(O()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==ae?{name:"endDate",value:O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add(ae,"days").unix("X")}:null),"parent"!==ae&&X(O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add(ae,"days").unix("X"))}}):a.a.createElement(a.a.Fragment,null)),("completed"===b.status||!ke)&&de<3?a.a.createElement(a.a.Fragment,null,b._tags&&b._tags.length>0?a.a.createElement(dt.a,{options:b._tags,expanded:!0}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("tags"))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__tags",1)),a.a.createElement(Yt,{data:{values:b._tags?b._tags:[]},callBack:function(e){ke&&fe({name:"_tags",value:e})},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.u)("$__selectTheOptions",1)}),b&&b._tags&&b._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!b.childrenAutoTag,onChange:function(e){ke&&fe({name:"childrenAutoTag",value:!b.childrenAutoTag})},name:"childrenAutoTag",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("childrenAutoTag")>-1))}),Object(S.u)("$__makeLinksAssumeTheSameLabelsOnAdd",1)):a.a.createElement(a.a.Fragment,null))),(!be.hideFields||be.hideFields&&(-1===be.hideFields.indexOf("priority")||-1===be.hideFields.indexOf("status")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},!Ee&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("priority"))&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.priority,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:b&&b.priority&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:i.priority[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__priority",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.priority?i.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:i.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.priority?i.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:i.priority[0].color)})}),value:b&&b.priority&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:i.priority[0]}))},onChange:function(e,t){ke&&fe({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.u)(e.label,1))},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.priority,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:b&&b.risk&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:i.priority[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__risk",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.risk?i.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:i.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.risk?i.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:i.priority[0].color)})}),value:b&&b.risk&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:i.priority[0]}))},onChange:function(e,t){ke&&fe({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.u)(e.label,1))},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.priority,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:b&&b.complexity&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:i.priority[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__complexity",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.complexity?i.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:i.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.complexity?i.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:i.priority[0].color)})}),value:b&&b.complexity&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:i.priority[0]}))},onChange:function(e,t){ke&&fe({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.u)(e.label,1))},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.priority,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:b&&b.impact&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:i.priority[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__impact",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(p.a)(Object(p.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.impact?i.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:i.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.impact?i.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:i.priority[0].color)})}),value:b&&b.impact&&i.priority?i.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:i.priority[0]}))},onChange:function(e,t){ke&&fe({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.u)(e.label,1))},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))}))),!Ee&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("status"))&&a.a.createElement(ze.a,{id:"combo-box-demo",options:i.status,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:b&&b.status&&i.status?i.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:i.status[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__status",1),variant:Object(S.d)("fieldVariant"),value:b&&b.status&&i.status?i.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:i.status[0]}))},onChange:function(e,t){(ke||"0"!==String(de))&&fe({name:"status",value:t.value})},disabled:!(ke&&!(be&&be.disabledFields&&be.disabledFields.indexOf("status")>-1))&&"0"===String(de)})),(de>4||ue&&ue.plan&&ue.planAdmin)&&"plan"===b.type&&"completed"!==b.status&&a.a.createElement(a.a.Fragment,null,Q||b.miroBoard?Q?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__MiroBoard",1)),a.a.createElement(Oe.a,{label:Object(S.u)("$__MiroBoardCode"),variant:Object(S.d)("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"save",color:"green",onClick:function(){return ee(!1)}})),onChange:function(e,t){fe({name:"miroBoard",value:e.target.value})}},value:b&&b.miroBoard?b.miroBoard:"",placeholder:Object(S.u)("$__MiroBoardCodePlaceholder",1),disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("miroBoard")>-1))})):b.miroBoard&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__MiroBoard",1)),a.a.createElement(Ce.a,{text:Object(S.u)("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:b.miroBoard})}}),a.a.createElement(Ce.a,{text:Object(S.u)("$__editBoard",1),icon:"insert_link",onClick:function(){ee(!0)}})):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__MiroBoard",1)),a.a.createElement(Ce.a,{text:Object(S.u)("$__addBoard",1),icon:"developer_board",onClick:function(){ee(!0)}}))),(!b._id||b&&b._users&&s&&s._id&&b._users[s._id]&&b._users[s._id].access&&parseInt(b._users[s._id].access)>=3&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("private")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!b.private,onChange:function(e){ke&&fe({name:"private",value:!b.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("private")>-1))}),Object(S.u)("$__private",1))),(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("private"))&&b.private&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!b.privateChildrens,onChange:function(e){ke&&fe({name:"privateChildrens",value:!b.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("private")>-1))}),Object(S.u)("$__privateChildrens",1))),ke&&"chatGroup"===b.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!b.onlyAdminsSendMessages,onChange:function(e){ke&&fe({name:"onlyAdminsSendMessages",value:!b.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__onlyAdminsCanSendMessage",1))),b.broadcast||l.a.getState().timeline&&(!l.a.getState().timeline[b._id]||l.a.getState().timeline[b._id]&&0===Object.keys(l.a.getState().timeline[b._id]).length)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!b.broadcast,onChange:function(e){ke&&fe({name:"broadcast",value:!b.broadcast})},name:"broadcast",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__workAsABroadcastList",1))):a.a.createElement(a.a.Fragment,null)),ue&&ue.plan&&ue.planAdmin&&Ee&&"plan"===b.type&&s._access&&s._access.userAdmin&&s._access.machenAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:b&&b.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}},renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:b&&b.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}}}))},onChange:function(e,t){ke&&fe({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null))))}))),qt=r(1180),Vt=r(542),Jt=r(1958),Xt=r(1974),Kt=r(147),Zt=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},data:{marginTop:"0px",padding:"0 10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},timeline:{position:"absolute",width:"100%",top:"300px",bottom:"0px"},timelineKpiParent:{position:"absolute",width:"100%",top:"350px",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};function Qt(){Qt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var er=Object(u.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Zt)((function(e){var t=e.classes,r=l.a.getState(),n=r.timeline,o=r.db,i=r.session,c=r.sideModule,s=c.data||{},u=a.a.useState(s.kpi_type?"timeline":"settings"),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(!(!s._id||"new"!==s._id||!s.name)),v=Object(m.a)(y,2),x=v[0],_=v[1];a.a.useEffect((function(){x&&e.reqSave&&e.reqSave()}),[x]);var O=Object(S.j)(),w=Object(et.t)(c.id),j=!1;(parseInt(w)>=4||O.plan&&O.planAdmin)&&(j=!0),i._id&&o.cards[s._id]&&o.cards[s._id]._users&&o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&(w=o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]);var E=window.location.hash.split("/");E[0]=E[0].replace("#","");var L=n[s._id]||{};L=Object.keys(L).filter((function(e){return"kpi"===L[e].type})).map((function(e){return L[e]}));var C=null,I=0;s._parent&&l.a.getState().db.cards[s._parent]&&l.a.getState().db.cards[s._parent].kpi_type&&"task"!==l.a.getState().db.cards[s._parent].kpi_type&&(C=l.a.getState().db.cards[s._parent],I=parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?parseInt(C.kpi_ini)-parseInt(C.kpi_fin):parseInt(C.kpi_fin)-parseInt(C.kpi_ini),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent&&l.a.getState().db.cards[e]._parent===C._id&&l.a.getState().db.cards[e].kpi_type===C.kpi_type&&l.a.getState().db.cards[e].kpi_useParent})).forEach((function(e){parseInt(C.kpi_ini)>parseInt(C.kpi_fin&&parseInt(l.a.getState().db.cards[e].kpi_ini))?I-=parseInt(l.a.getState().db.cards[e].kpi_ini):parseInt(l.a.getState().db.cards[e].kpi_fin)&&(I-=parseInt(l.a.getState().db.cards[e].kpi_fin))})));var T=function(t){(t.value&&!c.data[t.name]||c.data[t.name]&&c.data[t.name]!==t.value)&&_(!0);var r=Object(p.a)(Object(p.a)({},c.data),{},Object(h.a)({},t.name,t.value));r.kpi_ini||(r=Object(p.a)(Object(p.a)({},r),{},{kpi_ini:0})),r.kpi_fin||(r=Object(p.a)(Object(p.a)({},r),{},{kpi_fin:0})),!r.kpi_useParent&&"false"!==!String(r.kpi_useParent)&&C&&C.kpi_type===t.value&&(r=Object(p.a)(Object(p.a)({},r),{},{kpi_useParent:!0})),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},c),{},{data:r}))},F=function(){var t=Object(f.a)(Qt().mark((function t(){var r,n=arguments;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],_(!1),"time"!==c.data.kpi_type||!(0===parseInt(c.data.kpi_fin)&&0===parseInt(c.data.kpi_ini)||parseInt(c.data.kpi_fin)>0&&parseInt(c.data.kpi_fin)<parseInt(c.data.kpi_ini))){t.next=6;break}Object(S.c)({message:Object(S.u)("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(et.F)(e,!0,c.data);case 8:t.sent&&Object(S.c)({message:Object(S.u)("$__kpiDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&e.reduxFunction("ASYNC","CLEAR_MODULE");case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=Object(f.a)(Qt().mark((function t(r){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},c),{},{data:Object(p.a)(Object(p.a)({},c.data),{},{kpi_ini:null,kpi_fin:null,kpi_useParent:!!r.value||null})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=function(){var e=Object(f.a)(Qt().mark((function e(t,r){var n;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=String(s["kpi_".concat(r)]?s["kpi_".concat(r)]:0),(n="backspace"===t.key.toLowerCase()?n.substr(0,n.length-1):"".concat(n||"").concat(isNaN(t.key)&&(","!==t.key&&"."!==t.key||-1!==n.indexOf(",")||-1!==n.indexOf("."))?"":t.key))&&n.indexOf(",")>-1&&(n=n.substr(0,n.indexOf(",")+3)),T({name:"kpi_".concat(r),value:n});case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=0;return Object.keys(o.cards).filter((function(e){return o.cards[e]&&o.cards[e]._parent&&o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).forEach((function(e,t){A=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?A+parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):A+parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini)})),a.a.createElement("div",null,a.a.createElement(ye,{save:x&&j?function(){F()}:null,saveClose:x&&j?function(){F(!0)}:null,close:function(){e.onClose&&e.onClose(x)}}),a.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},j?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},a.a.createElement(k.a,{title:Object(S.u)("$__changeKpiType",1),color:Object(S.d)("settings"===g?"menu":"color"),icon:"tune",onClick:function(){return b("settings")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.u)("$__chart",1),color:Object(S.d)("chart"===g?"menu":"color"),icon:"analytics",onClick:function(){return b("chart")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.u)("$__statement",1),color:Object(S.d)("timeline"===g?"menu":"color"),icon:"receipt",onClick:function(){return b("timeline")},size:"25px",transparent:!0})):a.a.createElement("div",null),"chart"===g?a.a.createElement(Vt.a,{data:s,chartShow:!0}):"settings"===g?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",null,Object(S.u)("$__measurementeType",1)),0===Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length?a.a.createElement(Xt.a,{value:s&&s.kpi_type?s.kpi_type:"task",exclusive:!0,onChange:function(e,t){T({name:"kpi_type",value:t})}},a.a.createElement(Jt.a,{value:"decimal"},a.a.createElement(re.a,{title:Object(S.u)("$__decimal",1),color:"color"},"filter_9_plus")),a.a.createElement(Jt.a,{value:"currency"},a.a.createElement(re.a,{title:Object(S.u)("$__currency",1),color:"color"},"attach_money")),a.a.createElement(Jt.a,{value:"percent"},a.a.createElement(Kt.a,{title:Object(S.u)("$__percentage",1)},a.a.createElement("span",{style:{color:"".concat(Object(S.d)("color")),fontSize:"22px"}},"%"))),a.a.createElement(Jt.a,{value:"time"},a.a.createElement(re.a,{title:Object(S.u)("$__time",1),color:"color"},"hourglass_top")),a.a.createElement(Jt.a,{value:"task"},a.a.createElement(re.a,{title:Object(S.u)("$__task",1),color:"color"},"task"))):"decimal"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.u)("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.u)("$__currency",1),color:"color"},"attach_money"):"percent"===s.kpi_type?a.a.createElement(re.a,{title:Object(S.u)("$__percentage",1),color:"color"},"percent"):a.a.createElement(re.a,{title:Object(S.u)("$__task",1),color:"color"},"task"),(Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length,a.a.createElement(a.a.Fragment,null)),C&&C.kpi_type&&C.kpi_type===s.kpi_type?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginTop:7}},a.a.createElement("legend",{style:{color:"gray",fontSize:12}},Object(S.u)("$__parentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginTop:3}},a.a.createElement("legend",{style:{color:"blue",fontSize:12}},C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?Object(S.u)("$__notAllocatedBudget",1):Object(S.u)("$__notAllocatedGoal",1)),Object(S.h)(I,"time"===C.kpi_type?"number":C.kpi_type,C.kpi_currency?C.kpi_currency:null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!s.kpi_useParent,onChange:function(e){D({name:"kpi_useParent",value:!s.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__useParentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{color:"red"}},Object(S.u)("$__independentKPIDescription")),a.a.createElement("div",null))):a.a.createElement(a.a.Fragment,null),s&&s.kpi_type&&"task"!==s.kpi_type&&a.a.createElement(a.a.Fragment,null,"currency"!==s.kpi_type||s.kpi_useParent||0!==Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length?Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).length>0?a.a.createElement("fieldset",{style:{marginTop:7}},a.a.createElement("legend",{style:{color:"gray",fontSize:12}},Object(S.u)("$__allocatedKpiActivities",1)),a.a.createElement("ul",{style:{listStyle:"none",padding:0}},Object.keys(o.cards).filter((function(e){return o.cards[e]._parent===s._id&&o.cards[e].kpi_useParent})).map((function(e,t){var r=0;r=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini);var i=0;return n&&n[e]&&Object.keys(n[e]).filter((function(t){return n[e][t]&&n[e][t].value})).length>0&&Object.keys(n[e]).filter((function(t){return n[e][t]&&n[e][t].value})).forEach((function(t){i+=parseFloat(n[e][t].value)})),a.a.createElement("li",{key:"ca-".concat(e)},a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),a.a.createElement("div",{style:{width:"100%",height:22}},a.a.createElement(qt.a,{data:[{ranges:[0,parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(s.kpi_ini)-parseInt(s.kpi_fin):parseInt(s.kpi_fin)-parseInt(s.kpi_ini)],measures:[r],markers:[i]}],minValue:parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?parseInt(s.kpi_fin):parseInt(s.kpi_ini),maxValue:parseInt(s.kpi_ini)<parseInt(s.kpi_fin)?parseInt(s.kpi_fin):parseInt(s.kpi_ini),margin:{top:0,right:0,bottom:0,left:0},spacing:50,titlePosition:"after",titleAlign:"end",titleOffsetX:-70,rangeBorderColor:{from:"color",modifiers:[]},measureBorderColor:{from:"color",modifiers:[]},measureSize:1e5,markerSize:1.2,rangeColors:"purple_orange",measureColors:"seq:blue_purple",markerColors:"seq:yellow_orange_red",motionConfig:"stiff"})),a.a.createElement("div",{style:{marginTop:0,fontSize:12,color:"black",width:"100%",textAlign:"left"}},Object(S.h)(r,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null)))})))):a.a.createElement(a.a.Fragment,null):a.a.createElement(ze.a,{id:"combo-box-demo",options:o.currency,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"currency",disableClearable:!0,value:s&&s.kpi_currency&&o.currency?o.currency.filter((function(e){return String(e.value)===String(s.kpi_currency)}))[0]:o.currency[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__currency",1),variant:Object(S.d)("fieldVariant"),value:s&&s.kpi_currency&&o.currency?o.currency.filter((function(e){return String(e.value)===String(s.kpi_currency)}))[0]:o.currency[0]}))},onChange:function(e,t){T({name:"kpi_currency",value:t.value})}}),a.a.createElement("div",{style:{display:"flex",marginTop:"14px",justifyContent:s.kpi_useParent?"center":"space-between"}},!s.kpi_useParent||s.kpi_useParent&&C&&parseInt(C.kpi_ini)>parseInt(C.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(Oe.a,{label:s.kpi_useParent?Object(S.u)("$__budget"):"time"===s.kpi_type?Object(S.u)("$__minimumMinutes",1):Object(S.u)("$__initialValue",1),variant:"outlined",name:"kpi_ini",placeholder:Object(S.u)("$__value",1),value:Object(S.h)(s.kpi_ini?s.kpi_ini:0,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){N(e,"ini")}}})):a.a.createElement(a.a.Fragment,null),!s.kpi_useParent||s.kpi_useParent&&C&&parseInt(C.kpi_ini)<parseInt(C.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(Oe.a,{label:s.kpi_useParent?Object(S.u)("$__goal"):"time"===s.kpi_type?Object(S.u)("$__maximumMinutes",1):Object(S.u)("$__finalValue",1),variant:"outlined",name:"kpi_fin",value:Object(S.h)(s.kpi_fin?s.kpi_fin:0,"time"===s.kpi_type?"number":s.kpi_type,s.kpi_currency?s.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){N(e,"fin")}}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!s.kpi_reqMessage,onChange:function(e){T({name:"kpi_reqMessage",value:!s.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__reqDescription",1)))):a.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},a.a.createElement(Vt.a,{data:s,chartShow:!1}),a.a.createElement("div",{style:{position:"absolute",top:103,bottom:0,left:0,right:0}},a.a.createElement(xe.a,{noSearch:!0,nodeId:s._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:s.kpi_type})))))})));function tr(){tr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var rr,nr=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.sideModule,i=n.planType,c=o.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],g=u[1];a.a.useEffect((function(){"link"===c.type&&"new"===c._id&&g(!0)}),[o.data._id]);var b=function(t,r){(t.value&&!o.data[t.name]||o.data[t.name]&&o.data[t.name]!==t.value)&&g(!0);var n=Object(p.a)(Object(p.a)({},o.data),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},r.name,r.value))),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:Object(p.a)(Object(p.a)({},o.data),n)}))},y=function(t){d&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},v=function(){var t=Object(f.a)(tr().mark((function t(){var r,n=arguments;return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],g(!1),o.data.name){t.next=6;break}Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(et.F)(e,!0,o.data);case 8:t.sent&&Object(S.c)({message:Object(S.u)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&y(!0);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(){var t=Object(f.a)(tr().mark((function t(){return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(f.a)(tr().mark((function t(){return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.L)(e,{cardId:c._id,_planId:c._planId});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=n.dataType.filter((function(e){return e.name===o.data.type}))[0];return a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{save:d?function(){v()}:null,saveClose:d?function(){v(!0)}:null,close:function(){y(!0)}}),a.a.createElement("div",{className:t.root},"plan"!==c.type?a.a.createElement(a.a.Fragment,null,Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===c._id&&!n.cards[e].checklist})).length>0?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__unLinkCards",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__unLinkCardsDescription",1)),a.a.createElement(nt,{onClick:function(){x()}},Object(S.u)("$__unLinkCards",1))):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!_.hideFields||_.hideFields&&-1===_.hideFields.indexOf("type"))&&a.a.createElement(ze.a,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:c&&c.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(c.type)}))[0]:n.type[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__type",1),variant:Object(S.d)("fieldVariant"),value:c&&c.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(c.type)}))[0]:n.type[0]}))},onChange:function(e,t){b({name:"type",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),"plan"===c.type?a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:c&&c.planType?i.filter((function(e){return e.value===c.planType}))[0]:i[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:c&&c.planType?i.filter((function(e){return e.value===c.planType}))[0]:i[0]}))},onChange:function(e,t){b({name:"planType",value:t.value})}}),i.filter((function(e){return!c.planType||c.planType&&e.value===c.planType&&!0===e.swot})).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",color:Object(S.d)("color")}},a.a.createElement(re.a,{icon:Ht.a,color:Object(S.d)("color"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},"MATRIX SWOT"))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,Object(S.u)(i.filter((function(e){return!c.planType||c.planType&&e.value===c.planType}))[0].description,1))):a.a.createElement(a.a.Fragment,null)))}))),ar=r(76);function or(){or=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ir=j.b.div(rr||(rr=Object(d.a)(["\n background-color:none\n "]))),cr=Object(u.b)((function(e,t){return{cards:Object.keys(e.db.cards).filter((function(r){return e.db.cards[r]._parent===t.nodeId}))}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(e.name?e.name:""),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],O=window.location.hash.split("/");O[0]=O[0].replace("#",""),36!==O[0].length&&(O[0]=null),a.a.useEffect((function(){return w(),function(){}}),[]);var w=function(){var t=Object(f.a)(or().mark((function t(){return or().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.a)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),[e.nodeId],!1,null,"childrens");case 2:t.sent&&_(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j={};l.a.getState().db[e.db]&&l.a.getState().db[e.db][e.nodeId]&&(j=l.a.getState().db[e.db][e.nodeId]);var E=Object.keys(l.a.getState().db.cards).filter((function(t){return!(l.a.getState().db.cards[t].deleted||l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._recurrenceId||l.a.getState().db.cards[t]._parent!==e.nodeId||l.a.getState().db.cards[t].private&&!(l.a.getState().db.cards[t].private&&l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[n._id]))})).map((function(e){return e})),L=function(){var e=Object(f.a)(or().mark((function e(){var t,r;return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.a.getState().functions.socket,r="task",j&&j.type&&(j.type.indexOf("guideline")>-1&&(r="objective"),"objective"===j.type&&(r="goal"),"goal"===j.type&&(r="task")),j.childrenAutoTag&&j._tags&&j._tags.length>0&&console.log(j),t.emit("data",{module:"cards",method:"post",action:"add"},Object(p.a)({_parent:j._id,planId:j._planId?j._planId:null,name:c,type:r,status:"notStarted"},j.childrenAutoTag&&j._tags&&j._tags.length>0?{_tags:j._tags}:{}),function(){var e=Object(f.a)(or().mark((function e(r){return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("card.UPD",{cardId:r.id,cardData:Object(p.a)(Object(p.a)({},r.data),{},{_planId:j._planId?j._planId:null,_parent:j._id,_timeline:Object(h.a)({},r.log._id,Object(p.a)(Object(p.a)({},r.log),{},{_parent:[r.id]})),_users:Object(h.a)({},n._id,{name:l.a.getState().db.users[n._id].name?l.a.getState().db.users[n._id].name:null,displayName:l.a.getState().db.users[n._id].displayName?l.a.getState().db.users[n._id].displayName:null,image:l.a.getState().db.users[n._id].image?l.a.getState().db.users[n._id].image:null,access:5,_id:n._id})})}),s("");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var t=Object(f.a)(or().mark((function t(n){var a,o,i,c,s;return or().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(l.a.getState().db.cards).filter((function(t){return!(!l.a.getState().db.cards[t]||!l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._parent!==e.nodeId)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&String(r.cards[e].order.low)&&String(r.cards[t].order.low)&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return e})),o=n.destination,i=n.source,c=n.draggableId,o){t.next=4;break}return t.abrupt("return",!1);case 4:if(o.droppableId!==i.droppableId||o.id!==i.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=a).splice(i.index,1),s.splice(o.index,0,c),t.abrupt("return");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var e=Object(f.a)(or().mark((function e(t){return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(f.a)(or().mark((function e(t){return or().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(x)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.u)("$__loadingCatenation")),a.a.createElement(ct.a,null));var F=E.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0})),D=E.filter((function(e){return"completed"===r.cards[e].status})).sort((function(e,t){return r.cards[e].name.toLowerCase()<r.cards[t].name.toLowerCase()?-1:r.cards[e].name.toLowerCase()>r.cards[t].name.toLowerCase()?1:0}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ar.a,{onDragEnd:C,onDragStart:I,onDragUpdate:T},a.a.createElement(ar.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(ir,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),F.length>0?F.map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(ut.a,{provided:t,snapshot:r,cardId:e,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))}))})):a.a.createElement(a.a.Fragment,null),D.length>0?D.map((function(r,n){return a.a.createElement("div",{key:r},a.a.createElement(ut.a,{provided:e,snapshot:t,cardId:r,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))})):a.a.createElement(a.a.Fragment,null),e.placeholder)}))),!g&&a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement("div",null,a.a.createElement(Ce.a,{reverse:!0,text:Object(S.u)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){b(!g)}}))),g&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)},onBlur:function(e){""===e.target.value&&b(!g)},onKeyDown:function(e){13===e.keyCode&&c&&L(),27===e.keyCode&&(b(!g),s(""))}},autoFocus:!0,value:c,placeholder:Object(S.u)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(k.a,{title:Object(S.u)("$__save",1),color:"green",icon:"save",onClick:function(e){L()},transparent:!0}),a.a.createElement(k.a,{title:Object(S.u)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){b(!g),s("")},transparent:!0})))))})),lr=r(340);function sr(){sr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ur=Object(u.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Mt.a)((function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=Object(S.j)();a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.forEach((function(e){l.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var c=function(){var t=Object(f.a)(sr().mark((function t(r){return sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),o(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement($t.a,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:l.a.getState().db.tag?l.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(S.u)("$__tags"),api:"tag/add",add:!0,filterSelectedOptions:!0,colorPicker:!(!i||!i.plan||!i.planAdmin&&!i.planModerate),multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:n,placeholder:e.placeholder||null,onChange:function(e){c(e)},colorPickerCallBack:function(e){l.a.getState().functions.socket.emit("tag.UPD",e)}}))})));function dr(){dr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var pr=function(){var e=Object(f.a)(dr().mark((function e(t){var r,n,a,o,i,c;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,n=t.page,a=void 0===n?0:n,o=t.limit,i=void 0===o?20:o,e.next=3,new Promise(function(){var e=Object(f.a)(dr().mark((function e(n,o){var c,l;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Files_List_V2/",{ids:r,type:t.type?t.type:"cards",limit:i,skip:a*i});case 3:(c=e.sent)&&c.data&&(l=c.data,n(l)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),o(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(c=e.sent)){e.next=6;break}return e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fr=function(){var e=Object(f.a)(dr().mark((function e(t){var r;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(f.a)(dr().mark((function e(r,n){var a;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Files_Folders/",{ids:t&&t.ids?t.ids:[],childrens:!(!t||!t.childrens)&&t.childrens,types:t&&t.types?t.types:null});case 3:(a=e.sent)&&a.data&&r(a.data),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),n(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 2:if(!(r=e.sent)){e.next=5;break}return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),hr=function(){var e=Object(f.a)(dr().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,p;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,n=t.search,a=t.skip,o=void 0===a?null:a,i=t.limit,c=void 0===i?null:i,l=t.asc,s=void 0!==l&&l,u=t.childrens,d=void 0!==u&&u,e.next=3,new Promise(function(){var e=Object(f.a)(dr().mark((function e(a,i){var l,u;return dr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Files_Nav/",{ids:r,skip:o,limit:c,search:n,asc:s,type:t.type?t.type:"cards",childrens:d});case 3:(l=e.sent)&&l.data&&(u=l.data,a(u)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFiles::ERR::"),console.log(e.t0),console.groupEnd(),i(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(p=e.sent)){e.next=6;break}return e.abrupt("return",p);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function mr(){mr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var gr=Object(u.b)((function(e){return{showPrivate:e.controls.lockPrivate}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState({}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState(""),b=Object(m.a)(g,2),y=b[0],v=b[1],x=e.idPlan?e.idPlan:null;a.a.useEffect((function(){return _({id:x}),fr(),function(){d({})}}),[]);var _=function(){var t=Object(f.a)(mr().mark((function t(r,n){var a,o;return mr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fr({ids:r&&r.id?[r.id]:[],childrens:!1,types:e&&e.types?e.types:null});case 2:(a=t.sent)&&(o=n||u,x&&(o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},x,{name:l.a.getState().db.cards[x].name,parent:l.a.getState().db.cards[x]._parent,private:null,type:"plan",_id:x,open:!0}))),a.filter((function(e){return"chatGroup"!==e.type})).forEach((function(e){o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},o[e._id]?o[e._id]:{}),e)))})),d(o));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var e=Object(f.a)(mr().mark((function e(t){var r,n,a,o,i,c,l=arguments;return mr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=l.length>1&&void 0!==l[1]&&l[1],n=t.id,a=void 0===n?null:n,o=t.type,i=void 0===o?null:o,c=u,c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(u).filter((function(e){return u[e].parent===a})).length?_({id:a,type:i},c):d(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(r,n){return a.a.createElement("div",{key:n,style:{position:"relative",float:"left",clear:"both",cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7,width:"100%"},onClick:function(t){(!r.private||r.private&&l.a.getState().controls.lockPrivate)&&(O({id:n},!u[n]||!u[n].open),i(n),e&&e.onSelect&&e.onSelect(u[n])),t.preventDefault(),t.stopPropagation()}},a.a.createElement(ge.a,{title:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.u)("$__private"):r.name),tooltipText:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.u)("$__private"):r.name),icon:(r.private&&!l.a.getState().controls.lockPrivate?"private_connectivity":r.type&&t&&t.dataType&&t.dataType.filter((function(e){return e.name===r.type}))[0].icon)||"$__topic",fontSize:"12px",color:r.private&&!l.a.getState().controls.lockPrivate?"lightgray":o&&o===n?Object(S.d)("color"):Object(S.d)("gray")}),u[n]&&u[n].open?j(n):a.a.createElement(a.a.Fragment,null))},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(u).filter((function(t){return!e||e&&u[t].parent===e})).length>0?Object.keys(u).filter((function(t){return!e||e&&u[t].parent===e})).sort((function(e,t){return u[e].step&&u[t].step&&parseInt(u[e].step)<parseInt(u[t].step)?-1:u[e].step&&u[t].step&&parseInt(u[e].step)>parseInt(u[t].step)?1:u[e].name.toLowerCase().trim()<u[t].name.toLowerCase().trim()?-1:u[e].name.toLowerCase().trim()>u[t].name.toLowerCase().trim()?1:0})).map((function(e){return w(u[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",clear:"both",paddingTop:"15px"}},a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",marginTop:-10}},a.a.createElement(Oe.a,{label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:y,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){v(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:Object(p.a)({position:"relative",maxHeight:"40vh",overflowX:"auto",backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"solid 0.5px rgba(0,0,0,0.1)",padding:15},e.styles?e.styles:{})},Object.keys(u).filter((function(e){return"chatGroup"!==u[e].type&&((!x||x&&36!==x.length)&&!u[e].parent||x&&36===x.length&&u[e]._id===x)&&(""===y||y&&u[e].name.toLowerCase().indexOf(y.toLowerCase().trim())>-1)})).sort((function(e,t){return u[e].name.toLowerCase().trim()<u[t].name.toLowerCase().trim()?-1:u[e].name.toLowerCase().trim()>u[t].name.toLowerCase().trim()?1:0})).map((function(e){return w(u[e],e)}))))))})),br=r(429);function yr(){yr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var vr=function(e){var t=l.a.getState().db;return a.a.createElement(ze.a,{id:"combo-box-demo",options:e.ignoreValues?t.automation.filter((function(t){return-1===e.ignoreValues.indexOf(t.value)})):t.automation,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:e.name||"AutomationAction",disableClearable:!0,value:e.value?t.automation.filter((function(t){return String(t.value)===e.value}))[0]:t.automation[0],renderInput:function(r){return a.a.createElement(Oe.a,Object.assign({},r,{label:Object(S.u)("$__action",1),variant:Object(S.d)("fieldVariant"),inputProps:Object(p.a)(Object(p.a)({},r&&r.inputProps?r.inputProps:{}),{},{style:Object(p.a)(Object(p.a)({},r&&r.inputProps&&r.inputProps.style?r.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)"})}),value:e.value?t.automation.filter((function(t){return String(t.value)===e.value}))[0]:t.automation[0]}))},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",null,Object(S.u)(e.label,1))},onChange:function(t,r){e.onChange(r.value)}})},xr=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.db,i=n.sideModule,c=o.planType,s=a.a.useState({}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({}),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useState(!1),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState((null===(t=i.data)||void 0===t?void 0:t.onConcludedStepMoveTo)||null),F=Object(m.a)(T,2),D=F[0],N=F[1],A=Object(S.j)(),P=Object(et.t)(i.id);a.a.useEffect((function(){return console.log("MONTANDO"),d._id!==i.data._id&&(g(i.data),j(!1)),g(i.data),j(!1),"link"!==d.type||d.name||B(),$(),i.data.name&&""!==i.data.name.trim()&&"link"===i.data.type&&"new"===i.data._id&&(j(!0),e.reqSave&&e.reqSave(!0)),function(){console.log("DESMONTADO")}}),[]),a.a.useEffect((function(){!d.name||d.name&&""===d.name.trim?j(!1):j(!0)}),[v]);var $=function(){var t=Object(f.a)(yr().mark((function t(){return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[i.data._id],cardLoad:"parents"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!i.data[t.name]&&!d[t.name]||i.data[t.name]&&i.data[t.name]!==t.value||n)&&e.reqSave&&e.reqSave(!0);var a=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(p.a)(Object(p.a)(Object(p.a)({},d),a),{},Object(h.a)({},r.name,r.value))),g(a),x(Object(p.a)(Object(p.a)({},v),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},z=function(t){w&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},Y=function(){var t=Object(f.a)(yr().mark((function t(){var r,n=arguments;return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],C){t.next=19;break}if(j(!1),e.reqSave&&e.reqSave(!1),d.status||(d.status="notStarted"),"new"===i.id&&i.data&&g(Object(p.a)(Object(p.a)({},d),i.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i),{},{data:d})),d.name&&(!d.name||""!==d.name.trim())){t.next=12;break}I(!1),Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(et.F)(Object(p.a)(Object(p.a)({},e),{},{store:Object(p.a)(Object(p.a)({},e.store),{},{db:Object(p.a)({},l.a.getState().db)})}),r,d);case 14:t.sent&&(v&&v.status&&(Object(et.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:d._id}}),{status:v.status}),Object(et.e)(e,d._id,v.status)),I(!1),Object(S.c)({message:Object(S.u)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),j(!1),e.reqSave&&e.reqSave(!1),r&&z(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=Object(f.a)(yr().mark((function t(){var r;return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,De.a.post("/link/content",{url:d.url});case 2:r=t.sent,g(Object(p.a)(Object(p.a)({},d),{},{content:r.data.article})),j(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=i.data&&i.data.type?o.dataType.filter((function(e){return e.name===i.data.type}))[0]:{};if(!d)return null;var G=!!e.permission&&e.permission;return!d||!d._planId||o.cards[d._planId]&&Object(et.B)(d._planId)||(G=!1),!G&&parseInt(P)>=4&&(G=!0),!G&&Object(et.B)(d._planId)&&A&&A.admin&&A.plan&&(A.planAdmin||A.planModerate)&&(G=!0),a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{save:w?function(){I(!0),Y()}:null,saveClose:w?function(){I(!0),Y(!0)}:null,saveLoader:C,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.data},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"step"===d.type&&d._id&&G?a.a.createElement(k.a,{title:Object(S.u)("$__openBoard",1),icon:"launch",color:"lightgray",onClick:function(){},size:"25px"}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===d.type&&d._id?Object(S.u)("$__plan ".concat(d.planType?c[1].label:c[0].label),1):Object(S.u)("$__data",1)),d.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},Object(S.u)("$__createdAt"),": ",Object(S.k)(d.created_at)):a.a.createElement(a.a.Fragment,null),a.a.createElement(Oe.a,{label:Object(S.u)(R&&R.fieldsTitle&&R.fieldsTitle.name?R.fieldsTitle.name:"$__titleOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.name?d.name:"",placeholder:Object(S.u)(R&&R.fieldsTitle&&R.fieldsTitle.placeholder&&R.fieldsTitle.placeholder.name?R.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("name")>-1))}),P>3||d.description||G?a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){M(e.target)}},value:d&&d.description?d.description:"",placeholder:Object(S.u)("$__descriptionOfCard_placeholder",1),disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.showSumValues,onChange:function(e){M({name:"showSumValues",value:!d.showSumValues})},name:"showSumValues",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__showSumValues",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireValue,onChange:function(e){M({name:"requireValue",value:!d.requireValue})},name:"requireValue",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__requireValue",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__automation",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__users",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.u)("$__automationUsersExplain",1)),a.a.createElement(vr,Object.assign({value:d.automationUsers||null,onChange:function(e){M({name:"automationUsers",value:e})}},"0"===d.step?{ignoreValues:["remove","removeAll"]}:{})),d._id&&o.cards[d._id]&&o.cards[d._id]._users&&"removeAll"!==d.automationUsers&&a.a.createElement(Dt.a,{_id:d._id,noLimit:!0,avatarSize:"33px",permission:G}),!d.automationUsers||"remove"!==d.automationUsers&&"replace"!==d.automationUsers?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.keepUserWhoCreatedActivity,onChange:function(e){M({name:"keepUserWhoCreatedActivity",value:!d.keepUserWhoCreatedActivity})},name:"keepUserWhoCreatedActivity",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__keepUserWhoCreatedActivity",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__dueDate",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__due",1)),a.a.createElement(vr,{value:d.automationDueDateType||null,onChange:function(e){M({name:"automationDueDateType",value:e})},ignoreValues:["replace","removeAll"]}),d.automationDueDateType&&"add"===d.automationDueDateType?a.a.createElement(Oe.a,{label:Object(S.u)("$__automationDueDate",1),variant:Object(S.d)("fieldVariant"),name:"automationDueDate",min:1,InputProps:{type:"number",min:1,autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},Object(S.u)("$__days","*")),onChange:function(e){var t=e.target.value||1;parseInt(t)<1&&(t=1),M({name:"automationDueDate",value:t})}},value:d&&d.automationDueDate?d.automationDueDate:1}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__tags",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__tags",1)),a.a.createElement(vr,{value:d.automationTags||null,onChange:function(e){M({name:"automationTags",value:e})},ignoreValues:["removeAll"]}),d.automationTags&&"doNotChange"!==d.automationTags?a.a.createElement(ur,{data:{values:d._tags?d._tags:[]},callBack:function(e){G&&M({name:"_tags",value:e})},disabled:!(G&&"completed"!==d.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.u)("$__selectTheOptions",1)}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__icon",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__setThisIconWhenAdd",1)),a.a.createElement("div",{className:r.switch,style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!!d.setIcon,onChange:function(e){M({name:"setIcon",value:d.setIcon?null:d.icon?d.icon:"fiber_new"})},name:"changeIcon",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__changeIconWhenReceiveCardTo",1)),d.setIcon?a.a.createElement(br.a,{icon:d.setIcon?d.setIcon:d.icon?d.icon:"fiber_new",color:Object(S.d)("colorText"),onChange:function(e){M({name:"setIcon",value:e})},size:"25px",style:{marginRight:7}}):a.a.createElement(a.a.Fragment,null))))),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===d._parent&&"step"===l.a.getState().db.cards[e].type&&!l.a.getState().db.cards[e].deleted})).length===parseInt(d.step)+1?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.u)("$__onConcludedStepMoveTo",1)),a.a.createElement("div",{className:r.switch},D&&D===d.onConcludedStepMoveTo?a.a.createElement(k.a,{title:Object(S.u)("$__selectTarget",1),text:Object(S.u)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){N(null)},size:"14px",textSize:"14px"}):a.a.createElement("div",null,a.a.createElement(gr,{onSelect:function(t){l.a.getState().db.cards[t._id]||Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"parents",idRel:t._id}),N(t._id)},ignoreTypes:["chatGroup"],types:["plan","guideline","guidelineC","guidelineD","guidelineE","guidelineR","objective","goal","step"]}),D&&D!==d.onConcludedStepMoveTo?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(k.a,{title:Object(S.u)("$__cancel",1),text:Object(S.u)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){M({name:"onConcludedStepMoveTo",value:(null===d||void 0===d?void 0:d.onConcludedStepMoveTo)||null})}}),a.a.createElement(k.a,{title:Object(S.u)("$__save",1),text:Object(S.u)("$__save",1),color:Object(S.d)("menu"),icon:"check",onClick:function(){M({name:"onConcludedStepMoveTo",value:D})}})):a.a.createElement(a.a.Fragment,null)),d.onConcludedStepMoveTo&&D===d.onConcludedStepMoveTo&&l.a.getState().db.cards[d.onConcludedStepMoveTo]?a.a.createElement(a.a.Fragment,null,a.a.createElement(pt.a,{id:d.onConcludedStepMoveTo,showLegend:!0,legend:Object(S.u)("$__target")})):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__status",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__changeStatusTo",1)),a.a.createElement(vr,{value:d.automationStatusType||null,onChange:function(e){M({name:"automationStatusType",value:e})},ignoreValues:["add","remove","removeAll"]}),d.automationStatusType&&"doNotChange"!==d.automationStatusType?a.a.createElement(ze.a,{id:"combo-box-demo",options:o.status,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"automationStatus",disableClearable:!0,value:d&&d.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(d.automationStatus)}))[0]:o.status[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__status",1),variant:Object(S.d)("fieldVariant"),value:d&&d.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(d.automationStatus)}))[0]:o.status[0]}))},onChange:function(e,t){(G||"0"!==String(P))&&M({name:"automationStatus",value:t.value})}}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.u)("$__automationApprovalExplain",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireApproval,onChange:function(e){M({name:"requireApproval",value:!d.requireApproval})},name:"requireApproval",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__requireApproval",1)),d.requireApproval?a.a.createElement(Dt.a,{_id:d._id,selected:"",noLimit:!0,avatarSize:"33px",permission:G,customDefine:{name:"approvalResponsible",icon:"gavel"}}):a.a.createElement(a.a.Fragment,null)),"0"===d.step&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.u)("$__showInPanel",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.showInPanel,onChange:function(e){M({name:"showInPanel",value:!d.showInPanel})},name:"showInPanel",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__permitOpenTicketInPanel",1)),d.showInPanel?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(we.a,{data:{values:d.showGroups||[],_id:d._id},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){M({name:"showGroups",value:e})}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(ze.a,{id:"combo-box-demo",options:Object.keys(l.a.getState().forms).sort((function(e,t){return l.a.getState().forms[e].name<l.a.getState().forms[t].name?-1:l.a.getState().forms[e].name>l.a.getState().forms[t].name?1:0})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}})),getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"form",value:d&&d.form?Object.keys(l.a.getState().forms).filter((function(e){return d.form&&l.a.getState().forms[e]._id===d.form})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__form",1),variant:Object(S.d)("fieldVariant"),value:d&&d.form?Object.keys(l.a.getState().forms).filter((function(e){return d.form&&l.a.getState().forms[e]._id===d.form})).map((function(e){return{label:l.a.getState().forms[e].name,value:String(l.a.getState().forms[e]._id)}}))[0]:null}))},onChange:function(e,t){M({name:"form",value:t&&t.value?String(t.value):null})}})),a.a.createElement(Oe.a,{label:Object(S.u)("$__shortCutTitle",1),variant:Object(S.d)("fieldVariant"),name:"shortCutTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutTitle?d.shortCutTitle:"",placeholder:Object(S.u)("$__shortCutTitlePlaceholder")}),a.a.createElement(Oe.a,{label:Object(S.u)("$__shortCutDescription",1),variant:Object(S.d)("fieldVariant"),name:"shortCutDescription",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"toc"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutDescription?d.shortCutDescription:"",placeholder:Object(S.u)("$__shortCutDescriptionPlaceholder",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__shortCutButtonToAdd",1),variant:Object(S.d)("fieldVariant"),name:"shortCutButtonToAdd",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){M(e.target)}},value:d&&d.shortCutButtonToAdd?d.shortCutButtonToAdd:"",placeholder:Object(S.u)("$__shortCutButtonToAddPlaceholder")}),a.a.createElement("div",{className:r.switch},a.a.createElement(Te.a,{checked:!!d.requireDescription,onChange:function(e){M({name:"requireDescription",value:!d.requireDescription})},name:"requireDescription",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__requireDescription",1))):a.a.createElement(a.a.Fragment,null))))))})));var _r=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=e.classes,r=l.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1];return a.a.useEffect((function(){"link"===n.type&&"new"===n._id&&s(!0)}),[r.data.id]),a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{save:c?function(){}:null,saveClose:c?function(){}:null,close:function(){}}),a.a.createElement("div",{className:t.root},a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__integration",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__useIdToFeelFlowIdIntegration",1)),a.a.createElement("div",{style:{fontSize:14,fontWeight:"bold",color:"blue"}},n._id))))}))),Or=r(137),wr=r(64),jr=Object(B.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}},sm:{width:e.spacing(3),height:e.spacing(3)},md:{width:e.spacing(5),height:e.spacing(5)},lg:{width:e.spacing(7),height:e.spacing(7)}}}));function Er(e){var t=jr(),r=Object(p.a)({},e);return r.title&&delete r.title,e.title?a.a.createElement(Kt.a,{title:e.title},a.a.createElement(at.a,Object.assign({},r,{className:t[e.size]}),e.children)):a.a.createElement(at.a,Object.assign({},r,{className:t[e.size]}),e.children)}function kr(){kr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Sr=Object(u.b)((function(e){return{history:e.db.history,showPrivate:e.controls.lockPrivate,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,c=l.a.getState().db,s=a.a.useState(e.data),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),y=b[0],v=b[1];a.a.useEffect((function(){0===e.unlockedPrivates&&v(!1)}),[e.unlockedPrivates]);var x=d.name.split("."),_=x[x.length-1];"blob"===d.name&&(d.name="".concat(Object(S.u)("$__coverImage","*"),".jpg"),_="jpg");var O="attachment";l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&(O=l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(d.file));var w=function(){var e=Object(f.a)(kr().mark((function e(t){return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{i.emit("data",{module:"node",method:"put",action:"update"},Object(p.a)({_id:d._id},t),Object(f.a)(kr().mark((function e(){return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(Object(p.a)(Object(p.a)({},d),t));case 1:case"end":return e.stop()}}),e)}))))}catch(r){console.log(r)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j="img";return c.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&c.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].viewer&&(j=c.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},d.in&&d.in.private&&!e.showPrivate&&!y?a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",justifyContent:"center",backgroundColor:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,display:"flex"}},a.a.createElement(re.a,{icon:"lock",size:"17px"})):a.a.createElement(a.a.Fragment,null,"string"===typeof O&&-1===O.indexOf("https")&&-1===O.indexOf("svg")?a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox()}},a.a.createElement(re.a,{icon:O,size:"33px"})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",backgroundImage:'url("'.concat(O,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",borderRadius:7,cursor:"pointer"},onClick:function(t){e.openLightBox&&e.openLightBox(),t.stopPropagation(),t.preventDefault()}})),a.a.createElement("div",{style:{display:"flex",paddingLeft:15,alignItems:"center",maxWidth:"calc(100% - 40px)",width:"100%"}},d.in&&d.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===d.in.db&&d.in._id===o._id?a.a.createElement("div",null,a.a.createElement(Er,{alt:d.createdBy.name,src:d.createdBy.image,style:{width:"21px",height:"21px"}},d.createdBy.name)):a.a.createElement(a.a.Fragment,null),"User"===d.in.db&&d.in._id!==o._id?a.a.createElement("div",null,a.a.createElement(Er,{alt:d.in.name,src:d.in.image,style:{width:"21px",height:"21px"}},d.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(wr.a,{private:!(!d.in||!d.in.private||l.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},title:"".concat("User"===d.in.db?"".concat(Object(S.u)("$__chatWithUser","*")," - ").concat(d.in._id!==o._id?"".concat(d.in.name):"".concat(d.createdBy.name)):"chatGroup"===d.in.type?"".concat(Object(S.u)("$__chatGroup","*")," - ").concat(d.in.name):"User"!==d.in.db&&"chatGroup"!==d.in.type?"".concat(d.in.name):""),icon:"User"===d.in.db||"chatGroup"===d.in.type?null:d.in.type&&c&&c.dataType&&c.dataType.filter((function(e){return e.name===d.in.type}))[0]&&c.dataType.filter((function(e){return e.name===d.in.type}))[0].icon||"$__topic",color:Object(S.d)("medium"),style:{padding:"7px",minHeight:"21px !important",textAlign:"left"},textStyle:!0}),a.a.createElement("span",{style:{marginRight:7}},"/")),a.a.createElement(wr.a,{private:!(!d.in||!d.in.private||l.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){console.log(t,t);var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),v(!!t),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,privateTitle:Object(S.u)("$__privateFile"),title:d.name,value:d.name.replace(".".concat(_),""),searchText:e.searchText?e.searchText:null,color:e.dark?Object(S.d)("lightgray"):Object(S.d)("gray"),editable:!!e.admin,dark:!!e.dark,inputStyle:e.dark?{backgroundColor:"rgba(250,250,250,0.8)",borderRadius:7}:null,textStyle:{fontSize:12,fontWeight:"normal"},searchTextStyle:Object(p.a)({fontSize:12},e.dark?{color:"#FFFFFF"}:{}),style:{minHeight:"21px !important"},onEdit:e.admin?function(e){w({name:"".concat(e,".").concat(_)})}:null}))),"audio"===j&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},a.a.createElement(ie.a,{src:"https://machen.azureedge.net/".concat(d.file),controls:!0})),d.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"57px",clear:"both"}},d.in&&!d.in.private?a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},Object(S.u)("$__sendedBy"),":"),a.a.createElement(Er,{alt:d.createdBy.name,src:d.createdBy.image,style:{width:"15px",height:"15px"}},d.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},d.createdBy.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement("span",{style:{marginLeft:3}},Object(S.k)(d.created_at)))),e.showParent&&(d.timelineId||d.message)&&(c.cards[d.cardId]&&r[d.cardId]&&r[d.cardId][d.timelineId]||d.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(Or.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:c.cards[d.cardId]&&r[d.cardId]&&r[d.cardId][d.timelineId]?r[d.cardId][d.timelineId]:d.message,db:"cards",nodeId:d.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&d.cardId&&c.cards[d.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(ut.a,{db:"cards",cardId:d.cardId,showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))}));function Lr(){Lr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Cr,Ir=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState([]),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(""),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useState(0),k=Object(m.a)(E,2),L=k[0],C=k[1],I=[];a.a.useEffect((function(){return x(!0),function(){s([])}}),[e.nodeId]),a.a.useEffect((function(){x(!0)}),[L]),a.a.useEffect((function(){v&&T()}),[v]);var T=function(){var t=Object(f.a)(Lr().mark((function t(){var n,a;return Lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h){t.next=5;break}return t.next=3,pr({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:L});case 3:(n=t.sent)&&(n.length<20&&g(!0),a=Array.from(c),n.forEach((function(e){0===a.filter((function(t){return t&&t.data&&e&&e.data&&t.data._id===e.data._id})).length&&a.push(e)})),s(a),x(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:I,file:t})};return a.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!w&&c.length>10||w)&&a.a.createElement("div",{style:{position:"relative",padding:"10px"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__fileNameSearch",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"find_in_page"})),onChange:function(e){j(e.target.value)}},value:Object(S.q)(w).toLowerCase(),placeholder:Object(S.u)("$__fileNameSearch")})),a.a.createElement("div",{style:{position:"absolute",bottom:0,top:c&&c.length>10?63:0,padding:15,left:0,right:0},id:"sideModule_files_list"},a.a.createElement("legend",{style:{display:"flex",alignItems:"center",color:e.dark?Object(S.d)("color"):Object(S.d)("menu"),fontSize:14}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"folder_open",title:Object(S.u)("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Object(S.u)("$__files","*")),a.a.createElement("ul",{id:"filesList_".concat(e.nodeId),style:{listStyle:"none",padding:"0px",position:"absolute",bottom:0,top:33,overflowY:"auto",overflowX:"hidden",left:15,right:15},onScroll:e.horizontal?null:function(t){!function(t){var r=document.getElementById("filesList_".concat(e.nodeId));r.scrollTop+window.innerHeight+150>r.scrollHeight&&!v&&C(L+1)}()}},c&&c.length>0&&c.filter((function(e){return!w||""===w||w&&e.data.name.toLowerCase().indexOf(w.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,o){I.push(t.data);var i=Object(p.a)(Object(p.a)({},t.data),{},{createdBy:t.createdBy}),c=!1;return(i.createdBy&&i.createdBy._id===n._id||e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[n._id]&&r.cards[e.nodeId]._users[n._id].access>2)&&(c=!0),a.a.createElement("li",{key:t.data._id,onClick:c?null:function(e){F(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},a.a.createElement(Sr,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:w,openLightBox:function(){F(t.data._id)}}))})),(c.length>0||v)&&!h?a.a.createElement("li",{style:{width:"100%",textAlign:"center",position:"relative",float:"left",color:e.dark?Object(S.d)("color"):Object(S.d)("menu")}},a.a.createElement(ct.a,null),Object(S.u)("$__checkingFiles","*")):0!==c.length||v?a.a.createElement(a.a.Fragment,null):Object(S.u)("$__hasNoFiles","*"))))}));function Tr(){Tr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Fr=j.b.div(Cr||(Cr=Object(d.a)(["\n background-color:none;\n "]))),Dr=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=l.a.getState().functions.socket,n=window.location.hash.split("/");n[0]=n[0].replace("#",""),36!==n[0].length&&(n[0]=null);var o=Object.keys(l.a.getState().db.cards).filter((function(t){return!(l.a.getState().db.cards[t].deleted||l.a.getState().db.cards[t].checklist||!l.a.getState().db.cards[t]._recurrenceId||l.a.getState().db.cards[t]._parent!==e.nodeId)})).map((function(e){return e})),i=function(){var n=Object(f.a)(Tr().mark((function n(a){var o,i,c,s,u,d;return Tr().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=Object.keys(l.a.getState().db.cards).filter((function(t){return!(!l.a.getState().db.cards[t]||!l.a.getState().db.cards[t].checklist||l.a.getState().db.cards[t]._parent!==e.nodeId)})).sort((function(e,r){return t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)<parseInt(t.cards[r].order.low)?-1:t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)>parseInt(t.cards[r].order.low)?1:0})).map((function(e){return e})),i=a.destination,c=a.source,s=a.draggableId,i){n.next=4;break}return n.abrupt("return",!1);case 4:if(i.droppableId!==c.droppableId||i.id!==c.index){n.next=6;break}return n.abrupt("return",!1);case 6:return(u=o).splice(c.index,1),u.splice(i.index,0,s),r.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),d={},u.map((function(e,r){return d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,t.cards[e])),d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},d[e]),{},{order:{low:"".concat(r+1)}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),d)})),n.abrupt("return");case 14:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ar.a,{onDragEnd:i},a.a.createElement(ar.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,r){return a.a.createElement(Fr,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:r.isDraggingOver}),o.sort((function(e,r){return t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)<parseInt(t.cards[r].order.low)?-1:t.cards[e].order&&t.cards[r].order&&String(t.cards[e].order.low)&&String(t.cards[r].order.low)&&parseInt(t.cards[e].order.low)>parseInt(t.cards[r].order.low)?1:0})).map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement(ut.a,{provided:t,snapshot:r,cardId:e,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))})),Nr=r(479),Ar=r(78),Pr=function(e){return{root:{transform:"translateZ(0px)",flexGrow:1,zIndex:1e3,height:"100vh"},speedDial:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2),"& .MuiFab-root":{backgroundColor:Object(S.d)("color"),color:Object(S.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"}},speedDialInvisible:{right:e.spacing(2),bottom:"-60px",position:"absolute","& .MuiFab-root":{backgroundColor:Object(S.d)("color"),color:Object(S.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiButtonBase-root":{}}}};function $r(){$r=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Mr=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Pr)((function(e){var t=e.classes,r=a.a.useState({name:"plan"}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(null),s=Object(m.a)(c,2),u=s[0],d=s[1],h=l.a.getState(),g=h.db,b=h.session,y=g.cards,v=l.a.getState().sideModule.data;a.a.useEffect((function(){Object(f.a)($r().mark((function t(){return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.a)(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var x=a.a.useRef(null),_=[];g.dataType.filter((function(e){return e.sendTo})).forEach((function(e){_.push({name:e.name})}));var O=g.users[Object.keys(g.users).find((function(e){return e.indexOf(b._id)>-1}))]._access,w=0;b._id&&g.cards[v._id]&&g.cards[v._id]._users&&g.cards[v._id]._users[Object.keys(g.cards[v._id]._users).find((function(e){return e.indexOf(b._id)>-1}))]&&(w=g.cards[v._id]._users[Object.keys(g.cards[v._id]._users).find((function(e){return e.indexOf(b._id)>-1}))]);var j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=y;E=Object.keys(E).filter((function(e){return!(E[e].archived||E[e].deleted||!(E[e]._users&&E[e]._id!==v._id&&E[e]._users[b._id]&&parseInt(E[e]._users[b._id].access)>2||O&&(O.owner||O.planAdmin||O.planModerate)||w&&w.access&&parseInt(w.access)>2))})).map((function(e){return E[e]})),o&&(E=Object.keys(E).filter((function(e){return!(!E[e]||!E[e].type||E[e].type!==o.name)})).map((function(e){return E[e]}))),E=Object.keys(E).filter((function(e){return v.type&&E[e].type&&g.dataType.filter((function(e){return e.name===v.type}))&&g.dataType.filter((function(e){return e.name===v.type})).length>0&&g.dataType.filter((function(e){return e.name===v.type}))[0].sharedIn&&(g.dataType.filter((function(e){return e.name===v.type}))[0].sharedIn.copy.indexOf(E[e].type)>-1||g.dataType.filter((function(e){return e.name===v.type}))[0].sharedIn.attach.indexOf(E[e].type)>-1||g.dataType.filter((function(e){return e.name===v.type}))[0].sharedIn.shared.indexOf(E[e].type)>-1)})).map((function(e){return E[e]}));var k=function(){var t=Object(f.a)($r().mark((function t(){var r;return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={_id:Object(Nr.a)(),cardId:v._id,idRel:u,_parent:u,type:"comment",message:"",shared:!0},Object(Ar.h)(e,Object(p.a)(Object(p.a)({},r),{},{user:Object(p.a)({},g.users[b._id]),files:{}})),De.a.post("timeline/add",r),d(null),i({name:"plan"});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),L=function(){var t=Object(f.a)($r().mark((function t(){return $r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:v._id,newRel:u,planId:g.cards[u]._planId?g.cards[u]._planId:"plan"===g.cards[u].type?u:null,oldRel:v._parent};Object(et.d)(e,t)&&(d(null),i({name:"plan"}))}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:t.root},a.a.createElement("div",{style:{width:"100%",padding:"15px",position:"relative",clear:"both"},ref:x},u&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.u)("$__action")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return k()}},Object(S.u)("$__share","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.u)("$__AttachInCard")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return L()}},Object(S.u)("$__Attach","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){d(null)}},Object(S.u)("$__cancel","*"))))),a.a.createElement("div",{style:{width:"100%",padding:"15px"}},a.a.createElement(gr,{styles:{height:"auto",maxHeight:u?"calc(100vh - 400px)":"none"},onSelect:function(e){d(e._id)},ignoreTypes:["chatGroup"]})))}))),zr=r(117),Yr=r(155),Br=r(688),Rr=r(34),Gr=r(67),Hr=r(69),Wr=r(189),Ur=r(1888),qr=r(1879),Vr=r(1878),Jr=r(723),Xr=r(1880),Kr=r(1203);function Zr(){Zr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Qr=Object(u.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.timeline,o=a.a.useState(O()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],w=a.a.useState({}),j=Object(m.a)(w,2),E=j[0],L=j[1],C=a.a.useState({}),I=Object(m.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!0),N=Object(m.a)(D,2),P=N[0],$=N[1],M=window.location.hash.split("/");M[0]=M[0].replace("#",""),a.a.useEffect((function(){return Y(),function(){}}),[]),a.a.useEffect((function(){z()}),[e.cards]);var z=function(){var t=Object(f.a)(Zr().mark((function t(){var r;return Zr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.s)(e.nodeId);case 2:r=t.sent,F(r);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var t=Object(f.a)(Zr().mark((function t(){return Zr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[e.nodeId],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&$(!1),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0),$(!1);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),B={},R={},G=0,H=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object(S.u)("$__seconds",1)),r="".concat(e,"s");else if(e>3600){var a=Math.trunc(e/3600);e-=3600*a;var o=Math.trunc(e/60)>0?Math.trunc(e/60):0,i=(e-=60*o)>0?e:0;r="".concat(a," ").concat(Object(S.u)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(S.u)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(S.u)("$__seconds",1)):""),n="".concat(a,"H ").concat(o,"M ").concat(i," S")}else{var c=Math.trunc(e/60)>0?Math.trunc(e/60):0,l=(e-=60*c)>0?e:0;r="".concat(c," ").concat(Object(S.u)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(S.u)("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r};Object.keys(T).filter((function(e){return n[e]&&Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type})).length>0})).forEach((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).forEach((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0?Object.keys(n[e][t]._toUser).forEach((function(r){R=Object(p.a)(Object(p.a)({},R),{},Object(h.a)({},r,Object(p.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})):R=Object(p.a)(Object(p.a)({},R),{},Object(h.a)({},n[e][t].user._id,Object(p.a)({},n[e][t].user)))})),Object.keys(n[e]).filter((function(t){return n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(0===Object.keys(E).length||Object.keys(E).length>0&&Object.keys(E).filter((function(r){return n[e]&&n[e][t]&&n[e][t].type&&"timer"===n[e][t].type&&E[r]&&n[e][t].user&&(n[e]&&n[e][t]&&n[e][t].user&&(!n[e][t]._toUser||n[e][t]._toUser&&!n[e][t]._toUser[r])&&n[e][t].user._id===r||n[e]&&n[e][t]&&n[e][t]._toUser&&n[e][t]._toUser[r]&&n[e][t]._toUser[r]!==n[e][t].user._id)})).length>0)})).forEach((function(t){Object.keys(R).forEach((function(r){if(r&&n[e]&&n[e][t]&&"timer"===n[e][t].type&&!n[e][t].deleted&&(parseInt(n[e][t].ini)>=O()("".concat(c," 00:00:01")).unix("X")||0===parseInt(n[e][t].ini))&&parseInt(n[e][t].fin)<=O()("".concat(g," 23:59:59")).unix("X")&&(n[e][t].user&&n[e][t].user._id===r&&n[e][t]._toUser&&0===Object.keys(n[e][t]._toUser).length||n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0&&n[e][t]._toUser[r])){G+=parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var a=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),o=a=B&&B[r]&&B[r].totalTimer?parseInt(B[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini)):parseInt(n[e][t].fin)-parseInt(n[e][t].ini),i="",l="";if(a<60)i="".concat(o," ").concat(Object(S.u)("$__seconds",1)),i="".concat(o,"s");else if(a>3600){var s=Math.trunc(o/3600);o-=3600*s;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,d=(o-=60*u)>0?o:0;i="".concat(s," ").concat(Object(S.u)("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Object(S.u)("$__minutes",1)," ").concat(d>0?"".concat(d," ").concat(Object(S.u)("$__seconds",1)):""),l="".concat(s,"H ").concat(u,"M ").concat(d," S")}else{var f=Math.trunc(o/60)>0?Math.trunc(o/60):0,m=(o-=60*f)>0?o:0;i="".concat(f," ").concat(Object(S.u)("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Object(S.u)("$__seconds",1)):""),l="".concat(f,"M ").concat(m," S")}B=Object(p.a)(Object(p.a)({},B),{},Object(h.a)({},r,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},B[r]?B[r]:{}),R[r]?R[r]:{}),B&&B[r]&&B[r].totalTimer?{totalTimer:parseInt(B[r].totalTimer)+(parseInt(n[e][t].fin)-parseInt(n[e][t].ini))}:{totalTimer:parseInt(n[e][t].fin)-parseInt(n[e][t].ini)}),{},{timerText:i,timerTextMini:l,_times:Object(p.a)(Object(p.a)({},B[r]&&B[r]._times?B[r]._times:{}),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var W=function(e){return a.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Kt.a,{title:e.data.name},a.a.createElement(at.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu"),width:"33%",minWidth:"150px"}},e.data.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu")}},e.data.timerText))};return a.a.createElement(Gr.a,null,a.a.createElement(ge.a,{title:Object(S.u)("$__timeSheet",1),icon:"update",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[!x&&{title:"$__timeSheetExport",icon:"file_download",color:Object(S.d)("colorText"),onClick:function(){_(!x)}}]}),P?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},a.a.createElement(fe.a,null)):a.a.createElement(a.a.Fragment,null),x&&a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},a.a.createElement("legend",null,Object(S.u)("$__timeCourse",1)),a.a.createElement(Oe.a,{label:Object(S.u)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:g||null},InputProps:{autoComplete:"new-password",onChange:function(e){s(e.target.value)}},value:c}),a.a.createElement(Oe.a,{label:Object(S.u)("$__endDate",1),variant:Object(S.d)("fieldVariant"),name:"endDate",type:"date",min:c||null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)}},value:g})),r.users&&Object.keys(r.users).length>0&&a.a.createElement(Ur.a,{style:{width:"100%"}},a.a.createElement(Vr.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(re.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"12px"}},Object(S.u)("$__users"),a.a.createElement(Jr.a,{max:6},Object.keys(E).length>0&&Object.keys(E).map((function(e,t){return a.a.createElement(Kt.a,{title:r.users[e].name,key:t},a.a.createElement(at.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(qr.a,{style:{minWidth:"100%"}},a.a.createElement(Kr.a,null,Object.keys(R).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Xr.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(at.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),a.a.createElement(Yr.a,{checked:!(!E||!E[e]),onChange:function(){!function(e){E[e]&&Object.keys(E).filter((function(e){return E[e]})).length<=1?L({}):L(Object(p.a)(Object(p.a)({},E),{},Object(h.a)({},e,!E[e])))}(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},a.a.createElement(Br.a,{data:B}),a.a.createElement(k.a,{title:Object(S.u)("$__closeFilter"),text:Object(S.u)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){_(!x)},size:"25px"}))),a.a.createElement(Wr.a,{style:{height:"333px"}},a.a.createElement(zr.a,{data:Object(A.a)(Object.keys(B).sort((function(e,t){return parseInt(B[e].totalTimer)>parseInt(B[t].totalTimer)?-1:parseInt(B[e].totalTimer)<parseInt(B[t].totalTimer)?1:0})).map((function(e,t){return{id:B[e].name,label:B[e].name,value:B[e].totalTimer,color:"#929497",textMini:B[e].timerText}}))),valueFormat:function(e){return H(e,!0),H(e)},enableArcLabels:!1,colors:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!0,innerRadius:.5,leavesOnly:!0,margin:{top:10,right:0,bottom:10,left:0},padAngle:1.3,sortByValue:!0}),a.a.createElement("div",{style:{width:"100px",wordWrap:"break-word",position:"absolute",top:"33%",left:"calc(50% - 50px)",fontWeight:"bold",color:Object(S.d)("menu"),textAlign:"center"}},H(G,!0))),a.a.createElement(Hr.a,null,a.a.createElement(Rr.a,null,Object.keys(B).sort((function(e,t){return parseInt(B[e].totalTimer)>parseInt(B[t].totalTimer)?-1:parseInt(B[e].totalTimer)<parseInt(B[t].totalTimer)?1:0})).map((function(e,t){return a.a.createElement(W,{data:B[e],key:e})})),a.a.createElement(W,{data:{name:Object(S.u)("$__total"),timerText:H(G)}}))),a.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[e.nodeId]&&"plan"===r.cards[e.nodeId].type?Object(S.u)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(S.u)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),en=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},data:{marginTop:"10px",padding:"10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},timeline:{position:"absolute",width:"100%",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};var tn=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(en)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.sideModule,i=r.session,c=o.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],p=u[1],f=a.a.useState(l.a.getState().db.cards[c._id]._users[i._id]?"timeline":"chart"),h=Object(m.a)(f,2),g=h[0],b=h[1],y=window.location.hash.split("/");y[0]=y[0].replace("#","");var v=n.cards[c._id]._timeline||{};return v=Object.keys(v).filter((function(e){return"kpi"===v[e].type})).map((function(e){return v[e]})),a.a.createElement("div",null,!d&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==g&&l.a.getState().db.cards[c._id]._users[i._id]&&a.a.createElement(k.a,{title:Object(S.u)("$__add"),text:Object(S.u)("$__add"),icon:"more_time",size:"25px",onClick:function(){p(!0)}}),"chart"!==g&&a.a.createElement(k.a,{title:Object(S.u)("$__showChart"),text:Object(S.u)("$__showChart"),icon:"analytics",size:"25px",onClick:function(){b("chart")}}),"timeline"!==g&&a.a.createElement(k.a,{title:Object(S.u)("$__showTimeline"),text:Object(S.u)("$__showTimeline"),icon:"timeline",size:"25px",onClick:function(){b("timeline")}})),"chart"===g&&a.a.createElement("div",{style:{width:"calc(100% - 30px)",marginLeft:"15px"}},a.a.createElement(Qr,{nodeId:c._id})),(d||"timeline"===g)&&a.a.createElement("div",{style:{position:"absolute",top:35,left:0,right:0,bottom:0}},a.a.createElement(xe.a,{nodeId:c._id,type:"timer",db:"cards",disabledSend:!0,loadTimeline:!0,noSearch:!0})),d&&a.a.createElement("div",{className:t.timeline,style:{top:"0px",zIndex:100,backgroundColor:"#FFFFFF"}},a.a.createElement(Bt.a,{data:c,manualAdd:!0,callBack:function(){p(!1)}})))})));function rn(){rn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var nn=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.sideModule,n=t.db,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(null),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(0),w=Object(m.a)(O,2),j=w[0],E=w[1],k=a.a.useState(""),L=Object(m.a)(k,2),C=L[0],I=L[1],T=r.data||{};a.a.useEffect((function(){return"user"===T.type?D():b(!1),function(){}}),[]);var F=function(){var t=Object(f.a)(rn().mark((function t(){return rn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.d)(T._id),Object(S.f)(e,{_id:T._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var e=Object(f.a)(rn().mark((function e(){var t;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,Pe.a.post("/Card_Count",{id:T._id,all:!0,rel:"INN",node:"User"});case 3:(t=e.sent)&&(b(!1),E(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=Object(f.a)(rn().mark((function e(){var t;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,De.a.post("/user/migrateActivities",{from:T._id,fromData:T,to:[x],toData:n.users[x]});case 4:e.sent&&(s(!0),t=Object(p.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[T._id]})).forEach((function(e){t[e]._users[x]||(t[e]._users=Object(p.a)(Object(p.a)({},t[e]._users),{},Object(h.a)({},x,{access:t[e]._users[T._id].access,_id:x}))),delete t[e]._users[T._id]})),b(!1)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0),setTimeout((function(){N()}),3e3);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ye,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),T._id&&n.users[T._id]&&("client"===n.users[T._id].type||"group"===n.users[T._id].type||"sic"===n.users[T._id].type||"unity"===n.users[T._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===T._id})).length>0?Object(S.u)("$__delete".concat(n.users[T._id].type,"WithUsersDescription"),1):Object(S.u)("$__delete".concat(n.users[T._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deleteThisDescription",1)),a.a.createElement(nt,{onClick:function(){F()}},Object(S.u)("$__deleteThis",1))),T._id&&n.users[T._id]&&"user"===n.users[T._id].type&&a.a.createElement(a.a.Fragment,null,g?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,j>0&&!c?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},j," ",Object(S.u)("$__items"),a.a.createElement("br",null),Object(S.u)("$__deleteCountCardsExplain"))),x?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(null)}},a.a.createElement(at.a,{alt:n.users[x].name,src:n.users[x].image||null,style:{marginRight:"15px"}},n.users[x].name.substr(0,1)),a.a.createElement("span",null,n.users[x].name)),a.a.createElement(nt,{onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.u)("$__confirm"),text:Object(S.u)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){N()}},{shadow:!0,title:Object(S.u)("$__cancel"),text:Object(S.u)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.u)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.u)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(Oe.a,{label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:C,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){I(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==T._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!T._parent&&!n.users[e]._parent||T._parent&&n.users[e]._parent===T._parent)&&(!C||C&&n.users[e].name.toLowerCase().indexOf(C.toLowerCase().trim())>-1)})).sort((function(e,t){var r=n.users[e].name.toLowerCase(),a=n.users[t].name.toLowerCase();return r<a?-1:r>a?1:0})).map((function(e){return a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(e)},key:e},a.a.createElement(at.a,{alt:n.users[e].name,src:n.users[e].image||null,style:{marginRight:"15px"}},n.users[e].name.substr(0,1)),a.a.createElement("span",null,n.users[e].name))}))),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deactivateWhithoutMigration",1)),a.a.createElement(nt,{onClick:function(){F()}},Object(S.u)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.u)("$__deactivateUserDescription",1)),a.a.createElement(nt,{onClick:function(){F()}},Object(S.u)("$__deactivateThis",1)))),g?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(be.a,null)):a.a.createElement(a.a.Fragment,null)))})),an=r(19),on=r(1971),cn=Object(B.a)({root:{"&:hover":{backgroundColor:"transparent"}},icon:{borderRadius:"50%",width:16,height:16,boxShadow:"inset 0 0 0 1px ".concat(Object(S.d)("color",.2),", inset 0 -1px 0 ").concat(Object(S.d)("color",.1)),backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))","$root.Mui-focusVisible &":{outline:"2px auto ".concat(Object(S.d)("color",.6)),outlineOffset:2},"input:hover ~ &":{backgroundColor:"#ebf1f5"},"input:disabled ~ &":{boxShadow:"none",background:"rgba(206,217,224,.5)"}},checkedIcon:{backgroundColor:Object(S.d)("color",1),backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"radial-gradient(#fff,#fff 28%,transparent 32%)",content:'""'},"input:hover ~ &":{backgroundColor:Object(S.d)("color",1)}}});var ln=function(e){var t=cn();return a.a.createElement(on.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:a.a.createElement("span",{className:Object(an.default)(t.icon,t.checkedIcon)}),icon:a.a.createElement("span",{className:t.icon})},e))},sn=r(1959),un=function(e){return{root:{position:"relative",float:"left",width:"calc(100% - 20px)",margin:"10px"},user:{position:"relative",width:"calc(100% - 20px)",margin:"10px",float:"left",height:"50px"},avatar:{position:"absolute",left:"-5px",top:"0px",border:"1px solid ".concat(Object(S.d)("color")),width:"57px",height:"57px",borderRadius:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"#FFFFFF"},name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px",paddingRight:"7px",fontWeight:"bold",fontSize:"12px",color:Object(S.d)("darkText"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.1)"},access:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"12px",color:Object(S.d)("color"),boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)"},accessEditing:{position:"absolute",top:"33px",left:"0px",right:"0px",height:"auto",minHeight:"290px",padding:"7px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",paddingTop:"15px",paddingLeft:"16px",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}},btActions:{position:"absolute",right:"7px",top:"7px",display:"flex"},switch:{fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium")},accessDescription:{fontSize:"12px",color:Object(S.d)("medium")}}},dn=r(1146),pn=r.n(dn);function fn(){fn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var hn=Object(u.b)((function(e,t){return{users:e.db.users,cardUsers:e.db.cards[e.sideModule.data._id]}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(un)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.db,i=n.sideModule,c=n.session,s=a.a.useState({id:null}),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useState("users"),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState(""),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),F=T[0],D=T[1],N=o.cards[i.data._id],P=(null===(t=o.cards[N._planId])||void 0===t?void 0:t.client)||null,$=Object(p.a)({},o.users),M=Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},N&&N._users?Object(p.a)({},N._users):{}),N._parent&&o.cards[N._parent]&&o.cards[N._parent]._users?Object(p.a)({},o.cards[N._parent]._users):{}),N._planId&&o.cards[N._planId]&&o.cards[N._planId]._users?Object(p.a)({},o.cards[N._planId]._users):{}),$),z=Array.from(l.a.getState().db.userGroup),Y=window.location.hash.split("/");Y[0]=Y[0].replace("#","");var B=Object(S.j)(),R=N&&N._id&&o.cards[N._id]&&o.cards[N._id]._users&&Object.keys(o.cards[N._id]._users).length>0?o.cards[N._id]._users[Object.keys(o.cards[N._id]._users).find((function(e){return e.indexOf(c._id)>-1}))]:0;if(!i||!i.data)return null;var G=function(){var t=Object(f.a)(fn().mark((function t(r,n,a){var c,l;return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=1,N&&"plan"===N.type&&(c=3),n?c=n:N._planId&&o.cards[N._planId]&&o.cards[N._planId]._users&&o.cards[N._planId]._users[r]&&o.cards[N._planId]._users[r].access&&(c=N._parent&&o.cards[N._parent]&&o.cards[N._parent]._users&&o.cards[N._parent]._users[r]&&o.cards[N._parent]._users[r].access&&parseInt(o.cards[N._parent]._users[r].access)>parseInt(o.cards[N._planId]._users[r].access)?parseInt(o.cards[N._parent]._users[r].access):parseInt(o.cards[N._planId]._users[r].access)),l=!!(o.cards[i.data._id]&&o.cards[i.data._id]._users&&o.cards[i.data._id]._users[r]),t.next=6,Object(ke.b)(e,r,c,i.data._id,l,a);case 6:if(!t.sent){t.next=11;break}return v(!1),h({_id:null}),t.abrupt("return",!0);case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),H=function(){var t=Object(f.a)(fn().mark((function t(r){return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ke.j)(e,r,i.data._id);case 2:if(!t.sent){t.next=7;break}return v(!1),h({_id:null}),t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var t=Object(f.a)(fn().mark((function t(r,n){return fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,De.a.put("cards/removeAccess/",{cardId:i.data._id,userIds:[r]});case 2:t.sent&&(n&&e.reduxFunction("ASYNC","CLEAR_MODULE"),v(!1),h({_id:null}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!N)return null;$=$&&Object.keys($).length>0&&Object.keys($).filter((function(e){return e&&N&&N._users&&N._users[$[e]._id]&&!N._users[$[e]._id].deleted})).sort((function(e,t){return e.name<t.name?-1:0})).map((function(e){return $[e]})),M=(M=Object.keys(M).filter((function(e){return!(!e||M[e].type&&(!M[e].type||"client"===M[e].type||"unity"===M[e].type||"group"===M[e].type)||M[e].deleted||(P||M[e]._parent&&(!M[e]._parent||M[e]._parent!==c.account))&&(!P||(!M[e]._parent||M[e]._parent!==P&&M[e]._parent!==c.account)&&M[e]._parent))})).map((function(e){return M[e]}))).filter((function(e){return e&&(!P||P&&(e._parent===P||!e._parent))&&(!N._users||!N._users[e._id])&&(!L||L&&(e.name&&e.name.toLowerCase().indexOf(L.toLowerCase())>-1||L.indexOf(">")>-1&&e._parent&&l.a.getState().db.users&&l.a.getState().db.users[e._parent]&&l.a.getState().db.users[e._parent].name&&l.a.getState().db.users[e._parent].name.toLowerCase().indexOf(L.toLowerCase().replace(">","").trim())>-1))})).map((function(e){return e}));var U=function(){var e=Object(f.a)(fn().mark((function e(t){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.forEach((function(e){G(e._id,null,e)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=Object(f.a)(fn().mark((function e(t){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C("");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(t){return a.a.createElement("div",{className:r.user,style:{height:37}},a.a.createElement("div",{className:r.name,style:{left:0}},t.label,a.a.createElement(k.a,{transparent:!0,title:N._groups&&N._groups[t.value]?Object(S.u)("$__removeTeam"):Object(S.u)("$__addTeam"),icon:N._groups&&N._groups[t.value]?"group_remove":"group_add",size:"20px",onClick:function(){N&&(!N._groups||N._groups&&!N._groups[t.value])?H(t.value):Object(ke.k)(e,t.value,N._id)}})))},X=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=!0,s=t;t._id&&o.users[t._id]&&(s=o.users[t._id]),t.type&&"external"!==t.type||s._parent&&(!s._parent||o.users[s._parent])||(l=!1),N&&N._planId&&Object(et.B)(N._planId)&&(l=!0);var u=1;return s&&s._id&&N._users&&N._users[s._id]&&N._users[s._id].access&&(u=String(N._users[s._id].access)),a.a.createElement("div",{className:r.user},a.a.createElement("div",{className:r.name},s.name,N._users[s._id]&&N._users[s._id].isResponsible?a.a.createElement("span",{style:{fontSize:"9px",fontWeight:"normal",color:"#CCCCCC"}},Object(S.u)("$__responsible",1)):"",n&&!d._id?a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__add"),icon:"person_add",size:"20px",onClick:function(){G(s._id,null,s)}})):a.a.createElement(a.a.Fragment,null),n?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(V.a,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),options:[{name:"$__setAsResponsible",icon:"admin_panel_settings",onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.l)(e,{cardId:i.data._id,userId:s._id})}})}}].concat(Object(A.a)(l&&(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===c._id)?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){h({_id:s._id,access:u})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){Object(S.c)({message:s._id!==c._id?Object(S.u)("$__confirmRemoveUser",1):Object(S.u)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(s._id,s._id===c._id)}})}}]:[]))}))),a.a.createElement("div",{className:r.avatar,style:{backgroundImage:'url("'.concat(s.image?s.image:pn.a,'")')}},s._parent&&o.users[s._parent]&&o.users[s._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:-4,right:-7,width:22,height:22,borderRadius:"50%",backgroundImage:"url(".concat(o.users[s._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null)),n?s._parent&&o.users[s._parent]&&o.users[s._parent].name?a.a.createElement("div",{className:r.access},a.a.createElement("div",null,o.users[s._parent].name)):a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.access,style:{cursor:"pointer",paddingLeft:15,paddingRight:15,paddingTop:3,display:"block"},onClick:l?function(){(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===c._id)&&h({_id:s._id,access:u})}:null},s._parent&&o.users[s._parent]&&o.users[s._parent].name?a.a.createElement("div",{style:{position:"relative",float:"left"}},o.users[s._parent].name):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"relative",float:"right"}},"(","owner"===s._access?Object(S.u)("$__owner",1):"0"===u?Object(S.u)("$__reader",1):"1"===u?Object(S.u)("$__executioner",1):"2"===u?Object(S.u)("$__collaborator",1):"3"===u?Object(S.u)("$__leadership",1):"4"===u?Object(S.u)("$__supervisor",1):"5"===u?Object(S.u)("$__admin",1):Object(S.u)("$__reader",1),")")))};if(d&&d._id){var K=1;N._users&&N._users[d._id]&&N._users[d._id].access&&(K=String(N._users[d._id].access));var Z=N._users[d._id],Q=!1;return N&&N._planId&&Object(et.B)(N._planId)&&(Q=!0),a.a.createElement(a.a.Fragment,null,X(Z,!0),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"100%",float:"left",justifyContent:"flex-end"}},y&&a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__save"),icon:"save",color:Object(S.d)("color"),onClick:function(){G(d._id,d.access,Z)}}),$.length>1&&a.a.createElement(k.a,{transparent:!0,title:d._id!==c._id?Object(S.u)("$__removeAccess",1):Object(S.u)("$__getOut",1),icon:d._id!==c._id?"delete_forever":"logout",color:"red",onClick:function(){Object(S.c)({message:d._id!==c._id?Object(S.u)("$__confirmRemoveUser",1):Object(S.u)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(d._id,d._id===c._id)}})}}),a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__close","*"),icon:"undo",color:Object(S.d)("medium"),onClick:function(){y?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){h({_id:null}),v(!1)}}):(h({_id:null}),v(!1))}})),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:15,float:"left"}},(d._id!==c._id||B.plan&&B.planAdmin)&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement(sn.a,{defaultValue:String(K),"aria-label":"gender",name:"customized-radios",onChange:function(e){h(Object(p.a)(Object(p.a)({},d),{},{access:e.target.value})),v(!0)}},"plan"!==N.type&&(R&&parseInt(R.access)>=0||Q&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"0",control:a.a.createElement(ln,null),label:Object(S.u)("$__reader",1)}),"plan"!==N.type&&(R&&parseInt(R.access)>=1||Q&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"1",control:a.a.createElement(ln,null),label:Object(S.u)("$__executioner",1)}),"plan"!==N.type&&"chatGroup"!==N.type&&(R&&parseInt(R.access)>=2||Q&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"2",control:a.a.createElement(ln,null),label:Object(S.u)("$__collaborator",1)}),(R&&parseInt(R.access)>=3||Q&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"3",control:a.a.createElement(ln,null),label:Object(S.u)("$__leadership",1)}),"chatGroup"!==N.type&&(R&&parseInt(R.access)>=4||Q&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"4",control:a.a.createElement(ln,null),label:Object(S.u)("$__supervisor",1)}),(R&&parseInt(R.access)>=5||B&&B.plan&&Q&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xr.a,{value:"5",control:a.a.createElement(ln,null),label:Object(S.u)("$__admin",1)}))),"chatGroup"!==N.type?a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},"0"===d.access&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__readOnlyTodo",1)),a.a.createElement("li",null,Object(S.u)("$__readTimeline",1))),parseInt(d.access)>=1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__executioner",1)),a.a.createElement("li",null,Object(S.u)("$__timeSheetRegister",1)),a.a.createElement("li",null,Object(S.u)("$__interactonTheTimeline",1))),parseInt(d.access)>1&&a.a.createElement("li",null,Object(S.u)("$__ExecuteAndCreateSubTasks",1)),parseInt(d.access)>2&&a.a.createElement(a.a.Fragment,null,"plan"===i.data.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__access",1)," BRIGHT & CONNECTED"),a.a.createElement("li",null,Object(S.u)("$__access",1)," INSIGHTS")),a.a.createElement("li",null,Object(S.u)("$__updateDueDate",1)),a.a.createElement("li",null,Object(S.u)("$__updateTags",1)),a.a.createElement("li",null,Object(S.u)("$__updateIndicators",1)),a.a.createElement("li",null,Object(S.u)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.u)("$__defineResponsible",1))),parseInt(d.access)>3&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__updateData",1)),a.a.createElement("li",null,Object(S.u)("$__usersManager",1))),parseInt(d.access)>=4&&a.a.createElement(a.a.Fragment,null,"plan"===i.data.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__access",1)," MATRIX SWOT")),a.a.createElement("li",null,Object(S.u)("$__settings",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.u)("$__deleteActivity",1))):a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(d.access)>1&&a.a.createElement("li",null,Object(S.u)("$__viewAndInteract",1)),parseInt(d.access)>2&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.u)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.u)("$__update",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.u)("$__deleteGroup",1))),N._users[d._id]&&!N._users[d._id].isResponsible&&a.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__setAsResponsible"),text:Object(S.u)("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(ke.l)(e,{cardId:i.data._id,userId:d._id})}})}}))))}return a.a.createElement("div",{className:r.root},F&&a.a.createElement("div",{style:{marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(Oe.a,{id:"quickUser_Search",label:Object(S.u)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end",style:{cursor:"pointer"},onClick:function(){C(""),D(!1)}},a.a.createElement(re.a,{icon:"close"})),onChange:function(e){C(e.target.value)},onBlur:function(e){}},value:L,placeholder:Object(S.u)("$__searchByName",1),autoFocus:!0})),""!==L&&L?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__permittedUsers",1)),$&&$.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e._id},X(e))}))),N&&N._groups&&Object.keys(N._groups).length>0?a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__permittedTeams",1)),z.filter((function(e){return N._groups[e.value]})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e},J(e))}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{display:"flex"}},a.a.createElement("div",{style:{padding:7,width:"calc(50% - 4px)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"users"!==O?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:"users"!==O?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){w("users")}},a.a.createElement(re.a,{icon:"supervised_user_circle",size:"33px",color:"users"!==O?null:"#FFFFFF"}),Object(S.u)("$__showUsers"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:"users"!==O?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:"users"!==O?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){w("teams")}},a.a.createElement(re.a,{icon:"group_work",size:"33px",color:"users"!==O?"#FFFFFF":null}),Object(S.u)("$__showTeams")))),"users"===O&&M&&M.length>0&&!d._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__avaiableUsers",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__add"),icon:"person_add",text:Object(S.u)("$__addAllUsers"),size:"20px",onClick:function(){U(M)}})),M.sort((function(e,t){return e.name.toLowerCase().trim()<t.name.toLowerCase().trim()?-1:e.name.toLowerCase().trim()<t.name.toLowerCase().trim()?1:0})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e._id},X(e,!0))}))),"users"!==O&&z&&z.length>0&&!d._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.u)("$__avaiableTeams",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__add"),icon:"person_add",text:Object(S.u)("$__addAllTeams"),size:"20px",onClick:function(){q(z)}})),z.filter((function(e){return!N._groups||N._groups&&!N._groups[e.value]})).sort((function(e,t){return e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?-1:e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?1:0})).map((function(e,t){return a.a.createElement("div",{style:{width:"100%",padding:7},key:e._id},J(e))}))),F?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:0}},a.a.createElement(k.a,{title:Object(S.u)("$__search",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){D(!0)},size:"25px"})))}))),mn=function(e){return{btClose:{position:"relative",zIndex:e.zIndex.drawer+1,right:"0",top:"-64px",backgroundColor:"#FFFFFF",display:"flex"},image:{width:"100%",backgroundColor:"rgb(0,88,0)",paddingTop:"45%"},data:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",marginTop:"10px",padding:"10px","& fieldset":{border:"solid 1px rgba(0,0,0,0.1)","& legend":{marginBottom:"0px",fontSize:"16px",color:Object(S.d)("color")}}},loader:{position:"relative",width:"100%",height:"40px",textAlign:"center","& .MuiCircularProgress-root":{color:"".concat(Object(S.d)("color")," !important")}},preview:{listStyle:"none",padding:"0px","& li":{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",marginBottom:"15px",boxShadow:"0 0 7px 3px rgba(0,0,0,0.1)"}},previewTitle:{position:"relative",width:"100%",fontWeight:"bold",marginBottom:"7px"},feedTitle:{position:"relative",width:"100%",marginBottom:"7px",borderBottom:"solid 1px ".concat(Object(S.d)("medium",.2))},feedContent:{position:"relative",width:"100%"},feedFooter:{width:"100%",textAlign:"right",height:"16px",borderTop:"1px solid rgba(0,0,0,0.05)",paddingTop:"3px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(S.d)("medium")}}};function gn(){gn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var bn=function(){var e=Object(f.a)(gn().mark((function e(t){var r,n,a;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=l.a.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,De.a.post("feed/save",Object(p.a)(Object(p.a)({},r),{},{feed:JSON.stringify(r.feed),_parent:n[0]||null}));case 7:if(!(a=e.sent)){e.next=14;break}return r._id||(r._id=a.data._id),t.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:a.data._id,data:Object(p.a)({},r)})),console.log(a),t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds),{},Object(h.a)({},r._id,Object(p.a)(Object(p.a)(Object(p.a)({},r),l.a.getState().db.feeds&&l.a.getState().db.feeds[r._id]?l.a.getState().db.feeds[r._id]:{}),{},{_parent:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[r._id]&&l.a.getState().db.feeds[r._id]._parent?l.a.getState().db.feeds[r._id]._parent:{}),{},Object(h.a)({},n[0]||null,{_id:a.data._id,idRel:a.data.idRel}))})))})),e.abrupt("return",!0);case 14:e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(4),e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t){return e.apply(this,arguments)}}(),yn=function(){var e=Object(f.a)(gn().mark((function e(t){var r,n,a,o=arguments;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=new Promise(function(){var e=Object(f.a)(gn().mark((function e(n,a){var o,i;return gn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Feed_List_V2",r);case 3:(o=e.sent)&&o.data&&(i={},o.data.forEach((function(e){var t={};e.parents&&e.parents.length>0&&e.parents.forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e._id,Object(p.a)({idRel:e.idRel},e.i)))})),i=Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e.data._id,Object(p.a)(Object(p.a)(Object(p.a)({},e.data),e.hide?{hide:!0}:{}),{},{feed:[Object(p.a)({},e.cover)],_parent:t},e.tags&&e.tags.filter((function(e){return e.value})).length>0?{_tags:e.tags}:{})))})),t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds),i)})),n(!0)),e.next=13;break;case 7:e.prev=7,e.t0=e.catch(0),console.group("loadFeeds::ERR::"),console.log(e.t0),console.groupEnd(),n(!0);case 13:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,r){return e.apply(this,arguments)}}()),e.next=4,n;case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function vn(){vn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var xn=Object(B.a)(mn);var _n=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=xn(),r=l.a.getState(),n=r.sideModule,o=r.session,i=r.db,c=n.data||{},s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState(!1),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useRef(),w=0,j=Object(S.j)(),E=window.location.hash.split("/");E[0]=E[0].replace("#",""),E[0]&&36===E[0].length&&(w=Object(et.t)(E[0]));var L=function(t){""===c.name||"name"===t.name&&""===t.value?g(!1):c._lock&&(t.value&&!n.data[t.name]||n.data[t.name]&&n.data[t.name]!==t.value)&&g(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},Object(h.a)({},t.name,t.value))}))},C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},I=function(){var t=Object(f.a)(vn().mark((function t(r){return vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),n.data.name){t.next=5;break}Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,bn(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.u)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&C(!0)):(Object(S.c)({message:Object(S.u)("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),g(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=Object(f.a)(vn().mark((function t(r){var a,o,i,c;return vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=41;break}if(-1!==r.indexOf("http")){t.next=6;break}Object(S.c)({message:"".concat(Object(S.u)("$__invalidUrl",1),": ").concat(Object(S.u)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},{url:""})})),t.next=41;break;case 6:if(!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[&a-z\\d%_.~+=-]*)?(\\@[a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(r)){t.next=40;break}if(x(!0),"/"===(a=r)[r.length-1]&&(a=a.substring(0,r.length-1)),"/"===a.indexOf("http://")&&(a=a.replace("http://","https://")),"feed"!==n.data.type){t.next=25;break}return t.prev=13,t.next=16,De.a.post("/feed/exist",{url:r});case 16:o=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},{_id:o.data.id,url:a,_lock:!0,feed:o.data.feed,name:o.data.title,customTitle:o.data.customTitle,customDescription:o.data.customDescription})})),o&&x(!1),o.data.title&&g(!0),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(13),F(r);case 25:if("link"!==n.data.type){t.next=40;break}return t.prev=26,(i=window.location.hash.split("/"))[0]=i[0].replace("#",""),t.next=31,De.a.post("/link/exist",{idRel:i[0],url:a});case 31:c=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:c.data.title,description:c.data.contentSnippet,image:c.data.img,url:c.data.link,content:c.data.article}})),c&&x(!1),c.data.title&&g(!0),t.next=40;break;case 37:t.prev=37,t.t1=t.catch(26),Object(S.c)({message:"".concat(Object(S.u)("$__invalidFeedUrl",1),": ").concat(Object(S.u)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 40:return t.abrupt("return");case 41:return t.abrupt("return",!1);case 42:case"end":return t.stop()}}),t,null,[[13,22],[26,37]])})));return function(e){return t.apply(this,arguments)}}(),F=function(){var t=Object(f.a)(vn().mark((function t(r){var a;return vn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,De.a.post("/feed/request/",{url:r});case 3:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:Object(p.a)(Object(p.a)({},n.data),{},{_id:a.data.id,url:r,_lock:!0,feed:a.data.feed,name:a.data.title,customTitle:a.data.customTitle,customDescription:a.data.customDescription})})),a&&x(!1),a.data.title&&g(!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),Object(S.c)({message:"".concat(Object(S.u)("$__invalidFeedUrl",1),": ").concat(Object(S.u)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}(),D=!!e.permission&&e.permission;return!D&&parseInt(w)>=3&&(D=!0),a.a.createElement("div",null,a.a.createElement("div",{className:t.btClose},a.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},D&&d&&a.a.createElement(ye,{save:d?function(){I()}:null,saveClose:d?function(){I(!0)}:null,close:function(){e.onClose&&e.onClose()}}),a.a.createElement(k.a,{title:Object(S.u)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},c._lock?a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,Object.assign({label:Object(S.u)("$__titleOfFeed",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){L(e.target)}},value:c&&c.name?c.name:"",placeholder:Object(S.u)("$__titleOfFeed_placeholder")},o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account||c&&c.name?{disabled:!0}:{})),a.a.createElement(Oe.a,{label:Object(S.u)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"title"})),onChange:function(e){L(e.target)}},value:c&&c.customTitle?c.customTitle:"",placeholder:Object(S.u)("$__customTitle",1)}),o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account?a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"copyright"})),onChange:function(e){L(e.target)}},value:c&&c.font?c.font:"",placeholder:Object(S.u)("$__nameOfFontData",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__descriptionOfRss",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.description?c.description:"",placeholder:Object(S.u)("$__descriptionOfRss",1)})):a.a.createElement(a.a.Fragment,null),a.a.createElement(Oe.a,{label:Object(S.u)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.customDescription?c.customDescription:"",placeholder:Object(S.u)("$__customDescription",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:_,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){L(e.target)},onBlur:function(e){T(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),j&&j.feed&&(j.feedAdmin||j.feedModerate)&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.u)("$__tags",1)),a.a.createElement(ur,{data:{values:c._tags?c._tags:[]},callBack:function(e){L({name:"_tags",value:e})}})),j&&j.feed&&j.feedAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(ze.a,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:c&&c.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:c&&c.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(c.plans)}))[0]:i.plans[0]}))},onChange:function(e,t){D&&L({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!c.private,onChange:function(e){L({name:"private",value:!c.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__private",1))):a.a.createElement(Oe.a,{label:Object(S.u)("$__feedUrl","*"),variant:Object(S.d)("fieldVariant"),ref:_,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"rss_feed"})),onChange:function(e){L(e.target)},onBlur:function(e){T(e.target.value)}},value:c&&c.url?c.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!c._lock}),!c._lock&&!v&&a.a.createElement(Ce.a,{text:Object(S.u)("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return T(_.current.value)}}),v&&a.a.createElement("div",{className:t.loader},a.a.createElement(be.a,null)),c.feed&&c.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.u)("$__preview",1)),c.feed.map((function(e,r){return a.a.createElement("li",{key:r},e&&e.title&&a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate},O()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank",rel:"noopener noreferrer"},Object(S.u)("$__openLink","*")))))})))))}));function On(){On=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var wn=Object(B.a)(mn);var jn=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=wn(),r=l.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useRef(),v=0,x=window.location.hash.split("/");x[0]=x[0].replace("#",""),x[0]&&36===x[0].length&&(v=Object(et.t)(x[0]));var _=function(t){""===n.name||"name"===t.name&&""===t.value?s(!1):n._lock&&(t.value&&!r.data[t.name]||r.data[t.name]&&r.data[t.name]!==t.value)&&s(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.a)({},r.data),{},Object(h.a)({},t.name,t.value))}))},w=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},j=function(){var t=Object(f.a)(On().mark((function t(n){return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!1),r.data.name){t.next=5;break}Object(S.c)({message:Object(S.u)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,bn(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.u)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&w(!0)):(Object(S.c)({message:Object(S.u)("$__AnErrorHasOccurredPleaseTryAgain",1),variant:"error",persist:!1,horizontal:"right",confirm:null}),s(!0));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=function(){var t=Object(f.a)(On().mark((function t(n){var a,o,i;return On().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(a=n.trim())){t.next=29;break}if(-1!==a.indexOf("http")){t.next=7;break}Object(S.c)({message:"".concat(Object(S.u)("$__invalidUrl",1),": ").concat(Object(S.u)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.a)({},r.data),{},{url:""})})),t.next=29;break;case 7:if(!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(a)){t.next=26;break}return b(!0),t.prev=10,(o=window.location.hash.split("/"))[0]=o[0].replace("#",""),t.next=15,De.a.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:i.data.title,description:i.data.contentSnippet,image:i.data.img,url:i.data.link,content:i.data.article}})),i&&b(!1),i.data.title&&s(!0),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(10),Object(S.c)({message:"".concat(Object(S.u)("$__invalidFeedUrl",1),": ").concat(Object(S.u)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 24:t.next=28;break;case 26:Object(S.c)({message:"".concat(Object(S.u)("$__invalidUrl",1),": ").concat(Object(S.u)("$__pleaseVerifyTheUrl",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r),{},{data:Object(p.a)(Object(p.a)({},r.data),{},{url:""})}));case 28:return t.abrupt("return",!0);case 29:return t.abrupt("return",!1);case 30:case"end":return t.stop()}}),t,null,[[10,21]])})));return function(e){return t.apply(this,arguments)}}(),L=!!e.permission&&e.permission;return!L&&parseInt(v)>=3&&(L=!0),a.a.createElement("div",null,a.a.createElement("div",{className:t.btClose},a.a.createElement("div",{style:{position:"fixed",display:"inline-flex",paddingLeft:"10px",top:"7px",right:0,backgroundColor:"#FFFFFF"}},L&&c&&a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),color:Object(S.d)("color"),icon:"save",onClick:function(){j()},size:"25px"}),a.a.createElement(k.a,{title:Object(S.u)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){j(!0)},size:"25px"})),a.a.createElement(k.a,{title:Object(S.u)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},n._lock&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__titleOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_headline"})),onChange:function(e){_(e.target)}},value:n&&n.name?n.name:"",placeholder:Object(S.u)("$__titleOfUrl_placeholder"),disabled:!0}),a.a.createElement(Oe.a,{label:Object(S.u)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"title"})),onChange:function(e){_(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Object(S.u)("$__customTitle",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"copyright"})),onChange:function(e){_(e.target)}},value:n&&n.font?n.font:"",placeholder:Object(S.u)("$__nameOfFontData",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__descriptionOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){_(e.target)}},value:n&&n.description?n.description:"",placeholder:Object(S.u)("$__descriptionOfUrl",1)}),a.a.createElement(Oe.a,{label:Object(S.u)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"subtitles"})),onChange:function(e){_(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Object(S.u)("$__customDescription",1)}),a.a.createElement("div",{className:t.switch},a.a.createElement(Te.a,{checked:!!n.private,onChange:function(e){_({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__private",1))),a.a.createElement(Oe.a,{label:Object(S.u)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:y,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"http"})),onChange:function(e){_(e.target)},onBlur:function(e){E(e.target.value)}},value:n&&n.url?n.url:"",placeholder:"http://www.domain.com/",disabled:!!n._lock}),!n._lock&&!g&&a.a.createElement(Ce.a,{text:Object(S.u)("$__validUrl",1),icon:"check",onClick:function(){return E(y.current.value)}}),g&&a.a.createElement("div",{className:t.loader},a.a.createElement(be.a,null)),n.feed&&n.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.u)("$__preview",1)),n.feed.map((function(e,r){return a.a.createElement("li",{key:r},e&&e.title&&a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.title},className:t.feedTitle}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.contentSnippet},className:t.feedContent}),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate},O()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank",rel:"noopener noreferrer"},Object(S.u)("$__openLink","*")))))})))))}));var En=Object(u.b)((function(e){return{sideModule:e.sideModule}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ve)((function(e){var t,r,n=l.a.getState(),o=n.sideModule,i=n.db,c=n.session,s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],f=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),y=b[0],v=b[1];if(a.a.useEffect((function(){return o.id&&(y||"timeline"!==o.activeModule||(v(!0),f(!1))),function(){}}),[o]),!o.data||!o.data.type||0===i.dataType.filter((function(e){return e.name===o.data.type})).length)return null;if(o&&!o.id)return null;var x=e.classes,_=o.data,O=window.location.hash.split("/");O[0]=O[0].replace("#","");var w=i.cards[_._id]?"cards":"users",j=Object(S.j)(),E=Object(et.t)(o.id),k=!1;!_||!_._planId||i.cards[_._planId]&&Object(et.B)(_._planId)||(k=!1),!(k=!(!o||!("new"===o.id||("user"===_.type||"client"===_.type)&&j&&j.user&&(j.userAdmin||j.userModerate)||"user"!==_.type&&"client"!==_.type&&"chatGroup"!==_.type&&j&&(j.owner||j.plan&&(j.planAdmin||j.planModerate))||"chatGroup"===_.type&&(!_.client||_.client&&i.users[_.client])&&j&&(j.owner||j.plan&&(j.planAdmin||j.planModerate)))))&&parseInt(E)>=4&&(k=!0),!k&&Object(et.B)(_._planId)&&j&&j.admin&&j.plan&&(j.planAdmin||j.planModerate)&&(k=!0);var L=_.formId&&l.a.getState().forms[_.formId]?JSON.parse(l.a.getState().forms[_.formId].elements):[],C={};L.forEach((function(e){_[e.id]&&(C=Object(p.a)(Object(p.a)({},C),{},Object(h.a)({},e.id,_[e.id])))}));var I=[{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:Ut,closeOption:!1,permission:0,buttonsCount:3,template:!0}].concat(Object(A.a)(_.formId&&l.a.getState().forms[_.formId]&&Object.keys(l.a.getState().forms[_.formId]).length>0?[{name:"forms",icon:"ballot",title:"$__forms",reqId:!0,module:jt,permission:0,closeOption:!0,template:!0,props:{formId:_.formId,values:C,disabled:!0,style:{padding:15}}}]:[]),[{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:_n,closeOption:!1,permission:3,template:!0},{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:Le,closeOption:!1,permission:0},{name:"checklist",icon:"checklist",title:"$__list",reqId:!0,module:lr.a,closeOption:!0,permission:1,props:{nodeId:o.data._id,db:o.db?o.db:"cards",permission:k,showProgress:!0},template:!0}],Object(A.a)(_.type.indexOf("guideline")>-1||_.type.indexOf("objective")>-1||_.type.indexOf("goal")>-1?[{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:cr,closeOption:!0,permission:2,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0}]:[]),[{name:"recurrence",icon:"update",title:"$__recurrence",reqId:!0,module:Dr,closeOption:!0,permission:3,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:jn,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:xe.a,props:{type:"comment",nodeId:o.id,db:"cards",loadTimeline:!0,disabledSend:"0"===String(E)},closeOption:!0,permission:0,count:"comment"},{name:"access",icon:c._id===_._id?"vpn_key":"security",title:c._id===_._id?"$__changePassword":"$__access",reqId:!0,module:Ae,closeOption:!1,permission:c._id===_._id?0:4},{name:"users",icon:"supervised_user_circle",title:"$__usersAndDepartments",reqId:!0,module:hn,closeOption:!0,permission:3,template:!0}],Object(A.a)(E>=4||E&&E<4&&_.kpi_type&&"task"!==_.kpi_type||j&&j.plan&&j.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:er,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:tn,closeOption:!0,permission:1,count:"timer"},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:Ir,closeOption:!0,permission:3,props:{nodeId:o.id,db:o.db}},{name:"log",icon:"history",title:"$__log",reqId:!0,module:xe.a,props:{type:"log",nodeId:o.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:0,count:"log"}],Object(A.a)(c._id===_._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Me,closeOption:!1,permission:c._id===_._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:Ke,closeOption:!1,permission:c._id===_._id?0:6,ownerLock:!0}]:[]),[{name:"columnEdit",icon:"tune",title:"$__edition",reqId:!1,module:xr,closeOption:!1,permission:0,buttonsCount:3,template:!0}],Object(A.a)("users"===w?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:nn,closeOption:!0}]:[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:it,closeOption:!0,permission:5,template:!0}]),[{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:Mr,closeOption:!0,permission:3,template:!0}],Object(A.a)("client"===_.type||"group"===_.type||"unity"===_.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Ue,closeOption:!1,permission:1,template:!0}]:[]),Object(A.a)("user"===_.type&&c._id===_._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Be,closeOption:!1,permission:1,template:!0}]:[]),Object(A.a)("step"===_.type&&k?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:_r,closeOption:!1,permission:5,template:!0}]:[]),Object(A.a)("user"!==_.type&&"step"!==_.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:nr,closeOption:!1,permission:5,template:!0}]:[])),T=I.filter((function(e){return e.name===o.activeModule}))[0];if(!T||!T.module)return null;var F=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d||t?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1)}}):(e.reduxFunction("ASYNC","CLEAR_MODULE"),f(!1))},D=Object(et.Q)(_._id),P=(o.data.type?i.dataType.filter((function(e){return"forms"===e.name||e.name===o.data.type}))[0]:[]).modules;return o&&o.id?a.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(0,0,0,0.7)",backdropFilter:"blur(3px)"},onClick:function(e){e.stopPropagation(),F()}},a.a.createElement("div",{className:c.sideModuleWindow&&"popup"===c.sideModuleWindow?x.modulePopup:c.sideModuleWindow&&"expanded"===c.sideModuleWindow?x.moduleExpanded:c.sideModuleWindow&&"fullScreen"===c.sideModuleWindow?x.moduleFullScreen:x.module,id:"sideModule",onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:x.menu,style:{background:Object(S.d)("menuColor"),borderRight:"solid 3px ".concat(Object(S.d)("color"))},id:"sideModule_menu"},a.a.createElement("div",{className:x.menuButtons_resume}),I.filter((function(e,t){return e&&(!D||o.data&&D&&e.template)&&(!e.reqId||e.reqId&&36===o.id.length)&&(("user"===_.type||"client"===_.type)&&(j&&j.user&&(j.userAdmin||j.userModerate&&e.permission<=4||j.userEdit&&e.permission<=3)||_._id===c._id&&e.permission<=3)||"user"!==_.type&&"client"!==_.type&&"account"!==_.type&&"unity"!==_.type&&k&&j&&j.plan&&(j.planAdmin||j.planModerate&&e.permission<=4)||("user"!==_.type||"client"!==_.type||"account"!==_.type)&&String(E)&&parseInt(E)>=parseInt(e.permission))&&("forms"===e.name&&_.formId||P.indexOf(e.name)>-1)&&("recurrence"!==e.name||"recurrence"===e.name&&Object.keys(l.a.getState().db.cards).filter((function(e){return!(l.a.getState().db.cards[e].deleted||l.a.getState().db.cards[e].checklist||!l.a.getState().db.cards[e]._recurrenceId||l.a.getState().db.cards[e]._recurrenceId!==o.data._id)})).length>0)})).filter((function(e){return!o.data._requireApproval||o.data._requireApproval&&("resume"===e.name||"cardEdit"===e.name||"timeline"===e.name||"kpi"===e.name||"log"===e.name||"timer"===e.name)})).map((function(t,r){return a.a.createElement(tt,{key:r,icon:t.icon,module:t.name,title:Object(S.u)(t.title,1),count:t.count?t.count:null,openModule:function(t){!function(t){d?Object(S.c)({message:Object(S.u)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){f(!1),o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)({},o))}}):(o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)({},o)))}(t)}})})),a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%",height:"50px"},onClick:function(){!function(){var t=!1;t?"popup"===t?t="expanded":"expanded"===t?t="fullScreen":"fullScreen"===t&&(t=null):t="popup",e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{sideModuleWindow:t}))}()}})),a.a.createElement("div",{id:"sideModule_header"},a.a.createElement(ge.a,Object.assign({title:o&&o.data&&o.data.name||"".concat(Object(S.u)("$__create")," ").concat(Object(S.u)("$__".concat(o.data.type))),icon:(null===o||void 0===o||null===(t=o.data)||void 0===t?void 0:t.icon)||o&&o.data&&o.data.type&&i.dataType.filter((function(e){return e.name===o.data.type}))[0].icon||"view_comfy",style:{paddingLeft:"50px",width:"calc(100% - 0px)",minHeight:"50px",marginTop:"-4px"},color:Object(S.d)("menu")},k&&(null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r._id)?{editable:!0,onChangeIcon:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:o.data._id}}),{icon:t})}}:{})),T.closeOption&&a.a.createElement(ye,{close:function(){return F()}})),a.a.createElement("div",{className:x.content},a.a.createElement(N.a,null,a.a.createElement(T.module,Object.assign({},T.props,{permission:k,onClose:function(e){F(e)},reqSave:function(e){f(e)}})))),a.a.createElement("div",{className:x.subTitle,id:"sideModule_subTitle",style:Object(p.a)(Object(p.a)({},o&&o.data&&o.data.private?{background:"gray"}:{}),{},{display:"flex",justifyContent:"space-between"})},Object(S.u)(T.title.toLowerCase(),1),o&&o.data&&o.data.private?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.u)("$__isPrivate","*"),a.a.createElement(re.a,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):a.a.createElement(a.a.Fragment,null)))):null}))),kn=r(1147),Sn=r.n(kn),Ln=r(324),Cn=r(1189),In=Object(le.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(Cn.a),Tn=r(234),Fn=r.n(Tn),Dn=r(228);function Nn(){Nn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var An=function(e,t){var r=l.a.getState().db.tag;r.filter((function(e){return e.value===t.value})).length>0?r.forEach((function(e,n){e.value===t.value&&(r[n]=Object(p.a)(Object(p.a)({},r[n]),t))})):r.push(t),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{tag:Object(A.a)(r)}))},Pn=function(){var e=Object(f.a)(Nn().mark((function e(t,r){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:De.a.delete("/tag/unique/".concat(r._id),Object(p.a)({},r))&&$n(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),$n=function(e,t){var r=[];l.a.getState().db.tag.forEach((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{tag:r}))},Mn=function(){var e=Object(f.a)(Nn().mark((function e(t,r){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:De.a.put("/tag/unlink/",Object(p.a)({},r))&&Yn(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),zn=function(){var e=Object(f.a)(Nn().mark((function e(t,r){var n,a;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState(),a=n.session,r.target===r._id&&(r.target=a.account),e.next=4,De.a.put("/tag/link/",Object(p.a)({},r));case 4:if(!e.sent){e.next=7;break}return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Yn=function(e,t){var r=[],n=l.a.getState(),a=n.session,o=n.db;o.tag.forEach((function(e){var n=e;e.value===t._id&&(n=Object(p.a)(Object(p.a)({},n),{},{count:0})),r.push(n)}));var i=Object(p.a)({},o.cards);Object.keys(i).filter((function(e){return i[e]._users&&i[e]._users[a._id]&&i[e]._tags&&i[e]._tags.filter((function(e){return e.value===t._id})).length>0})).forEach((function(e){var r=[];i[e]._tags.forEach((function(e){e.value!==t._id&&r.push(e)})),i[e]._tags=r})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},o),{},{tag:r,cards:i}))};r(1085);function Bn(){Bn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Rn=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],s=Object(S.j)(),u=function(){var t=Object(f.a)(Bn().mark((function t(r){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Pn(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=Object(f.a)(Bn().mark((function t(r){return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Mn(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return t.item.value?a.a.createElement("div",{style:{width:"100%",cursor:"pointer",display:"flex"},onMouseOver:function(){s&&s.plan&&s.planAdmin&&i(!0)},onMouseLeave:function(e){i(!1)}},a.a.createElement("div",{style:Object(p.a)({zIndex:0,maxWidth:"90%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},t.item.color?{borderLeft:"solid 6px ".concat(t.item.color),paddingLeft:"7px"}:{}),onClick:function(){var r;r=t.item,c.a.push("tags#".concat(r.value)),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"tags#".concat(r.value)}))}},t.item.text," ",t.item._count?"(".concat(t.item._count,")"):""),o&&a.a.createElement("div",{style:{zIndex:1}},a.a.createElement(V.a,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),options:[].concat(Object(A.a)(s&&s.plan&&s.planAdmin?[{name:"$__edit",icon:"edit",onClick:function(){e.editTag(t.item)}}]:[]),[(0===parseInt(t.item._count)&&0===parseInt(t.item._countOthers)||parseInt(t.item._count)>0&&0===parseInt(t.item._countOthers))&&{name:"$__delete",icon:"delete_forever",onClick:function(){u(t.item)}},parseInt(t.item._count)>0&&parseInt(t.item._countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){d(t.item)}}])}))):a.a.createElement("div",{style:{fontWeight:"bold",color:Object(S.d)("color"),fontSize:"12px"}},t.item.text)})),Gn=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{menu:{position:"relative",borderRight:Object(S.d)("color")},menuExpanded:{position:"relative",borderRight:Object(S.d)("color")},button:{position:"relative",float:"left",width:"100%",padding:"7px"},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function Hn(){Hn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Wn=Object(u.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(B.a)(Gn)(),r=l.a.getState(),n=r.db,o=r.session,i=e.tag,c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],y=g[1],v=a.a.useState(!1),x=Object(m.a)(v,2),_=x[0],w=x[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(!1),T=Object(m.a)(I,2),F=T[0],D=T[1],P=a.a.useState(null),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useState([]),R=Object(m.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(!1),U=Object(m.a)(W,2),q=U[0],V=U[1],J=a.a.useState(null),X=Object(m.a)(J,2),K=X[0],Z=X[1],Q=a.a.useState(!0),ee=Object(m.a)(Q,2),te=ee[0],ne=ee[1],ae=Fn.a.ExcelFile,oe=Fn.a.ExcelFile.ExcelSheet,ie=Fn.a.ExcelFile.ExcelColumn,ce=window.location.hash.split("/");ce.length>0&&(ce[0]=ce[0].replace("#","")),a.a.useEffect((function(){return u||(d(!0),se(),e.onLoad&&e.onLoad()),function(){}}),[]),a.a.useEffect((function(){se()}),[M,JSON.stringify(e.tag)]);var le=Object(S.j)(),se=function(){var e=[];i.filter((function(e){var t=M?Object(S.q)(M.toLowerCase().trim()):"",r=Object(S.q)(e.label.toLowerCase().trim());return!(e.parent||M&&!(M&&r.indexOf(t)>-1))})).sort((function(e,t){return Object(S.q)(e.label.toLowerCase().trim())<Object(S.q)(t.label.toLowerCase().trim())?-1:Object(S.q)(e.label.toLowerCase().trim())>Object(S.q)(t.label.toLowerCase().trim())?1:0})).forEach((function(t){var r=t;if(r._count=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length>parseInt(r._count)?Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length:parseInt(r._count),r._countOthers=Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&!n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length>parseInt(r._countOthers)?Object.keys(n.cards).filter((function(e){return n.cards[e]._users&&!n.cards[e]._users[o._id]&&n.cards[e]._tags&&n.cards[e]._tags.filter((function(e){return e.value===r.value})).length>0})).length:parseInt(r._countOthers),0===e.filter((function(e){return e.id===r.label.substr(0,1)})).length){var a=[];i.filter((function(e){return e.parent&&e.parent===r.value})).length>0&&i.filter((function(e){return e.parent&&e.parent===r.value})).forEach((function(e){0===a.filter((function(t){return t.value===e.value})).length&&a.push(Object(p.a)({id:e.value,text:e.label},e))})),e.push({id:r.label.substr(0,1),text:r.label.substr(0,1),children:[Object(p.a)(Object(p.a)({id:r.value,text:r.label},r),{},{children:a})]})}else if(e.filter((function(e){return e.id===r.label.substr(0,1)})).length>0&&0===e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.filter((function(e){return e.value===r.value})).length){var c=[];i.filter((function(e){return e.parent&&e.parent===r.value})).length>0&&i.filter((function(e){return e.parent&&e.parent===r.value})).forEach((function(e){0===c.filter((function(t){return t.value===e.value})).length&&c.push(Object(p.a)({id:e.value,text:e.label},e))})),e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.push(Object(p.a)(Object(p.a)({id:r.value,text:r.label},r),{},{children:c}))}})),JSON.stringify(e)!==JSON.stringify(G)&&H(e)},ue=function(){C({}),D(!1),y(!1)},de=function(e){y(!0),C(e||{})},pe=function(){var t=Object(f.a)(Hn().mark((function t(){var r;return Hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D(!0),!L.value){t.next=15;break}return t.prev=2,t.next=5,De.a.put("tag/update",{_id:L.value,name:L.name?L.name:L.label,color:L.newColor?L.newColor:L.color?L.color:null});case 5:t.sent&&(An(e,{value:L.value,label:L.name?L.name:L.label,color:L.newColor?L.newColor:L.color}),D(!1),ue()),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),console.log(t.t0),D(!1);case 13:t.next=26;break;case 15:return t.prev=15,t.next=18,De.a.post("tag/add",{name:L.name,color:L.newColor?L.newColor:L.color?L.color:null});case 18:(r=t.sent)&&r.data&&(w(!0),An(e,r.data),D(!1),ue()),t.next=26;break;case 22:t.prev=22,t.t1=t.catch(15),console.log(t.t1),D(!1);case 26:case"end":return t.stop()}}),t,null,[[2,9],[15,22]])})));return function(){return t.apply(this,arguments)}}(),he=function(){var e=Object(f.a)(Hn().mark((function e(){var t;return Hn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(!0),e.next=3,Pe.a.post("Rel_TagUser_Used");case 3:(t=e.sent)&&(V(!1),Z(a.a.createElement(ae,{filename:"".concat(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_tagReport"),element:a.a.createElement(k.a,{title:Object(S.u)("$__export"),text:Object(S.u)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(oe,{data:t.data,name:"timeSheet"},a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__user",1)),value:"user"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__tag",1)),value:"tag"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__activity",1)),value:"card"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__status",1)),value:"status"})))));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(N.a,null,a.a.createElement("div",{className:t.menu},a.a.createElement("div",{style:{marginTop:"5px"}},a.a.createElement(wr.a,{title:Object(S.u)("$__tags",1),icon:"bookmarks",iconTitle:Object(S.u)("$__tags",1),color:Object(S.d)("colorText"),fontSize:"16px",moreButton:!0,options:[{name:"$__addTag",icon:"add_box",color:Object(S.d)("color"),show:"hover",onClick:function(){de()}},le&&le.plan&&le.planAdmin&&!_&&{name:"$__showAllTags",icon:"style",color:Object(S.d)("color"),show:"hover",onClick:function(){w(!0)}},_&&{name:"$__onlyMyTags",icon:"loyalty",color:Object(S.d)("color"),show:"hover",onClick:function(){w(!1)}},{name:te?"$__showFilters":"$__showTagList",icon:te?"filter_alt":"bookmarks",color:Object(S.d)("color"),show:"hover",onClick:function(){ne((function(e){return!e}))}},le&&le.plan&&le.planAdmin&&{name:"$__exportReport",icon:"print",color:Object(S.d)("color"),show:"hover",onClick:function(){he()}}],optionsProps:{transparent:!0}})),K&&K,a.a.createElement("div",{className:t.separator}),te?a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",clear:"both"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:M?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"cancel",color:"green",onClick:function(){return z(null)}})):null,onChange:function(e){z(e.target.value)}},placeholder:Object(S.u)("$__nameOfTagSearch_placeholder",1)})):a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",padding:7,width:"-webkit-fill-available"}},a.a.createElement(Dn.a,{nodeId:"tagsView",customLabels:{text:"$__"},fields:["tags","date","users","status","priority","impact","risk","complexity"].concat(Object(A.a)(le&&le.plan&&le.planAdmin?["admin"]:[])),showFilters:!0,mode:"modal",onChange:function(e){console.log(e)},fieldsProps:{users:{allPlataform:!0,selectedShow:{internal:!0,external:!1}}}}))),te&&a.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},a.a.createElement(Sn.a,{collapse:"ALL",items:G,maxDepth:3,renderItem:function(e){return a.a.createElement(Rn,{data:e,editTag:function(e){de(e)}})},onChange:function(t){var r=t.items,n=r[t.targetPath[0]].children[t.targetPath[1]];if(!t.dragItem.parent&&t.dragItem.id===n.id)return!1;zn(e,{_id:t.dragItem.id,target:n.id}),H(r)}})),a.a.createElement(In,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:b,style:{overflow:"visible !important"}},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(wr.a,{title:L.value?Object(S.u)("$__editTag",1):Object(S.u)("$__newTag",1),icon:"label",onCancel:function(){y(!1)}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},"Etiquetas permitem que voc\xea adicione palavras-chave \xe0s atividades (Tarefas, Insights, Not\xedcias), organizando-as e permitindo melhor navega\xe7\xe3o e praticidade no seu dia a dia."),a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(Oe.a,{error:!(!L||L.label&&0!==L.label.length),helperText:"Campo de nome da etiqueta deve ter o compimento m\xednimo de 1 caractere",label:Object(S.u)("$__name",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){C(Object(p.a)(Object(p.a)({},L),{},{name:e.target.value}))}},defaultValue:L&&L.label?L.label:null,placeholder:Object(S.u)("$__nameOfTag_placeholder",1)})),a.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},a.a.createElement("span",{style:{marginRight:"7px"}},Object(S.u)("$__tagColor"),":"),a.a.createElement(Ln.a,{disablePortal:!0,color:L.color,onChange:function(e){C(Object(p.a)(Object(p.a)({},L),{},{newColor:e}))}},L.color||L.newColor?a.a.createElement("div",{className:"tag",style:{backgroundColor:L.newColor?L.newColor:L.color,width:"22px",height:"22px",borderRadius:"50%",cursor:"pointer"}}):a.a.createElement("div",{className:"tag",style:{fontWeight:"bold"}},Object(S.u)("$__clickHereToAddColor")))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__cancel"),text:Object(S.u)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){y(!1)}}),L&&(L.name||L.newColor)&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),icon:"save",size:"25px",load:!!F,onClick:function(){pe()}})))),q?a.a.createElement(fe.a,{fullScreen:!0}):a.a.createElement(a.a.Fragment,null))}));var Un=Object(u.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(Ar.b)();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),a.a.createElement(a.a.Fragment,null,a.a.createElement(J.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),qn=r(21),Vn={button:{minHeight:"auto",minWidth:"auto",backgroundColor:Z.p[0],color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.p[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.p[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.p[0])+", 0.12)",border:"none",borderRadius:"3px",position:"relative",padding:"12px 30px",margin:".3125rem 1px",fontSize:"12px",fontWeight:"400",textTransform:"uppercase",letterSpacing:"0",willChange:"box-shadow, transform",transition:"box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1)",lineHeight:"1.42857143",textAlign:"center",whiteSpace:"nowrap",verticalAlign:"middle",touchAction:"manipulation",cursor:"pointer","&:hover,&:focus":{color:Z.I,backgroundColor:Z.p[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.p[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.p[0])+", 0.2)"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{position:"relative",display:"inline-block",top:"0",marginTop:"-1em",marginBottom:"-1em",fontSize:"1.1rem",marginRight:"4px",verticalAlign:"middle"},"& svg":{position:"relative",display:"inline-block",top:"0",width:"18px",height:"18px",marginRight:"4px",verticalAlign:"middle"},"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& .material-icons":{marginTop:"0px",position:"absolute",width:"100%",transform:"none",left:"0px",top:"0px",height:"100%",lineHeight:"41px",fontSize:"20px"}}},fullWidth:{width:"100%"},custom_color:{backgroundColor:Object(S.d)("color"),boxShadow:"0 2px 2px 0 "+Object(S.d)("color",.14)+", 0 3px 1px -2px "+Object(S.d)("color",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("color",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("color"),boxShadow:"0 14px 26px -12px "+Object(S.d)("color",.42)+", 0 4px 23px 0px "+Object(S.d)("color",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("color",.2)}},custom_menuColor:{backgroundColor:Object(S.d)("menu"),boxShadow:"0 2px 2px 0 "+Object(S.d)("menu",.14)+", 0 3px 1px -2px "+Object(S.d)("menu",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("menu",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("menu"),boxShadow:"0 14px 26px -12px "+Object(S.d)("menu",.42)+", 0 4px 23px 0px "+Object(S.d)("menu",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("menu",.2)}},custom_mediumColor:{backgroundColor:Object(S.d)("medium"),boxShadow:"0 2px 2px 0 "+Object(S.d)("medium",.14)+", 0 3px 1px -2px "+Object(S.d)("medium",.2)+", 0 1px 5px 0 rgba("+Object(S.d)("medium",.12),"&:hover,&:focus":{backgroundColor:Object(S.d)("medium"),boxShadow:"0 14px 26px -12px "+Object(S.d)("medium",.42)+", 0 4px 23px 0px "+Object(S.d)("medium",.12)+", 0 8px 10px -5px rgba("+Object(S.d)("medium",.2)}},primary:{backgroundColor:Z.w[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.w[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.w[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.w[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.w[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.w[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.w[0])+", 0.2)"}},info:{backgroundColor:Z.s[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.s[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.s[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.s[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.s[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.s[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.s[0])+", 0.2)"}},success:{backgroundColor:Z.B[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.B[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.B[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.B[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.B[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.B[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.B[0])+", 0.2)"}},warning:{backgroundColor:Z.H[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.H[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.H[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.H[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.H[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.H[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.H[0])+", 0.2)"}},danger:{backgroundColor:Z.i[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.i[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.i[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.i[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.i[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.i[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.i[0])+", 0.2)"}},rose:{backgroundColor:Z.z[0],boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.z[0])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.z[0])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.z[0])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.z[0],boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.z[0])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.z[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:Z.I,color:Z.p[0]}},twitter:{backgroundColor:Z.F,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.F)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.F)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.F)+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:Z.F,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.F)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.F)+", 0.2)"}},facebook:{backgroundColor:Z.n,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.n)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.n)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.n)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.n,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.n)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.n)+", 0.2)"}},google:{backgroundColor:Z.o,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.o)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.o)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.o)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.o,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.o)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.o)+", 0.2)"}},linkedin:{backgroundColor:Z.t,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.t)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.t)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.t)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.t,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.t)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.t)+", 0.2)"}},pinterest:{backgroundColor:Z.u,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.u)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.u)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.u)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.u,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.u)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.u)+", 0.2)"}},youtube:{backgroundColor:Z.J,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.J)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.J)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.J)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.J,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.J)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.J)+", 0.2)"}},tumblr:{backgroundColor:Z.E,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.E)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.E)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.E)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.E,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.E)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.E)+", 0.2)"}},github:{backgroundColor:Z.p[7],color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.p[6])+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.p[6])+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.p[6])+", 0.12)","&:hover,&:focus":{backgroundColor:Z.p[7],color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.p[6])+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.p[6])+", 0.2)"}},behance:{backgroundColor:Z.a,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.a)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.a)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.a)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.a,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.a)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.a)+", 0.2)"}},dribbble:{backgroundColor:Z.m,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.m)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.m)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.m)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.m,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.m)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.m)+", 0.2)"}},reddit:{backgroundColor:Z.x,color:Z.I,boxShadow:"0 2px 2px 0 rgba("+Object(Z.q)(Z.x)+", 0.14), 0 3px 1px -2px rgba("+Object(Z.q)(Z.x)+", 0.2), 0 1px 5px 0 rgba("+Object(Z.q)(Z.x)+", 0.12)","&:hover,&:focus":{backgroundColor:Z.x,color:Z.I,boxShadow:"0 14px 26px -12px rgba("+Object(Z.q)(Z.x)+", 0.42), 0 4px 23px 0px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.x)+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:Z.I,background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:Z.w[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:Z.s[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:Z.B[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:Z.H[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:Z.z[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:Z.i[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:Z.F}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:Z.n}},"&$google":{"&,&:focus,&:hover,&:visited":{color:Z.o}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:Z.t}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:Z.u}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:Z.J}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:Z.E}},"&$github":{"&,&:focus,&:hover,&:visited":{color:Z.p[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:Z.a}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:Z.m}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:Z.x}}},transparent:{"&,&:focus,&:hover":{color:"inherit",background:"transparent",boxShadow:"none"}},disabled:{opacity:"0.65",pointerEvents:"none"},lg:{"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginTop:"-4px"}},padding:"1.125rem 2.25rem",fontSize:"12px",lineHeight:"1.333333",borderRadius:"0.2rem"},sm:{"&$justIcon":{"& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginTop:"1px"}},padding:"0.40625rem 1.25rem",fontSize:"0.6875rem",lineHeight:"1.5",borderRadius:"0.2rem"},round:{borderRadius:"30px"},block:{width:"100% !important"},link:{"&,&:hover,&:focus":{backgroundColor:"transparent",color:Z.p[0],boxShadow:"none"}},justIcon:{paddingLeft:"12px",paddingRight:"12px",fontSize:"20px",height:"41px",minWidth:"41px",width:"41px","& .fab,& .fas,& .far,& .fal,& svg,& .material-icons":{marginRight:"0px"},"&$lg":{height:"57px",minWidth:"57px",width:"57px",lineHeight:"56px","& .fab,& .fas,& .far,& .fal,& .material-icons":{fontSize:"32px",lineHeight:"56px"},"& svg":{width:"32px",height:"32px"}},"&$sm":{height:"30px",minWidth:"30px",width:"30px","& .fab,& .fas,& .far,& .fal,& .material-icons":{fontSize:"12px",lineHeight:"29px"},"& svg":{width:"16px",height:"16px"}}}},Jn=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],Xn=Object(B.a)(Vn),Kn=a.a.forwardRef((function(e,t){var r,n=Xn(),o=e.color,i=e.round,c=e.children,l=e.fullWidth,s=e.disabled,u=e.simple,d=e.size,p=e.block,f=e.link,m=e.justIcon,g=e.className,b=e.muiClasses,y=Object(ft.a)(e,Jn),v=x()((r={},Object(h.a)(r,n.button,!0),Object(h.a)(r,n[d],d),Object(h.a)(r,n[o],o),Object(h.a)(r,n.round,i),Object(h.a)(r,n.fullWidth,l),Object(h.a)(r,n.disabled,s),Object(h.a)(r,n.simple,u),Object(h.a)(r,n.block,p),Object(h.a)(r,n.link,f),Object(h.a)(r,n.justIcon,m),Object(h.a)(r,g,g),r));return a.a.createElement(rt.a,Object.assign({},y,{ref:t,classes:b,className:v}),c)})),Zn={cardFooter:{padding:"0",paddingTop:"10px",margin:"0 15px 10px",borderRadius:"0",justifyContent:"space-between",alignItems:"center",display:"flex",backgroundColor:"transparent",border:"0"},cardFooterProfile:{marginTop:"-15px"},cardFooterPlain:{paddingLeft:"5px",paddingRight:"5px",backgroundColor:"transparent"},cardFooterPricing:{zIndex:"2"},cardFooterTestimonial:{display:"block"},cardFooterStats:{borderTop:"1px solid"+Z.p[8],marginTop:"20px","& svg":{position:"relative",top:"4px",marginRight:"3px",marginLeft:"3px",width:"16px",height:"16px"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{position:"relative",top:"4px",marginRight:"3px",marginLeft:"3px",fontSize:"12px",lineHeight:"16px"}},cardFooterChart:{borderTop:"1px solid"+Z.p[8]}},Qn=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],ea=Object(B.a)(Zn);function ta(e){var t,r=ea(),n=e.className,o=e.children,i=e.plain,c=e.profile,l=e.pricing,s=e.testimonial,u=e.stats,d=e.chart,p=e.product,f=Object(ft.a)(e,Qn),m=x()((t={},Object(h.a)(t,r.cardFooter,!0),Object(h.a)(t,r.cardFooterPlain,i),Object(h.a)(t,r.cardFooterProfile,c||s),Object(h.a)(t,r.cardFooterPricing,l),Object(h.a)(t,r.cardFooterTestimonial,s),Object(h.a)(t,r.cardFooterStats,u),Object(h.a)(t,r.cardFooterChart,d||p),Object(h.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:m},f),o)}var ra=function(e){return{container:Object(p.a)(Object(p.a)({},Z.e),{},Object(h.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(p.a)(Object(p.a)({},Z.d),{},{color:Z.I}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:Z.I},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:Z.p[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function na(){na=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var aa=Object(B.a)(ra);var oa,ia,ca=r(1962),la=r(1975),sa=r(1963),ua=r(1969);function da(){da=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var pa=j.b.div(oa||(oa=Object(d.a)(["\n background-color:none;\n\n "]))),fa=j.b.div(ia||(ia=Object(d.a)(["\n min-width:300px;\n background-color: rgba(255,255,255,0.9);\n padding: 7px;\n margin-bottom:10px;\n box-shadow: 0 0 7px rgba(0,0,0,0.2);\n display:flex;\n "]))),ha=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(null),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(""),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useState({}),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useState({open:!1,name:""}),j=Object(m.a)(w,2),E=j[0],k=j[1],L=l.a.getState().db,C=l.a.getState().functions.socket,I=function(){var e=Object(f.a)(da().mark((function e(t){var r,n,a,o,i,c;return da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.destination,n=t.source,a=t.draggableId,r){e.next=3;break}return e.abrupt("return",!1);case 3:if(r.droppableId!==n.droppableId||r.id!==n.index){e.next=5;break}return e.abrupt("return",!1);case 5:return o=Array.from(L.cards.boardModels.boards[n.droppableId].columnOrder),i=n.droppableId,o.splice(n.index,1),o.splice(r.index,0,a),De.a.put("column/reorder",{columns:o}),c={_parent:"boardModels",_board:i,_order:o},C.emit("column.REORDER",c),e.abrupt("return");case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(f.a)(da().mark((function e(t){var r,a,i,c;return da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Array.from(L.cards.boardModels.boards[t].columnOrder),e.prev=1,i={},n){e.next=10;break}return e.next=6,De.a.post("column/add",{board:t,name:s,icon:b});case 6:a=e.sent,i={cards:[],name:s,_id:a.data.id,icon:b},e.next=14;break;case 10:return e.next=12,De.a.put("column/update",{_id:n,board:t,name:s,icon:b});case 12:a=e.sent,i={name:s,_id:a.data.id,icon:b};case 14:a&&(n||r.push(a.data.id),c={_parent:"boardModels",_columnId:a.data.id,_board:t,_cardColumn:"boardModels",_columnData:i,_columnsOrder:r},C.emit("column.UPD",c),O(!1),u(""),y(""),o(null)),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),console.log(e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=Object(f.a)(da().mark((function e(t,r){var n,a;return da().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState().functions.socket,e.prev=1,e.next=4,De.a.delete("column/run/".concat(r,"__").concat(t),{board:t,name:s,icon:b});case 4:e.sent&&(a={_parent:"boardModels",_board:t,_deleted:r},n.emit("column.DELETE",a)),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r){return e.apply(this,arguments)}}(),D=function(){var t=Object(f.a)(da().mark((function t(){var r;return da().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,De.a.post("boards/add",{name:E.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},{boardModels:Object(p.a)(Object(p.a)({},l.a.getState().db.cards.boardModels),{},{boards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards.boardModels.boards),r.data)})})})),k({name:"",open:!1}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&Object.keys(L.cards.boardModels.boards).map((function(t){return a.a.createElement(ar.a,{onDragEnd:I,key:t},a.a.createElement(qn.a,{md:3},a.a.createElement("fieldset",{style:{width:"100%"}},a.a.createElement("legend",null,L.cards.boardModels.boards[t].name),a.a.createElement(ar.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return a.a.createElement(pa,Object.assign({ref:r.innerRef},r.droppableProps,{isDraggingOver:n.isDraggingOver}),!e.noList&&L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&L.cards.boardModels.boards[t]&&L.cards.boardModels.boards[t].columnOrder&&L.cards.boardModels.boards[t].columnOrder.map((function(e,r){return a.a.createElement(ar.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return a.a.createElement(fa,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),L.cards.boardModels.boards[t].columns[e].name&&a.a.createElement(ge.a,{title:L.cards.boardModels.boards[t].columns[e].name||"",icon:L.cards.boardModels.boards[t].columns[e].icon||null,iconTitle:"A",fontSize:"16px",customButtons:[{name:"delete",icon:"delete_forever",onClick:function(){F(t,e)},show:"hover"},{name:"edit",icon:"edit",onClick:function(){u(L.cards.boardModels.boards[t].columns[e].name),y(L.cards.boardModels.boards[t].columns[e].icon||null),o(e),O(Object(h.a)({},t,{open:!0}))},show:"hover"}]}))}))})),_&&_[t]&&_[t].open?a.a.createElement(a.a.Fragment,null,a.a.createElement(fa,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(br.a,{callBack:function(e){y(e)}})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__nameOfColumn",1),variant:"outlined",name:"NewColumn",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&T(t)}},value:s,placeholder:Object(S.u)("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}))),a.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},a.a.createElement(Ce.a,{icon:"save",text:Object(S.u)("$__save","*"),onClick:function(){T(t)}}),a.a.createElement(Ce.a,{icon:Object(S.u)("$__cancel","*"),iconColor:"red",text:Object(S.u)("$__cancel","*"),onClick:function(){u(""),O({})}}))):a.a.createElement(Ce.a,{icon:"add_box",text:Object(S.u)("$__addColumn",1),onClick:function(){O(Object(h.a)({},t,{open:!0}))}}),r.placeholder)})))))})),a.a.createElement("div",null,E.open?a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__boardName",1),variant:"outlined",name:"boardName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){k(Object(p.a)(Object(p.a)({},E),{},{name:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&D()}},value:E&&E.name,placeholder:Object(S.u)("$__name",1),styles:{marginBotton:"0px !important"},autoFocus:!0}),a.a.createElement("div",{style:{display:"inline-flex",alignItems:"center",width:"100%",justifyContent:"center"}},a.a.createElement(Ce.a,{icon:"save",text:Object(S.u)("$__save","*"),onClick:function(){D()}}),a.a.createElement(Ce.a,{icon:"cancel",iconColor:"red",text:Object(S.u)("$__cancel","*"),onClick:function(){u(""),k({open:!1,name:""})}}))):a.a.createElement(Ce.a,{icon:"add_box",text:Object(S.u)("$__addBoard",1),onClick:function(){k(Object(p.a)(Object(p.a)({},E),{},{open:!0}))}})))})),ma=r(1972),ga=function(e){return{root:Object(p.a)(Object(p.a)({},Z.k),{},{width:"100%",marginBottom:e.spacing(2),padding:"7px",height:"calc(100vh - 220px)",overflowX:"auto"}),header:{position:"relative",float:"left",width:"auto",minWidth:"100%",height:"50px",display:"flex",alignItems:"center",backgroundColor:Object(S.d)("dark"),color:Object(S.d)("light")},column:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(S.d)("light",.4)),width:"300px"},column2:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(S.d)("light",.4)),width:"calc(100% - 300px)"},body:{color:Object(S.d)("medium"),position:"relative",clear:"both",display:"flex",alignItems:"center",borderBottom:"solid 1px ".concat(Object(S.d)("medium",.2)),"& ul":{position:"relative",padding:"0px",margin:"0px",float:"left",minWidth:"100%","& li":{minWidth:"100%",width:"fit-content",display:"flex",listStyle:"none",padding:"15px 0px",borderBottom:"1px solid ".concat(Object(S.d)("medium",.2))}}},chip:{margin:"3px"}}};function ba(){ba=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ya=Object(u.b)((function(e){return{languages:e.languages}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ga)((function(e){var t=e.classes,r=l.a.getState().languages,n=l.a.getState().functions.socket,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(0),d=Object(m.a)(u,2),p=d[0],h=d[1],g=a.a.useState(25),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useState(""),_=Object(m.a)(x,2),O=_[0],w=_[1],j=function(){var e=Object(f.a)(ba().mark((function e(t,r,a,o){return ba().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?n.emit("language.UPD",{alias:r,locale:a,text:o}):n.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:a,text:o});case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",p+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(r).length/y),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(r).length,page:p,onChangePage:function(e,t){h(t)},rowsPerPage:y,onChangeRowsPerPage:function(e){v(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__cardsPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__search",1),variant:Object(S.d)("fieldVariant"),value:O,onChange:function(e){w(e.target.value)}}),a.a.createElement(Ce.a,{text:Object(S.u)("$__showOnlyEmpty","*"),icon:c?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){s(!c)}})),a.a.createElement(Ct.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.u)("alias",1)),a.a.createElement("div",{className:t.column},"Portugues"),a.a.createElement("div",{className:t.column},"Ingles")),a.a.createElement("div",{className:t.body},a.a.createElement("ul",null,r&&Object.keys(r)&&Object.keys(r).length>0&&Object.keys(r).filter((function(e){return!(!(!O||O&&(e.indexOf(O)>-1||r[e]&&r[e].locales&&Object.keys(r[e].locales).filter((function(t){return r[e].locales[t].name.indexOf(O)>-1})).length>0))||(!c||!r[e]||r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].name)&&c)})).sort((function(e,t){return e<T.b?-1:e>t?1:0})).filter((function(e,t){return t<=(p+1)*y&&t>=p*y})).map((function(e,n){return a.a.createElement("li",{key:e.trim()},a.a.createElement("div",{className:t.column},e),a.a.createElement("div",{className:t.column},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(ge.a,{key:"".concat(e,"_pt-BR"),title:r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].name&&r[e].locales["pt-BR"].name,editable:!0,_id:r[e].locales&&r[e].locales["pt-BR"]&&r[e].locales["pt-BR"].id&&r[e].locales["pt-BR"].id,onEdit:function(e,t){console.log(e)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))),a.a.createElement("div",{className:t.column},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(ge.a,{key:"".concat(e,"_en-US"),title:r[e].locales&&r[e].locales["en-US"]&&r[e].locales["en-US"].name&&r[e].locales["en-US"].name,editable:!0,_id:r[e].locales&&r[e].locales["en-US"]&&r[e].locales["en-US"].id&&r[e].locales["en-US"].id,onEdit:function(t,r){j(r,e,"en-US",t)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),va=function(e){Object(bt.a)(r,e);var t=Object(yt.a)(r);function r(e){var n;return Object(ht.a)(this,r),(n=t.call(this,e)).change=function(e){n.setState({input:Object(S.e)(e.target.value)})},n.state={input:""},n.start=0,n}return Object(mt.a)(r,[{key:"render",value:function(){return a.a.createElement("div",null,a.a.createElement("input",Object.assign({type:"text",onBlur:this.blur,onChange:this.change,value:this.state.input,style:{fontSize:"22px",padding:"4px"}},this.props)),a.a.createElement("pre",{style:{color:"#999",height:"30px"}},Object(S.h)(this.state.input)))}}]),r}(a.a.Component);var xa=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ga)((function(e){var t=!!l.a.getState().db.myTasksMenuExpanded;return a.a.createElement("div",{style:t?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},a.a.createElement(va,null))}))),_a=["children","value","index"];function Oa(e){var t=e.children,r=e.value,n=e.index,o=Object(ft.a)(e,_a);return a.a.createElement("div",Object.assign({role:"tabpanel",hidden:r!==n,id:"scrollable-strength-tabpanel-".concat(n),"aria-labelledby":"scrollable-strength-tab-".concat(n)},o),r===n&&a.a.createElement(la.a,{p:3},t))}function wa(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var ja=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=a.a.useState(0),t=Object(m.a)(e,2),r=t[0],n=t[1],o=a.a.useState(""),i=Object(m.a)(o,2),s=i[0],u=i[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&n(Math.ceil(e[0]))}),[]);var d=function(e){l.a.getState().functions.socket.emit("global",{fn:e})};return a.a.createElement("div",null,a.a.createElement(ca.a,{position:"static",color:"default"},a.a.createElement(ua.a,{value:r,onChange:function(e,t){n(t),c.a.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},a.a.createElement(sa.a,Object.assign({label:"Data",icon:a.a.createElement(re.a,{color:Object(S.d)(0===r?"medium":"color",1)},"Data")},wa(0))),a.a.createElement(sa.a,Object.assign({label:"Languages",icon:a.a.createElement(re.a,{color:Object(S.d)(1===r?"medium":"color",1)},"translate")},wa(1))),a.a.createElement(sa.a,Object.assign({label:"Versions",icon:a.a.createElement(re.a,{color:Object(S.d)(2===r?"medium":"color",1)},"app_registration")},wa(2))))),a.a.createElement(Oa,{value:r,index:0},a.a.createElement("div",null,a.a.createElement(xa,null))),a.a.createElement(Oa,{value:r,index:1},a.a.createElement("div",null,a.a.createElement(ya,null))),a.a.createElement(Oa,{value:r,index:2},a.a.createElement("div",null,a.a.createElement("input",{type:"text",value:s,onChange:function(e){u(e.target.value)}}),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("version")}},Object(S.u)("$__send","*")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("logout")}},Object(S.u)("$__logout","*")),a.a.createElement(nt,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("reload")}},Object(S.u)("$__reload","*")))),a.a.createElement(Oa,{value:r,index:3},a.a.createElement("div",null,a.a.createElement(ha,null))),a.a.createElement(Oa,{value:r,index:4},Object(S.u)("$__accounts",1)),a.a.createElement(Oa,{value:r,index:5},Object(S.u)("$__users",1)),a.a.createElement(Oa,{value:r,index:6},Object(S.u)("$__support",1)),a.a.createElement(Oa,{value:r,index:7},Object(S.u)("$__finance",1)))}));var Ea=Object(u.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Zt)((function(e){return a.a.createElement(a.a.Fragment,null,e.loaders&&Object.keys(e.loaders).length>0&&Object.keys(e.loaders).filter((function(t){return"loading"===e.loaders[t]})).length>0&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{id:"loadBar",style:{color:Object(S.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(S.u)("$__loadingData")),a.a.createElement(ct.a,null)))}))),ka=r(144),Sa=r.n(ka),La=r(453),Ca=r(299),Ia=Object(B.a)(La.a);var Ta=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Ia(),r=l.a.getState(),n=r.session,o=r.search,i=r.db,c=[],s=window.location.hash.split("/");s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null);var u=window.location.pathname.split("/"),d="/".concat(u[1]),p=1;if(s[0]){var f=i.cards[s[0]]||{};(p=f&&f._users&&Object.keys(f._users).length>0?f._users[Object.keys(f._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&p.access&&(p=p.access)}return s[1]&&_u.filter((function(e){return e.path===d})).length>0&&_u.filter((function(e){return e.path===d}))[0].tabs&&_u.filter((function(e){return e.path===d}))[0].tabs.length>0?(_u.filter((function(e){return e.path===d}))[0].tabs&&_u.filter((function(e){return e.path===d}))[0].tabs).forEach((function(e){e.path===s[1]&&(c=e.searchFields)})):_u.filter((function(e){return e.path===d})).length>0&&_u.filter((function(e){return e.path===d}))[0].searchFields&&(c=_u.filter((function(e){return e.path===d}))[0].searchFields),JSON.stringify(Ca.a)===JSON.stringify(o)?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",null,a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:9,md:9,lg:9,xl:9},a.a.createElement("span",{style:{color:Object(S.d)("medium"),fontWeight:"bold",fontSize:"18px",display:"flex",alignItems:"center"}},a.a.createElement(re.a,{size:"18px"},"search"),Object(S.u)("$__appliedFilters"))),a.a.createElement(qn.a,{xs:12,sm:3,md:3,lg:3,xl:3},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(Ce.a,{reverse:!0,icon:"clear_all",text:Object(S.u)("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),c&&c.indexOf("text")>-1&&o.text&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{className:t.textField,style:{width:"100%"}},Object(S.u)("$__text"),": ",o.text)),c&&c.indexOf("status")>-1&&JSON.stringify(o.cards.status)!==JSON.stringify(Ca.a.cards.status)&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.u)("$__status")),Object.keys(o.cards.status).filter((function(e,t){return o.cards.status[e]&&"all"!==e})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(i.status.filter((function(t){return t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),c&&c.indexOf("priority")>-1&&JSON.stringify(o.cards.priority)!==JSON.stringify(Ca.a.cards.priority)&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.u)("$__priority")),Object.keys(o.cards.priority).filter((function(e,t){return o.cards.priority[e]&&"all"!==e})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))})))),c&&c.indexOf("users")>-1&&JSON.stringify(o.users)!==JSON.stringify(Ca.a.users)&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.u)("$__users"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.users.selected).length>0&&Object.keys(l.a.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.users.selected[e]?a.a.createElement(Kt.a,{title:i.users[e].name,key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&l.a.getState().search.users.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.u)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.u)("$__unassigned",1),src:Sa.a},Object(S.u)("$__unassigned",1)))}))))),c&&c.indexOf("units")>-1&&JSON.stringify(o.units)!==JSON.stringify(Ca.a.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&c.indexOf("units")>-1&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.u)("$__units"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.units.selected).length>0&&Object.keys(l.a.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.units.selected[e]?a.a.createElement(Kt.a,{title:i.users[e].name,key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:i.users[e].name,src:i.users[e].image||null},i.users[e].name.substr(0,1))):"unassigned"===e&&l.a.getState().search.units.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.u)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.u)("$__unassigned",1),src:Sa.a},Object(S.u)("$__unassigned",1)))}))))),l.a.getState().search.plans&&l.a.getState().search.plans.selected&&Object.keys(l.a.getState().search.plans.selected).length>0&&Object.keys(i.cards).filter((function(e){return"plan"===i.cards[e].type})).length>0&&c&&c.indexOf("plans")>-1&&a.a.createElement(qn.a,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.u)("$__plans"),a.a.createElement(Jr.a,{max:6},Object.keys(l.a.getState().search.plans.selected).length>0&&Object.keys(l.a.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&l.a.getState().search.plans.selected[e]?a.a.createElement(Kt.a,{title:i.cards[e].name,key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:i.cards[e].name,src:i.cards[e].image||null},i.cards[e].name.substr(0,1))):"unassigned"===e&&l.a.getState().search.plans.selected[e]&&a.a.createElement(Kt.a,{title:Object(S.u)("$__unassigned",1),key:t},a.a.createElement(at.a,{style:{width:"30px",height:"30px"},alt:Object(S.u)("$__unassigned",1),src:Sa.a},Object(S.u)("$__unassigned",1)))}))))),a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12})))}));function Fa(){Fa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Da=Object(u.b)((function(e){return{cards:e.db.cards,search:e.search,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().search,r=a.a.useState(0),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(21),s=Object(m.a)(c,1)[0],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useRef(!0);a.a.useEffect((function(){return function(){_.current=!1}}),[]);var O=function(){var t=Object(f.a)(Fa().mark((function t(r,n){var a;return Fa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!_.current){t.next=6;break}return g(!0),t.next=4,Object(Rt.b)(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&_.current&&(g(!1),a.total<n&&x(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();a.a.useEffect((function(){h||v||!_.current||O(o,s)}),[o,s]);var w=window.location.hash.split("/");w[0]=w[0].replace("#","");var j=l.a.getState().db,E=Object.keys(j.cards).filter((function(e){return j.cards[e]&&"insight"===j.cards[e].type&&!j.cards[e].deleted&&Object(ke.a)(e)})).sort((function(e,t){return j.cards[e].created_at>j.cards[t].created_at?-1:j.cards[e].created_at<j.cards[t].created_at?1:0})).map((function(e){return j.cards[e]}));E=E.filter((function(e){return e.description&&e.description.toLowerCase().indexOf(t.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(t.text.toLowerCase())>-1})).map((function(e){return e})),t.tags.length>0&&(E=E.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var r=!1;return t.tags.forEach((function(t){t.value===e.value&&(r=!0)})),r})).length>0})).map((function(e){return e})));var k=function(e){var t=document.getElementById("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&_.current&&i(o+1)};return 0===E.filter((function(t,r){return!e.max||e.max&&r<e.max})).length?a.a.createElement("div",{id:"insightList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){k()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{justifyContent:"center",textAlign:"center",display:"block",paddingBottom:15}},a.a.createElement("div",{style:{margin:"auto",marginBottom:15,display:"flex",justifyContent:"center"}},a.a.createElement(re.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.u)("$__youHaveNoIdeasAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.u)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(S.u)("$__getStarted")))))):a.a.createElement("div",{id:"insightList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){k()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(E).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(qn.a,{key:E[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:E[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))})),Na=r(1941),Aa=function(){return{feed:{backgroundColor:"rgba(255,255,255,1)",margin:"auto",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",width:"-webkit-fill-available",marginBottom:"15px",borderTopRightRadius:22},infos:{padding:"7px",cursor:"pointer"},feedRotate:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",backgroundColor:"rgba(255,255,255,1)",padding:"7px 7px 20px 7px",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",placeSelf:"flex-end",cursor:"pointer"},image:{width:"100%",paddingTop:"calc((9 / 16) * 100%)",backgroundPosition:"center",backgroundRepeat:"no-repeat"},linkTitle:{marginTop:"7px",width:"100%",height:"auto",fontWeight:"bold",minHeight:"65px"},linkContent:{width:"100%",marginTop:"7px",height:"87px",textOverflow:"ellipsis",overflow:"hidden"},feedFooter:{width:"100%",cursor:"auto",textAlign:"right",justifyContent:"space-between",paddingTop:"10px",display:"flex",paddingBottom:"7px"},feedDate:{position:"relative",left:"0px",fontSize:"12px",float:"left"},feedLink:{position:"relative",left:"0px",fontSize:"12px",float:"right",display:"flex"}}};var Pa=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.feed},a.a.createElement(Na.a,{variant:"rect",animation:"wave",style:{borderRadius:0,paddingTop:"calc((9 / 16) * 100%)",width:"100%",borderTopRightRadius:22}}),a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.linkTitle},a.a.createElement(Na.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Na.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Na.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),a.a.createElement("div",{className:t.linkContent},a.a.createElement(Na.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Na.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Na.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Na.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}})),a.a.createElement("div",{className:t.feedFooter},a.a.createElement("div",{className:t.feedDate,style:{width:"50%",height:"20px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"100%",height:"8px"}},a.a.createElement(Na.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function $a(){$a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ma=Object(u.b)((function(e,t){return{cards:e.db.cards,search:e.search,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!1),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useRef(!0);a.a.useEffect((function(){return O(c,18),function(){_.current=!1}}),[]),a.a.useEffect((function(){h||v||!_.current||O(c,18)}),[c,18]);var O=function(){var t=Object(f.a)($a().mark((function t(r,n){var a;return $a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!_.current){t.next=6;break}return g(!0),t.next=4,Object(Rt.b)(e,{cardLoad:"links",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&_.current&&(g(!1),a.total<n&&x(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),w=window.location.hash.split("/");w[0]=w[0].replace("#","");var j={};j=(j=Object.keys(r.cards).filter((function(e){return"link"===r.cards[e].type&&r.cards[e]._users&&Object(ke.a)(e)&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),n.tags.length>0&&(j=j.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var E=function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&_.current&&s(c+1)},k=function(){for(var e=[],t=0;t<18;t++)e.push(a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Pa,null)));return a.a.createElement(a.a.Fragment,null,e)};return 0===Object.keys(j).filter((function(t,r){return!e.max||e.max&&r<e.max})).length?a.a.createElement("div",{id:"insightList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){E()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{justifyContent:"center",textAlign:"center",display:"block",paddingBottom:15}},a.a.createElement("div",{style:{margin:"auto",marginBottom:15,display:"flex",justifyContent:"center"}},a.a.createElement(re.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.u)("$__youHaveNoRadarAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.u)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(S.u)("$__getStarted")))))):a.a.createElement("div",{id:"linkList",style:e.horizontal?{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}:{position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",overflowY:"auto"},onScroll:e.horizontal?null:function(e){E()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement("div",null),Object.keys(j).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(qn.a,{key:j[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:j[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),h?a.a.createElement(k,null):a.a.createElement(a.a.Fragment,null)))})),za=r(530),Ya=r.n(za),Ba=r(95),Ra=r(869),Ga=r.n(Ra),Ha=r(870),Wa=r.n(Ha),Ua=r(129),qa=r(150),Va=r.n(qa);var Ja=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=e.data,r=e.classes,n=a.a.useState(t.img),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState({backgroundSize:"contain"}),u=Object(m.a)(s,2),d=u[0],f=u[1],h=a.a.useRef({});return a.a.useEffect((function(){if(h.current&&e.onResize){var t=new ResizeObserver((function(){var t=h.current.clientHeight;e.onResize(t)}));return t.observe(h.current),function(){return t.disconnect()}}}),[]),a.a.createElement("div",{className:r.feed,ref:h,onClick:e.clickChannel?function(){return e.clickChannel()}:null,style:Object(p.a)(Object(p.a)({},e.clickChannel?{cursor:"pointer"}:{}),{},{position:"relative"})},a.a.createElement("div",{style:{display:"none"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:i,onError:function(){c(null)},onLoad:function(e){var t=e.target;t&&t.width&&t.height&&(t.width>t.height&&t.width/t.height>1.75?f({backgroundSize:"contain"}):f({backgroundSize:"cover"}))}})),a.a.createElement("div",{className:r.image,style:Object(p.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},i?Object(p.a)({backgroundImage:'url("'.concat(i,'")')},d):{background:Object(S.d)("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},!i&&a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(re.a,{icon:Va.a,size:"39px",color:Object(S.d)("textColor")})),!e.clickChannel&&a.a.createElement("div",{style:{position:"absolute",top:7,right:7}},a.a.createElement(k.a,{title:Object(S.u)("$__sendToRadar","*"),color:Object(S.d)("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:t.title,description:t.contentSnippet,pubDate:t.isoDate?t.isoDate:t.pubDate,image:t.img,url:t.link}}))},size:"25px"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.5)",padding:"3px 7px",color:"white",fontSize:11}},O()(t.isoDate?t.isoDate:t.pubDate).format("DD/MM/YYYY HH:MM"))),a.a.createElement(Ua.a,{title:a.a.createElement(a.a.Fragment,null,!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(S.u)("$__clickHereToReadNews",1)))},a.a.createElement("div",{className:r.infos,onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},a.a.createElement("div",{className:r.linkTitle},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t&&t.title&&Wa()(t.title)?t.title:t.title?Ga()(t.title):""}})),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&Wa()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?Ga()(t.contentSnippet):""},className:r.linkContent}),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedLink},!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(S.u)("$__readMore",1)))))),a.a.createElement("div",{style:{top:-30}},a.a.createElement(dt.a,{options:e._tags})))})));var Xa=Object(le.a)(Aa)((function(e){var t=e.data,r=e.classes;return a.a.createElement("div",{className:r.feed,onClick:e.clickChannel?function(){return e.clickChannel()}:null},a.a.createElement("div",{className:r.image,style:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{marginTop:"calc(-48% + 0px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(re.a,{icon:Va.a,size:"47px",color:"rgba(250,250,250,0.77)"}))),a.a.createElement("div",{className:r.infos},a.a.createElement("div",{className:r.linkTitle},Object(S.u)("$__attention")),a.a.createElement("div",{className:r.linkContent},Object(S.u)("$__weHaveNotFoundYetLink")),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedDate},O()(t.created_at&&t.created_at.low?t.created_at.low:t.created_at).format("DD/MM/YYYY HH:MM")))))}));function Ka(){Ka=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Za=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=e.data,i=Object(S.j)(),s=window.location.hash.split("/");if(s[0]=s[0].replace("#",""),!o)return null;var u=function(){var t=Object(f.a)(Ka().mark((function t(a){var i,c;return Ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=s[0]&&36===s[0].length?o._parent[s[0]].idRel:o._parent[n.account].idRel,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return l.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel&&(i=o._parent[Object.keys(o._parent)[0]].idRel),De.a.put("/rel/update",{_id:i,customTitle:a}),c=l.a.getState().db.feeds,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return l.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel?c[o._id]=Object(p.a)(Object(p.a)({},c[o._id]),{},{_parent:Object(p.a)(Object(p.a)({},c[o._id]._parent),{},Object(h.a)({},Object.keys(o._parent)[0],Object(p.a)(Object(p.a)({},c[o._id]._parent[Object.keys(o._parent)[0]]),{},{customTitle:a})))}):c[o._id]=Object(p.a)(Object(p.a)({},c[o._id]),{},{_parent:Object(p.a)(Object(p.a)({},c[o._id]._parent),{},Object(h.a)({},s[0],Object(p.a)(Object(p.a)({},c[o._id]._parent[s[0]]),{},{customTitle:a})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{feeds:c})),e.onChange&&e.onChange();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var e=Object(f.a)(Ka().mark((function e(t){return Ka().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){m(t)}});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var t=Object(f.a)(Ka().mark((function t(n){var a,i;return Ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=n||s[0],De.a.delete("feed/unfollow/".concat(a,"__").concat(o._id)),(i=Object(p.a)({},l.a.getState().db.feeds))[o._id]&&i[o._id]._parent&&i[o._id]._parent[a]&&delete i[o._id]._parent[a],n&&i[o._id]&&delete i[o._id],e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{feeds:Object(p.a)({},i)})),e.onChange&&setTimeout((function(){e.onChange()}),400);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(f.a)(Ka().mark((function t(n){var a,i=arguments;return Ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.length>1&&void 0!==i[1]&&i[1],De.a.put("feed/visible/",{feedId:o._id,visible:!o||!o.hide}),a=o,a=Object(p.a)(Object(p.a)({},a),{},{hide:!o||!o.hide}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{feeds:Object(p.a)(Object(p.a)({},r.feeds),{},Object(h.a)({},o._id,Object(p.a)(Object(p.a)({},r.feeds[o._id]),a)))}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o._parent&&Object.keys(o._parent).forEach((function(e){s[0]&&36===s[0].length&&s[0]===e?o.customTitle=o._parent[e].customTitle:Object.keys(o._parent).length>0&&(o.customTitle=o._parent[Object.keys(o._parent)[0]].customTitle)})),a.a.createElement("div",{style:{position:"relative",height:"auto",cursor:"pointer",width:"100%"}},a.a.createElement(wr.a,Object.assign({title:o.customTitle?o.customTitle:o.name,icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return u(e)},color:Object(S.d)("color"),editable:!!(s[0]&&36===s[0].length&&i&&i.plan&&(i.planAdmin||i.planModerate)||o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return l.a.getState().db.cards[e]})).length),moreButton:!0},s[0]&&"tab"===s[0]&&i&&i.plan&&(i.planAdmin||i.planModerate)?Object(p.a)({},o._parent&&Object.keys(o._parent).length>0&&{options:[{name:o.hide?Object(S.u)("$__folowRSS"):Object(S.u)("$__hideRSS"),icon:o.hide?"visibility":"visibility_off",onClick:function(){g()}}].concat(Object(A.a)(i&&i.feed&&(i.feedAdmin||i.feedModerate)?[{name:Object(S.u)("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"feeds",id:o._id,module:"feedEdit",activeModule:"feedEdit",data:Object(p.a)(Object(p.a)({},o),{},{_lock:!0,_admin:!!e.admin})}))}}]:[]),Object(A.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).forEach((function(o){if(l.a.getState().db.cards[o]&&l.a.getState().db.cards[o]._users&&l.a.getState().db.cards[o]._users[n._id]){var i=l.a.getState().db.cards[o];t=[].concat(Object(A.a)(t),[{name:i.name,icon:"view_comfy",render:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex",color:Object(S.d)("color")}},a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Ba.a,{overlap:"rectangular",icon:i.type&&r&&r.dataType?r.dataType.filter((function(e){return e.name===i.type}))[0].icon:"topic",title:"$__".concat(i.type),size:"22px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},i.name))),onClick:function(){c.a.push("sp#".concat(o,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(A.a)(t),[{name:Object(S.u)("$__globalAccount"),icon:"rss_feed",render:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginRight:"10px",width:"100%",display:"flex"}},a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(Ba.a,{overlap:"rectangular",icon:"rss_feed",title:Object(S.u)("$__globalAccount"),size:"22px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},Object(S.u)("$__globalAccount}")),a.a.createElement("div",{style:{width:"16px"}},a.a.createElement(Ba.a,{overlap:"rectangular",icon:"delete_forever",title:Object(S.u)("$__delete"),size:"22px",color:"red",onClick:function(){d(o)}})))),onClick:function(){d(o)}}]))})),t}}()))}):i&&i.plan&&(i.planAdmin||i.planModerate)?{options:[{name:Object(S.u)("$__deleteRSS"),icon:"delete_forever",onClick:function(){d()}}]}:{})),a.a.createElement("div",{style:{padding:"0",display:"flex",marginBottom:"15px",flexFlow:"wrap",marginTop:"15px"}},o.feed&&Object.keys(o.feed).length>0?Object.keys(o.feed).sort((function(e,t){return o.feed[e].isoDate&&o.feed[t].isoDate&&o.feed[e].isoDate<o.feed[t].isoDate?1:-1})).filter((function(e,t){return!(!o||0!==t)})).map((function(e){var t=o.feed[e],r=Ya.a.MD5(t.link);return a.a.createElement(Ja,{key:r,data:t,_tags:o._tags,clickChannel:function(){c.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})})):a.a.createElement(Xa,{data:o,clickChannel:function(){c.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})))})));function Qa(){Qa=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var eo=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=l.a.getState().db,n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(window.location.hash.split("/")),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState([]),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(!0),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useRef({}),k=a.a.useRef(!0);a.a.useEffect((function(){k.current=!0,E.current={loading:!1};var e=window.location.hash.split("/");return e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(d)&&g(e),j(!0),function(){k.current=!1}}),[]),a.a.useEffect((function(){d.length>0&&k.current&&(L(),d[2]&&36!==d[2].length&&j(!0))}),[d]),a.a.useEffect((function(){k.current&&j(!1)}),[v]);var L=function(){var e=Object(f.a)(Qa().mark((function e(){var t,r;return Qa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i||E.current.loading){e.next=10;break}return E.current={loading:!0},k.current&&j(!0),e.next=5,Pe.a.post("/Feed_Links_V2",{ids:d[2]&&d[2].length?d[2]:null,skip:Object.keys(v).length,limit:21});case 5:t=e.sent,r=Array.from(v),t&&t.data&&(t.data.forEach((function(e){0===r.filter((function(t){return t.link===e.link})).length&&r.push(e)})),k.current&&x(r)),t.data&&0===t.data.length&&k.current&&c(!0),E.current={loading:!1};case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var n=Object(f.a)(Qa().mark((function n(a){var o;return Qa().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:De.a.put("/rel/update",{_id:t.idRel,customTitle:a}),(o=r.cards[d[0].replace("#","")]._feeds)[t._id]=Object(p.a)(Object(p.a)({},o[t._id]),{},{customTitle:a}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{cards:Object(p.a)(Object(p.a)({},r.cards),{},Object(h.a)({},d[0].replace("#",""),Object(p.a)(Object(p.a)({},r.cards[d[0].replace("#","")]),{},{_feeds:o})))}));case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),I=function(){var n=Object(f.a)(Qa().mark((function n(a){var o,i;return Qa().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:window.history.back(),o=a.replace("#",""),De.a.delete("feed/unfollow/".concat(o,"__").concat(t._id)),delete(i=r.cards[o]._feeds)[t._id],e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},r),{},{cards:Object(p.a)(Object(p.a)({},r.cards),{},Object(h.a)({},o,Object(p.a)(Object(p.a)({},r.cards[o]),{},{_feeds:i})))}));case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),T=function(){for(var e=[],t=0;t<21;t++)e.push(a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Pa,null)));return a.a.createElement(a.a.Fragment,null,e)};return a.a.createElement("div",null,t&&(t.customTitle||t.name)&&a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:33}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",marginBottom:"15px",display:"flex"}},a.a.createElement(Ce.a,{icon:"undo",text:Object(S.u)("$__back","*"),onClick:function(){return window.history.back()}}),d[0]&&"bright-and-connected"===d[1]&&d[2]&&a.a.createElement(Ce.a,{icon:"delete_sweep",text:Object(S.u)("$__removeChannel","*"),onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){I(d[0])}})}})),a.a.createElement(ge.a,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return C(e)},editable:!0})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},e.horizontal?{position:"relative",width:"100%"}:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0}),{},{padding:"0px 15px",overflow:"auto"}),id:"linkList",onScroll:function(t){!function(t){var r=document.getElementById("linkList");!w&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&L()}()}},a.a.createElement(Rr.a,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},v.filter((function(t,r){return!e.max||e.max&&r<e.max})).sort((function(e,t){return e.isoDate&&t.isoDate&&e.isoDate<t.isoDate?1:e.isoDate&&t.isoDate&&e.isoDate>t.isoDate?-1:0})).map((function(e){return a.a.createElement(qn.a,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Ja,{db:"cards",data:e}))})),!i&&w?a.a.createElement(T,null):a.a.createElement(a.a.Fragment,null))))})),to=function(e){return{}};function ro(){ro=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var no=Object(u.b)((function(e){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(to)((function(e){var t=l.a.getState(),r=t.search,n=t.session,o=a.a.useState(!0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState({}),d=Object(m.a)(u,2),g=d[0],b=d[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),a.a.useEffect((function(){x()}),[e.store.feeds]),a.a.useEffect((function(){v()}),[]);var v=function(){var t=Object(f.a)(ro().mark((function t(){return ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!0),"hideFeeds"!==y[1]){t.next=8;break}return t.next=4,yn(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&x(),t.next=16;break;case 8:if(0!==Object.keys(l.a.getState().db.feeds).filter((function(e){return!l.a.getState().db.feeds[e].hide})).length){t.next=15;break}return t.next=11,yn(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}));case 11:t.sent&&x(),t.next=16;break;case 15:x();case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),x=function(){var e={};Object.keys(l.a.getState().db.feeds).length>0&&(e=Object(p.a)(Object(p.a)({},e),l.a.getState().db.feeds));var t={};Object.keys(e).filter((function(t){return e[t]&&e[t].name&&e[t].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||e[t].customTitle&&e[t].customTitle.toLowerCase().indexOf(r.text.toLowerCase())>-1||e[t].customDescription&&e[t].customDescription.toLowerCase().indexOf(r.text.toLowerCase())>-1})).forEach((function(n){(Object.keys(r.plans.selected).length>0&&Object.keys(r.plans.selected).map((function(t){return r.plans.selected[t]&&e[n]._parent[t]})).length>0||0===Object.keys(r.plans.selected).length)&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},n,e[n])))})),b(t),s(!1)};return c?a.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):y[2]&&36===y[2].length?a.a.createElement("div",null,a.a.createElement(eo,{follow:!0})):a.a.createElement("div",{style:{width:"calc(100% - 20px)",position:"relative",display:"flex"}},a.a.createElement(Rr.a,null,g&&Object.keys(g).length>0&&Object.keys(g).filter((function(t){if(36===y[0].length&&l.a.getState().db.cards[y[0]]&&g[t]._parent&&Object.keys(g[t]._parent).length>0&&g[t]._parent[y[0]])return!0;if("tab"===y[0]){var r=!1;if(g[t].hide&&(r=!0),!e.showHidden&&!r)return!0;if(e.showHidden&&r)return!0}return!1})).sort((function(e,t){var r=g[e].customTitle?g[e].customTitle.toLowerCase().trim():g[e].name.toLowerCase().trim(),a=g[t].customTitle?g[t].customTitle.toLowerCase().trim():g[t].name.toLowerCase().trim();return y[0]&&36!==y[0].length&&(n&&n.account&&g[e]._parent&&g[e]._parent[n.account]&&g[e]._parent[n.account].customTitle&&(r=g[e]._parent[n.account].customTitle.toLowerCase().trim()),n&&n.account&&g[t]._parent&&g[t]._parent[n.account]&&g[t]._parent[n.account].customTitle&&(a=g[t]._parent[n.account].customTitle.toLowerCase().trim())),r<a?-1:r>a?1:0})).map((function(e,t){var r=g[e];return a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},a.a.createElement(Za,{data:r,follow:!0,onChange:function(){x()}}))}))))})));function ao(){ao=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var oo=Object(B.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),io=function(e){var t=l.a.getState(),r=t.session,n=t.functions.socket,o=a.a.useState(e.data),i=Object(m.a)(o,2),c=i[0],s=i[1],u=oo();a.a.useEffect((function(){s(e.data)}),[e.data]);var d=function(){var t=Object(f.a)(ao().mark((function t(a,o){var i,l;return ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.emit("data",{module:"social",method:"post",action:"interact"},{react:a,user:r._id,nodeId:e.data._id,message:e.data._id,delete:o}),(i=c)&&i._reactions&&Object.keys(i._reactions).length>0&&Object.keys(i._reactions).filter((function(e){return e!==a})).forEach((function(e){i._reactions[e][r._id]&&delete i._reactions[e][r._id]})),o&&c&&c._reactions&&c._reactions[a]&&c._reactions[a][r._id]?(delete(l=c)._reactions[a][r._id],s(l)):s(Object(p.a)(Object(p.a)({},c),{},{_reactions:Object(p.a)(Object(p.a)({},c._reactions),{},Object(h.a)({},a,Object(h.a)({},r._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},r.displayName?{displayName:r.displayName}:{}),r.name?{name:r.name}:{}),r.image?{image:r.image}:{}),{},{reactDate:{low:O()().tz("America/Sao_Paulo").unix("X")}}))))}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),g=function(t){var n=t.react,o=t.color,i=t.primaryIcon,l=t.secondaryIcon;return e.hideDisables&&c&&n&&c._reactions&&(!c._reactions[n]||c._reactions[n]&&0===Object.keys(c._reactions[n]).length)?a.a.createElement(a.a.Fragment,null):a.a.createElement(Ce.a,{icon:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?i:l||i,iconColor:c._reactions&&c._reactions[n]&&c._reactions[n][r._id]?o||Object(S.d)("menu"):"lightgray",size:"18px",onClick:function(){d(n,!!(c._reactions&&c._reactions[n]&&c._reactions[n][r._id]))},title:c._reactions&&c._reactions[n]&&Object.keys(c._reactions[n]).length>0?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:3,borderBottom:"1px solid lightgray",marginBottom:"7px"}},Object(S.u)("$__".concat(n),1)),a.a.createElement("div",{className:u.users},Object.keys(c._reactions[n]).sort((function(e,t){return c._reactions[n][e].reactDate&&String(c._reactions[n][e].reactDate.low)&&c._reactions[n][t].reactDate&&String(c._reactions[n][t].reactDate.low)&&parseInt(c._reactions[n][e].reactDate.low)<parseInt(c._reactions[n][t].reactDate.low)?-1:c._reactions[n][e].reactDate&&String(c._reactions[n][e].reactDate.low)&&c._reactions[n][t].reactDate&&String(c._reactions[n][t].reactDate.low)&&parseInt(c._reactions[n][e].reactDate.low)>parseInt(c._reactions[n][t].reactDate.low)?1:0})).map((function(e,t){return a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(at.a,{alt:c._reactions[n][e].name,src:c._reactions[n][e].image||Sa.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},c._reactions[n][e].displayName?c._reactions[n][e].displayName:c._reactions[n][e].name,c._reactions[n][e].reactDate&&c._reactions[n][e].reactDate.low&&" (".concat(O()(1e3*c._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):Object(S.u)("$__".concat(n),1)})};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"}},a.a.createElement(g,{react:"like",primaryIcon:"thumb_up",secondaryIcon:"thumb_up_off_alt"}),a.a.createElement(g,{react:"nolike",primaryIcon:"thumb_down",secondaryIcon:"thumb_down_off_alt"}),a.a.createElement(g,{react:"love",primaryIcon:"favorite",secondaryIcon:"favorite_border",color:"red"}),a.a.createElement(g,{react:"approve",primaryIcon:"verified",color:"green"}),a.a.createElement(g,{react:"attention",primaryIcon:"report_problem",color:"red"}),e.children&&a.a.createElement(a.a.Fragment,null,e.children)))};var co=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useRef({});return a.a.useEffect((function(){if(c.current&&e.onResize){var t=new ResizeObserver((function(){var t=c.current.clientHeight;e.onResize(t)}));return t.observe(c.current),function(){return t.disconnect()}}return function(){}}),[c]),a.a.useEffect((function(){i(e.data)}),[]),a.a.createElement("div",{ref:c,className:t.feed,style:{cursor:"pointer"},onClick:e.onClick?function(){return e.onClick()}:null},o&&o.img&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:o.img,style:{width:"100%"},onError:function(){i(Object(p.a)(Object(p.a)({},o),{},{img:null}))}})),a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.linkTitle,dangerouslySetInnerHTML:{__html:o.title}}),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:o.contentSnippet},className:t.linkContent}),a.a.createElement("div",{className:t.feedFooter,onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:t.feedDate},O()(o.isoDate?o.isoDate:o.pubDate).format("DD/MM/YYYY HH:MM")),o.title&&o.title.indexOf("Violet ganham")>-1&&console.log(o),a.a.createElement(io,{data:o},a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(Ce.a,{icon:"settings_input_antenna",title:Object(S.u)("$__sendToRadar",1),iconColor:Object(S.d)("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:o.title,description:o.contentSnippet,pubDate:o.isoDate?o.isoDate:o.pubDate,image:o.img,url:o.link}}))}}))))))})));function lo(){lo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var so=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Aa)((function(e){var t=e.data,r=a.a.useState([]),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState([]),l=Object(m.a)(c,2),s=l[0],u=l[1],d=a.a.useState(!0),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useRef(!0),x=a.a.useRef({endLinks:!1});a.a.useEffect((function(){return function(){v.current=!1}}),[]);var _=function(){var e=Object(f.a)(lo().mark((function e(){var t,r,n,a;return lo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object.keys(s).length>0?Math.ceil(Object.keys(s).length/7)+1:0,7,x.current.endLinks){e.next=19;break}return y(!0),e.prev=4,e.next=7,Pe.a.post("/Feed_Social_V2",{ids:null,skip:7*t,limit:7});case 7:r=e.sent,n={},a=0,r&&r.data&&r.data.length>0?r.data.forEach((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.react.type,Object(p.a)(Object(p.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(h.a)({},e.user._id,Object(p.a)(Object(p.a)({},e.user),{},{reactDate:e.react.created_at})))))})),n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.link._id,Object(p.a)(Object(p.a)({},e.link),{},{_reactions:t}))),e.total>a&&(a=e.total)})):r&&r.data&&0===r.data.length&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{endLinks:!0})),u(Object(p.a)(Object(p.a)({},s),n)),y(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(4),console.log(e.t0),y(!1);case 19:return e.abrupt("return",!0);case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(){return e.apply(this,arguments)}}();return a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),i(e),y(!0)}),[]),a.a.useEffect((function(){o.length>0&&v.current&&(_(),o[2]&&36!==o[2].length&&y(!0))}),[o]),a.a.useEffect((function(){v.current&&y(!1)}),[s]),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement("div",{style:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0,padding:"0px 15px",overflow:"auto"},id:"linkList",onScroll:function(e){!function(e){var t=document.getElementById("linkList");!b&&t.scrollHeight-t.scrollTop<2500&&v.current&&_()}()}},a.a.createElement(Rr.a,null,Object.keys(s).sort((function(e,t){return s[e].isoDate&&s[t].isoDate&&s[e].isoDate<s[t].isoDate?1:s[e].isoDate&&s[t].isoDate&&s[e].isoDate>s[t].isoDate?-1:0})).map((function(e){return a.a.createElement(Rr.a,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(qn.a,{xs:12,sm:10,md:8,lg:6,xl:6},a.a.createElement(co,{db:"cards",data:s[e],onClick:function(){window.open(s[e].link,"_blank")}})))}))),b&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(ct.a,null))))})));function uo(){uo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var po=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.data,r=a.a.useState([]),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState([]),l=Object(m.a)(c,2),s=l[0],u=l[1],d=a.a.useState(!0),h=Object(m.a)(d,2),g=h[0],b=h[1],y=a.a.useRef(!0);a.a.useEffect((function(){return function(){y.current=!1}}),[]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(o)&&i(e),b(!0)}),[]),a.a.useEffect((function(){o.length>0&&y.current&&(v(),o[2]&&36!==o[2].length&&b(!0))}),[o]);var v=function(){var e=Object(f.a)(uo().mark((function e(t,r){var n,a;return uo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y.current&&b(!0),e.prev=2,e.next=5,Pe.a.post("/Feed_Social",{id:o[2]});case 5:n=e.sent,a={},n&&n.data&&n.data.links?(a=Object(p.a)(Object(p.a)({},a),n.data.links),y.current&&u(Object(p.a)(Object(p.a)({},s),a)),y.current&&b(!1)):y.current&&b(!1),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t,r){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement("div",{style:{position:"absolute",top:t&&(t.customTitle||t.name)?50:0,left:0,right:0,bottom:0,padding:"0px 15px",overflow:"auto"},id:"linkList"},a.a.createElement(Rr.a,null,Object.keys(s).length>0?Object.keys(s).sort((function(e,t){return s[e].isoDate&&s[t].isoDate&&s[e].isoDate<s[t].isoDate?1:s[e].isoDate&&s[t].isoDate&&s[e].isoDate>s[t].isoDate?-1:0})).map((function(e){return a.a.createElement(Rr.a,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(qn.a,{xs:12,sm:6,md:6,lg:6,xl:6},a.a.createElement(co,{db:"cards",data:s[e],onClick:function(){window.open(s[e].link,"_blank")}})))})):a.a.createElement(Rr.a,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(qn.a,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),g&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(ct.a,null))))}));var fo=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){a.a.useEffect((function(){return console.log("StrategyAndPlans"),function(){}}),[]),window.location.hash.split("/")[0].replace("#","")||c.a.push("bright-and-connected#tab/home");var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),a.a.createElement("div",null,t[1]&&("radar"===t[1]||"insight-boards"===t[1])&&a.a.createElement(Ea,null),t[1]&&"home"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(so,null)),t[1]&&"read"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ta,null),a.a.createElement(po,null)),t[1]&&"insight-boards"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ta,null),a.a.createElement(Da,null)),t[1]&&"radar"===t[1]&&a.a.createElement("div",{style:{top:33}},a.a.createElement(Ma,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ta,null),a.a.createElement(no,null)),t[1]&&"hideFeeds"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ta,null),a.a.createElement(no,{showHidden:!0})),t[1]&&"allNews"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ta,null),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement(eo,null))))})),ho=r(878),mo=r(1155),go=r.n(mo),bo=(r(1734),Object(le.a)((function(e){return{tooltip:{backgroundColor:"rgba(0,0,0,0.5) !important",color:"rgba(0, 0, 0, 0.87)",padding:"5px !important",fontSize:e.typography.pxToRem(12),border:"none",borderRadius:"7px",boxShadow:"3px 3px 7px 0px rgba(0,0,0,0.7)",alignItems:"center",justifyContent:"center"}}}))(Kt.a)),yo=(r(1735),r(1736),r(132));function vo(e){var t=e.options,r=void 0===t?[]:t,n=e.onChange,o=void 0===n?function(){}:n,i=l.a.getState().db;return a.a.createElement(yo.a,{text:Object(S.u)("$__showActivitiesType"),icon:"collections_bookmark",options:[].concat(Object(A.a)(i.type.filter((function(e){return e.calendar})).map((function(e){return{name:Object(S.u)("".concat(e.label),1),icon:e.icon,iconColor:r.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),color:r.indexOf(e.value)>-1?"lightgray":Object(S.d)("menu"),onClick:function(){var t=Array.from(r);-1===t.indexOf(e.value)?t.push(e.value):t.splice(t.indexOf(e.value),1),o(t)}}}))),[{name:r.length===i.type.filter((function(e){return e.calendar})).length?Object(S.u)("$__showAll",1):Object(S.u)("$__hideAll",1),icon:"clear_all",iconColor:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),color:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(S.d)("menu"),onClick:function(){if(r.length===i.type.filter((function(e){return e.calendar})).length)o([]);else{var e=[];i.type.filter((function(e){return e.calendar})).forEach((function(t){e.push(t.value)})),o(e)}}}])})}function xo(){xo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var _o=go()(ho.a),Oo={allDay:Object(S.u)("$__allDay"),previous:"<",next:">",today:Object(S.u)("$__today"),month:Object(S.u)("$__month"),week:Object(S.u)("$__week"),day:Object(S.u)("$__aday"),agenda:Object(S.u)("$__agenda"),date:Object(S.u)("$__date"),time:Object(S.u)("$__hour"),event:Object(S.u)("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(Object(S.u)("$__activities"))}};function wo(e){var t=e.label,r=function(t){e.onNavigate(t)};return a.a.createElement("div",{className:"rbc-toolbar"},a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("PREV")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__prev"))),a.a.createElement("span",{className:"rbc-toolbar-label"},t),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("NEXT")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__next"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("TODAY")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__today"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("day")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__day"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("week")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__week"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("month")},style:{backgroundColor:Object(S.d)("menu"),borderRadius:0}},Object(S.u)("$__month"))))}var jo=Object(u.b)((function(e){return{search:e.search,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.reduxFunction,r=e.search,n=l.a.getState(),o=n.db,i=n.session,c=a.a.useState([]),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState("week"),g=Object(m.a)(h,2),b=g[0],y=g[1],v=a.a.useState(Ge()().toLocaleString()),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(m.a)(w,2),E=j[0],k=j[1],L=a.a.useState(!1),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.a.useState([]),D=Object(m.a)(F,2),N=D[0],P=D[1];Ge.a.locale(i.language?i.language.toLowerCase():"pt-br",{week:{dow:1}});var $=Object(ho.b)(Ge.a);a.a.useEffect((function(){var e=i&&i.calendarPreffers?JSON.parse(i.calendarPreffers):{};e.view&&y(e.view),e.view&&k(e.showAllEvents),e.severalDaysActivities&&T(e.severalDaysActivities),e.disabledTypes&&P(Array.from(e.disabledTypes))}),[]),a.a.useEffect((function(){z()}),[e.cards,r]),a.a.useEffect((function(){z(),M()}),[I,N]);var M=function(){var e=Object(f.a)(xo().mark((function e(){var t;return xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i.calendarPreffers?JSON.parse(i.calendarPreffers):{},t=Object(p.a)(Object(p.a)({},t),{},{disabledTypes:Array.from(N),showAllEvents:E,severalDaysActivities:I,view:b}),l.a.getState().functions.socket.emit("data",{module:"user",method:"post",action:"preffers"},{calendarPreffers:JSON.stringify(t)},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(f.a)(xo().mark((function e(){var t;return xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&l.a.getState().db.cards[e]._users&&l.a.getState().db.cards[e]._users[i._id]&&(!l.a.getState().db.cards[e].checklist||l.a.getState().db.cards[e].checklist&&l.a.getState().db.cards[e].showCard)&&Ge()(1e3*l.a.getState().db.cards[e].startDate).isValid()&&Ge()(1e3*l.a.getState().db.cards[e].endDate).isValid()&&(0===N.length||N.length>0&&-1===N.indexOf(l.a.getState().db.cards[e].type))&&"plan"!==l.a.getState().db.cards[e].type&&"chatGroup"!==l.a.getState().db.cards[e].type&&"completed"!==l.a.getState().db.cards[e].status&&!l.a.getState().db.cards[e].deleted&&(I||!I&&Ge()(1e3*l.a.getState().db.cards[e].startDate).format("YYYY-MM-DD")===Ge()(1e3*l.a.getState().db.cards[e].endDate).format("YYYY-MM-DD"))&&(0===r.tags.length||r.tags.length>0&&l.a.getState().db.cards[e]._tags&&l.a.getState().db.cards[e]._tags.length>0&&l.a.getState().db.cards[e]._tags.filter((function(e){var t=!1;return r.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0)&&(""===r.text||""!==r.text&&(l.a.getState().db.cards[e].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||l.a.getState().db.cards[e].description&&l.a.getState().db.cards[e].description.toLowerCase().indexOf(r.text.toLowerCase())>-1))&&r.cards.status[l.a.getState().db.cards[e].status]&&(r.cards.priority.all||l.a.getState().db.cards[e].priority&&r.cards.priority[l.a.getState().db.cards[e].priority])&&(r.cards.risk.all||l.a.getState().db.cards[e].risk&&r.cards.risk[l.a.getState().db.cards[e].risk])&&(r.cards.complexity.all||l.a.getState().db.cards[e].complexity&&r.cards.complexity[l.a.getState().db.cards[e].complexity])&&(r.cards.impact.all||l.a.getState().db.cards[e].impact&&r.cards.impact[l.a.getState().db.cards[e].impact])&&(0===Object.keys(r.users.selected).length||Object.keys(r.users.selected).length>0&&Object.keys(l.a.getState().db.cards[e]._users).filter((function(e){return r.users.selected[e]})).length>0)})).forEach((function(e){var r=!1,n=Ge()(1e3*l.a.getState().db.cards[e].startDate).toDate(),a=Ge()(1e3*l.a.getState().db.cards[e].endDate).toDate(),o=Ge()(1e3*l.a.getState().db.cards[e].endDate).unix("x")-Ge()(1e3*l.a.getState().db.cards[e].startDate).unix("x");("00:00:00"===Ge()(1e3*l.a.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===Ge()(1e3*l.a.getState().db.cards[e].endDate).format("HH:mm:ss")||Math.ceil(o/60/60)>23)&&(r=!0),t.push({title:l.a.getState().db.cards[e].name,allDay:r,startDate:n,endDate:a,_id:e})})),d(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Ea,null),a.a.createElement(Rr.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},a.a.createElement(V.a,{text:Object(S.u)("$__legend"),icon:"style",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(S.d)("menu"),borderRadius:0},options:[{name:Object(S.u)("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:Object(S.u)("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(A.a)(o.status.map((function(e){return{name:Object(S.u)("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:Object(S.u)("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(A.a)(o.priority.map((function(e){return{name:Object(S.u)("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),a.a.createElement(vo,{options:N,onChange:function(e){P(e)}}),a.a.createElement(V.a,{text:Object(S.u)("$__options"),icon:"settings",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(S.d)("menu"),borderRadius:0},style:{marginRight:"15px"},options:[{name:Object(S.u)("$__showAllEvents","*"),icon:E?"check_circle_outline":"radio_button_unchecked",onClick:function(){k((function(e){return!e}))}},{name:Object(S.u)("$__activitiesTInSeveralDays","*"),icon:I?"check_circle_outline":"radio_button_unchecked",onClick:function(){T((function(e){return!e}))}}]})),a.a.createElement(qn.a,{xs:12,sm:12,md:12},a.a.createElement(Gr.a,null,a.a.createElement(Hr.a,null,a.a.createElement(_o,{selectable:!0,localizer:$,events:u,messages:Oo,defaultDate:new Date,onSelectSlot:function(e){t("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:"new",module:"cardEdit",activeModule:"cardEdit",data:{type:"task",startDate:Ge()(e.start).unix("x"),endDate:Ge()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){y(e)},onSelectEvent:function(e){t("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:e._id,module:"cardEdit",activeModule:"cardEdit",data:l.a.getState().db.cards[e._id]}))},eventPropGetter:function(e,t,r,n){var a=l.a.getState().db.cards[e._id],i=l.a.getState().db.status.filter((function(t){return t.value===l.a.getState().db.cards[e._id].status}))[0].color,c=Ge()(new Date(t)).unix("x"),s=Ge()(new Date(r)).unix("x");Ge()(new Date(r)).unix("x")<Ge()().unix("x")&&(i="#ff0000");var u=(s-c)/60/1440*100;return u>100&&(u=100),{className:"",style:Object(p.a)(Object(p.a)({height:"".concat(u,"%")},"week"===b||"day"===b?{minHeight:"".concat(u,"%")}:{minHeight:22}),{},{width:"100%",border:"solid 1px rgba(0,0,0,0.1)",borderRadius:3,boxShadow:"0px 1x 2px 0px rgba(0,0,0,0.3)",backgroundColor:"".concat(n?Object(S.m)(i,.3):Object(S.m)(i,.5))},a.priority&&o.priority.filter((function(e){return String(e.value)===String(a.priority)})).length>0?{borderLeft:"solid 5px ".concat(o.priority.filter((function(e){return String(e.value)===String(a.priority)}))[0].color)}:{})}},components:{event:function(e){var t=e.event,r=l.a.getState().db.cards[t._id],n=r.type&&o&&o.dataType&&o.dataType.filter((function(e){return e.name===r.type}))[0]?o.dataType.filter((function(e){return e.name===r.type}))[0].icon:"$__topic";return a.a.createElement(bo,{leaveDelay:800,title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",zIndex:5e3}},a.a.createElement(ut.a,{data:r,onlyOption:!0,notGlobalExpanded:!0})))},a.a.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:10,height:"100%",maxWidth:"100%",textOverflow:"ellipsis",overflow:"hidden"}},a.a.createElement("div",{style:{marginRight:5}},a.a.createElement(Ba.a,{overlap:"rectangular",size:"12px",icon:n,color:"bkack",title:Object(S.u)("$__".concat(r.type))})),t.title))},toolbar:wo,month:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(S.d)("menu"),cursor:"pointer"}},t)}},week:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(S.d)("menu"),cursor:"pointer"}},t)}}},onNavigate:function(e,t,r){_&&Ge()(e).format("YYYY-MM")===Ge()(_).format("YYYY-MM")||O(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&y(r)},view:b,onEventResize:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:Ge()(t.start).unix("x"),endDate:Ge()(t.end).unix("x")})},onEventDrop:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:Ge()(t.start).unix("x"),endDate:Ge()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:E,popup:!0,resizable:!0,defaultView:"week"}))),a.a.createElement("div",{style:{height:300,width:"100%"}}))))})),Eo=r(1968),ko=r(1156),So={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}};var Lo=Object(u.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object.keys(r.cards).filter((function(e){var t;return!!(r.cards[e]&&"step"===r.cards[e].type&&r.cards[e].showInPanel&&(null===(t=r.cards[e].showGroups)||void 0===t?void 0:t.filter((function(e){var t,a;return(null===(t=r.users[n._id])||void 0===t||null===(a=t.groups)||void 0===a?void 0:a.filter((function(t){return t.value===e.value})).length)>0})).length)>0)})).sort((function(e,t){var n=r.cards[e].name.toLowerCase().trim(),a=r.cards[t].name.toLowerCase().trim();return n<a?-1:n>a?1:0})).map((function(e){return r.cards[e]}));return 0===u.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{width:"100%",position:"relative",float:"left",clear:"both"}},u&&u.length>0?a.a.createElement(Rr.a,{style:{paddingLeft:15,paddingRight:15,boxShadow:"0 5px 7px 1px rgba(0,0,0,0.03)",backgroundColor:"rgba(250,250,250,0.07)",paddingBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center"}},Object(S.u)("$__myChannels"),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(yo.a,{style:{marginRight:7,marginLeft:7},text:Object(S.u)("$__channels"),active:!c,onClick:function(){s(!1)}}),a.a.createElement(yo.a,{text:Object(S.u)("$__showMyRequests"),active:c,onClick:function(){s(!0)}}))),c?a.a.createElement(qn.a,{xs:12,sm:6,md:6,style:{paddingTop:33,padding:7}},a.a.createElement("fieldset",{style:{backgroundColor:"#FFFFFF",borderRadius:7,marginTop:15}},a.a.createElement("legend",null,Object(S.u)("$__legends")),a.a.createElement("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#02b915",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.u)("$__completedStep"))),a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#00a2e9",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.u)("$__actualStep"))),a.a.createElement("div",{style:{alignItems:"center",display:"flex"}},a.a.createElement("div",{style:{height:10,width:30,backgroundColor:"#e9e9e9",borderRadius:7,marginRight:7}}),a.a.createElement("div",null,Object(S.u)("$__stepNotStarted"))))),Object.keys(r.cards).filter((function(e){var t,a,o,i;return(null===(t=r.cards[e])||void 0===t||null===(a=t._createdBy)||void 0===a?void 0:a.channel)&&(null===(o=r.cards[e])||void 0===o||null===(i=o._createdBy)||void 0===i?void 0:i._id)===n._id})).sort((function(e,t){return l.a.getState().db.cards[e].created_at>l.a.getState().db.cards[t].created_at?-1:l.a.getState().db.cards[e].created_at<l.a.getState().db.cards[t].created_at?1:0})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:"ch".concat(t,"-").concat(e)},a.a.createElement(ko.a,{db:"cards",data:r.cards[e],noShadow:!0}))}))):a.a.createElement(a.a.Fragment,null),!c&&u.map((function(t){return a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:t._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:t._id,rows:0}}))}},a.a.createElement("div",{style:{backgroundColor:"#FFFFFF",borderRadius:7,height:152,padding:15,position:"relative",borderBottom:"solid 2px ".concat(Object(S.d)("menu")," ")}},a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:14}},t.shortCutTitle),a.a.createElement(Ua.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,t.shortCutDescription)},a.a.createElement("div",{style:{padding:3,color:Object(S.d)("menu"),maxWidth:"100%",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",fontSize:12}},t.shortCutDescription)),a.a.createElement("div",{style:{position:"absolute",bottom:15,left:15,right:15,padding:3,color:Object(S.d)("menu"),fontWeight:"bold",fontSize:16,textTransform:"uppercase"}},t.shortCutButtonToAdd)))}))):a.a.createElement(a.a.Fragment,null))}))),Co=r(1157),Io=r.n(Co),To=r(1158),Fo=r.n(To);function Do(){Do=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var No=Object(u.b)((function(e){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=r.users,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],p=a.a.useState("EndDate"),h=Object(m.a)(p,2),g=h[0],b=h[1],y=a.a.useState(["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal","link","insight"]),v=Object(m.a)(y,2),x=v[0],_=v[1],w=Object(Eo.a)(["banner"]),j=Object(m.a)(w,2),E=j[0],L=j[1],C=a.a.useState([]),I=Object(m.a)(C,2),T=I[0],F=I[1];a.a.useEffect((function(){var t=Object.keys(l.a.getState().db.cards).filter((function(t){return l.a.getState().db.cards[t]&&!l.a.getState().db.cards[t].checklist&&!l.a.getState().db.cards[t].deleted&&(!e.hidePrivate||e.hidePrivate&&!l.a.getState().db.cards[t].private)})).map((function(e){return l.a.getState().db.cards[e]}));JSON.stringify(t)!==JSON.stringify(T)&&F(t)}),[e.cards]);var D=function(){var e=Object(f.a)(Do().mark((function e(){var t;return Do().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.a.getState().functions.socket,L("banner",!0,{path:"/"});try{t.emit("data",{module:"user",method:"post",action:"preffers"},{hideSupportAndAppBanner:!0},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}))}catch(r){console.log(r)}case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=O()().format("YYYY-MM-DD"),P=window.location.hash.split("/");P[0]=P[0].replace("#","");var $=T.filter((function(e){return 0===x.length||x.length>0&&-1===x.indexOf(e.type)})).filter((function(e){return!!(e&&e._users&&e._users[n._id]&&"completed"!==e.status&&"chatGroup"!==e.type&&"plan"!==e.type&&(e._users[n._id].myDay&&O()(1e3*e._users[n._id].myDay).format("YYYY-MM-DD")!==A||e._users[n._id].isResponsible&&(e.endDate&&O()(1e3*e.endDate).unix("x")<O()().unix("x")||e.startDate&&O()(1e3*e.startDate).unix("x")>O()(new Date(A)).subtract(30,"days").unix("x"))&&(e._users[n._id]&&!e._users[n._id].myDay||e._users[n._id].myDay&&O()(1e3*e._users[n._id].myDay).format("YYYY-MM-DD")!==A)))})).sort((function(e,t){var r=e._users[n._id].myDay||e.endDate||e.startDate||0,a=t._users[n._id].myDay||t.endDate||t.startDate||0;return r>a?-1:r>a?1:0})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(ut.a,{db:"cards",data:t,noShadow:!0,suggestion:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.J)(e,{_id:t._id,userId:n._id,option:!0})}},a.a.createElement(re.a,{icon:"add",color:Object(S.d)("menu"),title:Object(S.u)("$__addOnMyDay")})))})),M=T.filter((function(e){return"completed"!==e.status&&e.name&&!e.deleted&&!e.archived&&e._users&&e._users[n._id]&&(!e._users[n._id].myDay||e._users[n._id].myDay&&O()(new Date(1e3*e._users[n._id].myDay)).format("YYYY-MM-DD")!==A)&&(e.endDate&&O()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")>=O()().format("YYYY-MM-DD")&&O()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")<=O()(new Date(A)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&O()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")>=O()().format("YYYY-MM-DD")&&O()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")<=O()(new Date(A)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){var r=e.name.toLowerCase().trim(),n=t.name.toLowerCase().trim();return"IniDate"===g&&(r=parseInt(e.startDate),n=parseInt(t.startDate)),"EndDate"===g&&(r=parseInt(e.endDate),n=parseInt(t.endDate)),r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(ut.a,{db:"cards",key:e._id,data:e,noShadow:!0})})),z=o&&Object.keys(o).length>0?o[Object.keys(o).find((function(e){return n&&n._id&&o[e]&&o[e]._id&&o[e]._id.indexOf(n._id)>-1}))]:{},Y=new Date,B=Y.getHours()>=0&&Y.getHours()<5?"$__goodNight":Y.getHours()>=5&&Y.getHours()<12?"$__goodMorning":Y.getHours()>=12&&Y.getHours()<18?"$__goodAfternoon":"$__goodNight",R=Object.keys(r.cards).filter((function(t){return r.cards[t]&&!r.cards[t].deleted&&!r.cards[t].archived&&"plan"===r.cards[t].type&&r.cards[t]._users&&r.cards[t]._users[n._id]&&"completed"!==r.cards[t].status&&r.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!r.cards[t].private)})),G=Object.keys(r.cards).filter((function(t){return r.cards[t]&&!r.cards[t].deleted&&!r.cards[t].archived&&"plan"!==r.cards[t].type&&r.cards[t]._users&&r.cards[t]._users[n._id]&&"completed"!==r.cards[t].status&&r.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!r.cards[t].private)})),H=G.map((function(e){var t=r.cards[e];return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(ut.a,{db:"cards",data:t,noShadow:!0}))}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Rr.a,null,E.banner||n.hideSupportAndAppBanner?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",marginBottom:"33px"},id:"view_dashboard_welcomeMessage"},a.a.createElement("div",{style:{fontSize:"16px",padding:"15px 0",fontWeight:"bold",width:"100%",textAlign:"left",color:Object(S.d)("menu"),paddingLeft:"15px"}},Object(S.u)(B,1),", ",z&&z.displayName?z.displayName:z.name?z.name:"","!"),a.a.createElement(Rr.a,{style:{width:"100%"}},a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Fo.a,width:800,height:610,style:{width:"100%",height:"auto",borderRadius:17,boxShadow:"0 0 7px 1px rgba(0,0,0,0.1)"}})),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative",paddingBottom:33,height:"100%"}},a.a.createElement("div",{style:{fontSize:"16px",color:Object(S.d)("medium"),paddingRight:15},dangerouslySetInnerHTML:{__html:Object(S.p)(Object(S.u)("$__supportWelcomeMessage",1))}}),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},a.a.createElement(k.a,{title:Object(S.u)("$__clickToaccessSupportPage","*"),text:Object(S.u)("$__clickToaccessSupportPage"),color:Object(S.d)("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Io.a,width:800,height:640,style:{width:"100%",height:"auto"}}),a.a.createElement("div",{style:{position:"absolute",bottom:-33,right:15,zIndex:10}},a.a.createElement(k.a,{title:Object(S.u)("$__hideSupportAndAppBanner","*"),text:Object(S.u)("$__hideSupportAndAppBanner"),color:Object(S.d)("menu"),icon:"close",onClick:function(){D()},size:"12px"})))))),R.length>0?a.a.createElement(Rr.a,{style:{marginTop:"33px",marginBottom:"33px"}},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12,id:"view_dashboard_favorites",style:{boxShadow:"0 5px 7px 1px rgba(0,0,0,0.03)",backgroundColor:"rgba(250,250,250,0.07)",paddingBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:33}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.u)("$__favoritePlans"),R.length>3?a.a.createElement(k.a,{title:"".concat(Object(S.u)("$__viewAllFavorites","*")," (").concat(R.length,")"),text:"".concat(Object(S.u)("$__viewAllFavorites","*")," (").concat(R.length,")"),color:Object(S.d)("menu"),icon:"favorite",transparent:!0,onClick:function(){c.a.push("sp#tab/home")},size:"25px"}):a.a.createElement(a.a.Fragment,null)),a.a.createElement(Rr.a,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},R.sort((function(e,t){var n=r.cards[e].updated_at&&r.cards[e].updated_at.low?r.cards[e].updated_at.low:0,a=r.cards[t].updated_at&&r.cards[t].updated_at.low?r.cards[t].updated_at.low:0;return n>a?-1:n<a?1:0})).filter((function(e,t){return t<6})).map((function(e,t){return a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:3,xl:2,key:r.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){c.a.push("sp#".concat(r.cards[e]._id,"/dashboard"))}},a.a.createElement(ut.a,{data:r.cards[e],expanded:!0,Avatar:!0,ignoreList:!0}))})))),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(N.a,null,a.a.createElement(Lo,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33,marginTop:33}},a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:G.length>0?4:6,xl:G.length>0?4:6,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_myDay"},a.a.createElement("div",{style:{padding:"0 16px",marginTop:15}},u?a.a.createElement("div",null,a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},a.a.createElement(rt.a,{onClick:function(){d(!1)}},a.a.createElement(re.a,{icon:"undo",color:Object(S.d)("menu"),title:Object(S.u)("$__backToMyDay")})),Object(S.u)("$__taskSuggestions")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(vo,{options:x,onChange:function(e){_(e)}}),a.a.createElement("div",{style:{color:Object(S.d)("medium"),fontWeight:"bold",fontSize:"12px"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia.")),a.a.createElement("div",null,$)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.u)("$__myDay"),$.length>0&&a.a.createElement("div",{style:{fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px",color:"#f50057",display:"flex",alignItems:"center"},onClick:function(){d(!0)},id:"view_dashboard_myDaySuggestionsOptions"},a.a.createElement(re.a,{icon:"info",color:Object(S.d)("medium"),style:{marginRight:"15px"}}),Object(S.u)("$__clickHereToCheckTaskSuggestions"))),a.a.createElement(lr.a,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))),a.a.createElement(qn.a,{xs:12,sm:12,md:G.length>0?4:6,lg:G.length>0?4:6,xl:G.length>0?4:6,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_nextTasks"},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px",marginTop:15}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.u)("$__nextTasks")),a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.u)("$__orderBy".concat(g)),color:"lightgray",icon:"IniDate"===g?"today":"EndDate"===g?"event":"text_rotate_vertical",onClick:function(){"IniDate"===g&&b("EndDate"),"EndDate"===g&&b("name"),"name"===g&&b("IniDate")},size:"21px",style:{padding:"0px !important"}}))),a.a.createElement("div",null,M))),G.length>0?a.a.createElement(qn.a,{xs:12,sm:12,md:4,lg:4,xl:4,style:{borderRight:"2px solid ".concat(Object(S.d)("menu"))},id:"view_dashboard_favoriteCards"},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"0 16px",marginTop:15}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(S.u)("$__myFavorites"))),a.a.createElement("div",null,H))):a.a.createElement(a.a.Fragment,null)))}))),Ao=(r(1091),r(384)),Po=r.n(Ao);var $o=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t=l.a.getState().session;a.a.useEffect((function(){return function(){}}),[]);var r=0;return t&&t.GlobalData&&(t.GlobalData.message&&(r+=1),t.GlobalData.history&&(r+=1),t.GlobalData.vocation&&(r+=1),t.GlobalData.legacy&&(r+=1)),a.a.createElement("div",{style:{width:"100%"}},r?a.a.createElement(Rr.a,null,t.GlobalData.strategicStatement?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.strategicStatement}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.message?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.message}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.vocation?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.vocation}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.history?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.history}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.values?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.values}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.legacy?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.legacy}}))))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement(N.a,null,a.a.createElement(No,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(eo,{max:6,horizontal:!0})))),a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Ma,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllInsights"),color:"white",icon:Po.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Da,{max:6,horizontal:!0,noPagination:!0}))))))})));var Mo=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t=l.a.getState().session;a.a.useEffect((function(){return function(){}}),[]);var r=0;return t&&t.GlobalData&&(t.GlobalData.message&&(r+=1),t.GlobalData.history&&(r+=1),t.GlobalData.vocation&&(r+=1),t.GlobalData.legacy&&(r+=1)),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllInsights"),color:"white",icon:Po.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Da,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(Ma,{max:6,horizontal:!0,noPagination:!0}))))),r?a.a.createElement(Rr.a,null,t.GlobalData.strategicStatement?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.strategicStatement}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.message?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.message}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.vocation?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.vocation}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.history?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.history}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.values?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.values}}))))):a.a.createElement(a.a.Fragment,null),t.GlobalData.legacy?a.a.createElement(qn.a,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Gr.a,{style:{height:"calc(100% - 33px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Hr.a,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.GlobalData.legacy}}))))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement(N.a,null,a.a.createElement(No,null)),a.a.createElement(Rr.a,{style:{paddingBottom:33}},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{position:"relative",backgroundColor:"rgba(250,250,250,0.7)",boxShadow:"0px 0px 3px 7px rgba(0,0,0,0.03)",marginBottom:33,overflow:"hidden"}},a.a.createElement("div",{style:{position:"relative",height:40,marginBottom:15}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(S.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(S.u)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.u)("$__save","*"),text:Object(S.u)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(N.a,null,a.a.createElement(eo,{max:6,horizontal:!0}))))))}))),zo=r(717),Yo=r.n(zo);var Bo=function(e){var t=l.a.getState().session,r=e.data,n=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o=a.a.useState(null),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]})).map((function(e){return l.a.getState().db.cards[e]})).filter((function(e){return e._users&&!e.checklist&&!e.deleted&&e._users[r._id]&&e._users[r._id].myDay&&(!e.private||e.private&&e._users[t._id])&&O()(new Date(1e3*parseInt(e._users[r._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===n})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e,t){return a.a.createElement(ut.a,{db:"cards",key:t,data:e,showStatus:!0,onlyOption:!0})}));return a.a.createElement("div",{style:{width:"100%",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 9px 3px rgba(0,0,0,0.2)",position:"relative"}},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",paddingLeft:"45px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(r.name,r.name)," (",u.length,")")),!c||r.image&&r.image!==c?a.a.createElement("img",{style:{width:"37px",height:"37px",top:"3x",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(r.image?r.image:Yo.a),onError:function(e){e.target.src="".concat(Yo.a)},onLoad:function(e){s("".concat(r.image?r.image:Yo.a))},width:"100%",alt:"MACHEN_IMG"}):a.a.createElement("div",{style:{width:"37px",height:"37px",top:"3px",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color")),backgroundImage:'url("'.concat(c,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",maxHeight:"calc(50vh - 90px)",overflowX:"auto"}},u)))};function Ro(){Ro=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Go=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t=l.a.getState().db.users,r=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=Object(S.j)();if(a.a.useEffect((function(){return i||(l.a.getState().session.cards.adminViewLoader||u(),c(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminView:!1})}))}}),[e.cards,e.users]),s&&s.plan&&!s.planAdmin&&!s.planModerate)return a.a.createElement(a.a.Fragment,null);var u=function(){var t=Object(f.a)(Ro().mark((function t(r){return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminView:!l.a.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&l.a.getState().db.cards[e]._users&&Object.keys(l.a.getState().db.cards[e]._users).filter((function(t){return l.a.getState().db.cards[e]._users[t].myDay&&O()(new Date(1e3*parseInt(l.a.getState().db.cards[e]._users[t].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===r})).length>0})).map((function(e){return l.a.getState().db.cards[e]}));console.log("----------------------------------------------",d.length);var h=Object.keys(t).filter((function(e){return!t[e].deleted&&"user"===t[e].type&&(!t[e]._parent||""===t[e]._parent)&&d.filter((function(t){return t._users&&t._users[e]&&t._users[e].myDay&&O()(new Date(1e3*parseInt(t._users[e].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===r})).length>0})).sort((function(e,r){return t[e].name<t[r].name?-1:t[e].name>t[r].name?1:0})).map((function(e){return t[e]}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12,style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{fontSize:"33px",padding:"15px 0",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.u)("$__dayTasks",1))),h.map((function(e){return a.a.createElement(qn.a,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},a.a.createElement(Bo,{data:e}))}))))})));var Ho=Object(u.b)((function(e,t){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(e){var t,r=window.location.hash.split("/");return r[0]=r[0].replace("#",""),"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(t=l.a.getState().session)||void 0===t?void 0:t.account)?a.a.createElement(N.a,null,a.a.createElement(Ea,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(N.a,null,a.a.createElement(Mo,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(N.a,null,a.a.createElement(Go,null))):a.a.createElement("div",null,a.a.createElement(Ea,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(N.a,null,a.a.createElement($o,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(N.a,null,a.a.createElement(Go,null)))}))),Wo=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:Z.I,padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(p.a)(Object(p.a)({},Z.C),{},{fontSize:"13.7em",color:Z.I,letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},Uo=Object(B.a)(Wo);function qo(){qo=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Vo=Object(u.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(null),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(0),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(10),w=Object(m.a)(O,2),j=w[0],E=w[1],L=a.a.useState([]),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.a.useState(0),D=Object(m.a)(F,2),A=D[0],P=D[1],$=a.a.useState("created_at"),M=Object(m.a)($,2),z=M[0],Y=M[1],B=a.a.useState(!0),R=Object(m.a)(B,2),G=R[0],H=R[1],W=a.a.useState(""),U=Object(m.a)(W,2),q=U[0],V=U[1],J=a.a.useState(!0),X=Object(m.a)(J,2),K=X[0],Z=X[1],Q=a.a.useState({}),ee=Object(m.a)(Q,2),te=ee[0],ne=ee[1],ae=a.a.useState(""),oe=Object(m.a)(ae,2),ie=oe[0],ce=oe[1],le=window.location.hash.split("/");le[0]=le[0].replace("#","");var se=null;le[0]&&36===le[0].length&&l.a.getState().db.cards[le[0]]&&l.a.getState().db.cards[le[0]]._users&&l.a.getState().db.cards[le[0]]._users[n._id]&&(se=le[0]),a.a.useEffect((function(){return ue({id:se}),fr(),function(){T([]),ne({}),Z(!0)}}),[]),a.a.useEffect((function(){g&&de({id:g})}),[g]),a.a.useEffect((function(){_(0),Z(!0),c||s(!0);var e=setTimeout((function(){I&&de({id:se})}),1e3);return function(){return clearTimeout(e)}}),[q]),a.a.useEffect((function(){de({id:se})}),[x,j,z,G]);var ue=function(){var e=Object(f.a)(qo().mark((function e(t,r){var n,a;return qo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fr({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||te,se&&(a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},se,{name:l.a.getState().db.cards[se].name,parent:l.a.getState().db.cards[se]._parent,private:null,type:"plan",_id:se,open:!0}))),n.forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},a[e._id]?a[e._id]:{}),e)))})),ne(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),de=function(){var e=Object(f.a)(qo().mark((function e(t){var r;return qo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hr({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:j,skip:x*j,asc:!G,orderBy:z||"created_at",search:q});case 2:(r=e.sent)&&(P(r&&r[0]&&r[0].total?parseInt(r[0].total):0),T(r),Z(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=[],fe=function(e){var t=z,r=G;z===e?r=!G:t=e,Y(t),H(r)},he=function(){var e=Object(f.a)(qo().mark((function e(t){var r,n,a,o,i,c,l=arguments;return qo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=l.length>1&&void 0!==l[1]&&l[1],n=t.id,a=void 0===n?null:n,o=t.type,i=void 0===o?null:o,c=te,c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(te).filter((function(e){return te[e].parent===a})).length?ue({id:a,type:i},c):ne(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=function(t,n){return a.a.createElement("div",{key:n,style:{cursor:"pointer",borderLeft:"solid 0.5px lightgray",paddingLeft:7},onClick:function(e){(!t.private||t.private&&l.a.getState().controls.lockPrivate)&&(he({id:n},!te[n]||!te[n].open),b(n)),e.preventDefault(),e.stopPropagation()}},a.a.createElement(wr.a,{private:!(!t.private||l.a.getState().controls.lockPrivate),unlockedPrivates:e.unlockedPrivates,setPrivate:function(t){var r=t?1:-1;t||0!==e.unlockedPrivates||(r=0),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,title:t.name,tooltipText:"".concat(t.private&&!l.a.getState().controls.lockPrivate?Object(S.u)("$__private"):t.name),icon:t.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===t.type}))[0].icon||"$__topic",fontSize:"12px"}),te[n]&&te[n].open?ge(n):a.a.createElement(a.a.Fragment,null))},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(te).filter((function(t){return!e||e&&te[t].parent===e})).length>0?Object.keys(te).filter((function(t){return!e||e&&te[t].parent===e})).sort((function(e,t){return te[e].name.toLowerCase().trim()<te[t].name.toLowerCase().trim()?-1:te[e].name.toLowerCase().trim()>te[t].name.toLowerCase().trim()?1:0})).map((function(e){return me(te[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement(N.a,null,a.a.createElement("div",null,a.a.createElement("div",{style:{backgroundColor:"#FFFFFF",position:"relative",padding:"7px 15px",float:"right",boxShadow:"0px 0px 7px 3px rgba(0,0,0,0.1)",display:"flex",alignItems:"center"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:q,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("color")},"search")),onChange:function(e){V(e.target.value)},onKeyDown:function(e){}}}),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"sideModule_saveButton",title:"created_at"===z&&G?Object(S.u)("$__mostRecent",1):Object(S.u)("$__olderFirst",1),color:"created_at"===z?Object(S.d)("color"):"gray",icon:"calendar_month",onClick:function(){fe("created_at")},size:"25px"}),"created_at"===z&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},G?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(re.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},G?"south":"north"))),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"sideModule_saveButton",title:"name"===z&&G?Object(S.u)("$__nameDesc",1):Object(S.u)("$__nameAsc",1),color:"name"===z?Object(S.d)("color"):"gray",icon:"sort_by_alpha",onClick:function(){fe("name")},size:"25px"}),"name"===z&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},G?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(re.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},G?"south":"north")))),a.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 7px 3px rgba(0,0,0,0.1)",clear:"both",marginTop:-10,minHeight:"calc(100vh - 150px)"}},a.a.createElement("div",{style:{position:"absolute",width:333,height:"100%",minHeight:1,padding:15,backgroundColor:"#f4f4f4",borderRight:"solid 0.77px lightGray",display:"flow-root"}},a.a.createElement("div",{style:{display:"flex",marginTop:-10}},a.a.createElement(wr.a,{title:Object(S.u)("$__folders",1),icon:"folder",fontSize:"20px",color:Object(S.d)("menu")}),a.a.createElement(Oe.a,{label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:ie,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){ce(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:{position:"relative",height:"calc(100% - 33px)",overflowX:"auto",backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"solid 0.5px rgba(0,0,0,0.1)",padding:15}},Object.keys(te).filter((function(e){return((!le[0]||le[0]&&36!==le[0].length)&&!te[e].parent||le&&le[0]&&36===le[0].length&&te[e]._id===le[0])&&(""===ie||ie&&te[e].name.toLowerCase().indexOf(ie.toLowerCase().trim())>-1)})).sort((function(e,t){return te[e].name.toLowerCase().trim()<te[t].name.toLowerCase().trim()?-1:te[e].name.toLowerCase().trim()>te[t].name.toLowerCase().trim()?1:0})).map((function(e){return me(te[e],e)})))),a.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:333,width:"calc(100% - 333px)",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",minWidth:177}},a.a.createElement(wr.a,{title:Object(S.u)("$__files",1),icon:"cloud",fontSize:"20px",color:Object(S.d)("menu")})),a.a.createElement("div",{style:{position:"relative",float:"right",display:"flex",alignItems:"center",marginTop:-10}},Object(S.u)("$__page")," ",x+1," ",Object(S.u)("$__of")," ",Math.ceil(A/j),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:A,page:x,onPageChange:function(e,t){_(t)},rowsPerPage:j,onRowsPerPageChange:function(e){E(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__filesPerPage")})))),K?a.a.createElement(ct.a,null):I&&I.length>0?I.map((function(t,r){pe.push(t.data);var o=Object(p.a)(Object(p.a)({},t.data),{},{createdBy:t.createdBy,in:t.in});return a.a.createElement("div",{key:"file_".concat(o._id).concat(r),style:{position:"relative",width:"100%",paddingTop:"7px",paddingLeft:"15px",clear:"both"}},a.a.createElement(Sr,{data:o,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:pe,file:t})}(o._id)},admin:!!(o.createdBy._id===n._id||o.in._id===n._id||o.access&&parseInt(o.access)>2)}),a.a.createElement("div",{style:{clear:"both"}}))})):a.a.createElement(a.a.Fragment,null),A>10?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",x+1," ",Object(S.u)("$__of")," ",Math.ceil(A/j),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:A,page:x,onPageChange:function(e,t){_(t)},rowsPerPage:j,onRowsPerPageChange:function(e){E(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__filesPerPage")}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{style:{clear:"both"}}))))})),Jo=r(474),Xo=r(871),Ko=r.n(Xo),Zo=r(1159),Qo=r.n(Zo),ei=r(1855),ti={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:Z.p[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:Z.w[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:Z.i[0]}},underlineSuccess:{"&:after":{borderColor:Z.B[0]}},labelRoot:Object(p.a)(Object(p.a)({},Z.k),{},{color:Z.p[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:Z.i[0]+" !important"},labelRootSuccess:{color:Z.B[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:Z.p[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:Z.I},"&:after":{backgroundColor:Z.I}},input:{color:Z.p[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:Z.p[3]}},whiteInput:{"&,&::placeholder":{color:Z.I,opacity:"1"}}},ri=Object(B.a)(ti);function ni(e){var t,r,n,o,i,c=ri(),l=e.formControlProps,s=e.labelText,u=e.id,d=e.labelProps,p=e.inputProps,f=e.error,m=e.white,g=e.inputRootCustomClasses,b=e.success,y=e.helperText,v=x()((t={},Object(h.a)(t," "+c.labelRootError,f),Object(h.a)(t," "+c.labelRootSuccess,b&&!f),t)),_=x()((r={},Object(h.a)(r,c.underlineError,f),Object(h.a)(r,c.underlineSuccess,b&&!f),Object(h.a)(r,c.underline,!0),Object(h.a)(r,c.whiteUnderline,m),r)),O=x()(Object(h.a)({},g,void 0!==g)),w=x()((n={},Object(h.a)(n,c.input,!0),Object(h.a)(n,c.whiteInput,m),n));i=void 0!==l?x()(l.className,c.formControl):c.formControl;var j=x()((o={},Object(h.a)(o,c.labelRootError,f),Object(h.a)(o,c.labelRootSuccess,b&&!f),o));return a.a.createElement(W.a,Object.assign({},l,{className:i}),void 0!==s?a.a.createElement(U.a,Object.assign({className:c.labelRoot+" "+v,htmlFor:u},d),s):null,a.a.createElement(q.a,Object.assign({classes:{input:w,root:O,disabled:c.disabled,underline:_},id:u},p)),void 0!==y?a.a.createElement(ei.a,{id:u+"-text",className:j},y):null)}function ai(){ai=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var oi="".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")),ii=Object(B.a)(ra);var ci=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({email:null,password:null}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(null),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),w=O[0],j=O[1],E=ii(),k=function(){var t=Object(f.a)(ai().mark((function t(){var r,a,o,i;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1!==window.location.origin.indexOf("localhost")||-1!==window.location.origin.indexOf("hom2022")||-1!==window.location.origin.indexOf("homologation")||-1!==window.location.origin.indexOf("a1b2c3d4")||-1!==window.location.origin.indexOf("192.168")||!(window.location.origin.indexOf("sonne.machen")>-1&&-1===n.email.indexOf("@sonne.global")||-1===window.location.origin.indexOf("sonne.machen")&&n.email.indexOf("@sonne.global")>-1)){t.next=4;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.u)("$__emailDomainNotPermitedForThisAddress",1))}),t.next=33;break;case 4:if(n.email){t.next=8;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.u)("$__alertLoginEmptyEmail",1))}),t.next=33;break;case 8:if(n.password){t.next=12;break}e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.u)("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return j(!0),t.next=15,Ko.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,Ko.a.hash(String(n.password),10);case 18:if(a=t.sent,o=Object(Jo.encode)("".concat(a,"//").concat(oi)),!(r&&a&&o)){t.next=32;break}return t.prev=21,t.next=24,Pe.a.post("/Login",Object(Jo.encode)(Object(Jo.encode)(JSON.stringify({lp:o,login:n.email,password:Object(Jo.encode)("".concat(r,"///").concat(Object(Jo.encode)(n.password),"///").concat(a))}))));case 24:(i=t.sent)&&(i.data&&400===i.data.code?e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.u)("$__".concat(i.data.error),1))}):i&&i.data&&i.data.twoFactor?(x(i.data.token),g(!0)):i.data.token&&(localStorage.setItem("TOKEN",i.data.token),e.callback&&e.callback({fn:"login",token:i.data.token}))),t.next=32;break;case 28:t.prev=28,t.t0=t.catch(21),console.log(t.t0),e.callback({fn:"alert",variant:"warning",horizontal:"center",message:"".concat(Object(S.u)("$__alertServerConectionLogin",1))});case 32:setTimeout((function(){j(!1)}),1500);case 33:case"end":return t.stop()}}),t,null,[[21,28]])})));return function(){return t.apply(this,arguments)}}(),L=function(){var t=Object(f.a)(ai().mark((function t(){var r;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j(!0),l&&(!l||6===l.length)){t.next=5;break}Object(S.c)({message:Object(S.u)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,Pe.a.post("/M_User_TwoFactor",{action:"verify",code:l,token:v});case 7:(r=t.sent)&&r.data&&r.data.result?(localStorage.setItem("TOKEN",v),e.callback&&e.callback({fn:"login",token:v})):Object(S.c)({message:Object(S.u)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),s(null);case 10:setTimeout((function(){j(!1)}),1500);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=function(){var t=Object(f.a)(ai().mark((function t(r){var n;return ai().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Object(S.u)("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,Pe.a.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Object(S.u)("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Object(S.u)("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Object(S.u)("$__loginAlertRecoveryError")});case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:E.container},a.a.createElement(Rr.a,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(qn.a,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement(Gr.a,{db:"cards",login:!0},a.a.createElement(Wr.a,{className:"".concat(E.cardHeader," ").concat(E.textCenter),color:"primary",style:{background:Object(S.d)("ColumnTitleColor"),boxShadow:"0 4px 20px 0 rgba(15,18,35,0.14), 0 7px 10px -5px rgba(15,18,35,0.4)"}},a.a.createElement("h4",{className:E.cardTitle},Object(S.u)("$__login"))),a.a.createElement(Hr.a,null,h?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__token",1)),a.a.createElement(Oe.a,{labelText:"token",id:"token_to_access",name:"token_to_access",formControlProps:{fullWidth:!0},value:l,inputProps:{onKeyDown:function(e){},onChange:function(e){s(e.target.value)},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(P.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(ni,{labelText:Object(S.u)("$__email"),id:"email",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{email:e.target.value}))},onLoad:function(e){o(Object(p.a)(Object(p.a)({},n),{},{email:e.target.value}))},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(Qo.a,{className:E.inputAdornmentIcon}))}}),a.a.createElement(ni,{labelText:Object(S.u)("$__password"),id:"password",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{password:e.target.value}))},onLoad:function(e){o(Object(p.a)(Object(p.a)({},n),{},{password:e.target.value}))},onKeyDown:function(e){13===e.keyCode&&k()},endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(P.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),a.a.createElement(Ce.a,{icon:"lock",text:Object(S.u)("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){C(n.email)}}))),a.a.createElement(ta,{className:E.justifyContentCenter},h?a.a.createElement(Kn,{style:{backgroundColor:w?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return L()}},Object(S.u)("$__validateTokenAndSigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(Kn,{style:{backgroundColor:w?"gray":Object(S.d)("menu"),color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return k()}},Object(S.u)("$__sigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(ct.a,null)):a.a.createElement(a.a.Fragment,null)))))))})),li=Object(B.a)(Wo);var si=Object(B.a)(Wo);var ui,di=r(273),pi=r(265),fi={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(p.a)(Object(p.a)({},Z.k),{},{padding:"3px 0px",width:"100%",margin:"0px",background:Object(S.d)("ColumnTitleColor"),"&$reverse":{}}),reverse:{flexDirection:"row-reverse"},cardList:{width:"calc(100% - 6px)",padding:"0px",minHeight:"30px","&::-webkit-scrollbar-track":{borderRadius:"0px"},"&::-webkit-scrollbar":{width:"7px"},"&::-webkit-scrollbar-thumb":{background:Object(S.d)("medium"),opacity:"0.5 !important",borderRadius:"0px"}},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1,transition:"visibility 0.1s, opacity 0.5s linear"},cardAdd:{position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",display:"block",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",padding:"3px"}};var hi,mi=j.b.div(ui||(ui=Object(d.a)(["\n margin:0 7px;\n min-width:180px;\n ","\n @media(min-width: 960px) {\n position:relative;\n max-height:",";\n \n ","\n }\n @media(max-width: 959px) {\n float:left;\n position: relative;\n }\n @media(max-width: 599px) {\n float:left;\n position: relative;\n }\n "])),(function(e){return e.columnStyle&&e.columnStyle.width?"width:calc(".concat(e.columnStyle.width," - 14px);"):"width:calc(100% - 14px);"}),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 0px)"}),(function(e){return e.inLine?"display:block;\n ":"margin-bottom:0px !important;\n ".concat((function(e){return e.columnStyle&&e.columnStyle.width?"width:".concat(e.columnStyle.width,";"):"width:100%;"}),"\n ")})),gi=Object(u.b)((function(e){return{searchs:e.searchs,agileOrderBy:e.controls.agileOrderBy,agileOrderDesc:e.controls.agileOrderDesc,groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(fi)(Object(n.memo)((function(e){var t=l.a.getState().session,r=y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),o=e.searchs&&e.searchs[r]?e.searchs[r]:null,i=a.a.createRef({}),c=Object(n.useRef)({}),s=Object(n.useRef)({}),u=Object(n.useRef)({}),d=a.a.useRef(!0);a.a.useEffect((function(){return d.current=!0,function(){d.current=!1}}),[]),a.a.useEffect((function(){e.groupByColor||(u.current={})}),[e.groupByColor,e.cards]);var f=window.location.hash.split("/");f[0]=f[0].replace("#",""),36!==f[0].length&&(f[0]=null);var m=e.cards.map((function(e){return l.a.getState().db.cards[e]}));o&&(m=Object(et.q)(m,o)),e.showDeleted||l.a.getState().controls.deleted||(m=m.filter((function(e){return!e.deleted})).map((function(e){return e})));var g=function e(t){var r=l.a.getState().db.cards[t]&&l.a.getState().db.cards[t].name?l.a.getState().db.cards[t].name.trim().toLowerCase():"";return l.a.getState().db.cards[t]&&"plan"!==l.a.getState().db.cards[t].type&&l.a.getState().db.cards[t]._parent&&(r="".concat(e(l.a.getState().db.cards[t]._parent),"-").concat(r)),r};m=m.sort((function(t,r){var n,a,o=(null===t||void 0===t||null===(n=t.order)||void 0===n?void 0:n.low)||!isNaN(null===t||void 0===t?void 0:t.order)||String(t.order)?parseInt(t.order):0,i=(null===r||void 0===r||null===(a=r.order)||void 0===a?void 0:a.low)||!isNaN(null===r||void 0===r?void 0:r.order)||String(r.order)?parseInt(r.order):0;if("name"===e.agileOrderBy&&(o="".concat(t.name.trim().toLowerCase()),i="".concat(r.name.trim().toLowerCase())),"startDate"===e.agileOrderBy&&(o=t.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(t.name),i=r.startDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.startDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(r.name)),"endDate"===e.agileOrderBy&&(o=t.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(t.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(t.name),i=r.endDate?"".concat("ASC"===e.agileOrderDesc?"Z":"A").concat(String(r.endDate)):"".concat("ASC"===e.agileOrderDesc?"A":"Z").concat(r.name)),o="".concat(g(t._parent),"-").concat(o),i="".concat(g(r._parent),"-").concat(i),"DESC"===e.agileOrderDesc){if(o<i)return-1;if(o>i)return 1}if("ASC"===e.agileOrderDesc){if(o>i)return-1;if(o<i)return 1}return 0})).map((function(e){return e}));var b=Object(S.u)(e.column.name,1),v=null,x={};l.a.getState().db.cards[f[0]]&&l.a.getState().db.cards[f[0]].customColumns&&(x=JSON.parse(l.a.getState().db.cards[f[0]].customColumns)),x&&x[e.column.name.replace("$__","")]&&x[e.column.name.replace("$__","")].name&&(b=Object(S.u)(x[e.column.name.replace("$__","")].name,1)),x&&x[e.column.name.replace("$__","")]&&x[e.column.name.replace("$__","")].icon&&(v=Object(S.u)(x[e.column.name.replace("$__","")].icon,1));var _=[];function O(t){var r=t.index,n=t.style,o=m[r],i="",c="";if(e.groupByColor&&f.indexOf("overview")>-1){var s=Object(et.r)(o);-1===_.indexOf(s.parentId)&&l.a.getState().db.cards[s.parentId]&&"plan"!==l.a.getState().db.cards[s.parentId].type&&(i=l.a.getState().db.cards[s.parentId].name,c=s.color,_.push(s.parentId),u.current=Object(p.a)(Object(p.a)({},u.current),{},Object(h.a)({},o._id,{title:l.a.getState().db.cards[s.parentId].name,color:s.color||"#FFFFFF"})))}return a.a.createElement(a.a.Fragment,null,a.a.createElement(ar.b,{draggableId:o._id,index:r,key:o._id,isDragDisable:e.isDragDisable||!1},(function(t,l){var s;return a.a.createElement("div",{style:n},e.groupByColor&&u.current[o._id]&&f.indexOf("overview")>-1?a.a.createElement("div",{style:{width:"100%",padding:3,color:"gray",marginTop:17,borderBottom:"solid 3px ".concat((null===(s=u.current[o._id])||void 0===s?void 0:s.color)||"")}},u.current[o._id].title):a.a.createElement(a.a.Fragment,null),a.a.createElement(w,{separator:e.groupByColor&&f.indexOf("overview")>-1&&i?{title:i,color:c}:null,provided:t,isDragging:null===l||void 0===l?void 0:l.isDragging,index:r,snapshot:l,clone:"CL"}))})))}function w(t){var r,n=t.provided,o=t.index,l=t.snapshot,g=(t.clone,m[o]);return a.a.createElement("div",Object.assign({},n.draggableProps,n.dragHandleProps,{ref:n.innerRef}),a.a.createElement(ut.a,{cardId:g._id,separator:e.groupByColor&&f.indexOf("overview")>-1&&(null===u||void 0===u||null===(r=u.current[g._id])||void 0===r?void 0:r.title)?null===u||void 0===u?void 0:u.current[g._id]:null,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:l.isDragging&&!l.isDropAnimating,snapshot:l,cardColorPicker:!!e.cardColorPicker,manualExpanded:(null===s||void 0===s?void 0:s.current[g._id])||!1,onResize:function(e){d.current&&function(e,t){var r;(null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0);c.current=Object(p.a)(Object(p.a)({},c.current),{},Object(h.a)({},e,t))}(g._id,e)},onExpand:function(e){d.current&&(!s.current[g._id]&&e||"false"===String(e)&&s.current[g._id])&&function(e,t){var r;(null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0);s.current=Object(p.a)(Object(p.a)({},s.current),{},Object(h.a)({},e,t))}(g._id,e)}}))}function j(e){var t=m[e];return c.current[t._id]+7||67}return a.a.createElement(ar.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){return a.a.createElement(mi,Object.assign({},!e.isDropDisabled&&r.draggableProps,e,{ref:r.innerRef}),a.a.createElement("div",Object.assign({},r.draggableProps,r.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&r.dragHandleProps,a.a.createElement(ge.a,Object.assign({title:b,icon:v||e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},f.length>0&&f[1]&&"overview"===f[1]&&l.a.getState().db.cards[f[0]]&&l.a.getState().db.cards[f[0]].planType&&"flow"===l.a.getState().db.cards[f[0]].planType&&l.a.getState().db.cards[f[0]]._users&&l.a.getState().db.cards[f[0]]._users[t._id]&&l.a.getState().db.cards[f[0]]._users[t._id].access&&parseInt(l.a.getState().db.cards[f[0]]._users[t._id].access)>3?{permitIcon:!0,editable:!0,onEdit:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:f[0]}}),{customColumns:JSON.stringify(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[f[0]]&&l.a.getState().db.cards[f[0]].customColumns?JSON.parse(l.a.getState().db.cards[f[0]].customColumns):{}),{},Object(h.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.u)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(S.d)("color"),onClick:function(){return console.log("s")},show:"hover"}]}))),a.a.createElement(ar.c,{droppableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",type:"card",isDropDisabled:e.column.isDropDisabled,direction:"".concat(e.inLine?"horizontal":"vertical"),isCombineEnabled:e.isCombineEnabled,mode:"virtual",renderClone:function(e,t,r){return a.a.createElement(w,{provided:e,isDragging:null===t||void 0===t?void 0:t.isDragging,index:r.source.index,snapshot:t,style:{margin:0},clone:!0})}},(function(t){return a.a.createElement("div",{ref:t.innerRef,style:{width:"100%",height:e.inLineAdd?"calc(100% - 60px)":"calc(100% - 10px)"}},a.a.createElement(pi.a,{style:{width:"100%",height:"100%"}},(function(r){var n=r.height,o=r.width;return a.a.createElement(di.b,{className:"List",height:n,width:o,ref:i,itemCount:m.length,itemSize:j,outerRef:t.innerRef,itemData:e.columnId&&"completed"===e.columnId?m.sort((function(e,t){var r=e.completed_at&&String(e.completed_at.low)?String(e.completed_at.low):e.completed_at,n=t.completed_at&&String(t.completed_at.low)?String(t.completed_at.low):t.completed_at;return r&&n&&r>n?-1:r&&n&&r<n?1:0})):m,style:{height:"100%"}},O)})))})),a.a.createElement("div",{id:"Agilev2_Column_552",style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ce.a,{text:Object(S.u)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:f[0]?f[0]:null,rows:m.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})))}))}))));function bi(){bi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var yi=j.b.div(hi||(hi=Object(d.a)(["\nheight:100%;\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n position:relative;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),vi=Object(u.b)((function(e){return{dbcards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(f.a)(bi().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y;return bi().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=n.draggableId,s=t.cards,!n.combine){r.next=5;break}return r.abrupt("return");case 5:if(o){r.next=7;break}return r.abrupt("return",!1);case 7:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=9;break}return r.abrupt("return",!1);case 9:if(u=i.droppableId,d=o.droppableId,f=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===u})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e}))),u!==d||l.a.getState().db.orderByTitle){r.next=21;break}return(m=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===u})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e._id})))).splice(i.index,1),m.splice(o.index,0,c),m.forEach((function(e,t){s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{order:{low:t}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:f.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return l.a.getState().db.cards[e].status===d})).sort((function(e,t){var r=l.a.getState().db.cards[e],n=l.a.getState().db.cards[t];return r.order&&n.order&&String(r.order.low)&&String(n.order.low)&&parseInt(r.order.low)<parseInt(n.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,c),f.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),b.forEach((function(e,r){var n,a,o;(null===(n=t.cards[e])||void 0===n?void 0:n.order)&&(null===(a=t.cards[e])||void 0===a||null===(o=a.order)||void 0===o||o.low),t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),y=Object(p.a)(Object(p.a)({},t),{},{cards:Object(p.a)(Object(p.a)({},t.cards),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},t.cards[c]),{},{status:d,completed_at:"completed"===d?{low:O()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:O()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:f});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(f.a)(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(f.a)(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(ar.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(yi,Object.assign({},e,{ref:t.innerRef}),l.a.getState().db.status.map((function(t,r){var n,o={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(gi,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),isDropDisabled:!0,column:o,cards:null===e||void 0===e||null===(n=e.cards)||void 0===n?void 0:n.filter((function(e){return l.a.getState().db.cards[e].status===t.value||"notStarted"===t.value&&!l.a.getState().db.cards[e].status})).map((function(e){return e})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(p.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))})),xi=r(153);var _i=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i,c=a.a.useState(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),s=Object(m.a)(c,2),u=s[0],d=s[1],f=a.a.useRef();a.a.useEffect((function(){d(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]);var g=Object(p.a)(Object(p.a)({},e.defaultValues||{}),l.a.getState().searchs[u]||{});a.a.useEffect((function(){e.defaultValues&&e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},u,Object(p.a)(Object(p.a)({},e.defaultValues||{}),l.a.getState().searchs[u]||{}))))}),[u]);var b=function(t){var r=t.card,n=(t.type,t.order);return a.a.createElement("div",{key:r,style:{padding:"3px 7px",backgroundColor:"rgba(0,0,0,0.1)",boxShadow:"rgba(0,0,0,0.2) 0px 0px 3px 3px 3px",margin:"3px",display:"flex",alignItems:"center",width:"fit-content",borderRadios:"0px 0px 8px 0px"}},l.a.getState().db.cards[r].name.substr(0,20)," ",a.a.createElement(re.a,{icon:"close",color:"lightGray",style:{marginLeft:10,width:10,height:10,padding:7,backgroundColor:"#80808087",borderRadius:7},size:10,onClick:function(){var t=l.a.getState().searchs[u].selectedCards;0===n&&(delete t.guideline,delete t.objective,delete t.goal,delete t.action),1===n&&(delete t.objective,delete t.goal,delete t.action),2===n&&(delete t.goal,delete t.action),3===n&&delete t.action,e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},u,Object(p.a)(Object(p.a)({},l.a.getState().searchs[u]||{}),{},{selectedCards:t}))))}}))};return a.a.createElement("div",{style:Object(p.a)({zIndex:"100 !important",display:"flex",justifyContent:"space-between",alignItems:"center"},e.style?e.style:{})},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%"}},a.a.createElement(yo.a,{text:Object(S.u)("$__filter"),icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px",zIndex:1},ref:f,id:"cal-menufilter"},a.a.createElement(Dn.a,Object.assign({},e,{onChange:function(t){e.onChange&&e.onChange(t)}})))}),e.showFilters?a.a.createElement("div",{style:{padding:"3px 15px",display:"flex",cursor:"pointer"}},g.text&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},(null===(t=e.title)||void 0===t?void 0:t.text)||Object(S.u)("$__text"),": ",a.a.createElement("span",{style:{color:Object(S.d)("darkText")}}," ",g.text)),g.tagsByText&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__tagsByText"),": ",a.a.createElement("span",{style:{color:Object(S.d)("darkText")}}," ",g.tagsByText)),g.startDate&&g.endDate&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,justifyContent:"space-between"}},a.a.createElement("label",{style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},O()(1e3*g.startDate).format("YYYY-MM-DD HH:MM:ss")),a.a.createElement(re.a,{size:"22px",color:Object(S.d)("color"),icon:"today",onClick:e.onClick})),a.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,justifyContent:"space-between"}},a.a.createElement("label",{style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},O()(1e3*g.endDate).format("YYYY-MM-DD HH:MM:ss")),a.a.createElement(re.a,{size:"22px",color:Object(S.d)("color"),icon:"today",onClick:e.onClick}))),g.users&&g.users.length>0?a.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},a.a.createElement(xi.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!1,data:l.a.getState().db.cards[u],noLimit:!0,multiple:!0,selected:g.users,transparent:!0})):a.a.createElement(a.a.Fragment,null),g.responsible&&g.responsible.length>0?a.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},a.a.createElement(xi.a,{avatarSize:"23px",data:l.a.getState().db.cards[u],selected:g.responsible,transparent:!0})):a.a.createElement(a.a.Fragment,null),g.tags&&a.a.createElement("div",{style:{display:"flex",fontSize:11}},g.tags.map((function(e,t){return a.a.createElement("div",{key:e.value,className:"tag",style:{backgroundColor:e.color||"lightgray",color:e.color?Object(S.s)(e.color,!0):"#FFFFFF",display:"flex",alignItems:"center",padding:"3px 7px",borderRadius:"7px",marginLeft:5,whiteSpace:"nowrap",height:"fit-content"}},e.parent&&l.a.getState().db.tag.filter((function(t){return t.value===e.parent})).length>0?a.a.createElement("div",{style:{fontSize:8,marginRight:3}},l.a.getState().db.tag.filter((function(t){return t.value===e.parent}))[0].label," / "):a.a.createElement(a.a.Fragment,null),e.label)}))),g.status&&!g.status.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__status"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(g.status).filter((function(e,t){return g.status[e]})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(l.a.getState().db.status.filter((function(t){return t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:l.a.getState().db.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),g.priority&&!g.priority.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__priority"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(g.priority).filter((function(e,t){return g.priority[e]&&l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:l.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),g.risk&&!g.risk.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__risk"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(g.risk).filter((function(e,t){return g.risk[e]&&l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:l.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),g.complexity&&!g.complexity.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__complexity"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(g.complexity).filter((function(e,t){return g.complexity[e]&&l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:l.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),g.impact&&!g.impact.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.u)("$__impact"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(g.impact).filter((function(e,t){return g.impact[e]&&l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0})).map((function(e,t){return a.a.createElement(Kt.a,{title:Object(S.u)(l.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:l.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))):a.a.createElement(a.a.Fragment,null),g&&g.selectedCards&&Object.keys(g.selectedCards).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",font:10,alignItems:"center",justifyContent:"flex-start",grid:3,display:"flex"}},(null===(r=g.selectedCards)||void 0===r?void 0:r.guideline)?a.a.createElement(b,{card:g.selectedCards.guideline,type:"guideline",order:0}):a.a.createElement(a.a.Fragment,null),(null===(n=g.selectedCards)||void 0===n?void 0:n.objective)?a.a.createElement(b,{card:g.selectedCards.objective,type:"objective",order:1}):a.a.createElement(a.a.Fragment,null),(null===(o=g.selectedCards)||void 0===o?void 0:o.goal)?a.a.createElement(b,{card:g.selectedCards.goal,type:"goal",order:2}):a.a.createElement(a.a.Fragment,null),(null===(i=g.selectedCards)||void 0===i?void 0:i.action)?a.a.createElement(b,{card:g.selectedCards.action,type:"action",order:3}):a.a.createElement(a.a.Fragment,null),Object.keys(g.selectedCards).length>1?a.a.createElement(re.a,{title:Object(S.u)("$__clearAll"),icon:"clear_all",color:"#80808087",size:17,onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},u,Object(p.a)(Object(p.a)({},l.a.getState().searchs[u]||{}),{},{selectedCards:{}}))))}}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null)),e.children?e.children:a.a.createElement(a.a.Fragment,null))}));var Oi=Object(u.b)((function(e){return{history:e.db.history,cards:e.db.cards,viewList:e.db.viewList,agileOrderBy:e.controls.agileOrderBy,agileOrderDesc:e.controls.agileOrderDesc}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=r.dataType,i=a.a.useState(["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal","link","insight"]),s=Object(m.a)(i,2),u=s[0],d=s[1],f=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();if(window.location.hash.split("/")[0].replace("#","")||c.a.push("t#tab/myTasks"),!r.cards)return null;var b=Object.keys(e.cards).filter((function(t){return e.cards[t]&&"chatGroup"!==e.cards[t].type&&"plan"!==e.cards[t].type&&"step"!==e.cards[t].type&&o.filter((function(r){return r.name===e.cards[t].type&&"swot"!==r.module&&"step"!==r.module})).length>0&&(!e.cards[t].checklist||e.cards[t].checklist&&e.cards[t].showCard)&&!e.cards[t].deleted})).map((function(t){return e.cards[t]}));return b=l.a.getState().session.cards.adminView?b.filter((function(e){return!(e.private&&!(e.private&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0))})):b.filter((function(e){return e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0&&(e._createdBy&&!e._createdBy.channel||e._createdBy&&e._createdBy.channel&&e._createdBy._id===n._id)})),u&&u.length>0&&(b=b.filter((function(e){return-1===u.indexOf(e.type)}))),"tab"===h[0]&&"unreaded"===h[1]&&(b=b.filter((function(e){return Object(et.j)(e._id).total>0}))),"tab"===h[0]&&"myTasks"===h[1]&&(b=b.filter((function(e){return e._users&&e._users[n._id]&&(e._users[n._id].isResponsible||!e._users[n._id].isResponsible&&1===Object.keys(e._users).length)})).map((function(e){return e}))),"tab"===h[0]&&"myDay"===h[1]&&(b=b.filter((function(e){return e._users&&e._users[n._id]&&e._users[n._id].myDay&&O()(new Date(1e3*e._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===f})).map((function(e){return e}))),"tab"===h[0]&&"ourDay"===h[1]&&(b=b.filter((function(e){return!(!e||!e._users)&&Object.keys(e._users).filter((function(t){return t&&e._users[t]&&e._users[t].myDay&&O()(new Date(1e3*e._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===f})).length>0})).map((function(e){return e}))),"tab"===h[0]&&"private"===h[1]&&(b=b.filter((function(e){return e.private})).map((function(e){return e}))),"tab"===h[0]&&"nextTasks"===h[1]&&(b=b.filter((function(e){return e.endDate&&O()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=O()().format("YYYY-MM-DD")&&O()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=O()(new Date(f)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&O()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=O()().format("YYYY-MM-DD")&&O()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=O()(new Date(f)).add(10,"days").format("YYYY-MM-DD")})).map((function(e){return e}))),"tab"===h[0]&&"lateTasks"===h[1]&&(b=b.filter((function(e){return e.endDate&&O()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(f)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e}))),"tab"===h[0]&&"unlinkedCards"===h[1]&&(b=b.filter((function(e){return!e.parent&&!e._parent})).map((function(e){return e}))),a.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(vo,{options:u,onChange:function(e){d(e)}}),a.a.createElement(_i,{fields:["text","date","users","responsible","tags","tagsByText","priority","complexity","risk","impact"],showFilters:!0,nodeId:g,style:{marginLeft:7},onChange:function(e){console.log(e)}})),a.a.createElement(ge.a,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:"$__orderByStartDate",icon:"today",color:"startDate"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{agileOrderBy:"startDate"}))}},{title:"$__orderByEndDate",icon:"event",color:"endDate"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{agileOrderBy:"endDate"}))}},{title:"$__orderByName",icon:"sort",color:"name"===e.agileOrderBy?Object(S.d)("color"):Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{agileOrderBy:"name"}))}},{title:"DESC"===e.agileOrderDesc?"$__asc":"$__desc",icon:"DESC"===e.agileOrderDesc?"text_rotation_down":"text_rotate_up",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{agileOrderDesc:"DESC"===e.agileOrderDesc?"ASC":"DESC"}))}}]})),a.a.createElement("div",null,a.a.createElement(Ea,null)),a.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},a.a.createElement(vi,{cards:b.map((function(e){return e._id})),inLine:r.viewList,showConnectedIn:!0,columnStyle:Object(p.a)({},r.viewList?{width:"100%"}:{maxHeight:"calc(100vh - 190px)",width:"25%"})}),a.a.createElement("div",{style:{clear:"both"}})))}));var wi=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ga)((function(e){return a.a.createElement("div",{style:{width:"100%"}},"Resume")})));var ji=function(e){var t=Fn.a.ExcelFile,r=Fn.a.ExcelFile.ExcelSheet,n=Fn.a.ExcelFile.ExcelColumn,o=e.data,i=[],c=[];return o.forEach((function(e){e.users.filter((function(e){return!e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).forEach((function(e){0===i.filter((function(t){return t.id===e.id})).length&&i.push(e)})),e.users.filter((function(e){return e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).forEach((function(e){0===c.filter((function(t){return t.id===e.id})).length&&c.push(e)}))})),a.a.createElement(t,{filename:"".concat(O()().tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_").concat(Object(S.u)("$__companies"),"_").concat(Object(S.u)("$__users")),element:a.a.createElement(k.a,{title:Object(S.u)("$__export"),text:Object(S.u)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:o.sort((function(e,t){return e.name<t.name})),name:Object(S.u)("$__accounts")},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__company",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__signaturePlan",1)),value:"plan"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__activeUsersCount",1)),value:"usersCount"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__usedDisk",1)),value:"diskUsed"})),a.a.createElement(r,{data:i.sort((function(e,t){return e.name<t.name})),name:"USUARIOS ATIVOS"},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__lastSessionDate",1)),value:"lastSession"})),a.a.createElement(r,{data:c.sort((function(e,t){return e.name<t.name})),name:"USU\xc1RIOS REMOVIDOS"},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__removed",1)),value:"deleted"})),o.map((function(e,t){return a.a.createElement(r,{data:e.users,name:e.name,key:t},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.u)("$__removed",1)),value:"deleted"}))})))};function Ei(){Ei=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ki=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ga)((function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState([]),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(null),h=Object(m.a)(d,2),g=h[0],b=h[1],y=a.a.useState("name"),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(!0),w=Object(m.a)(O,2),j=w[0],E=w[1],L=l.a.getState().db.plans;a.a.useEffect((function(){C()}),[]);var C=function(){var e=Object(f.a)(Ei().mark((function e(){var t,r;return Ei().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pe.a.post("Adm_ReqAccounts");case 2:t=e.sent,r=[],t&&(t.data.forEach((function(e){var t=0;if(0===r.filter((function(t){return t.id===e.id})).length){e.users.filter((function(e){return e.filesSize})).forEach((function(e){t+=parseInt(e.filesSize)})),t>0&&(t=Object(S.i)(t));var n=e.account.created_at&&e.account.created_at.low?String(e.account.created_at.low):e.account.created_at,a=e&&e.account&&e.account.plan&&L.filter((function(t){return t.value.indexOf(e.account.plan)})).length>0?e.account.plan:"p0",o=Array.from(e.users);o.flatMap((function(e){(e.deleted||e.unityDeleted)&&(e.deleted="SIM"),e.created_at=Ge()(1e3*e.created_at).format("DD/MM/YYYY HH:mm:ss"),e.lastSession=e.lastSession?Ge()(1e3*e.lastSession).format("DD/MM/YYYY HH:mm:ss"):""})),r.push(Object(p.a)(Object(p.a)({id:e.id},e.account),{},{created_at:Ge()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.u)(L.filter((function(e){return e.value.indexOf(a)>-1}))[0].label,"*"),diskUsed:t,usersCount:e.users.length,users:o})),"ENEVA"===e.account.name&&console.log(e,Object(p.a)(Object(p.a)({id:e.id},e.account),{},{created_at:Ge()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.u)(L.filter((function(e){return e.value.indexOf(a)>-1}))[0].label,"*"),diskUsed:t,usersCount:e.users.length,users:o}))}})),o(t.data),u(r));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e){x===e?E((function(e){return!e})):_(e)},T=function(e){var t=e.data,r=e.index,n=t.filesSize?parseInt(t.filesSize):0;return n>0&&(n=Object(S.i)(n)),a.a.createElement("div",null,a.a.createElement("div",{style:Object(p.a)(Object(p.a)({border:"solid 1px #f6f6f6",width:"100%",padding:7,overflowY:"auto",display:"flex"},t.deleted?{color:"red"}:{}),{},{marginBottom:7},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"})},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px",overflow:"hidden",textOverflow:"ellipsis"}},a.a.createElement("div",{style:{width:"100%",position:"relative",float:"left"}},t.name)," ",t.unity?a.a.createElement("div",{style:{fontSize:10,width:"100%",position:"relative",float:"left"}},"(",t.unity,")"):""),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.email),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.created_at),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"}},t.lastSession)))},F=function(e){var t=e.data,r=e.index,n=t&&t.account&&t.account.plan&&L.filter((function(e){return e.value.indexOf(t.account.plan)>-1})).length>0?t.account.plan:"p0",o=t.users.filter((function(e){return!e.deleted})).length,i=0;return t.users.filter((function(e){return e.filesSize})).forEach((function(e){i+=parseInt(e.filesSize)})),i>0&&(i=Object(S.i)(i)),a.a.createElement("div",{style:Object(p.a)({position:"relative",width:"100%",padding:7,marginBottom:3},t.account.deleted?Object(p.a)({},r%2?{background:"linear-gradient(33deg, rgba(237,20,61,0.1), rgba(237,20,61,0.2))"}:{background:"linear-gradient(33deg, rgba(237,20,61,0.2), rgba(237,20,61,0.1))"}):Object(p.a)({},r%2?{background:"linear-gradient(33deg, rgba(255, 255, 255, 1), rgba(247,247,247, 1))"}:{background:"linear-gradient(77deg, rgba(247,247,247, 1), rgba(255, 255, 255, 1))"}))},a.a.createElement("div",{style:{width:"100%",padding:7,overflowY:"auto",display:"flex",marginBottom:3}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",t.id),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},t.account.name),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.k)(t.account.created_at)),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},L.filter((function(e){return e.value.indexOf(n)>-1}))[0]&&L.filter((function(e){return e.value.indexOf(n)>-1}))[0].label?Object(S.u)("".concat(L.filter((function(e){return e.value.indexOf(n)>-1}))[0].label)):""),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px",cursor:"pointer",display:"flex"},onClick:function(){g===t.id?b(null):b(t.id)}},a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__showUsers","*"),color:Object(S.d)("lightgrey"),icon:g===t.id?"expand_less":"expand_more",onClick:function(){b(g===t.id?null:t.id)},size:"25px"}),o),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},i)),g===t.id?a.a.createElement("fieldset",{style:{borderRadius:5,width:"100%",overflow:"auto",position:"relative"}},a.a.createElement("legend",{style:{display:"flex"}},Object(S.u)("$__users"),a.a.createElement(k.a,{transparent:!0,title:Object(S.u)("$__hide","*"),color:Object(S.d)("lightgrey"),icon:"expand_less",onClick:function(){b(null)},size:"25px"})),a.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:Object(S.d)("menu"),fontSize:"11px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"},onClick:function(){I("id")}},"#",Object(S.u)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("name")}},Object(S.u)("$__name")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){I("email")}},Object(S.u)("$__email")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("createdAt")}},Object(S.u)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("lastSession")}},Object(S.u)("$__lastSession"))),t.users.sort((function(e,t){var r="",n="";return"id"===x&&(r=e.id,n=t.id),"name"===x&&(r=e.name.toLowerCase(),n=t.name.toLowerCase()),"email"===x&&(r=e.email.toLowerCase(),n=t.email.toLowerCase()),"createdAt"===x&&(r=e.created_at,n=t.created_at),"lastSession"===x&&(r=e.lastSession,n=t.lastSession),r<n?j?-1:1:r>n?j?1:-1:0})).map((function(e,t){return a.a.createElement(T,{data:e,index:t,key:t})}))):a.a.createElement(a.a.Fragment,null))};return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(ji,{data:s}),a.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:Object(S.d)("menu")}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",Object(S.u)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},Object(S.u)("$__company")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.u)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.u)("$__plan")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.u)("$__users")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.u)("$__diskUsed"))),a.a.createElement("div",null,n.filter((function(e){return!g||g===e.id})).sort((function(e,t){var r=e.account.name.toLowerCase(),n=t.account.name.toLowerCase();return r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(F,{index:t,data:e,key:e.account._id})}))))})));function Si(){Si=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Li=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ga)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=l.a.getState().functions.socket,s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],p=u[1],h=a.a.useState(0),g=Object(m.a)(h,2),b=g[0],y=g[1],v=a.a.useState(25),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useState(""),j=Object(m.a)(w,2),E=j[0],k=j[1];a.a.useEffect((function(){i(l.a.getState().languages)}),[JSON.stringify(l.a.getState().languages)]);var L=function(){var e=Object(f.a)(Si().mark((function e(t,r,n,a){return Si().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?c.emit("language.UPD",{alias:r,locale:n,text:a}):c.emit("data",{module:"language",method:"post",action:"addLocale"},{alias:r,locale:n,text:a});case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,a){return e.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",b+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(o).length/_),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(o).length,page:b,onChangePage:function(e,t){y(t)},rowsPerPage:_,onChangeRowsPerPage:function(e){O(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__aliasPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__search",1),variant:Object(S.d)("fieldVariant"),value:E,onChange:function(e){k(e.target.value)}}),a.a.createElement(Ce.a,{text:d?Object(S.u)("$__all","*"):Object(S.u)("$__onlyEmpty","*"),icon:d?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){p(!d)}})),a.a.createElement(Ct.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.u)("$__alias",1)),a.a.createElement("div",{className:t.column},Object(S.u)("$__translation",1))),a.a.createElement("div",{className:t.body},a.a.createElement("ul",null,o&&Object.keys(o)&&Object.keys(o).length>0&&Object.keys(o).filter((function(e){return!(!(!E||E&&(e.indexOf(E)>-1||o[e]&&o[e].locales&&o[e].locales.filter((function(e){return e.name.toLowerCase().indexOf(E.toLowerCase())>-1})).length>0))||!(d&&o[e]&&(!o[e].locales||o[e].locales&&(0===!o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length||o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name||0===o[e].locales.filter((function(e){return"en-US"===e.locale})).length||o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name||0===o[e].locales.filter((function(e){return"es-ES"===e.locale})).length||o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&!o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name)))&&d)})).sort((function(e,t){return e<t?-1:e>t?1:0})).filter((function(e,t){return t<=(b+1)*_&&t>=b*_})).map((function(e,r){return a.a.createElement("li",{key:e.trim()},a.a.createElement("div",{className:t.column},e),a.a.createElement("div",{className:t.column2},a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Portugu\xeas - Brasil"),a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(ge.a,{key:"".concat(e,"_pt-BR"),title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale})).length>0&&o[e].locales.filter((function(e){return"pt-BR"===e.locale}))[0]._id,editable:!0,onEdit:function(t,r){L(r,e,"pt-BR",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))),a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Ingl\xeas - Internacional"),a.a.createElement(ge.a,{key:"".concat(e,"_en-US"),editable:!0,title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale})).length>0&&o[e].locales.filter((function(e){return"en-US"===e.locale}))[0]._id,onEdit:function(t,r){L(r,e,"en-US",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0})),a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Espanhol"),a.a.createElement(ge.a,{key:"".concat(e,"_es-ES"),editable:!0,title:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0].name,_id:o[e].locales&&o[e].locales.length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale})).length>0&&o[e].locales.filter((function(e){return"es-ES"===e.locale}))[0]._id,onEdit:function(t,r){L(r,e,"es-ES",t.name)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))))}))))))})));var Ci=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(So)((function(){var e=l.a.getState().session,t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(null),s=Object(m.a)(c,2),u=s[0],d=s[1];return e._access.master?(window.location.hash.split("/")[0].replace("#",""),a.a.createElement("div",null,!t[0]&&a.a.createElement(wi,null),"tab"===t[0]&&"accounts"===t[1]&&a.a.createElement(ki,null),"tab"===t[0]&&"languages"===t[1]&&a.a.createElement(Li,null),"tab"===t[0]&&"tests"===t[1]&&a.a.createElement("div",{style:{width:"300px"}},a.a.createElement(He.a,{type:"datetime",onChangeStartDate:function(e){console.log(O()(e).format("YYYY-MM-DD 23:59:59").unix("X")),i(O()(e).unix("X"))},onChangeEndDate:function(e){d(O()(e).unix("X"))},range:!0,startDate:o?new Date(1e3*o):null,endDate:u?new Date(1e3*u):null,onClear:function(){i(null),d(null)}})))):a.a.createElement("div",null,"ACCESS DENIED")}))),Ii=r(703),Ti=function(e){return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 50px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:Z.I,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",left:"50%",marginLeft:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadge:{left:"7px"},timelineBadgeInverted:{color:Z.I,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",right:"50%",marginRight:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadgeInverted:{right:"7px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.b)+", 0.4)"},info:{backgroundColor:Z.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.s[0])+", 0.4)"},success:{backgroundColor:Z.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.B[0])+", 0.4)"},danger:{backgroundColor:Z.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.i[0])+", 0.4)"},warning:{backgroundColor:Z.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.H[0])+", 0.4)"},primary:{backgroundColor:Z.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 7px 10px -5px rgba("+Object(Z.q)(Z.w[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:{maxWidth:"calc(100% - 70px)",float:"right",padding:"7px",marginBottom:"5px",marginRight:"40px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(Z.q)(Z.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(Z.q)(Z.b)+", 0.87)",background:Object(S.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(Z.q)(Z.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(Z.q)(Z.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:"0px",display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(S.d)("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:"0px",minHeight:"50px",padding:"10px",height:"auto",width:"calc(100% - 0px)",backgroundColor:"rgba(240,240,240,1)",zIndex:10},files:{display:"inline-table",position:"relative"},textEditor:{},textEditorIcon:{cursor:"pointer",color:Object(S.d)("color")},progressBar:{backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}};function Fi(){Fi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Di=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ti)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=r.functions,c=r.timeline,s=i.socket,u=a.a.useState(e.stories||{}),d=Object(m.a)(u,2),g=d[0],b=d[1],y=[];a.a.useEffect((function(){v()}),[e.stories,e.nodeId,JSON.stringify(c)]);var v=function(){var t={};c[o._id]&&Object.keys(c[o._id]).filter((function(t){return c[o._id][t]&&c[o._id][t].user&&c[o._id][t].user._id&&c[o._id][t].user._id===e.nodeId})).forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e,c[o._id][e]))})),c[e.nodeId]&&Object.keys(c[e.nodeId]).forEach((function(r){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},r,c[e.nodeId][r]))})),b(t)},x=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:y,file:t})},_=function(){var t=Object(f.a)(Fi().mark((function t(){return Fi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users",type:e.type?e.type:"comment"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"15px"}},a.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},g&&Object.keys(g).length>0&&Object.keys(g).sort((function(e,t){return parseInt(g[e].created_at)<parseInt(g[t].created_at)?-1:parseInt(g[e].created_at)>parseInt(g[t].created_at)?1:0})).forEach((function(r,n){var i=g[r];return!e.showUnReaded&&n>Object.keys(g).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).forEach((function(e,t){var r=i.files[e];y.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Or.a,{openLightBox:function(e){x(e)},storie:i,reply:i.reply?g[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):e.showUnReaded&&i&&i.user&&i.user._id!==o._id&&(!i.readedBy||i.readedBy&&!i.readedBy[o._id])?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).forEach((function(e,t){var r=i.files[e];y.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Or.a,{openLightBox:function(e){x(e)},storie:i,reply:i.reply?g[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),a.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),a.a.createElement(Ii.a,{nodeId:e.nodeId,onSending:function(){_()}}))})));function Ni(){Ni=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ai=Object(B.a)((function(){return{unReaded:{background:"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(250, 250, 250, 0))",padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"100%",opacity:1},Readed:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",opacity:.6,maxWidth:"100%","&:hover":{opacity:1}}}}));var Pi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.chat,o=t.timeline,i=e.data,c=Ai(),s="cards";i.nodeId&&l.a.getState().db.users[i.nodeId]&&(s="users");var u=function(){var t=Object(f.a)(Ni().mark((function t(r,a){return Ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.a.getState().db[a][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:a,nodeId:r,loading:!1})):(Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Notifications/Index/openChat()"}),{id:[r],db:a}),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:a,nodeId:r,loading:!0}))),e.openChat(r,a);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if("timeline"===i.module&&(!i.inNode||!i.inNode.type||!l.a.getState().db||!l.a.getState().db[s]))return a.a.createElement(a.a.Fragment,null);if(!i.byUser||i.byUser&&!r.users[i.byUser]||i.inNode&&i.inNode.type&&i.inNode._id&&!l.a.getState().db[s][i.inNode._id])return a.a.createElement(a.a.Fragment,null);var d=function(){var e="";return e=O()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(1e3*i.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Object(S.u)("$__today",1)," ").concat(O()(1e3*i.created_at).tz("America/Sao_Paulo").format("HH:MM")):O()().tz("America/Sao_Paulo").format("YYYY")===O()(1e3*i.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(O()(1e3*i.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(O()(1e3*i.created_at).tz("America/Sao_Paulo").format("YYYY/DD/MM HH:MM")),a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{style:{position:"relative",alignItems:"center",display:"flex",textSize:"10px",width:"100%",color:Object(S.d)("medium"),justifyContent:"space-between"}},a.a.createElement(Er,{alt:r.users[i.byUser].name,src:r.users[i.byUser].image||null,size:"sm"},r.users[i.byUser].name.substr(0,1)),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.u)(i.description)," - ",e,i.readed&&a.a.createElement(re.a,{icon:"done_all",color:Object(S.d)("medium"),title:"$__readed"}))))};return a.a.createElement("div",{className:i.readed?c.Readed:c.unReaded},a.a.createElement("div",{style:{textAlign:"center",width:"100%",padding:"7px",maxWidth:"100%"}}),"timeline"===i.module&&!e.showTimeline&&i.inNode&&i.inNode.type&&i.inNode._id&&l.a.getState().db[s]&&l.a.getState().db[s][i.inNode._id]&&o[i.inNode._id]&&o[i.inNode._id][i.nodeId]&&a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===i.inNode.type&&(i&&i.inNode&&i.inNode._id&&l.a.getState().db&&l.a.getState().db.users&&l.a.getState().db.users[i.inNode._id]&&o[i.inNode._id]&&Object.keys(o[i.inNode._id]).length>0&&o[i.inNode._id][i.nodeId]&&(t=o[i.inNode._id][i.nodeId].user._id),u(t,"users"));"Card"===i.inNode.type&&("chatGroup"!==l.a.getState().db.cards[i.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideMudule),{},{db:"cards",id:i.inNode._id,module:"cardEdit",activeModule:"timeline",data:l.a.getState().db.cards[i.inNode._id]})):u(i.inNode._id,"cards"))}},a.a.createElement(Or.a,{storie:i&&i.inNode&&i.inNode._id&&l.a.getState().db&&l.a.getState().db[s]&&l.a.getState().db[s][i.inNode._id]&&o[i.inNode._id]&&Object.keys(o[i.inNode._id]).length>0&&o[i.inNode._id][i.nodeId]?o[i.inNode._id][i.nodeId]:{},boxStyle:{width:"calc(100% - 10px) !important"},db:s})),"card"===i.module&&r[s]&&r[s][i.nodeId]&&a.a.createElement("div",{style:"chatGroup"===l.a.getState().db.cards[i.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.nodeId].type&&u(i.nodeId,"cards")}},a.a.createElement(d,null),a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[i.nodeId],expanded:!0,onlyOption:"chatGroup"===l.a.getState().db.cards[i.nodeId].type,onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.nodeId].type&&u(i.nodeId,"cards")}})),e.showTimeline&&r[s]&&r[s][i.inNode._id]&&a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:"chatGroup"===l.a.getState().db.cards[i.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.inNode._id].type&&u(i.inNode._id,"cards")}},a.a.createElement(d,null),a.a.createElement(ut.a,{db:"cards",data:l.a.getState().db.cards[i.inNode._id],expanded:!0,onlyOption:"chatGroup"===l.a.getState().db.cards[i.inNode._id].type,onClick:function(e){"chatGroup"===l.a.getState().db.cards[i.inNode._id].type&&u(i.inNode._id,"cards")}}))),a.a.createElement(qn.a,{xs:12,sm:12,md:8,lg:8,xl:8},a.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},a.a.createElement(Di,{nodeId:i.inNode._id,stories:i&&i.inNode&&i.inNode._id&&l.a.getState().db.cards[i.inNode._id]&&o[i.inNode._id]?o[i.inNode._id]:{},db:"cards"})))))})),$i=function(e){var t;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)"},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:{width:"100%",padding:"7px",color:Object(S.d)("menuButtonColor",.8),"&:hover":{color:Object(S.d)("menuButtonColor",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"0px"},display:"flex",fontSize:"12px",fontWeight:"bold",alignItems:"center",cursor:"pointer"},itemButtomActive:{width:"100%",padding:"7px",color:Object(S.d)("menuButtonColor",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"0px",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",cursor:"pointer"},themeExample:(t={},Object(h.a)(t,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(h.a)(t,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),t),module:{position:"fixed",top:"0px",left:"147px",width:"50px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)",borderRight:"solid 4px ".concat(Object(S.d)("color"))},moduleExpanded:{position:"fixed",top:"0",left:"147px",width:"311px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",zIndex:"100 !important",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(S.d)("menuButtonColor"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},logoImg:{width:"66%",marginTop:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function Mi(){Mi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var zi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)($i)((function(e){var t=l.a.getState(),r=t.db,n=t.chat,o=t.notifications,i=t.timeline,s=e.classes,u=a.a.useState(null),d=Object(m.a)(u,2),h=d[0],g=d[1],b=window.location.hash.split("/");b[0]=b[0].replace("#","");var y=function(){var t=Object(f.a)(Mi().mark((function t(r,a,o){var i,l=arguments;return Mi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=l.length>3&&void 0!==l[3]?l[3]:"users",!r||window.location.pathname===r&&a!==h||c.a.push(r),g(a),"chat"!==a||o?"chat"===a&&o?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0,db:i,nodeId:o})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},n),{},{open:!0}));case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),v=[],x=[];Object.keys(o).sort((function(e,t){return parseInt(o[e].created_at)>parseInt(o[t].created_at)?-1:1})).filter((function(e){return"card"===o[e].module})).sort((function(e,t){return o[e].created_at.low-o[t].created_at.low})).forEach((function(e,t){-1===x.indexOf(o[e].nodeId)&&(v.push(e),x.push(o[e].nodeId))}));var _=[],O=[];return Object.keys(o).sort((function(e,t){return parseInt(o[e].created_at)>parseInt(o[t].created_at)?-1:1})).filter((function(e){return"timeline"===o[e].module})).sort((function(e,t){return o[e].created_at.low-o[t].created_at.low})).forEach((function(e,t){o[e].inNode&&o[e].inNode._id&&-1===O.indexOf(o[e].inNode._id)&&(_.push(e),O.push(o[e].inNode._id))})),a.a.createElement("div",null,a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{className:s.moduleTitle},Object(S.u)("$__notifications"))),a.a.createElement(qn.a,{xs:12,sm:6,md:4,lg:4,xl:4},a.a.createElement("div",{className:s.moduleTitle},Object(S.u)("$__cardsUpdated")),v.filter((function(e){return!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1])})).map((function(e){return a.a.createElement(Pi,{data:o[e],key:e})}))),a.a.createElement(qn.a,{xs:12,sm:6,md:8,lg:8,xl:8},a.a.createElement("div",{className:s.moduleTitle},Object(S.u)("$__timelineUpdated")),_.filter((function(e){return!b[1]||b[1]&&("important"===b[1]||"favorite"===b[1]||"archive"===b[1]||"latest"===b[1])})).map((function(e){return a.a.createElement(Pi,{data:o[e],key:e,openChat:function(e,t){return y(null,"chat",e,t)},showTimeline:!0,timeline:o[e]&&o[e].inNode&&o[e].inNode._id&&r.cards[o[e].inNode._id]&&i[o[e].inNode._id]?i[o[e].inNode._id]:{}})})))))}))),Yi=r(1857),Bi={root:{position:"relative",width:"100%",backgroundColor:"".concat(Object(S.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"#FFFFFF !important"},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(S.d)("color")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},bar:{borderRadius:7}};var Ri=Object(le.a)(Bi)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.root},a.a.createElement(Yi.a,null))})),Gi=r(1884),Hi=r(1885),Wi={checkRoot:{padding:"14px","&:hover":{backgroundColor:"unset"}},radioRoot:{padding:"16px","&:hover":{backgroundColor:"unset"}},labelRoot:{marginLeft:"-14px"},checkboxAndRadio:{position:"relative",display:"block",marginTop:"10px",marginBottom:"10px"},checkboxAndRadioHorizontal:{position:"relative",display:"block","&:first-child":{marginTop:"10px"},"&:not(:first-child)":{marginTop:"-14px"},marginTop:"0",marginBottom:"0"},checked:{color:Z.w[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:Z.b,opacity:"0.26",color:Z.b}},label:{cursor:"pointer",paddingLeft:"0",color:Z.p[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Object(Z.q)(Z.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"39px",marginRight:"0","@media (min-width: 992px)":{float:"right"}},labelHorizontalRadioCheckbox:{paddingTop:"22px"},labelLeftHorizontal:{color:"rgba("+Object(Z.q)(Z.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:Z.i[0]},radio:{color:Z.w[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+Z.w[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:Z.p[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:Z.p[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:Z.z[0],"& > span:first-child":{borderColor:Z.z[0]}}},iconCheckboxChecked:{color:Z.z[0],"& > span:first-child":{borderColor:Z.z[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:Z.w[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Object(Z.q)(Z.b)+", 0.4)",color:Z.I+" !important",border:"1px solid rgba("+Object(Z.q)(Z.b)+", .54)"},switchIconChecked:{borderColor:Z.w[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Object(Z.q)(Z.p[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Object(Z.q)(Z.w[0])+", 1) !important"},"& $switchIcon":{borderColor:Z.w[0]}}},Ui=Object(p.a)(Object(p.a)({},Wi),{},{cardTitle:Object(p.a)(Object(p.a)({},Z.d),{},{textAlign:"center"}),container:Object(p.a)(Object(p.a)({},Z.e),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Object(Z.q)(Z.b)+", 0.14), 0 6px 30px 5px rgba("+Object(Z.q)(Z.b)+", 0.12), 0 8px 10px -5px rgba("+Object(Z.q)(Z.b)+", 0.2)",marginBottom:"100px",padding:"40px 0px",marginTop:"15vh"},center:{textAlign:"center"},right:{textAlign:"right"},left:{textAlign:"left"},form:{padding:"0 20px",position:"relative"},socialTitle:{fontSize:"18px"},inputAdornment:{marginRight:"18px",position:"relative"},inputAdornmentIcon:{color:Z.p[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Object(Z.q)(Z.b)+", 0.26)"}});function qi(){qi=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Vi=Object(B.a)(Ui);r(1092);function Ji(e){var t=e.draggableStyle,r=e.virtualStyle,n=e.isDragging,a=Object(p.a)(Object(p.a)({},r),t);return Object(p.a)(Object(p.a)({},a),{},{height:n?a.height:a.height-8,left:n?a.left:a.left+8,width:n?t.width:"calc(".concat(a.width," - ").concat(16,"px)"),marginBottom:8})}var Xi=function(e){var t=e.provided,r=e.item,n=e.style,o=e.isDragging;return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:Ji({draggableStyle:t.draggableProps.style,virtualStyle:n,isDragging:o}),className:"item ".concat(o?"is-dragging":""),ref:t.innerRef}),a.a.createElement(ut.a,{data:r,db:"cards",isDragging:o,manualExpanded:e.manualExpanded||!1,onResize:function(t,r){e.onResize&&e.onResize(t)},onExpand:function(t){e.onExpand&&e.onExpand(t)}}))},Ki=a.a.memo((function(e){var t=e.index,r=e.column,o=e.discount,i=Object(n.useRef)(),c=Object(n.useRef)({}),l=Object(n.useRef)({});Object(n.useLayoutEffect)((function(){var e=i.current;e&&e.scrollTo(0)}),[t]);var s=function(t){var r=t.data,n=t.index,o=t.style,s=r[n];return s?a.a.createElement(ar.b,{draggableId:s._id,index:n,key:s._id},(function(t){return a.a.createElement(Xi,{provided:t,item:s,style:o,manualExpanded:e.cardsExpanded||(null===l||void 0===l?void 0:l.current[s._id])||!1,onResize:function(e){!function(e,t){var r;(null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0),c.current=Object(p.a)(Object(p.a)({},c.current),{},Object(h.a)({},e,t))}(s._id,e)},onExpand:function(e){!function(e,t){var r;"undefined"!==String(t)&&"null"!==String(t)&&((null===i||void 0===i||null===(r=i.current)||void 0===r?void 0:r.resetAfterIndex)&&i.current.resetAfterIndex(0),l.current=Object(p.a)(Object(p.a)({},l.current),{},Object(h.a)({},e,t)))}(s._id,e)}})})):null},u=r.items;if(e.nodeId&&e.searchs&&e.searchs[e.nodeId]){var d=e.searchs[e.nodeId];d.text&&void 0!==d.text&&null!==d.text&&""!==d.text&&(u=Array.from(u.filter((function(e){var t;return e.name.toLowerCase().indexOf(d.text.toLowerCase())>-1||(null===(t=e.description)||void 0===t?void 0:t.toLowerCase().indexOf(d.text.toLowerCase()))>-1})))),d.startDate&&void 0!==d.startDate&&null!==d.startDate&&""!==d.startDate&&(u=Array.from(u.filter((function(e){return parseInt(e.startDate)>=parseInt(d.startDate)})))),d.endDate&&void 0!==d.endDate&&null!==d.endDate&&""!==d.endDate&&(u=Array.from(u.filter((function(e){return parseInt(e.endDate)<=parseInt(d.endDate)})))),d.tags&&d.tags&&d.tags.filter((function(e){return e.value})).length>0&&(u=Array.from(u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return d.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})))),u=(u=(u=(u=(u=u.filter((function(e){return!(e.status&&!(e&&e.status&&d.status&&d.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&d.priority&&d.priority[e.priority]||d.priority.null&&!e.priority)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.complexity&&d.complexity[e.complexity]||d.complexity.null&&!e.complexity)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.risk&&d.risk[e.risk]||d.risk.null&&!e.risk)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.impact&&d.impact[e.impact]||d.impact.null&&!e.impact)})).map((function(e){return e})),d.users&&d.users.length>0&&(u=u.filter((function(e){return d.users.filter((function(t){return e&&e._users&&e._users[t]})).length>0})).map((function(e){return e})))}return u=(u=(u=u.sort((function(e,t){return e.order&&t.order&&e.order<t.order?-1:e.order&&t.order&&e.order>t.order?1:e.name<t.name?-1:1}))).sort((function(e,t){return"completed"===e.status&&e.completed_at>t.completed_at?-1:0}))).sort((function(e,t){return"completed"!==e.status?-1:0})),a.a.createElement(ar.c,{droppableId:r.id,mode:"virtual",renderClone:function(t,r,n){var o=u[n.source.index];return a.a.createElement(Xi,{provided:t,isDragging:r.isDragging,item:o,manualExpanded:e.cardsExpanded||(null===l||void 0===l?void 0:l.current[o._id])||!1,snapshot:r})}},(function(t,r){var n=r.isUsingPlaceholder?u.length+1:u.length;return a.a.createElement(pi.a,{style:{width:"100%",height:"calc(100% - ".concat(o+47,"px)"),overflowY:"auto",position:"relative"}},(function(r){var o=r.height;r.width;return a.a.createElement(di.b,{width:279,height:o,itemCount:n,itemSize:function(e){var t,r;return r=(null===(t=u[e])||void 0===t?void 0:t._id)||null,c.current[r]+7||67},itemData:u,className:"task-list",ref:i,style:Object(p.a)(Object(p.a)({},e.style?e.style:{}),{},{height:"100%"}),outerRef:t.innerRef},s)}))}))})),Zi=a.a.memo((function(e){var t=e.column,r=e.index,n=(l.a.getState().session,a.a.useState(!1)),o=Object(m.a)(n,2),i=o[0],c=o[1],s=Object(S.j)(),u=Object(et.t)(t.id),d=!!(s.plan&&s.planAdmin||parseInt(u)>4),f=l.a.getState().db.cards[t.id],h=a.a.useRef();a.a.useEffect((function(){var e=new ResizeObserver((function(){c(h.current.clientHeight)}));return e.observe(h.current),function(){return e.disconnect()}}),[h]);var g=0;return f.showSumValues&&t.items&&t.items.length>0&&t.items.filter((function(e){return e.value})).length>0&&t.items.filter((function(e){return e.value})).forEach((function(e){g+=parseFloat(e.value)})),a.a.createElement(ar.b,{draggableId:t.id,index:r},(function(n){return a.a.createElement("div",Object.assign({className:"column"},n.draggableProps,{ref:n.innerRef}),a.a.createElement("div",Object.assign({ref:h},n.dragHandleProps),a.a.createElement(ge.a,{title:"".concat(t.name," (").concat(t.items.length,")"),icon:t.icon||null,color:Object(S.d)("menu"),style:{padding:"7px",width:"100%"},placeholder:Object(S.u)("$__columnName"),customButtons:d?[{name:Object(S.u)("$__columnSettings",1),icon:"more_horiz",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:t.id,module:"columnEdit",activeModule:"columnEdit",data:l.a.getState().db.cards[t.id]}))},show:"hover"}]:[]}),f&&f.description?a.a.createElement(Ua.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,f.description)},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10,padding:"0px 15px",maxHeight:68,textOverflow:"ellipsis",overflow:"hidden",paddingBottom:15}},f.description.substr(0,133),"...")):a.a.createElement(a.a.Fragment,null),f.showSumValues&&g>0?a.a.createElement("div",{style:{position:"relative",width:"100%",color:"black",fontWeight:"bold",fontSize:12,padding:"0px 15px",paddingBottom:15}},"R$ ",g):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement(Ki,Object.assign({column:t,index:r},e,{discount:i||0})),a.a.createElement("div",{id:"AgileKanbanColumn_304",style:{position:"relative",float:"left",width:"100%",padding:"15px 7px"}},a.a.createElement(Ce.a,{text:Object(S.u)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:t.id,rows:t.items.length}}))}})))}))})),Qi=Object(u.b)((function(e,t){return{searchs:e.searchs,cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(T.b)(I,e)}))(Zi);function ec(){ec=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function tc(e,t,r){var n=Array.from(e),a=n.splice(t,1),o=Object(m.a)(a,1)[0];return n.splice(r,0,o),n}var rc=Object(u.b)((function(e,t){return{cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(n.useState)(Object(lt.d)(e.nodeId,{deleted:!1},e.cards)),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],g=Object(S.j)(),b=Object(et.t)(e.nodeId);function y(){return(y=Object(f.a)(ec().mark((function t(r){var n,a,i,c,s,u,d,f,m,g,y,v,x,_,O,w;return ec().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.destination){t.next=2;break}return t.abrupt("return");case 2:if("column"!==r.type){t.next=17;break}if(!(b<5)){t.next=5;break}return t.abrupt("return");case 5:if(a=tc(o.columnOrder,r.source.index,r.destination.index),i={},a.forEach((function(e,t){i=Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e]),{},{step:"".concat(t)})))})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),i)})),c=l.a.getState().db.cards[a[r.source.index]],s=l.a.getState().db.cards[a[r.destination.index]],!c||!c.showInPanel&&!c.onConcludedStepMoveTo){t.next=13;break}return t.abrupt("return");case 13:if(!s||!s.showInPanel&&!s.onConcludedStepMoveTo){t.next=15;break}return t.abrupt("return");case 15:return JSON.stringify(a)!==JSON.stringify(o.columnOrder)&&Object(lt.f)(a,"step"),t.abrupt("return");case 17:if(u=o.columns[r.source.droppableId],d=u.items[r.source.index],f=l.a.getState().db.cards[r.destination.droppableId],m=l.a.getState().db.cards[u.items[r.source.index]._id],g=l.a.getState(),y=g.session,!(parseInt(f.step)>=parseInt(l.a.getState().db.cards[r.source.droppableId].step)&&m._requireApproval&&m._users&&m._users[y._id])||m._users[y._id].approvalResponsible){t.next=24;break}return t.abrupt("return");case 24:if(r.source.droppableId!==r.destination.droppableId){t.next=33;break}return v=o.columns[r.source.droppableId],x=tc(v.items,r.source.index,r.destination.index),_={},O=[],x.forEach((function(e,t){_=Object(p.a)(Object(p.a)({},_),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{order:"".concat(t+1)}))),-1===O.indexOf(e._id)&&O.push(e._id)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),_)})),Object(lt.f)(O,"order"),t.abrupt("return");case 33:if(!(parseInt(f.step)>parseInt(l.a.getState().db.cards[r.source.droppableId].step)&&m._requireApproval&&m._users&&m._users[y._id])||m._users[y._id].approvalResponsible){t.next=35;break}return t.abrupt("return");case 35:w=Object(lt.c)(e,(null===m||void 0===m?void 0:m._id)||null,(null===f||void 0===f?void 0:f._id)||null,(null===m||void 0===m||null===(n=m._createdBy)||void 0===n?void 0:n._id)||null),f.requireApproval?w=Object(p.a)(Object(p.a)({},w),{},{_requireApproval:!0}):!f.requireApproval&&d._requireApproval&&(w=Object(p.a)(Object(p.a)({},w),{},{_requireApproval:null})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},d._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[d._id]),w),{},{_parent:r.destination.droppableId})))}));case 38:case"end":return t.stop()}}),t)})))).apply(this,arguments)}a.a.useEffect((function(){i(Object(lt.d)(e.nodeId,{deleted:!1}))}),[e.cards,e.nodeId,e.searchs]);var v=function(){var t=Object(f.a)(ec().mark((function t(r){var n;return ec().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(lt.b)(r);case 2:(n=t.sent)&&e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),n)}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement(ar.a,{onDragEnd:function(e){return y.apply(this,arguments)},onDragStart:function(){}},a.a.createElement("div",{className:"app",style:{overflowY:"auto",height:"-webkit-fill-available",paddingTop:50}},a.a.createElement(ar.c,{droppableId:"all-droppables",direction:"horizontal",type:"column"},(function(t){return a.a.createElement("div",Object.assign({},t.droppableProps,{className:"columns",ref:t.innerRef}),o.columnOrder.map((function(t,r){return a.a.createElement(Qi,Object.assign({},e,{key:t,column:o.columns[t],index:r,nodeId:e.nodeId},e.columProps?e.columProps:{}))})),g.admin&&g.planAdmin||b>3?a.a.createElement("div",{className:"column",style:{display:"flex",justifyContent:"center"}},u?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",width:279,padding:7}},a.a.createElement("div",{id:"AgileKanbanIndex_282"},a.a.createElement(ge.a,{style:{width:"100%"},title:null,color:Object(S.d)("menu"),editable:!0,permitIcon:!0,onEdit:function(t){d(!1),v(Object(p.a)(Object(p.a)({},t),{},{_parent:e.nodeId,type:"step",step:String(o.columnOrder.length),checklist:!0}))},placeholder:Object(S.u)("$__columnName"),onCancel:function(){d(!1)}}))):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#FFFFFF",color:"black",padding:15,width:279}},a.a.createElement("div",{id:"AgileKanbanIndex_256"},a.a.createElement(k.a,{title:Object(S.u)("$__addColumn"),text:Object(S.u)("$__addColumn"),color:"lightgrey",textColor:"lightgrey",icon:"add_box",onClick:function(){d(!0)},size:"25px"})))):a.a.createElement(a.a.Fragment,null),t.placeholder)}))),a.a.createElement("div",{style:{position:"absolute",top:15,left:15,height:"50px",width:"50px"}},a.a.createElement(_i,{nodeId:e.nodeId,fields:["text","date","tags","status","priority","impact","risk","complexity","users"],showFilters:!0})))}));var nc=Object(u.b)((function(e,t){return{cards:e.db.cards,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition,dataType:e.db.dataType}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.cards,r=e.orderByTitle,n=e.orderByTitlePosition,o=e.dataType,i=window.location.hash.split("/");if(i[0]=i[0].replace("#",""),!t)return a.a.createElement("div",null);var c=Object.keys(t).filter((function(r){return!(t[r].checklist||t[r]._planId!==i[0]||!("actions"===e.type&&t[r]&&t[r].type&&"objective"!==t[r].type&&"goal"!==t[r].type&&"plan"!==t[r].type&&"link"!==t[r].type&&"insight"!==t[r].type&&"chatGroup"!==t[r].type&&-1===t[r].type.indexOf("guideline")&&"swot"!==o.filter((function(e){return e.name===t[r].type}))[0].module||"guidelines"===e.type&&t[r].type.indexOf("guideline")>-1||"objectives"===e.type&&t[r].type.indexOf("objective")>-1||"goals"===e.type&&t[r].type.indexOf("goal")>-1))})).map((function(e){return t[e]}));return a.a.createElement("div",null,a.a.createElement("div",{style:{padding:"0px 10px"}},a.a.createElement(_i,{style:{with:"100%"},fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0}),a.a.createElement(ge.a,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:r?"$__orderByName":"$__orderByManualOrder",icon:r?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitle:!r}))}},r&&{title:"ASC"===n?"$__asc":"$__desc",icon:"ASC"===n?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitlePosition:"ASC"===n?"DESC":"ASC"}))}}]})),a.a.createElement(vi,{cards:c.map((function(e){return e._id})),columnStyle:{maxHeight:"calc(100vh - 220px)",width:"25%"}}))})),ac=r(872),oc=(r(1744),r(1745),r(193)),ic=r(83),cc=function(e){var t=Object(n.useRef)([400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random()]),r=[{id:"Atrasadas",label:"Plano A",value:t.current[0],color:"#f48c7c"},{id:"Concluidas",label:"Plano B",value:t.current[1],color:"#44f474"},{id:"Executando",label:"Plano C",value:t.current[2],color:"#24acdc"},{id:"Atrasadas2",label:"Plano A",value:t.current[3],color:"#f48c7c"},{id:"Concluidas2",label:"Plano B",value:t.current[4],color:"#44f474"}];return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},a.a.createElement(ic.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{width:"60%"}},a.a.createElement(zr.a,{data:r,colors:["#929497","#011E41","pink","#EBA900","#5A7F71"],margin:{top:37,right:27,bottom:37,left:0},innerRadius:.6,animate:!1,padAngle:3,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:!1,arcLabel:!1})),a.a.createElement(re.a,{size:65,style:{alignSelf:"center",marginLeft:"-20px"}},"list_alt"))))},lc=function(e){var t=Object(n.useRef)([400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random(),400*Math.random()]),r=[{id:"Atrasadas",label:"Plano A",value:t.current[0],color:"#f48c7c"},{id:"Concluidas",label:"Plano B",value:t.current[1],color:"#44f474"},{id:"Executando",label:"Plano C",value:t.current[2],color:"#24acdc"},{id:"Atrasadas2",label:"Plano A",value:t.current[3],color:"#f48c7c"},{id:"Concluidas2",label:"Plano B",value:t.current[4],color:"#44f474"}];return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},a.a.createElement(ic.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},a.a.createElement(zr.a,{data:r,margin:{top:30,right:30,bottom:30,left:30},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:0,borderWidth:0,colors:["#929497","#011E41","pink","#EBA900","#5A7F71"],theme:{fontSize:"20px",fontWeight:"bold",legend:!1},animate:!1,arcLinkLabelsStraightLength:0,isInteractive:!1,borderColor:{from:"color",modifiers:[["darker",.8]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:!1,arcLabel:!1}))))},sc=r(262),uc=function(e){var t=Object(n.useRef)(Math.floor(7*Math.random())+3);return console.log(t),a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(ic.a,{styles:{},tittle:e.title,icon:e.icon,datafilter:!0}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},a.a.createElement(sc.a,{data:[{country:"AD","hot dog":129,"hot dogColor":"hsl(182, 70%, 50%)",burger:161,burgerColor:"hsl(324, 70%, 50%)",sandwich:75,sandwichColor:"hsl(266, 70%, 50%)",kebab:66,kebabColor:"hsl(148, 70%, 50%)",fries:180,friesColor:"hsl(130, 70%, 50%)",donut:180,donutColor:"hsl(253, 70%, 50%)"},{country:"AE","hot dog":115,"hot dogColor":"hsl(121, 70%, 50%)",burger:87,burgerColor:"hsl(30, 70%, 50%)",sandwich:22,sandwichColor:"hsl(170, 70%, 50%)",kebab:164,kebabColor:"hsl(24, 70%, 50%)",fries:5,friesColor:"hsl(103, 70%, 50%)",donut:47,donutColor:"hsl(308, 70%, 50%)"},{country:"AF","hot dog":129,"hot dogColor":"hsl(354, 70%, 50%)",burger:15,burgerColor:"hsl(353, 70%, 50%)",sandwich:28,sandwichColor:"hsl(223, 70%, 50%)",kebab:178,kebabColor:"hsl(134, 70%, 50%)",fries:26,friesColor:"hsl(30, 70%, 50%)",donut:182,donutColor:"hsl(206, 70%, 50%)"},{country:"AG","hot dog":192,"hot dogColor":"hsl(276, 70%, 50%)",burger:179,burgerColor:"hsl(165, 70%, 50%)",sandwich:184,sandwichColor:"hsl(21, 70%, 50%)",kebab:107,kebabColor:"hsl(292, 70%, 50%)",fries:45,friesColor:"hsl(63, 70%, 50%)",donut:193,donutColor:"hsl(97, 70%, 50%)"},{country:"AI","hot dog":117,"hot dogColor":"hsl(84, 70%, 50%)",burger:151,burgerColor:"hsl(183, 70%, 50%)",sandwich:190,sandwichColor:"hsl(11, 70%, 50%)",kebab:46,kebabColor:"hsl(85, 70%, 50%)",fries:133,friesColor:"hsl(65, 70%, 50%)",donut:66,donutColor:"hsl(190, 70%, 50%)"},{country:"AL","hot dog":0,"hot dogColor":"hsl(89, 70%, 50%)",burger:53,burgerColor:"hsl(348, 70%, 50%)",sandwich:3,sandwichColor:"hsl(87, 70%, 50%)",kebab:45,kebabColor:"hsl(193, 70%, 50%)",fries:169,friesColor:"hsl(108, 70%, 50%)",donut:25,donutColor:"hsl(153, 70%, 50%)"},{country:"AM","hot dog":98,"hot dogColor":"hsl(233, 70%, 50%)",burger:193,burgerColor:"hsl(144, 70%, 50%)",sandwich:178,sandwichColor:"hsl(298, 70%, 50%)",kebab:183,kebabColor:"hsl(261, 70%, 50%)",fries:128,friesColor:"hsl(309, 70%, 50%)",donut:72,donutColor:"hsl(326, 70%, 50%)"}].slice(0,t.current),keys:["donut","fries","kebab"],indexBy:"country",margin:{top:20,right:20,bottom:20,left:20},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!0},enableLabel:!1,colors:["#011E41","#EBA900","#5A7F71"],yScale:{max:100},theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fontSize:14}}}},fill:!1,borderColor:{from:"color",modifiers:[["darker",1.6]]},isInteractive:!1,axisTop:null,axisRight:null,axisBottom:null,axisLeft:null,role:"application"}))))},dc=r(700),pc=function(e){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(ic.a,{styles:{},tittle:e.title,icon:e.icon}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",marginBottom:"25px"}},a.a.createElement(dc.a,{data:[{id:"japan",data:[{x:"",y:89},{x:"seg",y:89},{x:"ter",y:289},{x:"quar",y:145},{x:"quin",y:268},{x:"sexta",y:285},{x:"sab",y:241},{x:"dom",y:86},{x:" ",y:86}]},{id:"france",data:[{x:"",y:89},{x:"seg",y:224},{x:"ter",y:153},{x:"quar",y:200},{x:"quin",y:94},{x:"sexta",y:285},{x:"sab",y:275},{x:"dom",y:287},{x:" ",y:127}]}],responsive:!0,margin:{top:0,right:-25,bottom:0,left:-25},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:500,stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:null,axisLeft:null,enableGridX:!0,enableGridY:!0,lineWidth:.5,pointSize:1,pointColor:{theme:"background"},pointBorderWidth:0,isInteractive:!1,enableArea:!0,areaBaselineValue:0,pointBorderColor:{from:"serieColor"},pointLabelYOffset:-12,useMesh:!0,curve:"cardinal",colors:["#525252","#24acdc"],theme:{fontSize:"14px",color:"white",background:"#f5f5f5",grid:{line:{stroke:"#e8e6e6",strokeWidth:1}},axis:{ticks:{text:{fontSize:14}}}}}))))},fc=function(e){return a.a.createElement("div",{style:{width:"100%",backgroundColor:"white",height:"100%",display:"flex",boxShadow:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"210px",alignSelf:"center"}},a.a.createElement(re.a,{size:40,icon:e.icon?e.icon:"close",style:{alignSelf:"center"}}),a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",fontSize:"16px",fontWeight:"bold",color:"rgba(0, 0, 0, 0.67)"}},e.title?e.title:"teste")))},hc=r(701),mc=function(e){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},a.a.createElement(ic.a,{styles:{},tittle:e.title,icon:e.icon,datafilter:!0}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},a.a.createElement(hc.a,{data:[{id:"step_sent",value:6,label:"Sent"},{id:"step_viewed",value:5,label:"Viewed"},{id:"step_clicked",value:4,label:"Clicked"},{id:"step_add_to_card",value:3,label:"Add To Card"},{id:"step_purchased",value:2,label:"Purchased"},{id:"step_purchased2",value:1,label:"Purchased"}],direction:"horizontal",margin:{top:0,right:0,bottom:0,left:0},shapeBlending:.46,spacing:3,valueFormat:" > .0s",colors:{scheme:"reds"},borderWidth:0,labelColor:{from:"color",modifiers:[["darker",3]]},beforeSeparatorLength:10,beforeSeparatorOffset:20,afterSeparatorLength:10,afterSeparatorOffset:20,currentPartSizeExtension:10,enableLabel:!1,motionConfig:"wobbly"}))))},gc=r(457),bc=r(833),yc=r(834),vc=r(516),xc=r(517),_c=r(518),Oc=r(835),wc=r(836),jc=r(519),Ec=r(837),kc=r(520),Sc=r(521),Lc=r(522),Cc=r(838),Ic=r(191),Tc=r(523),Fc=r(839),Dc=r(840),Nc=r(841),Ac=r(842),Pc=r(458),$c=r(459),Mc=r(460),zc=r(524),Yc=r(461),Bc=r(843),Rc=(r(1751),function(e){var t,r=e.onClose,o=e.filter,i=e.addWidget,c=Object(n.useState)("all"),s=Object(m.a)(c,2),u=s[0],d=s[1],p=window.location.hash.split("/");p[0]=p[0].replace("#","");var f=l.a.getState().db,h=[{name:Object(S.u)("$__all"),type:"all"},{name:Object(S.u)("$__charts"),type:"charts"},{name:Object(S.u)("$__tasks"),type:"tasks"},{name:Object(S.u)("$__others"),type:"others"}],g=[{Component:Nc.default,widget:"TaskDoneBar",type:"charts",name:"TaskDoneBar",datagrid:{x:0,y:0,w:4,h:6,minW:2,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:uc},{Component:Ac.default,widget:"TaskDoneDoughTable",type:"charts",name:"TaskDoneDoughTable",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"stacked_bar_chart",Preview:lc},{Component:$c.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"area_chart",Preview:pc},{Component:Pc.default,widget:"TaskByPerson",name:"TaskByPerson",type:"charts",datagrid:{x:0,y:0,w:5,h:5,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:uc,filter:{index:0,showQuantity:5,number:(null===o||void 0===o?void 0:o.users)?null===o||void 0===o||null===(t=o.users)||void 0===t?void 0:t.length:4,finalIndex:5}},{Component:Bc.default,widget:"TaskDoneBarMonth",type:"charts",name:"TaskDoneBarMonth",datagrid:{x:0,y:0,w:6,h:6,minW:2,maxW:12,minH:4},icon:"stacked_bar_chart",Preview:uc},{Component:Mc.default,widget:"TimeLine",name:"TimeLine",type:"others",datagrid:{x:0,y:0,w:4,h:4,minW:6,maxW:12,minH:4},icon:"chat",Preview:fc},{Component:yc.default,widget:"ActionsDetailed",name:"actions",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"play_arrow",Preview:cc,plan:"flow"},{Component:wc.default,widget:"GoalsDetailed",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"flag",Preview:cc,plan:"flow"},{Component:Cc.default,widget:"MatrixDoughDetailed",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:Ht.a,Preview:cc,plan:"flow"},{Component:Dc.default,widget:"ObjectiveDetailed",name:"objectives",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"gps_fixed",Preview:cc,plan:"flow"},{Component:zc.default,widget:"ObjetiveDough",name:"objectives",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"gps_fixed",Preview:lc,plan:"flow"},{Component:vc.default,widget:"ActionsDough",name:"actions",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"play_arrow",Preview:lc,plan:"flow"},{Component:Lc.default,widget:"MatrixDough",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:Ht.a,Preview:lc,plan:"flow"},{Component:jc.default,widget:"GoalsDough",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"flag",Preview:lc,plan:"flow"},{Component:Oc.default,widget:"Goal",name:"goals",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"flag",Preview:Ic.default,plan:"flow"},{Component:Fc.default,widget:"Objective",name:"objectives",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"gps_fixed",Preview:Ic.default,plan:"flow"},{Component:Ec.default,widget:"Guideline",name:"guidelines",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:Ht.a,Preview:Ic.default,plan:"flow"},{Component:bc.default,widget:"Actions",name:"actions",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"play_arrow",Preview:Ic.default,plan:"flow"},{Component:kc.default,widget:"LastCompleted",type:"tasks",name:"lastCompletedCards",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:fc},{Component:xc.default,widget:"DayTasks",type:"tasks",name:"todayTasks",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:fc},{Component:Sc.default,widget:"LateTask",type:"tasks",name:"lateActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:fc},{Component:Tc.default,widget:"NextTask",type:"tasks",name:"nextActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:fc},{Component:Yc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:0,w:6,h:8,minW:3,maxW:12,minH:8},icon:"update",Preview:fc},{Component:_c.default,widget:"Funnel",type:"charts",name:"Etapas",datagrid:{x:0,y:0,w:6,h:4,minW:4,maxW:12,minH:4},icon:"filter_alt",Preview:mc},{Component:gc.default,widget:"AboutPlan",type:"others",name:"planResume",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:4},icon:"info",Preview:fc}],b=function(e){var t=e.name,n=e.prev;return a.a.createElement("div",null,a.a.createElement("p",{style:{marginTop:"2px",height:"80px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",width:"105%",marginLeft:"-2%",fontWeight:"bold",borderBottom:"1px solid #d1d1cf",fontSize:"16px",color:"rgba(0, 0, 0, 0.80)"}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"analytics"),t),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",right:"20px",top:"18px",color:"grey"},size:"30px",onClick:r},"close")),n&&a.a.createElement("div",{id:"getElements_58"}," ",a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},size:"30px"},"arrow_back")))};return a.a.createElement("div",{className:"container"},a.a.createElement("div",{className:"gridContainer"},a.a.createElement(Rr.a,null,a.a.createElement(oc.a,{className:"grid",xs:12},a.a.createElement(b,{name:Object(S.u)("$__addCharts")})),a.a.createElement(oc.a,{className:"grid",xs:4},a.a.createElement("div",{className:"list"},h.map((function(e,t){var r=e.name,n=e.type,o=r.charAt(0).toUpperCase()+r.slice(1);return"tasks"===n&&"operational"===f.cards[p[0]].planType?null:a.a.createElement("p",{key:t,onClick:function(){return d(n)},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},className:"filter",style:{paddingLeft:"20px",display:"flex",alignItems:"center",fontSize:"16px"}},o)})))),a.a.createElement(oc.a,{className:"grid",xs:8},a.a.createElement("div",{className:"filterItemBox"},g&&g.map((function(e,t){var n=e.name,o=(e.image,e.Component),c=e.datagrid,l=e.type,s=e.icon,d=e.widget,h=e.Preview,m=e.filter,g=e.plan;return"tasks"===l&&"operational"===f.cards[p[0]].planType||"Funnel"===d&&"operational"!==f.cards[p[0]].planType||"flow"===g&&"flow"!==f.cards[p[0]].planType?null:l===u||"all"===u?a.a.createElement(oc.a,{className:"gridBox",xs:6,key:t},a.a.createElement("div",{style:{position:"absolute",zIndex:"10",width:"97%",height:"95%",cursor:"pointer",marginLeft:"-4.5%"},onClick:function(){i(o,n,c,n,n,s,d,m),r()},className:"boxIncrease"}),a.a.createElement("div",{className:"filterItem"},a.a.createElement(h,{tittle:Object(S.u)("$__".concat(n),1),title:Object(S.u)("$__".concat(n),1),preview:!0,data:1,type:l,icon:s}))):null})))))))}),Gc=r(106),Hc=r(696),Wc=[{Component:gc.default,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:Mc.default,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:Hc.default,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:Pc.default,widget:"TaskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:$c.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:zc.default,widget:"ObjetiveDough",name:"objectives",datagrid:{x:0,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:vc.default,widget:"ActionsDough",name:"actions",datagrid:{x:3,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"play_arrow"},{Component:Lc.default,widget:"MatrixDough",name:"guidelines",datagrid:{x:6,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"MatrixIcon"},{Component:jc.default,widget:"GoalsDough",name:"goals",datagrid:{x:9,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:kc.default,widget:"LastCompleted",name:"lastCompletedCards",datagrid:{x:0,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:xc.default,widget:"DayTasks",name:"todayTasks",datagrid:{x:3,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:Sc.default,widget:"LateTask",name:"lateActivities",datagrid:{x:6,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:Tc.default,widget:"NextTask",name:"nextActivities",datagrid:{x:9,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:Yc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:18,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}],Uc=[{Component:gc.default,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:Mc.default,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:Hc.default,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:Pc.default,widget:"TaskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:$c.default,widget:"TaskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:_c.default,widget:"Funnel",type:"charts",name:"Etapas",datagrid:{x:0,y:22,w:12,h:5,minW:4,maxW:12,minH:4},icon:"filter_alt"},{Component:Yc.default,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:27,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}];r(164);function qc(){qc=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Vc,Jc=Object(ac.WidthProvider)(ac.Responsive),Xc=Object(u.b)((function(e){return{cards:e.db.cards,loaders:e.sessionLoads.cards.load}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(n.useState)([]),o=Object(m.a)(t,2),c=o[0],s=o[1],u=Object(n.useState)(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=Object(n.useState)({}),v=Object(m.a)(y,2),x=v[0],_=v[1],O=Object(n.useState)(!1),w=Object(m.a)(O,2),j=w[0],E=w[1],k=Object(n.useState)(0),L=Object(m.a)(k,2),C=L[0],I=L[1],T=Object(n.useState)([]),F=Object(m.a)(T,2),D=F[0],P=F[1],$=Object(n.useState)(!0),M=Object(m.a)($,2),z=M[0],Y=M[1],B=Object(n.useState)(!1),R=Object(m.a)(B,2),G=(R[0],R[1]),H=l.a.getState().db,W=Object(n.useRef)([{}]),U=Object(n.useRef)(!1),q=Object(n.useRef)({}),V=(Object(n.useRef)(!1),window.location.hash.split("/"));V[0]=V[0].replace("#","");var J=Object(S.j)(),X=Object(et.t)(V[0]),K={backgroundColor:"white",color:"rgba(0, 0, 0, 0.80)"},Z=JSON.stringify(e.cards),Q=Object(n.useRef)(null);Object(n.useEffect)((function(){e.loaders&&Object.keys(e.loaders).length>0&&Object.keys(e.loaders).filter((function(t){return"loading"===e.loaders[t]})).length>0?!1!==z&&Y(!0):Y(!1)}),[e.loaders]),Object(n.useEffect)((function(){var e=[];!j&&Object.keys(x).length>0&&function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var n=l.a.getState().db.cards[t[0]].customDashboard?Object.values(JSON.parse(l.a.getState().db.cards[t[0]].customDashboard)):null;if(n){n.sort((function(e,t){return e.datagrid.y===t.datagrid.y?e.datagrid.x-t.datagrid.x:e.datagrid.y-t.datagrid.y}));var a=[];n.map(function(){var e=Object(f.a)(qc().mark((function e(t,o){var i,c,l,u,d;return qc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.widget,c="".concat(i.substr(0,1).toUpperCase()).concat(i.substr(1,i.length)),e.next=4,r(1752)("./".concat(c,".jsx"));case 4:l=e.sent,u=l.default,d={component:u,name:t.name,type:t.name,datagrid:t.datagrid,chart:t.name,icon:t.icon,widget:t.widget,key:Object(Nr.a)(),filter:!!t.filter&&t.filter},a=[].concat(Object(A.a)(a),[d]),o===n.length-1&&(s(a),G(!0));case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}else{e="operational"!==H.cards[t[0]].planType?Wc:Uc;var o=[];e.forEach((function(t,r){var n={component:t.Component,name:t.name,type:t.name,datagrid:t.datagrid,chart:t.name,icon:t.icon,widget:t.widget,key:Object(Nr.a)(),filter:!1};o=[].concat(Object(A.a)(o),[n]),r===e.length-1&&(s(o),G(!0))}))}}()}),[x,j]),Object(n.useEffect)((function(){if(!j){if(0===c.length){var e=l.a.getState().db.cards[V[0]].customDashboard?Object.values(JSON.parse(l.a.getState().db.cards[V[0]].customDashboard)):null;if(e)s(e);else{var t=[];t="operational"!==H.cards[V[0]].planType?Wc:Uc,s(t)}}(function(){var e=Object(f.a)(qc().mark((function e(){var t;return qc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,100)}));case 2:return e.next=4,Object(et.s)(V[0]);case 4:t=e.sent,JSON.stringify(x)!==JSON.stringify(t)&&_(t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}}),[Z]);var ee=function(){U.current?i.a.render(a.a.createElement(Rc,{category:"plan",filter:g,onClose:function(){return i.a.unmountComponentAtNode(document.getElementById("render-container"))},addWidget:function(e,t,r,n,a,o,i,c){return function(e,t,r,n,a,o,i,c,l){var u={component:e,name:t,type:n,datagrid:r,chart:a,icon:o,widget:i,key:Object(Nr.a)(),filter:c||!1};void 0!==l?s((function(e){return e.map((function(e,t){return t===l?u:e}))})):j?P((function(e){return[].concat(Object(A.a)(e),[u])})):s((function(e){return[].concat(Object(A.a)(e),[u])}))}(e,t,r,n,a,o,i,c)}}),document.getElementById("render-container")):i.a.unmountComponentAtNode(document.getElementById("render-container"))};return a.a.createElement("div",{ref:Q,key:C,style:{width:"100%",marginTop:"8px",marginBottom:"8%",fontSize:"19px",color:"grey",overflowX:"hidden",overflowY:"hidden",paddingBottom:"80px",minHeight:"90vh"}},a.a.createElement("div",{id:"render-container"}),a.a.createElement("div",{style:{display:"flex"}},j&&a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(yo.a,{text:Object(S.u)("$__addCharts"),icon:"add",onClick:function(){return U.current=!0,b(!0),void ee()}})),j&&a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(yo.a,{text:Object(S.u)("$__save"),icon:"save",onClick:function(){return function(){var t={};D.forEach((function(e){W.current.forEach((function(r){r.i===e.key&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.key,Object(p.a)(Object(p.a)({},e),{},{datagrid:r}))))}))})),Object.keys(U).length>0&&D.forEach((function(e){Object.values(q.current).forEach((function(r){r.id===e.key&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e.key,Object(p.a)(Object(p.a)({},t[e.key]),{},{filter:r}))))}))})),Object(et.M)(e,{_id:V[0],customDashboard:JSON.stringify(t)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},V[0],Object(p.a)(Object(p.a)({},l.a.getState().db.cards[V[0]]),{},{customDashboard:JSON.stringify(t)})))})),Object(S.c)({message:"Dados salvos",variant:"info",persist:!1,horizontal:"right",confirm:null}),s(D),E(!1)}()}})),(J.plan&&J.planAdmin||X>3)&&a.a.createElement("div",{style:{marginLeft:"10px"},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(yo.a,{text:j?Object(S.u)("$__cancel"):Object(S.u)("$__editMode"),icon:j?"close":"edit",onClick:function(){j?(E((function(e){return!e})),P(c),I((function(e){return e+1}))):(P(c),E((function(e){return!e})))},style:{backgroundColor:j&&"white",color:j&&"black "}}))),(j?D:c).length>0&&a.a.createElement(Jc,{breakpoints:{lg:1200},cols:{lg:12,ll:4},rowHeight:80,isResizable:j,onLayoutChange:function(e,t){var r;(null===t||void 0===t||null===(r=t.lg)||void 0===r?void 0:r.length)>0&&(W.current=null===t||void 0===t?void 0:t.lg)},style:{zIndex:"0"},draggableHandle:".drag-handle"},(j?D:c).filter((function(e){e.component;var t=e.key,r=e.name,n=e.datagrid,a=e.type,o=e.icon;e.filter;return t&&r&&n&&a&&o})).map((function(e){var t=e.component,r=e.key,n=e.name,o=e.datagrid,i=e.type,l=e.icon,u=e.filter,d=(e.tableKey,t||!1);return a.a.createElement("div",{key:r,"data-grid":o,className:"box"},a.a.createElement("div",{style:{height:"100%",width:"100%"}},a.a.createElement(Gc.a,null,(function(e){return a.a.createElement(N.a,null,Object.keys(x).length>0&&("function"===typeof d||"function"===typeof(null===d||void 0===d?void 0:d.WrappedComponent))&&(e||j)?a.a.createElement(d,{styles:K,handleRemoveObject:function(e){return function(e){P((function(t){return t.filter((function(t){return t.key!==e}))}))}(e)},edit:j,handleDatagridTable:function(){return function(e){var t=(j?D:c).map((function(t){var r=t;if(t.key===e){var n=Object(Nr.a)();r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)({},t.filter),{},{table:!t.filter.table||!t.filter.table}),key:n})}return Object.keys(U).length>0&&Object.values(q.current).forEach((function(e){e.id===t.key&&(r=Object(p.a)(Object(p.a)({},r),{},{filter:Object(p.a)(Object(p.a)(Object(p.a)({},r.filter),e),{},{table:r.filter.table})}))})),Object.keys(W).length>0&&Object.values(W.current).forEach((function(n){n.i===e&&(r=Object(p.a)(Object(p.a)({},r),{},{datagrid:Object(p.a)(Object(p.a)({},r.datagrid),{},{h:t.filter.table?n.h/2>6?n.h/2:6:2*n.h<8?2*n.h:8,w:n.w})}))})),r}));j?P(Object(A.a)(t)):s(Object(A.a)(t))}(r)},handleSetFilter:function(e){return function(e){q.current=Object(p.a)(Object(p.a)({},q.current),{},Object(h.a)({},e.id,Object(p.a)(Object(p.a)({},q.current[e.id]),e)))}(e)},tittle:n,preview:!1,type:i,icon:l,datagrid:o,planCards:x,id:r,filter:u||{}}):a.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:"white"}},a.a.createElement(re.a,{size:24,style:{alignSelf:"center",marginLeft:"17px",color:"rgba(0, 0, 0, 0.67)",marginTop:"1px"}},"blur_on"),a.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:"rgba(0, 0, 0, 0.67)",fontSize:"16px"}},Object(S.u)("$__".concat(n),1))),a.a.createElement("div",{style:{flex:"1",display:"flex",justifyContent:"center",backgroundColor:"white"}},a.a.createElement("div",{style:{alignSelf:"center"}},a.a.createElement("div",{className:"loader"})))))}))))}))))})),Kc=function(e){var t=a.a.useState("horizontal"),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState("stacked"),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(N.a,null,a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(k.a,{color:Object(S.d)("lightgray"),icon:"work_history",onClick:function(){s((function(e){return"stacked"===e?"grouped":"stacked"}))},size:"15px",title:"".concat(Object(S.u)("$__changeGroupMode")),text:"".concat(Object(S.u)("$__changeGroupMode"))}),a.a.createElement(k.a,{color:Object(S.d)("lightgray"),icon:"work_history",onClick:function(){o((function(e){return"vertical"===e?"horizontal":"vertical"}))},size:"15px",title:"".concat(Object(S.u)("$__changeLayout")),text:"".concat(Object(S.u)("$__changeLayout"))})),a.a.createElement(sc.a,{data:e.data,keys:e.keys,indexBy:"date",groupMode:l,margin:{top:50,right:250,bottom:50,left:80},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!0},colors:{scheme:"nivo"},layout:n,defs:[{id:"dots",type:"patternDots",background:"inherit",color:"#38bcb2",size:4,padding:1,stagger:!0},{id:"lines",type:"patternLines",background:"inherit",color:"#eed312",rotation:-45,lineWidth:6,spacing:10}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:0,legend:"",legendPosition:"middle",legendOffset:32},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:"",legendPosition:"middle",legendOffset:-40},labelSkipWidth:12,labelSkipHeight:12,labelTextColor:{from:"color",modifiers:[["darker",1.6]]},legends:[{dataFrom:"keys",anchor:"bottom-right",direction:"column",justify:!1,translateX:250,translateY:0,itemsSpacing:2,itemWidth:140,itemHeight:10,itemDirection:"right-to-left",itemOpacity:.85,symbolSize:10,effects:[{on:"hover",style:{itemOpacity:1}}]}],role:"application",ariaLabel:"Nivo bar chart demo",barAriaLabel:function(e){return e.id+": "+e.formattedValue+": "+e.indexValue}}))},Zc=r(331),Qc=r(463),el=r(706),tl=r(662),rl=r(333);function nl(){nl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var al=Object(B.a)(rl.a),ol=j.b.div(Vc||(Vc=Object(d.a)(["\n minWidth:200px;\n background-color:#fff;\n marginBottom:7px;\n box-shadow:rgba(0,0,0,0.1) 0px 0px 10px 3px;\n\n ","\n ","\n ","\n ","\n ","\n ","\n width:calc(100%) !important;\n\n ","\n ","\n "])),(function(e){return e.separator?"marging-top:30px;":""}),(function(e){return e.selectable&&e.selected?"\n opacity:1;":e.selectable?"\n opacity:0.5;":""}),(function(e){return e.locked?"cursor:no-drop !important;":"cursor:pointer;"}),(function(e){return e.selected?"border-bottom:solid 5px ".concat(Object(S.d)("color")," !important;"):""}),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88;\n max-width:320px;\n border:solid 10px red;":""}),(function(e){return e.inLine?"position:relative;\n float:left;\n margin:3.5px;\n width:calc(20% - 7px);\n // maxWidth:320px;\n ":"\n width:calc(100%) !important;\n margin:7px 0px 12px 0px;\n "}),(function(e){return e.priority?"border-left:5px solid ".concat(e.priority," !important;"):""}),(function(e){return e.isCombining?"border:solid 3px ".concat(Object(S.d)("menu")," !important;"):""})),il=Object(u.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.lockPrivate,cards:e.db.cards,unlockedPrivates:e.controls.unlockedPrivates,controls:e.controls}}),(function(e){return Object(T.b)(I,e)}))((function e(t){var r,o,i,s,u,d,g,b=al(),y=l.a.getState(),v=y.db,x=y.session,_=t.data,w=a.a.useState(!1),j=Object(m.a)(w,2),E=j[0],L=j[1],C=a.a.useState(t.cardsExpanded),I=Object(m.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!1),N=Object(m.a)(D,2),A=N[0],P=N[1],$=a.a.useState(!1),M=Object(m.a)($,2),z=M[0],Y=M[1],B=a.a.useState(t.cardColorPicker?Object(et.r)(_):{}),R=Object(m.a)(B,2),G=R[0],H=R[1],W=a.a.useState(!1),U=Object(m.a)(W,2),q=U[0],V=U[1],J=Object(n.useRef)({}),X=a.a.useRef(!0);a.a.useEffect((function(){return X.current=!0,function(){X.current=!1}}),[]),Object(n.useEffect)((function(){if(J&&J.current&&t.onResize){var e=J.current.clientHeight;if(t.separator&&(e+=55),t.onResize(e,E),J&&J.current){var r=new MutationObserver((function(){if(X.current){var e=J.current.clientHeight;t.separator&&(e+=55),t.onResize(e,E)}}));return r.observe(J.current,{attributes:!0,childList:!0,subtree:!0}),function(){r.disconnect()}}}}),[E,t.manualExpanded,q]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&V(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&q&&V(!1)}),[null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor]),a.a.useEffect((function(){var e=!0;return e&&"0"===String(t.unlockedPrivates)&&z&&Y(!1),function(){e=!1}}),[t.unlockedPrivates]),a.a.useEffect((function(){var e=!0;return e&&F(t.cardsExpanded),function(){e=!1}}),[t.cardsExpanded]),a.a.useEffect((function(){t.onExpand&&t.onExpand(T)}),[T]);var K=window.location.hash.split("/");if(K[0]=K[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&K&&"overview"===K[1]&&(H(Object(et.r)(_)),e=!1),function(){e=!1}}),[t.cards]),_==={}||!_)return a.a.createElement(a.a.Fragment,null);var Z=Object(S.j)(),Q=Object(et.t)(_._id);if(!_||!t.data||!t.data._id)return null;var ee=function(){var e=Object(f.a)(nl().mark((function e(){var r,n,a;return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(v.cards).filter((function(e){return v.cards[e]&&!v.cards[e].deleted&&(v.cards[e]._planId===K[0]||v.cards[e]._parent===K[0])})).forEach((function(e){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,v.cards[e]))})),n=Object(p.a)({},l.a.getState().db.cards),a=!_._selected,"swot"!==v.dataType.filter((function(e){return e.name===_.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==_._id&&r[e].type&&r[e].type===_.type})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),_.type.indexOf("guideline")>-1?Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):_.type.indexOf("objective")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):_.type.indexOf("goal")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("goal")||-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)(Object(p.a)({},n),r),{},Object(h.a)({},_._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[_._id]),r[_._id]),{},{_selected:a})))})),"swot"===l.a.getState().db.dataType.filter((function(e){return e.name===_.type}))[0].module&&Object(et.G)(t),a&&"matrix"===l.a.getState().db.dataType.filter((function(e){return e.name===_.type}))[0].module&&Object(et.H)(t,_._id);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=Object(f.a)(nl().mark((function e(){var r,n=arguments;return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.length>0&&void 0!==n[0]?n[0]:"cardEdit",t.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:t.db,id:_._id,module:"cardEdit",activeModule:r,data:_}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=Object(f.a)(nl().mark((function e(t){return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(Q)>2||Z.owner||Z.plan&&(Z.planAdmin||Z.planModerate)?c.a.push("sp#".concat(t,"/dashboard")):te("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=Object(f.a)(nl().mark((function e(){return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(et.E)(t,{_id:_._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&!0===l.a.getState().db.cards[e]._selected&&l.a.getState().db.cards[e].type&&l.a.getState().db.cards[e].type.indexOf("guideline")>-1})).length>0,oe=!t.noExpanded&&(E||!(t.notGlobalExpanded||!(t.manualExpanded||t.expanded||_._expanded||t.cardsExpanded))),ie=!!(Z&&(Z.owner||Z.plan&&(Z.planAdmin||Z.planModerate))||Q>2);if(_&&_.private&&(!_._users||_._users&&!_._users[x._id]))return a.a.createElement(a.a.Fragment,null);if(A)return a.a.createElement(tl.a,{cardId:_._id,toTemplate:!_.isTemplate,onComplete:function(){P(!1)}});var ce={title:(null===_||void 0===_?void 0:_.name)||Object(S.u)("$__new",1),icon:(null===_||void 0===_?void 0:_.icon)||_.type&&v&&v.dataType&&v.dataType.filter((function(e){return e.name===_.type}))[0]&&v.dataType.filter((function(e){return e.name===_.type}))[0].icon||"$__topic",iconTitle:"$__".concat(_.type)};if(_._planId&&(null===(o=l.a.getState().db.cards[_._planId])||void 0===o?void 0:o.customColumns)&&(_.type.indexOf("guideline")>-1||_.type.indexOf("objective")||_.type.indexOf("goal"))){var le=JSON.parse(l.a.getState().db.cards[_._planId].customColumns),se=_.type.indexOf("guideline")>-1?"guideline":_.type;le["".concat(se,"s")]&&(ce=Object(p.a)(Object(p.a)(Object(p.a)({},ce),le["".concat(se,"s")].name?{iconTitle:le["".concat(se,"s")].name}:{}),le["".concat(se,"s")].icon?{icon:le["".concat(se,"s")].icon}:{}))}return a.a.createElement(ol,{ref:J,separator:t.separator||!1,plan:!(!oe||"plan"!==_.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:_.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===_.type||!t.inLine),className:t.noShadow?b.containerNoShadow:b.container,selectable:t.showSelected,selected:_._selected,priority:_.priority&&v.priority.filter((function(e){return String(e.value)===String(_.priority)})).length>0?v.priority.filter((function(e){return String(e.value)===String(_.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onClick:function(e){t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&ae||t.selectable)?ee():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==_.type?t.locked||te():re(_._id):t.onClick(),t.onOpen&&t.onOpen())}},("completed"===_.status||t.cardColorPicker&&G.color)&&a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},a.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&G.color?G.color:"rgba(0,0,0,1)",opacity:G.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),a.a.createElement(a.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(S.u)("$__dropHereToLink")),a.a.createElement(wr.a,{private:!(!_.private&&!_.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:l.a.getState().controls.unlockedPrivates+r})),Y(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:ce.title,tooltipText:"".concat(_._parent&&l.a.getState().db.cards[_._parent]?"".concat(l.a.getState().db.cards[_._parent].name," / "):"").concat(ce.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:ce.icon,iconTitle:ce.iconTitle,color:Object(S.d)("medium"),editable:!(_.name||t.onlyOption&&!t.editable),_id:_._id,locked:!("link"!==_.type&&!t.locked),colorPicker:ie&&t.cardColorPicker&&G&&!G.parent?function(e){(!G.color&&e||G.color&&G.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},_._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[_._id]),{},{color:e})))}))}:null,onEdit:"completed"!==_.status&&(Q&&parseInt(Q)>1||Z&&Z.plan&&(Z.owner||Z.planAdmin||Z.planEdit||Z.planModerate))?function(e){t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},_._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[_._id]),{},{name:e})))}))}:null,isExpanded:!t.noExpanded&&oe,noExpanding:t.expanded||l.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!oe),t.expanded||l.a.getState().db.cardsExpanded||L((function(e){return!e}))}}),_&&(_._cardCode||_.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},_&&_._cardCode?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",_._cardCode):a.a.createElement(a.a.Fragment,null),_&&_.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",_.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===_.type||"link"===_.type)&&_._createdBy&&v.users[_._createdBy._id]||_._createdBy&&_._createdBy.channel&&_._createdBy._id&&_._createdBy._id!==x._id)&&a.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},a.a.createElement(Kt.a,{title:_._createdBy.name||v.users[_._createdBy._id].name},a.a.createElement(at.a,{alt:_._createdBy.name||v.users[_._createdBy._id].name,src:(null===(i=v.users[_._createdBy._id])||void 0===i?void 0:i.image)||null,size:"12px",style:{width:16,height:16}},(null===(s=_._createdBy)||void 0===s||null===(u=s.name)||void 0===u?void 0:u.substr(0,1))||v.users[_._createdBy._id].name.substr(0,1)))),a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),fontWeight:"bold"}},a.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(S.u)("$__createdBy","*")),": ",(null===(d=_._createdBy)||void 0===d||null===(g=d.name)||void 0===g?void 0:g.split(" ")[0])||v.users[_._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,O()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(O()(1e3*_.created_at).tz("America/Sao_Paulo").format("H:mm")):O()(new Date).tz("America/Sao_Paulo").format("YYYY")===O()(1e3*_.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(O()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(O()(1e3*_.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))),_._kpiTimer&&Object.keys(_._kpiTimer).length>0&&0!==Object.keys(_._kpiTimer).filter((function(e){return _._kpiTimer[e].userId===x._id})).length&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Bt.a,{data:_})),!t.noExpanded&&oe&&(!_.private||_.private&&(z||l.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(el.a,Object.assign({},t,{private:!!_.private,expanded:!0,onClick:function(e){},Resume:!0})),a.a.createElement("div",null,t.searchText&&_.description&&a.a.createElement("div",{className:b.description},Object(S.b)(_.description,t.searchText)))):oe?a.a.createElement(a.a.Fragment,null,a.a.createElement(Qc.a,null)):a.a.createElement(a.a.Fragment,null),_.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},"completed"!==_.status&&(_.startDate&&O()(_.startDate).isValid()||_.endDate&&O()(_.endDate).isValid())?a.a.createElement("div",{style:Object(p.a)({position:"relative",display:"flex",width:"100%"},oe?{height:"45px"}:{})},a.a.createElement("div",{className:_.endDate&&O()(new Date(1e3*_.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<O()().format("YYYY-MM-DD")&&"completed"!==_.status?b.lateDates:b.dates},_.startDate&&O()(_.startDate).isValid()&&a.a.createElement("div",{className:b.dateInfo},a.a.createElement(Ba.a,{overlap:"rectangular",className:b.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*_.startDate)instanceof Date&&!isNaN(new Date(1e3*_.startDate))?O()(new Date(1e3*_.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):O()(_.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),_.endDate&&O()(_.endDate).isValid()?a.a.createElement("div",{className:b.dateInfo},a.a.createElement(Ba.a,{overlap:"rectangular",className:b.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*_.endDate)instanceof Date&&!isNaN(new Date(1e3*_.endDate))?O()(new Date(1e3*_.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):O()(_.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null)),_._tags&&_._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:t.showTags||oe?{marginBottom:33}:{}},a.a.createElement(dt.a,{options:_._tags,expanded:!!(t.showTags||oe&&"plan"!==_.type&&"link"!==_.type&&"insight"!==_.type)})):a.a.createElement(a.a.Fragment,null),_._recurrenceId&&a.a.createElement("div",{style:{position:"absolute",width:"100%",bottom:"3px",left:"3px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},a.a.createElement(Ba.a,{overlap:"rectangular",className:b.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(S.u)("$__recurrence")).concat(_.recurrenceCreatedDate?": ".concat(O()(_.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(S.u)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",data:v.cards[_._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),_.recurrenceCreatedDate?O()(_.recurrenceCreatedDate).format("DD/MM/YYYY"):""),_._users&&Object.keys(_._users).filter((function(e){return null!==String(e)})).length>0&&(!_._users[x._id]||_._users[x._id]&&Object.keys(_._users).length>1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:oe?37:7}},a.a.createElement("div",{className:b.usersContent},a.a.createElement("div",{className:b.users},a.a.createElement(Zc.a,{_id:_._id,data:_,permission:ie,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),_.isTemplate&&a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(S.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),P(!0)}},a.a.createElement(Ce.a,{text:Object(S.u)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),"completed"===_.status&&a.a.createElement("div",{style:{position:"absolute",left:0,right:0,top:"20px"}},a.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},Object(S.u)("$__completeDate"),":",Object(S.k)(_.completed_at||_.updated_at))),"plan"!==_.type&&_.deleted?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},a.a.createElement("div",{style:{position:"absolute",backgroundColor:"#71389da6",top:0,left:0,right:0,bottom:0,paddingRight:7,display:"flex",alignItems:"center",cursor:"pointer",justifyContent:"right"}},a.a.createElement(k.a,{title:Object(S.u)("$__restoreThis",1),text:Object(S.u)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){ne()},size:"17px",textSize:"17px",transparent:!0}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))}));function cl(e){var t=e.data,r=l.a.getState().db,n=e.statusFilter,o=e.search,i=e.totalTimes,c=a.a.useState({}),s=Object(m.a)(c,2),u=s[0],d=s[1],f=a.a.useState("time"),g=Object(m.a)(f,2),b=g[0],y=g[1];return console.log(o),a.a.createElement(a.a.Fragment,null,a.a.createElement(ge.a,{title:"TOP TAGS ".concat(i?"- (".concat(Object(S.l)(i),")"):""),color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__orderBy".concat(b),icon:"sort",color:"#FFFFFF",onClick:function(){y((function(e){return"time"===e?"count":"time"}))}}]}),a.a.createElement(Hr.a,null,Object.keys(t).filter((function(e){return r.tag.filter((function(t){return t.value===e&&(!o.text||o.text&&t.label.indexOf(o.text)>-1)})).length>0})).sort((function(e,r){if("time"===b){if(t[e].timesInt>t[r].timesInt)return-1;if(t[e].timesInt<t[r].timesInt)return 1}return t[e].TotalCards>t[r].TotalCards?-1:t[e].TotalCards<t[r].TotalCards?1:0})).map((function(e,i){var c,s,f,m,g=r.tag.filter((function(t){return t.value===e}))[0],b=t[e].timesByUser,y=t[e].TotalCards||0;return m=t[e].times||0,a.a.createElement("div",{style:{width:"100%",marginBottom:33},key:"".concat(e,"_").concat(i)},a.a.createElement("div",{style:{border:"solid 1px #d6d6d6",borderLeft:"solid 10px ".concat((null===g||void 0===g?void 0:g.color)||""),borderBottom:"none",borderRadius:5,padding:"3px 5px",width:"100%",alignItems:"center",justifyContent:"space-between",display:"flex"}},a.a.createElement("div",{style:{}},g.label," (",y,")"),a.a.createElement("div",{style:{display:"flex"}},"00:00:00"!==m?a.a.createElement(k.a,{color:u.toptags&&u.toptags[e]&&"timesheet"!==(null===(c=u.toptags[e])||void 0===c?void 0:c.view)?Object(S.d)("lightgray"):Object(S.d)("menu"),icon:"work_history",onClick:function(){d(Object(p.a)(Object(p.a)({},u),{},{toptags:Object(p.a)(Object(p.a)({},u.toptags||{}),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"timesheet"})))}))},size:"15px",title:"".concat(Object(S.u)("$__workedHours"),": ").concat(m),text:"".concat(Object(S.u)("$__workedHours"),": ").concat(m)}):a.a.createElement(a.a.Fragment,null),a.a.createElement(k.a,{color:u.toptags&&u.toptags[e]&&"activities"===(null===(s=u.toptags[e])||void 0===s?void 0:s.view)?Object(S.d)("menu"):Object(S.d)("lightgray"),icon:"list_alt",onClick:function(){d(Object(p.a)(Object(p.a)({},u),{},{toptags:Object(p.a)(Object(p.a)({},u.toptags||{}),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"activities"})))}))},size:"15px",title:Object(S.u)("$__viewActivities","*"),text:Object(S.u)("$__viewActivities","*")}))),a.a.createElement("div",{style:{border:"solid 1px #d6d6d6",padding:5,marginTop:-10,paddingTop:15,borderTop:"none",marginLeft:10}},"00:00:00"!==m&&(u.toptags&&u.toptags[e]&&u.toptags[e].view&&"timesheet"===u.toptags[e].view||!u.toptags||u.toptags&&!u.toptags[e]||u.toptags&&u.toptags[e]&&!u.toptags[e].view)?a.a.createElement(a.a.Fragment,null,Object.keys(b).filter((function(e){return b[e]})).sort((function(e,t){return b[e]>b[t]?-1:b[e]<b[t]?1:0})).map((function(e){var t=l.a.getState().db.users[e]||{};return a.a.createElement("div",{key:e,style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(at.a,{alt:t.name,src:t.image||null,style:{width:"18px",height:"18px"}},t.name.substr(0,1))),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu"),width:"33%",minWidth:"150px"}},t.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.l)(b[e])))}))):a.a.createElement(a.a.Fragment,null),u.toptags&&u.toptags[e]&&"activities"===(null===(f=u.toptags[e])||void 0===f?void 0:f.view)?a.a.createElement("div",null,Object.keys(t[e]).map((function(e){var t=Object(et.s)(e);return Object.keys(t).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&r.cards[e].status===n&&(!r.cards[e].checklist||r.cards[e].checklist&&r.cards[e].showCard)&&("completed"===n&&Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*o.endDate).format("YYYY-MM-DD")||"completed"!==n&&Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*o.endDate).format("YYYY-MM-DD"))})).sort((function(e,t){var a="completed"===n?Object(S.k)(r.cards[e].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(S.k)(r.cards[e].updated_at,"YYYY-MM-DD HH:MM:ss"),o="completed"===n?Object(S.k)(r.cards[t].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(S.k)(r.cards[t].updated_at,"YYYY-MM-DD HH:MM:ss");return a>o?-1:a<o?1:0})).map((function(e){return a.a.createElement(a.a.Fragment,{key:"card-".concat(e)},a.a.createElement(il,{db:"cards",data:l.a.getState().db.cards[e],noShadow:!0,resume:!0}))}))}))):a.a.createElement(a.a.Fragment,null)))}))))}function ll(e){var t,r=e.type,n=e.text,o=e.tags,i=e.tagsChartMount,c=l.a.getState().db,s=window.location.hash.split("/");s[0]=s[0].replace("#",""),36!==s[0].length&&(s[0]=null);var u={};return(null===(t=c.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(u=JSON.parse(c.cards[s[0]].customColumns)),a.a.createElement(a.a.Fragment,null,o&&Object.keys(o).filter((function(e){return o[e].label.indexOf(n)>-1})).length>0?a.a.createElement(qn.a,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement(Gr.a,null,a.a.createElement(wr.a,{title:u[r]&&u[r].name?u[r].name:Object(S.u)("$__".concat(r),1),color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wr.a,null,Object.keys(o).filter((function(e){return o[e].label.indexOf(n)>-1})).sort((function(e,t){return o[e].label.toUpperCase().trim()<o[t].label.toUpperCase().trim()?-1:o[e].label.toUpperCase().trim()>o[t].label.toUpperCase().trim()?1:0})).forEach((function(e){var t,r,n={};if(c.status.forEach((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.value,0))})),i&&i[e]&&i[e].TotalCards)return a.a.createElement("div",{style:{width:"100%",marginBottom:7},key:e},a.a.createElement("div",{style:{backgroundColor:(null===(t=o[e])||void 0===t?void 0:t.color)||"none",color:(null===(r=o[e])||void 0===r?void 0:r.color)?Object(S.s)(o[e].color,!0):"none",borderRadius:5,padding:"3px 5px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",null,o[e].label," (",i[e].TotalCards,")")))}))))):a.a.createElement(a.a.Fragment,null))}function sl(){sl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ul=Object(u.b)((function(e){return{cards:e.db.cards,tags:e.db.tags,searchs:e.searchs,timelines:e.timelines}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){r()}),[]);var r=function(){var t=Object(f.a)(sl().mark((function t(){return sl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[n[0]],db:"cards",type:"timer",reqChildrens:!0});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),n=window.location.hash.split("/");n[0]=n[0].replace("#",""),36!==n[0].length&&(n[0]=null);var o=Object(et.s)(n[0]),i={guidelines:{},objectives:{},goals:{},actions:{}},c={};Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&t.cards[e].type.indexOf("guideline")>-1&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{guidelines:Object(p.a)(Object(p.a)({},i.guidelines||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{guidelines:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.guidelines)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&"objective"===t.cards[e].type&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{objectives:Object(p.a)(Object(p.a)({},i.objectives||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{objectives:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.objectives)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&t.cards[e].type.indexOf("goal")>-1&&!t.cards[e].deleted})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{goals:Object(p.a)(Object(p.a)({},i.goals||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{goals:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.goals)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(o[e]||t.cards[e]._parent===n[0])&&!t.cards[e].deleted&&("iniciative"===t.cards[e].type||"task"===t.cards[e].type||"meeting"===t.cards[e].type||"iniciative"===t.cards[e].type||"myTask"===t.cards[e].type)&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).forEach((function(t){var r;i=Object(p.a)(Object(p.a)({},i),{},{actions:Object(p.a)(Object(p.a)({},i.actions||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),c=Object(p.a)(Object(p.a)({},c),{},{actions:Object(p.a)(Object(p.a)({},(null===(r=c)||void 0===r?void 0:r.actions)||{}),{},Object(h.a)({},e,!0))})}))}));var s={},u=[],d=[],m=[],g={};Object.keys(c).forEach((function(e){g=Object(p.a)(Object(p.a)({},g),c[e])}));var b=new Date,y=new Date,v=O()(b).unix("X");b=b.toISOString().split("T")[0],y.setDate(y.getDate()-30);var x=O()(y).unix("X");y=y.toISOString().split("T")[0];var _=e.searchs["tagsStatistics_".concat(n[0])]||{text:"#4",startDate:x,endDate:v},w=new Date(1e3*_.startDate||_.startDate),j=new Date(1e3*_.endDate||_.endDate),E="completed";_&&_.status&&Object.keys(_.status).length>0&&Object.keys(_.status).forEach((function(e){_.status[e]&&(E=e)}));for(var k,L=E,C=function(){var e=w.toISOString().split("T")[0],r={};Object.keys(o).filter((function(r){return t.cards[r].status===L&&Object(S.k)(t.cards[r]["completed"===L?"completed_at":"updated_at"],"YYYY-MM-DD")===e})).forEach((function(e){var n=t.cards[e],a=Object(et.s)(e);Object.keys(a).filter((function(e){return"completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD")})).forEach((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).length>0&&t.cards[e]._tags.filter((function(e){return e.value&&(!_.text||_.text&&e.label.indexOf(_.text)>-1)})).forEach((function(e){var t;r=Object(p.a)(Object(p.a)({},r),{},(t={},Object(h.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(h.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===m.indexOf(e.label)&&m.push(e.label)})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.filter((function(e){return e.value&&(!_.text||_.text&&e.label.indexOf(_.text)>-1)})).forEach((function(e){var t;r=Object(p.a)(Object(p.a)({},r),{},(t={},Object(h.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(h.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===m.indexOf(e.label)&&m.push(e.label)}))}))})),Object.keys(r).length>0&&d.push(Object(p.a)({date:e},r)),k=w.setDate(w.getDate()+1),w=new Date(k)};w<=j;)C();Object.keys(o).filter((function(e){return t.cards[e].status===L&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD"))})).forEach((function(e){var r=Object(et.s)(e),n=t.cards[e];Object.keys(r).filter((function(e){return(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD"))})).forEach((function(r){t.cards[e]._tags.forEach((function(e){var n,a,o,i;s=Object(p.a)(Object(p.a)({},s),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},s[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===L?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===L?(null===(n=t.cards[r])||void 0===n||null===(a=n.completed_at)||void 0===a?void 0:a.low)||t.cards[r].completed_at||null:(null===(o=t.cards[r])||void 0===o||null===(i=o.updated_at)||void 0===i?void 0:i.low)||t.cards[r].updated_at||null}))))})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.forEach((function(e){var n,a,o,i;s=Object(p.a)(Object(p.a)({},s),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},s[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===L?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===L?(null===(n=t.cards[r])||void 0===n||null===(a=n.completed_at)||void 0===a?void 0:a.low)||t.cards[r].completed_at||null:(null===(o=t.cards[r])||void 0===o||null===(i=o.updated_at)||void 0===i?void 0:i.low)||t.cards[r].updated_at||null}))))}))}))})),Object.keys(s).forEach((function(e){var r=[],n={},a={};Object.keys(s[e]).forEach((function(t){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},"".concat(s[e][t].date," "),n["".concat(s[e][t].date," ")]+1||1)),a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e,a[e]+1||1))})),Object.keys(n).forEach((function(e){r.push({x:e,y:n[e]})}));for(var o,i=new Date(y),c=function(){var e=i.toISOString().split("T")[0];0===r.filter((function(t){return t.x===e})).length&&r.push({x:e,y:0}),o=i.setDate(i.getDate()+1),i=new Date(o)};i<=new Date(b);)c();t.tag.filter((function(t){return t.value===e})).length>0&&(u=[].concat(Object(A.a)(u),[{id:t.tag.filter((function(t){return t.value===e})).map((function(e){return e}))[0].label,data:Array.from(Object(A.a)(r.sort((function(e,t){return Date.parse(e.x)<Date.parse(t.x)?-1:Date.parse(e.x)>Date.parse(t.x)?1:0}))))}]))}));var I=0;return Object.keys(s).filter((function(e){return t.tag.filter((function(t){return t.value===e})).length>0})).sort((function(e,t){return Object.keys(s[e]).length>Object.keys(s[t]).length?-1:Object.keys(s[e]).length<Object.keys(s[t]).length?1:0})).forEach((function(e,r){var n=0,a={},o=s[e].total||0;Object.keys(s[e]).forEach((function(e){if(l.a.getState().timeline&&l.a.getState().timeline[e]){var r=l.a.getState().timeline[e];Object.keys(r).filter((function(e){return"timer"===r[e].type&&r[e].ini>=_.startDate&&r[e].fin<=_.endDate})).forEach((function(e){var t=1;r[e]&&r[e].users&&r[e].users.filter((function(e){return e._id})).length>0?t=r[e].users.filter((function(e){return e._id})).length:a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},r[e].user._id,a[r[e].user._id]+1||1));var o=(r[e].fin-r[e].ini)*t;n+=o,r[e]&&r[e].users&&r[e].users.filter((function(e){return e._id})).length>0?r[e].users.filter((function(e){return e._id})).forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e._id,a[e._id]+o||o))})):a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},r[e].user._id,a[r[e].user._id]+o||o))}))}var i=Object(et.s)(e);o+=Object.keys(i).filter((function(e){return t.cards[e]&&!t.cards[e].deleted&&t.cards[e].status===L&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&("completed"===L&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD")||"completed"!==L&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*_.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*_.endDate).format("YYYY-MM-DD"))})).length})),I+=n,s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{times:Object(S.l)(n),timesInt:n,TotalCards:o,timesByUser:a})})),a.a.createElement(N.a,null,a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12},a.a.createElement(_i,{nodeId:"tagsStatistics_".concat(n[0]),defaultValues:{startDate:x,endDate:v,text:"#4",status:{all:!1,notStarted:!1,awaitAction:!1,paused:!1,inProgress:!1,completed:!0}},preffers:{searchButton:!0,unique:{status:!0}},fields:["text","date","status"],showFilters:!0})),a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,style:{minHeight:300,height:35*d.length}},a.a.createElement(Kc,{data:d,keys:m}))),a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12},a.a.createElement(Gr.a,null,a.a.createElement(cl,{data:s,statusFilter:L,startDate:x,search:_,totalTimes:I})))),a.a.createElement(Rr.a,null,a.a.createElement(ll,{tagsChartMount:s,tags:i.guidelines,cards:c.guidelines,type:"guidelines",text:"#1"}),a.a.createElement(ll,{tagsChartMount:s,tags:i.objectives,cards:c.objectives,type:"objectives",text:"#2"}),a.a.createElement(ll,{tagsChartMount:s,tags:i.goals,cards:c.goals,type:"goals",text:"#3"}),a.a.createElement(ll,{tagsChartMount:s,tags:i.actions,cards:c.actions,type:"actions",text:"#4"})))})),dl=function(){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};var pl=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(dl)((function(){var e=l.a.getState(),t=e.db,r=e.search,n=a.a.useState(0),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(25),u=Object(m.a)(s,2),d=u[0],p=u[1],f=window.location.hash.split("/");f[0]=f[0].replace("#","");var h={};return h=36===f[0].length?(h=Object.keys(t.cards).filter((function(e){return t.cards[e]._parent&&t.cards[e]._parent===f[0]&&"insight"===t.cards[e].type&&!t.cards[e].deleted})).sort((function(e,r){return t.cards[e].created_at>t.cards[r].created_at?-1:0})).map((function(e){return t.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(r.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1})).map((function(e){return e})):(h=Object.keys(t.cards).filter((function(e){return!t.cards[e]._parent&&"insight"===t.cards[e].type})).sort((function(e,r){return t.cards[e].created_at>t.cards[r].created_at?-1:0})).map((function(e){return t.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(r.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(r.text.toLowerCase())>-1})).map((function(e){return e})),a.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(h).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",i+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(h).length,page:i,onChangePage:function(e,t){c(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__insightsPerPage")}))),a.a.createElement(Rr.a,null,Object.keys(h).filter((function(e,t){return t<=(i+1)*d&&t>=i*d})).map((function(e,t){return a.a.createElement(qn.a,{key:h[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:h[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(h).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",i+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(h).length,page:i,onChangePage:function(e,t){c(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__insightsPerPage")}))))}))),fl={container:Object(p.a)(Object(p.a)({},Z.k),{},{position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",display:"block",minWidth:"240px !important",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",minHeight:"50px"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500"}},indicators:{position:"relative",float:"left",width:"100%",padding:"0 5px",height:"auto",display:"flex"},indicatorsIcon:{margin:"0px 0px"},image:{position:"relative",float:"left",width:"100%",maxWidth:"100%",backgroundColor:"rgb(0,0,0)",backgroundSize:"cover",backgroundPosition:"center"},progress:{position:"relative",float:"left",padding:"0 12px",width:"calc(100% - 15x)"},description:{position:"relative",float:"left",padding:"5px"},dates:{position:"relative",float:"left",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(S.d)("medium"),fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},users:{position:"absolute",bottom:"2px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};var hl,ml,gl=Object(le.a)(fl)(Object(n.memo)((function(e){var t=e.data,r=l.a.getState().db,n=[],o=r.cards,i=function(e,t){if(!t.isDropAnimating)return Object(p.a)({},e);var r=t.dropAnimation.moveTo,n="translate(".concat(r.x,"px, ").concat(r.y,"px)");return Object(p.a)(Object(p.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(n," ").concat(""),border:"solid 3px ".concat(Object(S.d)("color")),backgroundColor:Object(S.d)("color"),padding:"3px"})};return Object.keys(o).map((function(e){return o[e]._parent===t._id&&(n[o[e].type]=null==n[o[e].type]?1:n[o[e].type]+1),!1})),a.a.createElement(ar.b,{draggableId:t.id?t.id:t._id?t._id:null,index:Math.floor(10*Math.random()),key:t.id?t.id:t._id?t._id:null,isDragDisable:t.isDragDisable||e.isDragDisable||!1},(function(t,r){return a.a.createElement("div",Object.assign({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:i(t.draggableProps.style,r)}),a.a.createElement(ut.a,{cardId:e.data._id,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:r.isDragging&&!r.isDropAnimating,snapshot:r,cardColorPicker:!!e.cardColorPicker}))}))})));var bl,yl=j.b.div(hl||(hl=Object(d.a)(["\n margin:0 7px;\n min-width:180px;\n ","\n @media(min-width: 960px) {\n position:relative;\n max-height:",";\n \n ","\n }\n @media(max-width: 959px) {\n float:left;\n position: relative;\n }\n @media(max-width: 599px) {\n float:left;\n position: relative;\n }\n "])),(function(e){return e.columnStyle&&e.columnStyle.width?"width:calc(".concat(e.columnStyle.width," - 14px);"):"width:calc(100% - 14px);"}),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 0px)"}),(function(e){return e.inLine?"display:block;\n ":"margin-bottom:0px !important;\n ".concat((function(e){return e.columnStyle&&e.columnStyle.width?"width:".concat(e.columnStyle.width,";"):"width:100%;"}),"\n ")})),vl=j.b.div(ml||(ml=Object(d.a)(["\nposition:relative;\nheight:100%;\nwidth:100%;\nmax-height:",";\n",";\n ",";\n","\n"])),(function(e){return e.columnStyle&&e.columnStyle.maxHeight?e.columnStyle.maxHeight:"calc(100% - 30px)"}),(function(e){return e.columnStyle&&e.columnStyle.maxWidth?e.columnStyle.maxWidth:"250px"}),(function(e){return e.isDraggingOver?"background-color:".concat(Object(S.d)("color"),"; opacity:0.5;"):""}),(function(e){return e.inLine?"\n display:table;\n margin-bottom:33px":"display:block;\n min-height: 150px !important;\n padding-bottom:15px;\n overflow-y: auto;\n "})),xl=Object(u.b)((function(e){return{searchs:e.searchs,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(fi)((function(e){var t=l.a.getState().session,r=e.classes,n=y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),o=e.searchs&&e.searchs[n]?e.searchs[n]:null,i=window.location.hash.split("/");i[0]=i[0].replace("#",""),36!==i[0].length&&(i[0]=null);var c=e.cards;o&&(c=Object(et.q)(c,o));var s=String(t.dashboard.period).replace("$__last","");s=s.replace("Days","");var u=O()(new Date).tz("America/Sao_Paulo").subtract(parseInt(s),"d").format("YYYY-MM-DDT00:00"),d=O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(c=c.filter((function(e){return!!("completed"===e.status&&e.completed_at&&(e.completed_at.low&&O()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&O()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.completed_at&&!e.completed_at.low&&O()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&O()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u)||"completed"!==e.status&&e.updated_at&&(e.updated_at.low&&O()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&O()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.updated_at&&!e.updated_at.low&&O()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=d&&O()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u))})).map((function(e){return e}))),e.showDeleted||l.a.getState().controls.deleted||(c=c.filter((function(e){return!e.deleted})).map((function(e){return e})));var f=r.cardList+" "+x()(Object(h.a)({},r.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),m=Object(S.u)(e.column.name,1),g={};return l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].customColumns&&(g=JSON.parse(l.a.getState().db.cards[i[0]].customColumns)),g&&g[e.column.name.replace("$__","")]&&g[e.column.name.replace("$__","")].name&&(m=Object(S.u)(g[e.column.name.replace("$__","")].name,1)),a.a.createElement(ar.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){var n,o;return a.a.createElement(yl,Object.assign({},!e.isDropDisabled&&r.draggableProps,e,{ref:r.innerRef}),a.a.createElement("div",Object.assign({},r.draggableProps,r.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&r.dragHandleProps,a.a.createElement(ge.a,Object.assign({title:m,icon:(null===(n=g[e.column.name.replace("$__","")])||void 0===n?void 0:n.icon)?null===(o=g[e.column.name.replace("$__","")])||void 0===o?void 0:o.icon:e.column.icon||"topic",color:Object(S.d)("menu"),style:{padding:"7px"}},i.length>0&&i[1]&&"overview"===i[1]&&l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].planType&&"operational"===l.a.getState().db.cards[i[0]].planType&&l.a.getState().db.cards[i[0]]._users&&l.a.getState().db.cards[i[0]]._users[t._id]&&l.a.getState().db.cards[i[0]]._users[t._id].access&&parseInt(l.a.getState().db.cards[i[0]]._users[t._id].access)>3?{editable:!0,onEdit:function(t){Object(et.N)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:i[0]}}),{customColumns:JSON.stringify(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[i[0]]&&l.a.getState().db.cards[i[0]].customColumns?JSON.parse(l.a.getState().db.cards[i[0]].customColumns):{}),{},Object(h.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(S.u)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(S.d)("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),a.a.createElement(ar.c,{droppableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",type:"card",isDropDisabled:e.column.isDropDisabled,direction:"".concat(e.inLine?"horizontal":"vertical"),isCombineEnabled:e.isCombineEnabled},(function(t,r){return a.a.createElement(vl,Object.assign({className:f,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),c.sort((function(t,r){var n="ASC"===e.orderByTitlePosition?t.name.toLowerCase():r.name.toLowerCase(),a="ASC"===e.orderByTitlePosition?r.name.toLowerCase():t.name.toLowerCase();return n<a?-1:n>a?1:0})).map((function(t){return t?a.a.createElement("div",{key:t._id||t.id?t._id:null},a.a.createElement(gl,{data:t,inLine:e.inLine,isDragDisable:e.column.isDragDisable,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,inLineAdd:e.inLineAdd||!1,viewButton:e.viewButton||!1,cardColorPicker:!!e.cardColorPicker})):a.a.createElement(a.a.Fragment,null)})),e.inLineAdd&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ce.a,{text:Object(S.u)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:i[0]?i[0]:null,rows:c.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}))})));function _l(){_l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ol,wl=j.b.div(bl||(bl=Object(d.a)(["\nheight:100%;\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n position:relative;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),jl=Object(u.b)((function(e,t){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(f.a)(_l().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y;return _l().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=n.draggableId,s=t.cards,!n.combine){r.next=5;break}return r.abrupt("return");case 5:if(o){r.next=7;break}return r.abrupt("return",!1);case 7:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=9;break}return r.abrupt("return",!1);case 9:if(u=i.droppableId,d=o.droppableId,f=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id}))),u!==d||l.a.getState().db.orderByTitle){r.next=21;break}return(m=Array.from(e.cards.filter((function(e){return e.status===u})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(i.index,1),m.splice(o.index,0,c),m.forEach((function(e,t){s[e]=Object(p.a)(Object(p.a)({},s[e]),{},{order:{low:t}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:f.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===d})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,c),f.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),b.forEach((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:parseInt(r)}})})),y=Object(p.a)(Object(p.a)({},t),{},{cards:Object(p.a)(Object(p.a)({},t.cards),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},t.cards[c]),{},{status:d,completed_at:"completed"===d?{low:O()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:O()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:f});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(f.a)(_l().mark((function e(t){return _l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=Object(f.a)(_l().mark((function e(t){return _l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(ar.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(wl,Object.assign({},e,{ref:t.innerRef}),l.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(xl,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),isDropDisabled:!0,column:n,cards:e.cards.filter((function(e){return e.status===t.value||"notStarted"===t.value&&!e.status})).map((function(e){return Object(p.a)(Object(p.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(p.a)({flex:r,width:"25%"},e.columnStyle?e.columnStyle:{}),viewButton:e.viewButton||!1,periodFilter:!(!t.props||!t.props.periodFilter)}))})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))})),El=r(1852),kl=r(1965),Sl=r(1966),Ll=r(1964);function Cl(e){var t=e.open,r=e.onClose;return a.a.createElement(Cn.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&a.a.createElement(Ll.a,{id:"simple-dialog-title"},e.title),a.a.createElement(K.a,null,e.options.map((function(e,t){return a.a.createElement(El.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},a.a.createElement(kl.a,null,a.a.createElement(re.a,{icon:e.icon})),a.a.createElement(Sl.a,{primary:Object(S.u)(e.name,1)}))}))))}function Il(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce.a,{text:e.text?e.text:null,icon:e.icon?e.icon:"add_box",size:e.iconSize?e.iconSize:null,iconColor:e.iconColor?e.iconColor:Object(S.d)("medium"),onClick:function(){o(!0)}}),a.a.createElement(Cl,{selectedValue:l,open:n,onClose:function(){var e;o(!1),s(e)},options:e.options}))}function Tl(){Tl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Fl,Dl=j.b.div(Ol||(Ol=Object(d.a)(["\n background-color:none;\n "]))),Nl=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=l.a.getState().functions.socket,i=a.a.useState(e.defaultName?e.defaultName:""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,2),b=g[0],y=g[1],v=window.location.hash.split("/");v[0]=v[0].replace("#",""),36!==v[0].length&&(v[0]=null);var x=function(){var t=Object(f.a)(Tl().mark((function t(){var r;return Tl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=l.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"add"},{_parent:v[0],planId:v[0]&&36===v[0].length?v[0]:null,name:s,type:e.cardType,status:"notStarted"},function(){var e=Object(f.a)(Tl().mark((function e(t){return Tl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("card.UPD",{cardId:t.id,cardData:Object(p.a)(Object(p.a)({},t.data),{},{_parent:v[0],_timeline:Object(h.a)({},t.log._id,Object(p.a)(Object(p.a)({},t.log),{},{_parent:[t.id]})),_users:Object(h.a)({},n._id,{name:l.a.getState().db.users[n._id].name?l.a.getState().db.users[n._id].name:null,displayName:l.a.getState().db.users[n._id].displayName?l.a.getState().db.users[n._id].displayName:null,image:l.a.getState().db.users[n._id].image?l.a.getState().db.users[n._id].image:null,access:5,_id:n._id})})});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),u("");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(){var t=Object(f.a)(Tl().mark((function t(n){var a,i,c,s,u;return Tl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,i=n.source,c=n.draggableId,a){t.next=3;break}return t.abrupt("return",!1);case 3:if(a.droppableId!==i.droppableId||a.id!==i.index){t.next=5;break}return t.abrupt("return",!1);case 5:return(s=e.cards).splice(i.index,1),s.splice(a.index,0,c),De.a.put("cards/reorder",{cards:s}),u={},s.map((function(e,t){return(u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},e,r.cards[e])))[e].order||(u[e].order.low=t),u[e].order.low=t,!0})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),u)})),o.emit("card.UPD",u),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(){var e=Object(f.a)(Tl().mark((function e(t){return Tl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=Object(f.a)(Tl().mark((function e(t){return Tl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement(ar.a,{onDragEnd:_,onDragStart:O,onDragUpdate:w},a.a.createElement(ar.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,r){return a.a.createElement(Dl,Object.assign({},t.droppableProps,{isDraggingOver:r.isDraggingOver,ref:t.innerRef}),e.cards.map((function(e,t){return a.a.createElement(ar.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(ut.a,{isDragging:r.isDragging&&!r.isDropAnimating,snapshot:r,cardId:e,db:"cards",viewButton:!0,selectOption:!0}))}))})),t.placeholder)}))),!b&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Ce.a,{text:Object(S.u)("$__add","*"),icon:"add_box",iconColor:Object(S.d)("medium"),onClick:function(){y(!b)}})),b&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__nameOfCard"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onBlur:function(e){""===e.target.value&&y(!b)},onKeyDown:function(e){13===e.keyCode&&s&&x(),27===e.keyCode&&(y(!b),u(""))}},autoFocus:!0,value:s,placeholder:Object(S.u)("$__titleOfCard_placeholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return x()}},a.a.createElement(re.a,{color:"green",icon:"save",title:Object(S.u)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){y(!b),u("")}},a.a.createElement(re.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.u)("$__cancel","*"),size:e.actionsSize||"25px"}))))))}));function Al(){Al=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Pl=j.b.div(Fl||(Fl=Object(d.a)(["\n","\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return!e.inLine&&e.styles&&e.styles.discountHeight&&"height:calc(100vh - ".concat(e.styles.discountHeight,"px);")}),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),$l=Object(u.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db;a.a.useEffect((function(){Object(et.H)(e)}),[]);var r=function(){var r=Object(f.a)(Al().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y,v;return Al().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l.a.getState().functions.socket,o=n.destination,i=n.source,c=n.draggableId,!n.combine){r.next=4;break}return r.abrupt("return");case 4:if(o){r.next=6;break}return r.abrupt("return",!1);case 6:if(o.droppableId!==i.droppableId||o.id!==i.index){r.next=8;break}return r.abrupt("return",!1);case 8:if(s=i.droppableId,u=o.droppableId,d=Array.from(e.cards.filter((function(e){return e.type===s&&!e.deleted})).sort((function(e,t){return e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)<parseInt(t.order.low)?-1:e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)>parseInt(t.order.low)?1:0})).map((function(e){return e._id}))),s!==u){r.next=21;break}return(f=Array.from(e.cards.filter((function(e){return e.type===s&&!e.deleted})).sort((function(e,t){return e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:e.order&&t.order&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)>parseInt(t.order.low)?1:0})).map((function(e){return e._id})))).splice(i.index,1),f.splice(o.index,0,c),m={},f.forEach((function(e,r){m[e]=Object(p.a)(Object(p.a)({},t.cards[e]),{},{order:{low:r}})})),g=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t.cards),m)}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:f,columnName:"type",sourceCards:[]}),r.abrupt("return");case 21:d.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.type===u})).sort((function(e,t){return e.order&&t.order&&e.order.low&&t.order.low&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e._id})))).splice(o.index,0,c),y=Object(p.a)({},t.cards),d.forEach((function(e,t){y=Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},y[e]?y[e]:{}),{},{order:{low:t}})))})),b.forEach((function(e,t){y=Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},y[e]?y[e]:{}),{},{order:{low:t}})))})),v=Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},c,Object(p.a)(Object(p.a)({},y[c]),{},{type:u,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:c,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"type",sourceCards:d});case 30:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement(ar.a,{onDragEnd:r},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return a.a.createElement(Pl,Object.assign({},e,{ref:r.innerRef}),t.swot.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(xl,Object.assign({},e,{key:"".concat(t.value),columnId:"".concat(t.value),column:n,cards:e.cards.filter((function(e){return e.type===t.value})).sort((function(e,t){var r=0,n=0;return e.order&&String(e.order.low)&&(r=e.order.low),t.order&&String(t.order.low)&&(n=t.order.low),parseInt(r)<parseInt(n)?-1:parseInt(r)>parseInt(n)?1:0})).map((function(e){return Object(p.a)(Object(p.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,columnStyle:{minWidth:"300px"},viewButton:e.viewButton||!1,locked:!(!e.lockColumns||-1!==e.lockColumns.indexOf(t.value)),manualOrder:!0,isDropDisabled:!0}))})),r.placeholder)})))}));var Ml,zl=Object(u.b)((function(e,t){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=l.a.getState().db,n=r.dataType,o=r.cards,i=window.location.hash.split("/");i[0]=i[0].replace("#",""),i[0]&&36!==i[0].length&&(i[0]=null),a.a.useEffect((function(){v()}),[]);var c={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===i[0]||r.cards[e]._parent===i[0])})).forEach((function(e){c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},e,r.cards[e]))}));var s,u=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&c[e].type.indexOf("guideline")>-1&&c[e]._parent===i[0]}))[0]||null,d=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&"objective"===c[e].type}))[0]||null,f=Object.keys(c).filter((function(e){return!0===c[e]._selected&&c[e].type&&"goal"===c[e].type}))[0]||null,m=Object.keys(c).filter((function(e){return"guidelineR"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),g=Object.keys(c).filter((function(e){return"guidelineC"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),b=Object.keys(c).filter((function(e){return"guidelineE"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),y=Object.keys(c).filter((function(e){return"guidelineD"===c[e].type&&c[e]._parent===i[0]&&!c[e].deleted})).sort((function(e,t){return c[e].order&&String(c[e].order.low)&&c[t].order&&String(c[t].order.low)&&parseInt(c[e].order.low)>parseInt(c[t].order.low)?1:-1})),v=function(){var t=Object(p.a)({},l.a.getState().db.cards);Object.keys(c).forEach((function(e){c[e]&&c[e]._selected&&(c[e]._selected=!1)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},t),c)}))};f?s=Object.keys(c).filter((function(e){return c[e]._parent===f&&!c[e].checklist})):d?s=Object.keys(c).filter((function(e){return c[e]._parent===d&&!c[e].checklist})):u&&(s=Object.keys(c).filter((function(e){return c[e]._parent===u&&!c[e].checklist})));var x=Object.keys(c).filter((function(e){return c[e]._parent===i[0]})),_=c&&Object.keys(c).filter((function(e){return c[e]&&c[e]._selected&&c[e].type&&c[e].type.indexOf("guideline")>-1}));return a.a.createElement("div",{style:{width:"inherit",padding:15}},!d&&a.a.createElement(a.a.Fragment,null,a.a.createElement(X.a,{smDown:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",marginRight:"14px",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.u)("$__internalAspects",1)),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.u)("$__externalAspects",1))),a.a.createElement(X.a,{smUp:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 7px)",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(S.u)("$__s.W.O.T","*"))),a.a.createElement($l,{cards:x.map((function(e){return c[e]})),showSelected:Object.keys(c).filter((function(e){return!0===c[e]._selected})).length>0,lockColumns:_.length>0&&"guidelineD"===c[_[0]].type?["strength","threat"]:_.length>0&&"guidelineR"===c[_[0]].type?["strength","opportunity"]:_.length>0&&"guidelineE"===c[_[0]].type?["weakness","threat"]:_.length>0&&"guidelineC"===c[_[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0,inLineAdd:!0})),a.a.createElement(Rr.a,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 28px)",marginRight:"14px",marginLeft:"14px",padding:"7px",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(re.a,{icon:Ht.a,color:Object(S.d)("textColor"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},u?Object(S.u)("$__planning",1):"MATRIX SWOT"))),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(qn.a,{md:3,sm:12,xs:12},a.a.createElement("div",null,a.a.createElement(ge.a,{title:"MATRIX SWOT",icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&o[u]&&o[u].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[u],db:"cards",selectOption:!0,expanded:!0}),a.a.createElement(Ce.a,{icon:"undo",text:Object(S.u)("$__backToMatrix","*"),onClick:function(){v("guideline")}})),d&&a.a.createElement("div",null,a.a.createElement(ge.a,{title:Object(S.u)("$__objective",1),icon:n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&o[d]&&o[d].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[d],db:"cards",selectOption:!0,expanded:!0})),f&&a.a.createElement("div",null,a.a.createElement(ge.a,{title:Object(S.u)("$__goal",1),icon:n.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__new",icon:"add_box",color:Object(S.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:d,status:"notStarted"}}))}}]}),e.hidePrivate&&o[f]&&o[f].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(ut.a,{data:o[f],db:"cards",selectOption:!0,expanded:!0}))),a.a.createElement(qn.a,{md:9,sm:12,xs:12},a.a.createElement(ge.a,{title:d&&!f?Object(S.u)("$__goals",1):d?Object(S.u)("$__actions",1):Object(S.u)("$__objectives",1),icon:d&&!f?n.filter((function(e){return"goal"===e.name}))[0].icon:d?"view_column":n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"},actionButtonsStyle:{position:"absolute",top:0,bottom:0,display:"flex",itemAligns:"center"},customButtons:[f?{component:a.a.createElement(Il,{iconColor:Object(S.d)("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Object(S.u)("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:f,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:Object(S.d)("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"objective"===e.name}))[0].iniModule,db:"cards",data:d?{type:"goal",_parent:d,status:"notStarted"}:{type:"objective",_parent:u,status:"notStarted"}}))}}]}),a.a.createElement(jl,{cards:(null===(t=s)||void 0===t?void 0:t.map((function(e){return c[e]})))||[],viewButton:!0}))):a.a.createElement(qn.a,{md:12},a.a.createElement(Rr.a,{style:{paddingBottom:"33px"}},a.a.createElement(qn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.u)("$__guidelineR",1),icon:n.filter((function(e){return"guidelineR"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.u)("$__guidelineRtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.u)("$__guidelineRdetails",1))),a.a.createElement(Nl,{cards:m,cardType:"guidelineR"})),a.a.createElement(qn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.u)("$__guidelineD",1),icon:n.filter((function(e){return"guidelineD"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.u)("$__guidelineDtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.u)("$__guidelineDdetails",1))),a.a.createElement(Nl,{cards:y,cardType:"guidelineD"})),a.a.createElement(qn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.u)("$__guidelineC",1),icon:n.filter((function(e){return"guidelineC"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.u)("$__guidelineCtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.u)("$__guidelineCdetails",1))),a.a.createElement(Nl,{cards:g,cardType:"guidelineC"})),a.a.createElement(qn.a,{md:3,sm:12,xs:12},a.a.createElement(ge.a,{title:Object(S.u)("$__guidelineE",1),icon:n.filter((function(e){return"guidelineE"===e.name}))[0].icon,color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"7px",minHeight:"130px",backgroundColor:"#F9F9F9",borderRadius:"0 0 7px 7px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(S.u)("$__guidelineEtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.u)("$__guidelineEdetails",1))),a.a.createElement(Nl,{cards:b,cardType:"guidelineE"}))))))}));function Yl(){Yl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Bl=j.b.div(Ml||(Ml=Object(d.a)(["\nposition:absolute;\nheight:100%;\npadding:7px;\n","\n","\n @media(max-width: 959px) {\n display: contents !important;\n width: -webkit-fill-available;\n height:auto;\n }\n "])),(function(e){return!e.inLine&&e.styles&&e.styles.discountHeight&&"height:calc(100vh - ".concat(e.styles.discountHeight,"px);")}),(function(e){return e.inLine?"display: block;\n width: -webkit-fill-available;\n ".concat(e.style):" display: flex;\n width: 100%;\n ".concat(e.style,"\n @media(min-width: 960px) {\n display: flex;\n }\n ")})),Rl=Object(u.b)((function(e,t){return{cards:e.db.cards,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i,c,s,u,d=l.a.getState(),g=d.db,b=d.session,v=g.dataType,x=a.a.useState(!1),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0],C=E[1],I=y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),T=window.location.hash.split("/");T[0]=T[0].replace("#",""),36!==T[0].length&&(T[0]=null);var F={},D=[],N=function e(t){-1===D.indexOf(t)&&D.push(t),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent&&!l.a.getState().db.cards[e].checklist&&l.a.getState().db.cards[e]._parent===t&&-1===D.indexOf(e)})).forEach((function(t){e(t),D.push(t)}))},A=function e(t){-1===D.indexOf(D)&&D.push(t),Object.keys(l.a.getState().db.cards).filter((function(e){var r;return t&&l.a.getState().db.cards[t]&&(e===t||(null===(r=l.a.getState().db.cards[t])||void 0===r?void 0:r._parent)===e)&&!l.a.getState().db.cards[e].checklist&&-1===D.indexOf(e)})).forEach((function(t){l.a.getState().db.cards[t]&&l.a.getState().db.cards[t]._parent&&e(l.a.getState().db.cards[t]._parent),D.push(t)}))};Object.keys(g.cards).filter((function(t){var r=Object(et.j)(t);return!(!g.cards[t]||g.cards[t].private&&!(g.cards[t].private&&g.cards[t]._users&&g.cards[t]._users[b._id])||g.cards[t]._planId!==T[0]&&g.cards[t]._parent!==T[0]||!e.showCompleted&&(e.showCompleted||"completed"===g.cards[t].status)||e.onlyUnReaded&&!(e.onlyUnReaded&&r.total>0))})).forEach((function(e){F=Object(p.a)(Object(p.a)({},F),{},Object(h.a)({},e,g.cards[e]))}));var P=(null===(t=e.searchs[I])||void 0===t||null===(r=t.selectedCards)||void 0===r?void 0:r.guideline)||null,$=(null===(n=e.searchs[I])||void 0===n||null===(o=n.selectedCards)||void 0===o?void 0:o.objective)||null,M=(null===(i=e.searchs[I])||void 0===i||null===(c=i.selectedCards)||void 0===c?void 0:c.goal)||null,z=(null===(s=e.searchs[I])||void 0===s||null===(u=s.selectedCards)||void 0===u?void 0:u.action)||null;z?(N(z),A(z)):M?(N(M),A(M)):$?(N($),A($)):P&&(N(P),A(P));var Y=[{value:"guidelines",type:"guideline",label:"$__guidelines",icon:"alt_route",viewButton:!0,selectedParent:null},{value:"objectives",type:"objective",label:"$__objectives",icon:v.filter((function(e){return"objective"===e.name}))[0].icon,viewButton:!0,selectedParent:P},{value:"goals",type:"goal",label:"$__goals",icon:v.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:$||P},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",viewButton:!0,selectedParent:M||$||P}],B={};B.guidelines=Object.keys(F).filter((function(e){return(F[e]._parent===T[0]||F[e]._planId===T[0])&&F[e].type&&F[e].type.indexOf("guideline")>-1&&(0===D.length||D.length>0&&D.indexOf(e)>-1)}))||null,B.objectives=Object.keys(F).filter((function(e){return F[e].type&&"objective"===F[e].type&&(0===D.length||D.length>0&&D.indexOf(e)>-1)}))||null,B.objectives=Object.keys(F).filter((function(e){return"objective"===F[e].type&&!F[e].checklist&&(0===D.length||D.length>0&&D.indexOf(e)>-1)})),B.objectives2=Object.keys(F).filter((function(e){return!$&&"objective"===F[e].type&&F[e]._parent!==P&&!F[e].checklist&&B.objectives.indexOf(F[e]._parent)>-1&&(0===D.length||D.length>0&&D.indexOf(e)>-1)})),B.objectives2.forEach((function(e){-1===B.objectives.indexOf(e)&&B.objectives.push(e)})),B.goals=Object.keys(F).filter((function(e){return F[e].type&&"goal"===F[e].type&&(0===D.length||D.length>0&&D.indexOf(e)>-1)}))||null,B.goals2=Object.keys(F).filter((function(e){return"goal"===F[e].type&&!F[e].checklist&&B.goals.indexOf(F[e]._parent)>-1&&(0===D.length||D.length>0&&D.indexOf(e)>-1)})),B.goals2.forEach((function(e){-1===B.goals.indexOf(e)&&B.goals.push(e)})),B.actions=Object.keys(F).filter((function(e){return F[e].type&&!F[e].checklist&&"plan"!==F[e].type&&"objective"!==F[e].type&&"goal"!==F[e].type&&"feed"!==F[e].type&&"link"!==F[e].type&&"insight"!==F[e].type&&"link"!==F[e].type&&"chatGroup"!==F[e].type&&-1===F[e].type.indexOf("guideline")&&v.filter((function(t){return t.name===F[e].type})).length>0&&"swot"!==v.filter((function(t){return t.name===F[e].type}))[0].module&&(0===D.length||D.length>0&&D.indexOf(e)>-1)}))||null,B.guidelines=B.guidelines.map((function(e){return F[e]})),B.objectives=B.objectives.map((function(e){return F[e]})),B.goals=B.goals.map((function(e){return F[e]})),B.actions=B.actions.map((function(e){return F[e]}));var R=function(){var t=Object(f.a)(Yl().mark((function t(r){var n,a,o,i,c,s,u,d,f,m,b,y,v;return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=r.destination,a=r.source,o=r.draggableId,!r.combine){t.next=4;break}return Object(S.c)({message:"".concat(Object(S.u)("$__confirmLink",1),": ").concat(l.a.getState().db.cards[o].name," >>> ").concat(l.a.getState().db.cards[r.combine.draggableId]?l.a.getState().db.cards[r.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){r.combine.draggableId&&Object(et.y)(e,{cardId:o,cardToLink:r.combine.draggableId})}}),t.abrupt("return");case 4:if(n){t.next=6;break}return t.abrupt("return",!1);case 6:if(n.droppableId!==a.droppableId||n.id!==a.index){t.next=8;break}return t.abrupt("return",!1);case 8:if(i=a.droppableId,c=n.droppableId,s=Array.from(Object.keys(F).filter((function(e){return F[e].status===i})).sort((function(e,t){return F[e].order&&F[t].order&&String(F[e].order.low)&&String(F[t].order.low)&&parseInt(F[e].order.low)<parseInt(F[t].order.low)?-1:1})).map((function(e){return e._id}))),i!==c||!l.a.getState().db.orderByTitle){t.next=13;break}return t.abrupt("return");case 13:if(i!==c||l.a.getState().db.orderByTitle){t.next=30;break}return u=l.a.getState().functions.socket,d="iniciative"===i?"action":i,(f=Array.from(B["".concat(d,"s")].filter((function(e){return e.status&&"completed"!==e.status})).sort((function(e,t){var r,n,a=(null===e||void 0===e||null===(r=e.order)||void 0===r?void 0:r.low)||!isNaN(null===e||void 0===e?void 0:e.order)||e.order?parseInt(e.order):0,o=(null===t||void 0===t||null===(n=t.order)||void 0===n?void 0:n.low)||!isNaN(null===t||void 0===t?void 0:t.order)||t.order?parseInt(t.order):0;return a<o?-1:a>o?1:0})).map((function(e){return e._id})))).splice(a.index,1),t.next=20,setTimeout(500);case 20:return f.splice(n.index,0,o),t.next=23,setTimeout(500);case 23:return u.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:f}),m=Object(p.a)({},l.a.getState().db.cards),t.next=27,new Promise((function(e,t){f.forEach((function(t,r){m=Object(p.a)(Object(p.a)({},m),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},m[t]),{},{order:"".concat(r+1)}))),r+1===f.length&&e(!0)}))}));case 27:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),m)})),t.abrupt("return");case 30:if(s.splice(a.index,1),(b=Array.from(Object.keys(F).filter((function(e){return e.status===c})).sort((function(e,t){return F[e].order&&F[t].order&&String(F[e].order.low)&&String(F[t].order.low)&&parseInt(F[e].order.low)<parseInt(F[t].order.low)?-1:1})).map((function(e){return e._id})))).splice(n.index,0,o),s.forEach((function(e,t){g.cards[e].order&&g.cards[e].order.low?g.cards[e].order.low=parseInt(t):g.cards[e]=Object(p.a)(Object(p.a)({},g.cards[e]),{},{order:{low:parseInt(t)}})})),b.forEach((function(e,t){g.cards[e].order&&g.cards[e].order.low?g.cards[e].order.low=parseInt(t):g.cards[e]=Object(p.a)(Object(p.a)({},g.cards[e]),{},{order:{low:parseInt(t)}})})),y=Object(et.s)(o),v={_id:o,type:n.droppableId,_childrens:y,_objectives:B.objectives.filter((function(e){return y[e._id]})).map((function(e){return e})),_goals:B.goals.filter((function(e){return y[e._id]})).map((function(e){return e}))},"goal"!==g.cards[o].type||"guideline"!==n.droppableId){t.next=41;break}return Object(S.c)({message:Object(S.u)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheObjectiveColumn",1),variant:"error",persist:!1,horizontal:"center"}),C({}),t.abrupt("return");case 41:if(-1!==g.cards[o].type.indexOf("guideline")||"objective"===g.cards[o].type||"goal"===g.cards[o].type||"guideline"!==n.droppableId&&"objective"!==n.droppableId){t.next=45;break}return Object(S.c)({message:Object(S.u)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheGoalsColumn",1),variant:"error",persist:!1,horizontal:"center"}),C({}),t.abrupt("return");case 45:g.cards[o].type.indexOf("guideline")>-1&&"guideline"!==g.cards[o].type?Object(S.c)({message:Object(S.u)("$__youCantMoveGuidelineWithSwotLinked",1),variant:"error",persist:!1,horizontal:"center"}):"guideline"===g.cards[o].type&&"guideline"!==n.droppableId&&(B.objectives.filter((function(e){return e._parent===o})).length>0||B.goals.filter((function(e){return e._parent===o})).length>0)||g.cards[o].type.indexOf("objective")>-1&&"guideline"!==n.droppableId&&"objective"!==n.droppableId&&B.goals.filter((function(e){return e._parent===o})).length>0?(C(v),w(!0)):Object(S.c)({message:"".concat(Object(S.u)("$__confirmTransformIn",1),": ").concat(Object(S.u)("$__".concat(n.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){G(v),g.cards[g.cards[o]._parent].type.indexOf(n.droppableId)>-1&&Object(et.y)(e,{cardId:o,cardToLink:g.cards[g.cards[o]._parent]._parent})},cancel:function(){C({})}});case 46:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),G=function(){var t=Object(f.a)(Yl().mark((function t(r){var n;return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,L&&L._id&&(n=L),t.next=4,Object(et.M)(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},n._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[n._id]),{},{type:n.type})))})),C({});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(){var t=Object(f.a)(Yl().mark((function t(r){var n;return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="goals"===r?L._goals:L._objectives,B[r].filter((function(e){return L._childrens[e._id]})).forEach(function(){var t=Object(f.a)(Yl().mark((function t(a,o){return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.filter((function(e){return e._id===a._id})).forEach((function(e){e.type="goals"===r?"task":"goal"})),t.next=3,Object(et.M)(e,{_id:a._id,type:"goals"===r?"task":"goal"});case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),C(Object(p.a)(Object(p.a)({},L),"goals"===r?{_goals:n}:{_objectives:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var t=Object(f.a)(Yl().mark((function t(){return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(et.M)(e,{_id:L._id,type:L.type});case 2:w(!1),C({});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(ar.a,{onDragEnd:R},a.a.createElement(ar.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Bl,Object.assign({},e,{ref:t.innerRef}),Y.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(gi,Object.assign({},e,{key:t.value,columnId:t.type,isDropDisabled:!0,column:n,cards:B&&B[t.value]?B[t.value].map((function(e){return e._id})):[],index:r,columnsSettings:!1,locked:!1,columnStyle:{minWidth:"200px"},viewButton:t.viewButton,isCombineEnabled:!0,inLineAdd:!0,typeAdd:t.type,selectedParent:t.selectedParent,cardColorPicker:!!e.showColors}))})),t.placeholder)}))),a.a.createElement(Cn.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:O},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__attention",1),icon:"label",onCancel:function(){w(!1),C({})}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},L._childrens&&!L._skipGoals&&L._goals.length>0&&L._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"gray"}},Object(S.u)("$__YouHaveLinkedGoals"),a.a.createElement("p",{style:{color:"red"}},Object(S.u)("$__ThisActionCanOnlyBeUndoneManually"))),L._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(ut.a,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.M)(e,{_id:t._id,type:"task"})}},a.a.createElement(re.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.u)("$__transformInTask")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__skipAll"),text:Object(S.u)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){C(Object(p.a)(Object(p.a)({},L),{},{_skipGoals:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__changeAllInTasks"),text:Object(S.u)("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){H("goals"),C(Object(p.a)(Object(p.a)({},L),{},{_skipGoals:!0}))}})))),L._childrens&&!L._skipObjectives&&L._objectives.length>0&&L._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"gray"}},Object(S.u)("$__YouHaveLinkedObjectives"),a.a.createElement("p",{style:{color:"red"}},Object(S.u)("$__ThisActionCanOnlyBeUndoneManually"))),L._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return l.a.getState().db.orderByTitle&&"ASC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||l.a.getState().db.orderByTitle&&"DESC"===l.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:l.a.getState().db.orderByTitle?0:!l.a.getState().db.orderByTitle&&String(e.order)&&String(t.order)&&String(e.order.low)&&String(t.order.low)&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(t,r){return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(ut.a,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(rt.a,{onClick:function(){Object(et.M)(e,{_id:t._id,type:"goal"})}},a.a.createElement(re.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.u)("$__transformInGoal")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__skipAll"),text:Object(S.u)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){C(Object(p.a)(Object(p.a)({},L),{},{_skipObjectives:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__changeAllInGoal"),text:Object(S.u)("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){H("objectives"),C(Object(p.a)(Object(p.a)({},L),{},{_skipObjectives:!0}))}}))),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__cancel"),text:Object(S.u)("$__cancel"),icon:"cancel",size:"25px",onClick:function(){w(!1),C({})}}))),(L&&L._childrens&&Object.keys(L._childrens).length>0&&0===L._goals.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length&&0===L._objectives.filter((function(e){return l.a.getState().db.cards[e._id]&&l.a.getState().db.cards[e._id].type===e.type})).length||(L._skipGoals&&L._goals.length>0||L&&L._goals&&0===L._goals.length)&&(L._skipObjectives&&L._objectives.length>0||L&&L._objectives&&0===L._objectives.length))&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"red"}},Object(S.u)("$__clickInSaveToFinishMigration")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__cancel"),text:Object(S.u)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){w(!1),C({})}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),icon:"done_all",size:"25px",onClick:function(){W()}})))))))}));function Gl(){Gl=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Hl=Object(u.b)((function(e){return{groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(!0),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],y=g[1],v=a.a.useState(!1),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(m.a)(w,2),E=j[0],L=j[1],C=window.location.hash.split("/");C[0]=C[0].replace("#",""),a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{deleted:!1}))}}),[]),a.a.useEffect((function(){_&&I()}),[_]);var I=function(){var t=Object(f.a)(Gl().mark((function t(){var r;return Gl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(!0),(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),t.next=5,Object(Rt.b)(e,{idRel:r[0],cardLoad:"deleted"});case 5:t.sent&&L(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=0;return Object.keys(t.cards).filter((function(e){var r=Object(et.j)(e);return!(!t.cards[e]||t.cards[e].deleted||t.cards[e]._planId!==C[0]&&t.cards[e]._parent!==C[0]||!o&&(o||"completed"===t.cards[e].status)||!(r.total>0))})).forEach((function(e){var t=Object(et.j)(e);T+=t.total})),a.a.createElement("div",null,a.a.createElement("div",{style:{padding:"0px 10px"}},a.a.createElement(_i,{style:{with:"100%"},fields:["text","date","tags","priority","unit","usersMode","users","responsible"],showFilters:!0},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(V.a,{text:Object(S.u)("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Object(S.u)("$__orderByAsc"):Object(S.u)("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitlePosition:"ASC"===l.a.getState().db.orderByTitlePosition?"DESC":"ASC"}))}},{name:t.orderByTitle?Object(S.u)("$__manualOrder"):Object(S.u)("$__orderByName"),icon:t.orderByTitle?"drag_handle":"format_list_numbered_rtl",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitle:!l.a.getState().db.orderByTitle}))}},{name:u?Object(S.u)("$__hideCatenationColors"):Object(S.u)("$__showCatenationColors"),icon:"palette",color:u?"lightGray":Object(S.d)("menu"),onClick:function(){d((function(e){return!e}))}},{name:Object(S.u)("$__groupByColor"),icon:"gradient",color:t.groupByColor?Object(S.d)("menu"):"lightGray",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{groupByColor:!t.groupByColor}))}}]}),a.a.createElement("div",{style:{marginLeft:"7px",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{title:o?Object(S.u)("$__hideCompleted","*"):Object(S.u)("$__showCompleted","*"),text:o?Object(S.u)("$__hideCompleted","*"):Object(S.u)("$__showCompleted","*"),color:o?Object(S.d)("menu"):"lightGray",icon:o?"toggle_on":"toggle_off",onClick:function(){i((function(e){return!e}))},size:"21px",style:{padding:"0px !important"}}),T>0?a.a.createElement(k.a,{title:b?Object(S.u)("$__hideUnreaded","*"):Object(S.u)("$__showUnreaded","*"),text:b?Object(S.u)("$__hideUnreaded","*"):Object(S.u)("$__showUnreaded","*"),color:b?Object(S.d)("menu"):"lightGray",icon:b?"toggle_on":"toggle_off",onClick:function(){y((function(e){return!e}))},badgeContent:T,size:"21px",style:{marginLeft:"7px",padding:"0px !important"}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:l.a.getState().controls.deleted?Object(S.u)("$__hideDeleted"):Object(S.u)("$__showDeleted"),color:l.a.getState().controls.deleted?"red":"lightgray",load:E,icon:"recycling",onClick:function(){O((function(e){return!e})),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{deleted:!_}))},size:"21px",style:{padding:"0px !important"}})))))),a.a.createElement(Rl,{nodeId:C[0]||null,showCompleted:o,showColors:u,onlyUnReaded:b,styles:{discountHeight:130}}))}));var Wl=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(dl)((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(25),d=Object(m.a)(u,2),p=d[0],f=d[1],h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g={};return g=36===h[0].length?(g=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===h[0]&&"link"===r.cards[e].type&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})):(g=Object.keys(r.cards).filter((function(e){return!r.cards[e]._parent&&"link"===r.cards[e].type})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),a.a.createElement("div",{style:{position:"relative",justifyContent:"space-between",margin:"auto",width:"100%"}},Object.keys(g).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",c+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__cardsPerPage")}))),a.a.createElement(Rr.a,null,Object.keys(g).filter((function(e,t){return t<=(c+1)*p&&t>=c*p})).map((function(e,t){return a.a.createElement(qn.a,{key:g[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:g[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(g).length>25&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",left:"0px",right:"0px",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.u)("$__page")," ",c+1," ",Object(S.u)("$__of")," ",Math.ceil(Object.keys(g).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ma.a,{component:"div",count:Object.keys(g).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.u)("$__cardsPerPage")}))))}))),Ul=r(697),ql=r.n(Ul);var Vl=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=Object(S.j)(),i=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),c=e.searchs&&e.searchs[i]?e.searchs[i]:null,s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=[];return u=Object.keys(r.cards).filter((function(e){return"plan"===r.cards[e].type&&("trash"!==s[1]&&!r.cards[e].deleted||"trash"===s[1]&&r.cards[e].deleted)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),u=o&&!o.owner&&!o.planAdmin&&!o.planEdit&&!o.planRead&&!o.planModerate&&r.cards&&n&&n._id||!r.adminView?Object.keys(r.cards).filter((function(e){return r.cards[e]&&"plan"===r.cards[e].type&&(!r.cards[e].private||r.cards[e].private&&r.cards[e]._users&&r.cards[e]._users[n._id])&&("templates"===s[1]||"templates"!==s[1]&&r.cards[e]._users&&Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||"admin"===s[1]&&r.cards[e]._users&&0===Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return r.cards[e]})):Object.keys(r.cards).filter((function(e){return r.cards[e]&&"plan"===r.cards[e].type&&r.cards[e]._users&&(Object.keys(r.cards[e]._users).filter((function(e){return e===n._id})).length>0||!r.cards[e].private&&Object.keys(r.cards[e]._users).filter((function(e){return e!==n._id})).length>0)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return r.cards[e]})),c&&(c.text&&(u=u.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(c.text.toLowerCase())>-1)})).map((function(e){return e}))),u=(u=u.filter((function(e){return!!(e&&e.status&&c&&c.status&&c.status[e.status]||!e.status&&c&&c.status&&c.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&c.priority[e.priority]||c.priority.null&&!e.priority)})).map((function(e){return e})),c&&c.users&&c.users.length>0&&(u=u.filter((function(e){var t=!1;if(c.users.indexOf("ALL")>-1&&(!e._users||0===Object.keys(e._users).length))t=!0;else if(e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).forEach((function(e){c.users.indexOf(e)>-1&&(t=!0)})),t;return!1})).map((function(e){return e}))),c&&c.clients&&c.clients.length>0&&(u=u.filter((function(e){return c.clients.indexOf("ALL")>-1&&!e.client||!!(e.client&&c.clients.indexOf(e.client)>-1)})).map((function(e){return e}))),c&&c.tags&&c.tags.length>0&&(u=u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return c.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement(Rr.a,{style:{marginTop:"7px"}},u&&u.length>0&&u.filter((function(e){return!!((!e._planId||e._planId&&0===u.filter((function(t){return t._id===e._planId})).length)&&("templates"!==s[1]&&(!e.isTemplate||e.isTemplate&&"trash"===s[1])||"templates"===s[1]&&e.isTemplate)&&("archived"===s[1]&&e.archived||"archived"!==s[1]&&!e.archived)&&("trash"===s[1]&&e.deleted||"trash"!==s[1]&&!e.deleted))})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return a.a.createElement(qn.a,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{db:"cards",data:e,Avatar:!0,expanded:!0,ignoreList:!0}))})),r.loaded&&(!u||0===u.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ql.a})))}))),Jl=r(291),Xl=r(718),Kl=r.n(Xl),Zl=r(719),Ql=r.n(Zl);var es=function(e){var t=l.a.getState().db.users,r=l.a.getState().db.cards,n=Object.keys(r).filter((function(t){return r[t].client===e.id&&"plan"===r[t].type&&!r[t].deleted&&!r[t].archived&&!r[t].isTemplate&&(!e.completed&&"completed"!==r[t].status||e.completed&&"completed"===r[t].status)})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){return r[e]}));return a.a.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},Object.keys(t).filter((function(r){return t[r]&&!t[r].deleted&&t[r]._parent===e.id})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%"}},Object(S.u)("$__users",1),":"),a.a.createElement(Jr.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&!t[r].deleted&&t[r]._parent===e.id})).map((function(e,r){return a.a.createElement(Kt.a,{title:t[e].name,key:e},a.a.createElement(at.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},t[e].name&&t[e].name.substr(0,1)?t[e].name.substr(0,1):""))})))),n.length>0&&a.a.createElement("div",{style:{width:"100%"}},n.map((function(e,t){return a.a.createElement("div",{key:"".concat(e._id,"-").concat(t)},a.a.createElement(ut.a,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},ts=Object(u.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ze)((function(e){var t,r,n=e.data,o=l.a.getState(),i=o.db,s=o.session,u=a.a.useState(null),d=Object(m.a)(u,2),f=d[0],g=d[1],b=window.location.hash.split("/");b[0]=b[0].replace("#","");var y=[],v={};return Object.keys(i.cards).filter((function(e){return!!(i.cards[e]&&"chatGroup"!==i.cards[e].type&&"link"!==i.cards[e].type&&"insight"!==i.cards[e].type&&i.cards[e]._users&&Object.keys(i.cards[e]._users).length>0&&1===Object.keys(i.cards[e]._users).filter((function(e){return e===n._id})).length)})).forEach((function(e){if(i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0]&&i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module&&"swot"!==i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module||i.cards[e]&&i.cards[e].type&&i.dataType.filter((function(t){return t.name===i.cards[e].type})).length>0&&"swot"===i.dataType.filter((function(t){return t.name===i.cards[e].type}))[0].module){var t;if(i.cards[e]&&i.cards[e].status&&"completed"!==i.cards[e].status)v=Object(p.a)(Object(p.a)({},v),{},(t={},Object(h.a)(t,i.cards[e].status,v&&v[i.cards[e].status]?v[i.cards[e].status]+1:1),Object(h.a)(t,"total",v.total?v.total+1:1),Object(h.a)(t,"late",i.cards[e].endDate&&O()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()().tz("America/Sao_Paulo").format()?v.late?v.late+1:1:v.late?v.late:0),t));else v=Object(p.a)(Object(p.a)({},v),{},{completed:v&&v.completed?v.completed+1:1,total:v.total?v.total+1:1});y[i.cards[e].type]=y[i.cards[e].type]?y[i.cards[e].type]+1:1}else y.swot=null==y.swot?1:y.swot+1})),y=[],v={},e.expanded?a.a.createElement("div",{style:Object(p.a)({boxShadow:"0 0 3px 3px rgba(0,0,0,0.1)",position:"relative",marginLeft:"15px"},e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",marginTop:"5px",paddingLeft:"60px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",left:"15px"}},(n.name,n.name),!e.resume&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"close",onClick:function(){c.a.push("c#tab/".concat(b[1]))}})))),!f&&n.image?a.a.createElement("img",{alt:"MACHEN_IMAGE",style:{width:"70px",height:"70px",top:"-20px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?Ql.a:Kl.a),onError:function(e){g(null)},onLoad:function(e){g("".concat(n.image?n.image:n.type&&"user"!==n.type?Ql.a:Kl.a))},width:"100%"}):n.image?a.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):a.a.createElement("div",{style:{width:"50px",height:"50px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(re.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(re.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"person"))):a.a.createElement("div",{style:{marginTop:"33px",width:e.style&&e.style.width?e.style.width:"calc(100% - 15px)",minHeight:"120px",backgroundColor:"#FFFFFF",boxShadow:"0 0 3px 3px rgba(0,0,0,0.1)",position:"relative",marginLeft:e.style&&e.style.marginLeft?e.style.marginLeft:"15px"}},a.a.createElement("div",{style:{backgroundColor:Object(S.d)("menu"),height:"43px",paddingLeft:"95px",fontSize:"12px",color:"#FFFFFF",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement("div",{style:{maxWidth:"calc(100% - 10px)",textOverflow:"ellipsis ",whiteSpace:"nowrap",overflow:"hidden"}},(n.name,n.name)),!e.resume&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},!e.noActions&&(!n.independentAccount||n.independentAccount&&s&&s.matrixAdmin)&&(!n._parent||n._parent&&l.a.getState().db.users[n._parent]&&!l.a.getState().db.users[n._parent].independentAccount)&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"create",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},n)}))}})),!e.noActions&&"user"!==n.type&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"contacts",onClick:function(){c.a.push("c#tab/units/".concat(n._id))}})),!e.noActions&&"sic"===n.type&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(re.a,{color:Object(S.d)("color"),icon:"badge",onClick:function(){c.a.push("c#tab/units/".concat(n._id))}})))),n.image&&(!f||n.image&&n.image!==f)?a.a.createElement("img",{alt:"MACHEN_IMAGE",style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(S.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?Ql.a:Kl.a),onError:function(e){},onLoad:function(e){g("".concat(n.image?n.image:null))},width:"100%"}):n.image?a.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(f,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}):a.a.createElement("div",{style:{width:"90px",height:"90px",top:"-24px",left:"-6px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(re.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(re.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"person")),e.children?e.children:a.a.createElement(a.a.Fragment,null,(null===n||void 0===n||null===(t=n._access)||void 0===t?void 0:t.enabled)&&"user"===n.type?a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-end",fontSize:12,color:Object(S.d)("medium"),padding:"3px 7px"}},(null===n||void 0===n||null===(r=n._access)||void 0===r?void 0:r.admin)?a.a.createElement(a.a.Fragment,null,a.a.createElement(re.a,{color:Object(S.d)("medium"),size:"12px"},"supervisor_account"),a.a.createElement("span",null,Object(S.u)("$__supervisorAccount"))):a.a.createElement(a.a.Fragment,null,a.a.createElement(re.a,{color:Object(S.d)("medium"),size:"12px"},"supervised_user_circle"),a.a.createElement("span",null,Object(S.u)("$__guest")))):"user"===n.type&&n._access&&!n._access.enabled?a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",color:"red",fontSize:10}},Object(S.u)("$__notEnabled")):a.a.createElement(a.a.Fragment,null),n.groups&&n.groups.length>0?a.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),paddingLeft:"94px",paddingRight:"15px",marginTop:"15px"}},n.groups.filter((function(e){return e.value})).sort((function(e,t){return e.label<t.label?-1:1})).map((function(e,t){return"".concat(t>0?" / ":"").concat(e.label)}))):"user"===n.type?a.a.createElement("div",{style:{position:"relative",width:"100%",fontSize:"12px",color:Object(S.d)("mediumText"),paddingLeft:"94px",marginTop:"15px"}},Object(S.u)("$__doesntBelongToAGroup")):a.a.createElement(a.a.Fragment,null),!e.noShowUsers&&"user"!==n.type&&a.a.createElement("div",{style:{marginTop:"11px",width:"100%",padding:"15px"}},a.a.createElement(es,Object.assign({id:n._id},e))),"user"===n.type&&Object.keys(y).length>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},Object.keys(y).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)?a.a.createElement(Ba.a,{overlap:"rectangular",key:t,style:{padding:3},icon:i.dataType.filter((function(t){return t.name===e}))[0].icon,title:Object(S.u)("$__".concat(e),1),size:"16px",count:y[e],disabled:!0}):null}))):a.a.createElement(a.a.Fragment,null),"user"===n.type&&v&&v.total>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},a.a.createElement("fieldset",{style:{padding:7,width:"calc(100% - 14px)"}},a.a.createElement("legend",{style:{color:"lightgray",fontSize:12}},Object(S.u)("$__openActivities")),a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.u)("$__total",1),": ",v.total)),i.status.filter((function(e){return"completed"!==e.value})).map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(re.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.u)(e.label,1))),a.a.createElement("div",null,v[e.value]?v[e.value]:0))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(re.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.u)("$__late",1))),a.a.createElement("div",null,v.late)))):a.a.createElement(a.a.Fragment,null),!e.resume&&a.a.createElement(dt.a,{options:n.tags,showOptions:!1}),e.resume&&a.a.createElement("div",null,a.a.createElement(Jl.a,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},userId:n._id},a.a.createElement(re.a,{size:"27px"},"chat")))))})));var rs=function(e){var t=l.a.getState().db,r=[];return e.plans.forEach((function(e){0===r.filter((function(t){return t._id===e.client})).length&&t.users[e.client]&&r.push(t.users[e.client])})),a.a.createElement(a.a.Fragment,null,r.sort((function(e,t){var r=e.displayName||e.name,n=t.displayName||t.name;return r<n?-1:r>n?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:"".concat(t._id,"-").concat(r),xs:12,sm:6,md:4,lg:4,xl:3,style:{height:"calc(100% - 34px)",padding:"0px 0px !important"}},a.a.createElement(ts,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},ns=function(e){return a.a.createElement(a.a.Fragment,null,e.plans.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e,t){return a.a.createElement(qn.a,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ut.a,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},as=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),i=e.searchs&&e.searchs[o]?e.searchs[o]:null,c=Object(S.j)(),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=[];return u=Object.keys(r.cards).filter((function(t){return r.cards[t]&&r.cards[t].type&&"plan"===r.cards[t].type&&!r.cards[t].deleted&&!r.cards[t].isTemplate&&!r.cards[t].archived&&(!e.completed&&"completed"!==r.cards[t].status||e.completed&&"completed"===r.cards[t].status)})).sort((function(e,t){return r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)<parseInt(r.cards[t].order.low)?-1:r.cards[e].order&&r.cards[t].order&&parseInt(r.cards[e].order.low)>parseInt(r.cards[t].order.low)?1:0})).map((function(e){return r.cards[e]})),u=c&&!c.owner&&!c.planAdmin&&!c.planEdit&&!c.planRead&&!c.planModerate&&r.cards&&n&&n._id||!r.adminView?u.filter((function(e){return"plan"===e.type&&e&&e._users&&Object.keys(e._users).filter((function(t){return t===n._id||l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.a.getState().db.users[t].groups.filter((function(t){return e._groups&&e._groups[t.value]})).length>0})).length>0})).sort((function(e,t){return e&&e.order&&t&&t.order&&parseInt(e.order.low)<parseInt(t.order.low)?-1:1})).map((function(e){return e})):u.filter((function(e){return"plan"===e.type&&e&&e._users&&(Object.keys(e._users).filter((function(t){return t===n._id||l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.a.getState().db.users[t].groups.filter((function(t){return e._groups&&e._groups[t.value]})).length>0})).length>0||!e.private&&Object.keys(e._users).filter((function(e){return e!==n._id})).length>0)})).sort((function(e,t){return e.order&&r.cards[t].order&&parseInt(e.order.low)<parseInt(r.cards[t].order.low)?-1:1})).map((function(e){return e})),i&&(i.text&&(u=u.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(i.text.toLowerCase())>-1)})).map((function(e){return e}))),u=(u=u.filter((function(e){return!!(e&&e.status&&i&&i.status&&i.status[e.status]||!e.status&&i&&i.status&&i.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&i.priority[e.priority]||i.priority.null&&!e.priority)})).map((function(e){return e})),i&&i.users&&i.users.length>0&&(u=u.filter((function(e){var t=!1;if(i.users.indexOf("ALL")>-1&&(!e._users||0===Object.keys(e._users).length))t=!0;else if(e&&e._users&&Object.keys(e._users).length>0)return Object.keys(e._users).filter((function(e){return i.users.indexOf(e)>-1&&(t=!0),!1})),t;return!1})).map((function(e){return e}))),i&&i.clients&&i.clients.length>0&&(u=u.filter((function(e){return i.clients.indexOf("ALL")>-1&&!e.client||!!(e.client&&i.clients.indexOf(e.client)>-1)})).map((function(e){return e}))),i&&i.tags&&i.tags.length>0&&(u=u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return i.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement("div",null,u.filter((function(e){return e._isFavorite})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__myFavoritePlans",1),icon:"favorite",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(ns,{plans:u.filter((function(e){return e._isFavorite&&!e.private})).map((function(e){return e}))}))),u.filter((function(e){return e._isFavorite&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(ns,{plans:u.filter((function(e){return e._isFavorite&&e.private})).map((function(e){return e}))}))),u.filter((function(e){return e.client&&r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__customerPlanning",1),icon:"business",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(rs,{plans:u.filter((function(e){return e.client})).map((function(e){return e})),completed:!!e.completed}))),u.filter((function(e){return!e.client&&!e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__accountPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(ns,{plans:u.filter((function(e){return!e.client&&!e.private})).map((function(e){return e}))}))),u.filter((function(e){return e.client&&!r.users[e.client]})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__consultingPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(ns,{plans:u.filter((function(e){return e.client&&!r.users[e.client]})).map((function(e){return e}))}))),u.filter((function(e){return!e.client&&e.private})).length>0&&a.a.createElement("div",{style:{marginBottom:"33px"}},a.a.createElement(ge.a,{title:Object(S.u)("$__privatePlanning",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(Rr.a,null,a.a.createElement(ns,{plans:u.filter((function(e){return!e.client&&e.private})).map((function(e){return e}))}))),r.loaded&&(!u||0===u.length)&&a.a.createElement("div",{style:{width:"100%",height:"calc(100vh - 150px)",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ql.a})))}));var os=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.a.getState().session;a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();window.location.hash.split("/")[0].replace("#","")||c.a.push("sp#tab/home");var o=!0;if(r[0]&&36===r[0].length&&!l.a.getState().db.cards[r[0]]&&(o=!1),r[0]&&36===r[0].length&&l.a.getState().db.cards[r[0]]&&!l.a.getState().db.cards[r[0]].isTemplate&&l.a.getState().db.cards[r[0]]._users&&!l.a.getState().db.cards[r[0]]._users[t._id]&&l.a.getState().db.cards[r[0]]._account&&l.a.getState().db.cards[r[0]]._account!==y()(t.account).toString()&&(o=!1),Object(et.A)(r[0])&&(o=Object(et.A)(r[0])),!o)return c.a.push("/deniedAccess"),a.a.createElement(a.a.Fragment,null);if(36===r[0].length&&l.a.getState().db.cards[r[0].replace("#","")]&&r[1]&&"board"===r[1])return a.a.createElement(rc,{nodeId:r[0]||null});var i=_u.filter((function(e){return!(r[1]&&e.tabs&&e.tabs.filter((function(e){return e.path===r[1]})).length>0&&!1===e.tabs.filter((function(e){return e.path===r[1]}))[0].search)&&!(!e||e.path!==window.location.pathname||!e.search)})).length>0;return a.a.createElement("div",{style:{height:"-webkit-fill-available"}},i?a.a.createElement("div",{style:{position:"absolute",left:0,top:0,right:0,zIndex:1,paddingLeft:15,display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(_i,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0,nodeId:n}),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(Ea,null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",top:i?30:0,left:0,bottom:0,right:0,overflow:"auto"}},(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"home"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(as,null)):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"completed"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(as,{completed:!0})):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&a.a.createElement(Vl,null),36===r[0].length&&l.a.getState().db.cards[r[0].replace("#","")]?a.a.createElement(a.a.Fragment,null,r[1]&&"matrix"===r[1]&&a.a.createElement(zl,null),r[1]&&("actions"===r[1]||"guidelines"===r[1]||"objectives"===r[1]||"goals"===r[1])&&a.a.createElement(nc,{type:r[1]}),r[1]&&"dashboard"===r[1]&&a.a.createElement(Xc,null),r[1]&&"statistics"===r[1]&&a.a.createElement(ul,null),r[1]&&"overview"===r[1]&&a.a.createElement(Hl,null),r[1]&&"bright-and-connected"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(fo,null)),r[1]&&"insight-boards"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(pl,null)),r[1]&&"radar"===r[1]&&a.a.createElement("div",{style:{marginTop:30}},a.a.createElement(Wl,null)),r[1]&&"library"===r[1]&&a.a.createElement("div",{style:{padding:15}},a.a.createElement(Vo,null)),r[1]&&"planningBoard"===r[1]&&a.a.createElement("div",{style:{padding:15}},a.a.createElement("iframe",{title:"outModule",style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/app/live-embed/".concat(l.a.getState().db.cards[r[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):a.a.createElement(a.a.Fragment,null)))})));function is(){is=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var cs=Object(u.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},history:e.db.history,hidePrivate:e.controls.hidePrivate,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(null),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),h=Object(m.a)(d,2),g=h[0],b=h[1],y=a.a.useState([]),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(!1),w=Object(m.a)(O,2),j=w[0],E=w[1],L=l.a.getState().session,C=e.store.db,I=l.a.getState().db.dataType,T=Object(S.j)();a.a.useEffect((function(){D(),j&&F()}),[j]),a.a.useEffect((function(){x.length>0&&x[0]!==n&&(E(!1),o(x[0]));var e=setTimeout((function(){return D()}),400);return function(){return clearTimeout(e)}}),[C.cards,C.tag,x]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(x)&&_(e)}),[e.history]),a.a.useEffect((function(){var e=setTimeout((function(){return D()}),400);return function(){return clearTimeout(e)}}),[C.cards,C.tag]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(x)&&_(e)}),[e.history]),a.a.useEffect((function(){console.log(n)}),[n]);var F=function(){Object(Rt.b)(e,{cardLoad:"tags",idRel:x[0],adminView:!0})},D=function(){var t=Object(f.a)(is().mark((function t(){var r,n;return is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(C.cards).filter((function(e){return C.cards&&C.cards[e]&&!C.cards[e].deleted&&(!j&&L&&L._id&&C.cards[e]&&C.cards[e]._users&&C.cards[e]._users[L._id]||j&&(T.owner||T&&T.plan&&T.planAdmin))&&x&&x.length>0&&x[0]&&C.tag&&C.tag.filter((function(e){return e.value===x[0]||e.parent===x[0]})).length>0&&C.cards&&C.cards[e]._tags&&C.cards[e]._tags.filter((function(e){return e.value===x[0]||C.tag.filter((function(t){return t.parent===x[0]&&e.value===t.value})).length>0})).length>0&&(!C.cards[e].private||L&&L._id&&C.cards[e].private&&C.cards[e]._users&&C.cards[e]._users[L._id])})))})),t.next=3,r.then((function(e){return e}));case 3:(n=t.sent)&&(b(n),u(!1),e.onFinish&&e.onFinish());case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=g.map((function(e){return C.cards[e]}));if(e.searchs&&e.searchs.tagsView){var A=e.searchs.tagsView;A.text&&void 0!==A.text&&null!==A.text&&""!==A.text&&(N=Array.from(N.filter((function(e){var t;return e.name.toLowerCase().indexOf(A.text.toLowerCase())>-1||(null===(t=e.description)||void 0===t?void 0:t.toLowerCase().indexOf(A.text.toLowerCase()))>-1})))),A.startDate&&void 0!==A.startDate&&null!==A.startDate&&""!==A.startDate&&(N=Array.from(N.filter((function(e){return parseInt(e.startDate)>=parseInt(A.startDate)})))),A.endDate&&void 0!==A.endDate&&null!==A.endDate&&""!==A.endDate&&(N=Array.from(N.filter((function(e){return parseInt(e.endDate)<=parseInt(A.endDate)})))),A.tags&&A.tags&&A.tags.filter((function(e){return e.value})).length>0&&(N=Array.from(N.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return A.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})))),N=(N=(N=(N=(N=N.filter((function(e){return!(e.status&&!(e&&e.status&&A.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&A.priority[e.priority]||A.priority.null&&!e.priority)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.complexity&&A.complexity[e.complexity]||A.complexity.null&&!e.complexity)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.risk&&A.risk[e.risk]||A.risk.null&&!e.risk)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.impact&&A.impact[e.impact]||A.impact.null&&!e.impact)})).map((function(e){return e})),A.users&&A.users.length>0&&(N=N.filter((function(e){return A.users.filter((function(t){return e&&e._users&&e._users[t]})).length>0})).map((function(e){return e})))}var P=N.map((function(e){return e._id}));return a.a.createElement("div",{style:{width:"100%"}},s&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(ct.a,null)),C.tag.filter((function(e){return e.value===x[0]})).length>0?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:Object(p.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},C.tag.filter((function(e){return e.value===x[0]})).length>0&&C.tag.filter((function(e){return e.value===x[0]}))[0].color?{backgroundColor:C.tag.filter((function(e){return e.value===x[0]}))[0].color,color:C.tag.filter((function(e){return e.value===x[0]}))[0].color?Object(S.s)(C.tag.filter((function(e){return e.value===x[0]}))[0].color,!0):Object(S.d)("menu")}:{})},a.a.createElement(re.a,{size:"22px",color:C.tag.filter((function(e){return e.value===x[0]}))[0].color?Object(S.s)(C.tag.filter((function(e){return e.value===x[0]}))[0].color,!0):Object(S.d)("menu"),icon:"tag"}),a.a.createElement("span",{style:{marginLeft:"7px"}},C.tag.filter((function(e){return e.value===x[0]}))[0].label)),T&&T.plan&&T.planAdmin&&T.user&&T.userAdmin?a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.u)("$__adminMode"),text:Object(S.u)("$__adminMode"),color:j?Object(S.d)("menu"):"lightgrey",textColor:j?Object(S.d)("menu"):"lightgrey",icon:"manage_accounts",onClick:function(){E((function(e){return!e}))},style:{marginLeft:15},size:"25px"})):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{positin:"relative",width:"100%"}},a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("plan")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__plans",1),icon:I.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return"plan"===C.cards[t].type&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name<C.cards[t].name?-1:C.cards[e].name>C.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,showTags:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__guidelines",1),icon:I.filter((function(e){return"guideline"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__objectives",1),icon:I.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return C.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__goals",1),icon:I.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return C.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(t){return I.filter((function(e){return e.name===C.cards[t].type})).length>0&&I.filter((function(e){return e.name===C.cards[t].type}))[0]&&"objective"!==C.cards[t].type&&"goal"!==C.cards[t].type&&"plan"!==C.cards[t].type&&"chatGroup"!==C.cards[t].type&&"link"!==C.cards[t].type&&"insight"!==C.cards[t].type&&-1===C.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__actions",1),icon:"double_arrow",color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(t){return I.filter((function(e){return e.name===C.cards[t].type})).length>0&&I.filter((function(e){return e.name===C.cards[t].type}))[0]&&"objective"!==C.cards[t].type&&"goal"!==C.cards[t].type&&"plan"!==C.cards[t].type&&"chatGroup"!==C.cards[t].type&&"link"!==C.cards[t].type&&"insight"!==C.cards[t].type&&-1===C.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!C.cards[t].private)})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),P.filter((function(e){return"insight"===C.cards[e].type||"link"===C.cards[e].type})).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:"BRIGHT & CONNECTED",icon:Va.a,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(Rr.a,null,P.filter((function(e){return"insight"===C.cards[e].type||"link"===C.cards[e].type})).sort((function(e,t){return C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?-1:C.cards[e].name.toLowerCase()<C.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(ut.a,{db:"cards",cardId:t,showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))}));var ls=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),ss={root:{}},us=r(874),ds=function(e){var t=e.handleData,r=Object(n.useState)(!1),o=Object(m.a)(r,2),i=o[0],c=o[1],l=Object(n.useState)(!1),s=Object(m.a)(l,2),u=s[0],d=s[1],f=Object(n.useState)(null),h=Object(m.a)(f,2),g=h[0],b=h[1],y={formFileUpload:{height:"88%",width:"90%",marginTop:"5%",marginBottom:"5%",maxWidth:"100%",textAlign:"center",position:"relative"},inputFileUpload:{display:"none"},labelFileUpload:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderWidth:"2px",borderRadius:"1rem",borderStyle:"dashed",borderColor:"#cbd5e1",backgroundColor:"#f8fafc"},labelFileUploadDragActive:{backgroundColor:"#ffffff"},uploadButton:{cursor:"pointer",padding:"0.25rem",fontSize:"1rem",border:"none",fontFamily:"'Oswald', sans-serif",backgroundColor:"transparent"},uploadButtonHover:{textDecorationLine:"underline"},dragFileElement:{position:"absolute",width:"100%",height:"100%",borderRadius:"1rem",top:"0px",right:"0px",bottom:"0px",left:"0px"}},v=a.a.useRef(null),x=function(e){d(!0);var r=new FileReader;r.onload=function(e){var r=e.target.result,n=us.a(r,{type:"binary"}),a=n.SheetNames[0],o=n.Sheets[a],i=us.b.sheet_to_json(o);setTimeout((function(){d(!1),t(i)}),0)},e instanceof File?(r.readAsBinaryString(e),b(e)):(r.readAsBinaryString(e.target.files[0]),b(e.target.files[0]))},_=function(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)};return a.a.createElement("form",{style:y.formFileUpload,onDragEnter:_,onSubmit:function(e){return e.preventDefault()}},a.a.createElement("input",{ref:v,type:"file",style:y.inputFileUpload,multiple:!0,onChange:function(e){e.preventDefault(),e.target.files&&e.target.files[0]}}),a.a.createElement("label",{className:i?"label-file-upload drag-active":"label-file-upload",style:i?Object(p.a)(Object(p.a)({},y.labelFileUpload),y.labelFileUploadDragActive):y.labelFileUpload},a.a.createElement("div",null,g?a.a.createElement("p",null,Object(S.u)("$__youSendedArchive"),' "',g.name,'"'):a.a.createElement("p",null,Object(S.u)("$__putAnArchive")),u&&a.a.createElement(fe.a,null),a.a.createElement("input",{type:"file",style:{alignSelf:"center",display:"none"},accept:".xlsx, .xls",id:"selectedFile",onChange:x}),a.a.createElement("input",{style:{marginTop:"10px",backgroundColor:"#0095ff",color:"white",cursor:"pointer",border:"none",borderRadius:"5px",padding:" 10px 20px"},type:"button",value:Object(S.u)("$__search..."),onClick:function(){document.getElementById("selectedFile").click()}}))),i&&a.a.createElement("div",{style:y.dragFileElement,onDragEnter:_,onDragLeave:_,onDragOver:_,onDrop:function(e){e.preventDefault(),e.stopPropagation(),c(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&(console.log(e.dataTransfer.files[0]),x(e.dataTransfer.files[0]))}}))},ps=function(e){var t=e.usuario,r=e.index,n=e.handleCheckboxChange,o=e.isActive,i=e.style,c=e.handleDataChange,l=e.selected,s=e.dataError,u=e.column,d=e.add,f=e.data,h=e.data1,m={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,border:"1px solid #ebebeb",alignSelf:"stretch"},g=function(e){var n=e.item;return a.a.createElement("div",{style:Object(p.a)({},m)},a.a.createElement("input",{style:{border:"none",backgroundColor:"transparent",height:"100%",width:"100%",marginLeft:"5px",color:"#1C1C1C",fontWeight:"nomecompleto"===n?"bold":"normal"},type:"text",defaultValue:null===t||void 0===t?void 0:t[n],onMouseUp:function(e){return e.target.focus()},onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onBlur:function(e){return c(r,e.target.value,[n])}}))};return a.a.createElement("div",{style:i},a.a.createElement("div",{style:{backgroundColor:!1===o&&Object.keys(h).length>=r&&0!==r?"rgba(255, 0, 0, 0.02)":o&&Object.keys(h).length>=r&&0!==r?"rgba(0, 128, 0, 0.02)":s&&!1===o||0===r&&!1===o&&Object.keys(h).length?"rgba(255, 0, 0, 0.02)":o&&0===r?"rgba(0, 128, 0, 0.02)":"transparent",width:"100%",display:"flex",justifyContent:"center",height:"44px",overflowY:f.length>11?"hidden":"scroll"}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},m),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",height:"100%",justifyContent:"center",display:"flex"})},a.a.createElement("input",{type:"checkbox",style:{width:"16px",height:"16px",borderRadius:"15px",cursor:"pointer",backgroundColor:"transparent"},defaultChecked:l,onMouseUp:function(){n(r)}})),u.length>0&&u.map((function(e,t){return a.a.createElement(g,{item:e,key:t})})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},m),{},{width:"60px",border:"1px solid #ebebeb",flex:"none",height:"100%",justifyContent:"center",display:"flex"})},o?a.a.createElement("div",null,a.a.createElement(re.a,{style:{color:"green",alignSelf:"center"}},"done")):a.a.createElement("div",null,a.a.createElement(Ua.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"200px",marginBottom:"20px",fontSize:"16px",marginTop:"20px"}},a.a.createElement("p",null,null===s||void 0===s?void 0:s.emailError),a.a.createElement("p",null,null===s||void 0===s?void 0:s.nameError),a.a.createElement("p",null,null===s||void 0===s?void 0:s.emailErrorInv)))},a.a.createElement("div",{style:{alignSelf:"center"}},h&&Object.keys(h).length>0&&r===Object.keys(h).length||d&&0===r&&!Object.keys(h).length?a.a.createElement(be.a,null):0===r&&!1===o&&Object.keys(h).length||!1===o&&Object.keys(h).length>=r&&0!==r||s?a.a.createElement(re.a,{style:{color:"red",alignSelf:"center"}},"warning"):void 0))))))},fs=function(e){var t=e.resetComponent,r=e.message,n=e.title,o=e.icon,i=e.color,c=function(e){var t=e.children;return a.a.createElement("div",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0, 0, 0, 0.3)",left:"0% !important",right:"0%",top:"0%",bottom:"0%",zIndex:"9999",display:"flex",justifyContent:"center",overflowY:"scroll",overflowX:"hidden"}},t)},l=function(e){var t=e.children,r=(e.widthSize,e.id);return a.a.createElement("div",{style:{width:"500px",position:"absolute",borderRadius:"5px",backgroundColor:"#fafbfc",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",alignSelf:"center"},id:r},t)},s=function(e){var t=e.name,r=e.handleEvent,n=e.style,o=e.disabled,i=e.id;return a.a.createElement("button",{id:i,onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onMouseUp:r,disabled:o,style:Object(p.a)(Object(p.a)({},n),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:"transparent"})},t)};return a.a.createElement("div",{style:{height:"80vh",maxHeight:"600px",display:"flex",justifyContent:"center"}},a.a.createElement(c,null,a.a.createElement(l,null,a.a.createElement(oc.a,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex",padding:"0px"}},a.a.createElement(re.a,{style:{alignSelf:"center"},color:i,size:"30px"},o),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",fontWeight:"bolder",marginBottom:"20px",color:"#141414"}},n)),a.a.createElement(oc.a,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"50px",padding:"0px"}},a.a.createElement("p",{style:{marginLeft:"30px",marginRight:"30px",fontWeight:"bolder"}},r)),a.a.createElement(oc.a,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"30px"}},a.a.createElement(s,{handleEvent:t,name:Object(S.u)("$__back"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",backgroundColor:"none",color:"black"}})))))};function hs(){hs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ms=function(e){var t=e.dataUser,r=e.resetComponent,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object(n.useState)(t),d=Object(m.a)(u,2),g=d[0],b=d[1],y=Object(n.useState)({}),v=Object(m.a)(y,2),x=v[0],_=v[1],O=Object(n.useState)([]),w=Object(m.a)(O,2),j=w[0],E=w[1],k=Object(n.useState)(!1),L=Object(m.a)(k,2),C=L[0],I=L[1],T=a.a.createRef(),F=Object(n.useState)([]),D=Object(m.a)(F,2),P=D[0],$=D[1],M=Object(n.useState)({}),z=Object(m.a)(M,2),Y=z[0],B=z[1],R=Object(n.useState)(!1),G=Object(m.a)(R,2),H=G[0],W=G[1];Object(n.useEffect)((function(){if(t.length>0){var e=t,r=["nomecompleto","nomedeexibi\xe7\xe3o","email","departamento/grupo","ramal","observa\xe7\xf5es","celular"];e=(e=(e=Object(A.a)(new Set(t.flatMap((function(e){return Object.keys(e)}))))).map((function(e){return e.toLowerCase()}))).filter((function(e){return r.includes(e)})),$(e);n=e,["nomecompleto","email"].every((function(e){return n.includes(e)}))?W(!1):W(!0)}var n}),[t]);var U=function(e){E((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(Object(A.a)(t),[e])}))},q=function(e,t,r){var n=Object(A.a)(g);n[e][r]=t,n&&b(n)},V=function(e){var t=e.name,r=e.handleEvent,n=e.style,o=e.disabled,i=e.id;return a.a.createElement("button",{id:i,onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="transparent"},onMouseUp:r,disabled:o,style:Object(p.a)(Object(p.a)({},n),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:"transparent"})},t)};Object(n.useEffect)((function(){if(x&&Object.keys(x).length>0&&Object.keys(x).length<Object.keys(g).length)setTimeout((function(){J(Object.keys(x).length)}),100);else if(Object.keys(x).length>0){!function(){if(!C){I(!0);var e=x;e=Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(m.a)(e,2);t[0];return!1===t[1].sended})));var t=[];r=e,n=function(e,r){if(!1===e.sended)return t=[].concat(Object(A.a)(t),[parseInt(r)])},Object.fromEntries(Object.entries(r).map((function(e,t){var r=Object(m.a)(e,2),a=r[0],o=r[1];return[a,n(o,a,t)]}))),b(g.filter((function(e,r){return t.includes(r)}))),e=Object.entries(e).reduce((function(e,t,r){var n=Object(m.a)(t,2),a=(n[0],n[1]);return e[r]=a,e}),{}),B(e),_({})}var r,n}()}}),[x]);var J=function(){var t=Object(f.a)(hs().mark((function t(){var r,n,a,o,i,c,u,d=arguments;return hs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d.length>0&&void 0!==d[0]?d[0]:0,e.onAdding&&e.onAdding(!0),!(g.length>0)){t.next=31;break}return I(!1),n=Object(S.v)(g[r].email),t.next=7,Object(ke.g)(g[r].email);case 7:if(!(a=t.sent)){t.next=31;break}if(!(i=Object(p.a)(Object(p.a)({},x),{},Object(h.a)({},r,Object(p.a)(Object(p.a)(Object(p.a)({email:g[r].email,sended:!0},a&&(a.exists||Object.keys(x).filter((function(e){return x[e].email===g[r].email})).length>0)&&{sended:!1,emailError:Object(S.u)("$__emailAlreadyInUse")}),(null===(o=g[r])||void 0===o?void 0:o.nomecompleto.split("").length)<3&&{sended:!1,nameError:Object(S.u)("$__minimalNameField")}),!n&&{sended:!1,emailErrorInv:Object(S.u)("$__invalidEmail")}))))[r].sended){t.next=28;break}return c={name:g[r].nomedeexibi\u00e7\u00e3o||"".concat(g[r].nomecompleto.split(" ")[0]," ").concat(g[r].nomecompleto.split(" ")[1]?g[r].nomecompleto.split(" ")[1]:"").trim(),fullName:g[r].nomecompleto,email:g[r].email,line:g[r].ramal||null,phone:g[r].phone||null,obs:g[r].observa\u00e7\u00f5es||null},g[r]["departamento/grupo"]&&l.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})).length>0&&(c.groups=Array.from(l.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})))),t.prev=13,t.next=16,De.a.post("user/addImport",c);case 16:(u=t.sent)&&(De.a.post("user/accessSendInvite",{_id:u.data._id}),T&&T.current&&T.current.scrollToItem(r),_(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1))),t.next=26;break;case 20:t.prev=20,t.t0=t.catch(13),i[r]={sended:!1,nameError:Object(S.u)("$__serverError")},T&&T.current&&T.current.scrollToItem(r),_(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1));case 26:t.next=31;break;case 28:T&&T.current&&T.current.scrollToItem(r),_(i),g.length===r+1&&(s(!1),e.onAdding&&e.onAdding(!1));case 31:case"end":return t.stop()}}),t,null,[[13,20]])})));return function(){return t.apply(this,arguments)}}(),X={display:"flex",justifyContent:"flex-start",alignItems:"center",textAlign:"left",flex:1,border:"1px solid #ebebeb",fontWeight:"bold",alignSelf:"stretch",overflow:"hidden"},K=function(e){var t="";switch(e.name){case"nomecompleto":t=Object(S.u)("$__completeName");break;case"nomedeexibi\xe7\xe3o":t=Object(S.u)("$__showName");break;case"email":t=Object(S.u)("$__email");break;case"departamento/grupo":t=Object(S.u)("$__department/group");break;case"ramal":t=Object(S.u)("$__branchLine");break;case"observa\xe7\xf5es":t=Object(S.u)("$__observation");break;case"celular":t=Object(S.u)("$__phone")}return a.a.createElement("div",{style:X},a.a.createElement("p",{style:{width:"100%",alignSelf:"center",padding:"0px",overflow:"hidden",margin:"0px 0px 0px 10px"}},t))};return a.a.createElement(N.a,null,a.a.createElement(oc.a,{item:!0,xs:12,style:{justifyContent:"center",padding:"0px 4px 0px",position:"re\xe7ative"}},c&&a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",zIndex:"99"}}),0===g.length&&a.a.createElement(fs,{message:Object(S.u)("$__finalMsgUserImportConcluded"),title:Object(S.u)("$__concluded"),icon:"done",color:"green",resetComponent:r}),H?a.a.createElement(fs,{message:Object(S.u)("$__finalMsgUserImportError"),title:Object(S.u)("$__error"),icon:"warning",color:"red",resetComponent:r}):a.a.createElement("div",null,g.length>0&&a.a.createElement("div",{id:"table-container",style:{marginBottom:"5px",height:"80vh",maxHeight:"600px",overflow:"hidden"}},a.a.createElement("div",{style:{overflowY:"scroll"}},a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",height:"50px",color:"#141414"}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},X),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",justifyContent:"center",display:"flex"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px"}},Object(S.u)("$__remove"))),P.length>0&&P.map((function(e,t){return a.a.createElement(K,{name:e,key:t})})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},X),{},{width:"60px",border:"1px solid #ebebeb",flex:"none",display:"flex"})},a.a.createElement("p",{style:{marginLeft:"2px",alignSelf:"center",padding:"0px",margin:"0px 0px 0px 10px"}}," ",Object(S.u)("$__stats"))))),g.length>0&&a.a.createElement(pi.a,null,(function(e){var t=e.height,r=e.width;return a.a.createElement(di.a,{itemData:g,height:t,itemCount:g.length,itemSize:44,width:r,ref:T},(function(e){var t,r=e.data,n=e.index,o=e.style;return a.a.createElement("div",{key:"a_".concat(n,"_").concat(Math.random(0,99999999))},a.a.createElement(ps,{selected:!(!j||!j.includes(n)),column:P,handleDataChange:function(e,t,r){return q(e,t,r)},handleCheckboxChange:U,style:o,add:c,data:r,data1:x,dataError:Y[n],usuario:r[n],index:n,isActive:!!(x&&r.length>0&&(null===(t=x[n])||void 0===t?void 0:t.sended))}))}))}))))),a.a.createElement(oc.a,{item:!0,xs:12,style:{borderTop:"1px solid #ebebeb",display:"flex",justifyContent:"right",marginTop:"10px"}},!H&&!c&&a.a.createElement(a.a.Fragment,null,a.a.createElement(V,{handleEvent:function(){b(g.filter((function(e,t){return!j.includes(t)}))),E([])},name:Object(S.u)("$__removeSelected"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black",justifySelf:"left"}}),a.a.createElement(V,{handleEvent:function(){J(0),s(!0)},name:Object(S.u)("$__add"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black"}})," ")))},gs=r(1160),bs=r.n(gs),ys=r(1161),vs=r.n(ys),xs=Object(u.b)((function(e){return{importUsers:e.controls.importUsers}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(n.useState)([]),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],f={padding:"5px 10px"},h={borderBottom:"1px solid #dddddd"},g={padding:"5px 25px",fontWeight:"bold",backgroundColor:"#f2f2f2"};return e.importUsers?a.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(250,250,250,0.7)",backdropFilter:"blur(3px)",padding:33,margin:"auto",display:"flex",alignItems:"center",justifyContents:"center"}},a.a.createElement(Rr.a,{style:{maxWidth:"1400px",backgroundColor:"#ffffff",borderRadius:"5px",border:"2px solid #dedede",position:"relative",margin:"auto"}},a.a.createElement(qn.a,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex"}},o.length>0&&!u&&a.a.createElement(re.a,{onClick:function(){return i([])},style:{alignSelf:"left",color:Object(S.d)("menu"),left:"25px",top:"25px",position:"absolute"},size:"30px"},"arrow_back"),!u&&a.a.createElement(re.a,{onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{importUsers:!1}))},style:{alignSelf:"left",color:Object(S.d)("menu"),right:"25px",top:"25px",position:"absolute"},size:"30px"},"close"),a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"download"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",width:"240px",color:Object(S.d)("menu")}},Object(S.u)("$__importUsers"))),!o.length>0?a.a.createElement(a.a.Fragment,null," ",a.a.createElement(qn.a,{item:!0,xs:6,style:{}},a.a.createElement(qn.a,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"task"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"10px"}},Object(S.u)("$__beforeImportUser"))),a.a.createElement(qn.a,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginBottom:"10px"}},Object(S.u)("$__importUsersDescp"),a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.u)("$__email"),'" '),Object(S.u)("$__and")," ",a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.u)("$__completeName"),'"'),"."),a.a.createElement("a",{href:bs.a,style:{fontSize:"17px"},target:"_blank",rel:"noopener noreferrer",download:"Arquivo-Amostra"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.u)("$__clickToDownloadXLSX")))),a.a.createElement(qn.a,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginTop:"10px"}},Object(S.u)("$__importUsersSecondDescp")),a.a.createElement("a",{href:vs.a,style:{fontSize:"16px"},target:"_blank",rel:"noopener noreferrer",download:"Arquivo-Amostra-Completo"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.u)("$__clickToDownloadXLSXOptions")))),a.a.createElement(qn.a,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(re.a,{style:{alignSelf:"center",color:Object(S.d)("menu")},size:"30px"},"checklist"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",color:Object(S.d)("menu")}},Object(S.u)("$__fieldOptions"))),a.a.createElement(qn.a,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",marginBottom:"60px"}},a.a.createElement("table",{style:{borderCollapse:"collapse",fontSize:"0.9em",fontFamily:"sans-serif",width:"100%",minHeight:"300px",height:"100%",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("tbody",null,a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.u)("$__phone")),a.a.createElement("td",{style:g}," ",Object(S.u)("$__phoneDescpImportUsers"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.u)("$__branchLine")),a.a.createElement("td",{style:g},Object(S.u)("$__branchLineDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.u)("$__observation")),a.a.createElement("td",{style:g},Object(S.u)("$__observationImportDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.u)("$__department/group")),a.a.createElement("td",{style:g},Object(S.u)("$__department/groupDescp"))),a.a.createElement("tr",{style:h},a.a.createElement("th",{style:f},Object(S.u)("$__showName")),a.a.createElement("td",{style:g}," ",Object(S.u)("$__showNameDescp"))))))),a.a.createElement(qn.a,{item:!0,xs:6,style:{border:"1px solid #ebebeb",display:"flex",justifyContent:"center"}},a.a.createElement(ds,{handleData:function(e){var t=e.reduce((function(e,t){var r=Object.entries(t).reduce((function(e,t){var r=Object(m.a)(t,2),n=r[0],a=r[1];return e[n.toLowerCase().replace(/\s/g,"")]=a.toString().trim(),e}),{});return[].concat(Object(A.a)(e),[r])}),[]);i(t)}}))):a.a.createElement(ms,{dataUser:o,resetComponent:function(){i([]),d(!1)},onAdding:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d(e)}}))):a.a.createElement(a.a.Fragment,null)}));var _s=Object(u.b)((function(e){return{users:e.db.users,page:e.db.history,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ss)((function(e){var t,r,n=a.a.useState(!1),o=Object(m.a)(n,1)[0],i=a.a.useState(!1),s=Object(m.a)(i,1)[0],u=l.a.getState(),d=u.db,p=u.session,f=d.users,h=Object(S.j)(),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=Object.keys(f).filter((function(e){return!f[e].deleted})).map((function(e){return f[e]})),v=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),x=e.searchs&&e.searchs[v]?e.searchs[v]:{};x.text&&(b=b.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(x.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(x.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(x.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===g[0]&&"users"===g[1]&&(b=b.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===g[0]&&"units"===g[1]&&(b=b.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),(null===x||void 0===x||null===(t=x.userGroups)||void 0===t?void 0:t.length)>0&&(b=b.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return x.userGroups.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var _=Object.keys(f).map((function(e){return f[e]}));if("tab"===g[0]&&"units"===g[1]&&g[2]&&36===g[2].length&&(_=_.filter((function(e){return"user"===e.type&&e._parent===g[2]})).map((function(e){return e}))),(null===x||void 0===x?void 0:x.users)&&(null===x||void 0===x?void 0:x.userGroup.length)>0&&(_=_.filter((function(e){return e.groups.filter((function(e){return e.value===x.users.userGroup[0].value})).length>0})).map((function(e){return e}))),x.text&&(_=_.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(x.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(x.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(x.text.toLowerCase())>-1)})).map((function(e){return e}))),(null===x||void 0===x||null===(r=x.tags)||void 0===r?void 0:r.length)>0&&(_=_.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return x.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),h&&!h.owner&&!h.user)return a.a.createElement(ls,null);window.location.hash.split("/")[0].replace("#","")||c.a.push("c#tab/units");var O=function(e,t){var r,n,a,i;return!!(l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.a.getState().db.users[t].groups.length>0&&l.a.getState().db.users[t].groups.filter((function(t){return t.value===e.value})).length>0&&(!x.text||x.text&&(l.a.getState().db.users[t].name.toLowerCase().indexOf(x.text.toLowerCase())>-1||(null===(r=l.a.getState().db.users[t])||void 0===r||null===(n=r.email)||void 0===n?void 0:n.toLowerCase().indexOf(x.text.toLowerCase()))>-1))&&(!x.tags||(null===(a=l.a.getState().db.users[t])||void 0===a||null===(i=a.tags)||void 0===i?void 0:i.filter((function(e){return x.tags.filter((function(t){return t.value===e.value})).length>0})).length)>0)&&(!o&&(!l.a.getState().db.users[t]._parent||l.a.getState().db.users[t]._parent===p.account)||o&&l.a.getState().db.users[t]._parent&&l.a.getState().db.users[t]._parent!==p.account)&&(!s&&!l.a.getState().db.users[t].deleted||s&&l.a.getState().db.users[t].deleted))};return a.a.createElement("div",null,a.a.createElement(Ea,null),a.a.createElement("div",null,a.a.createElement(_i,Object.assign({},"tab"!==g[0]||"departments"!==g[1]?{fields:["text","tags","userGroups"]}:{fields:["text","tags"]},{nodeId:v,showFilters:!0,style:{marginLeft:7},onChange:function(e){},title:{text:Object(S.u)("$__name")}})),a.a.createElement(Rr.a,null,"tab"===g[0]&&"departments"===g[1]?a.a.createElement("div",null,a.a.createElement("div",null,l.a.getState().db.userGroup.filter((function(e){return Object.keys(l.a.getState().db.users).filter((function(t){return O(e,t)})).length>0})).map((function(e){var t=Object.keys(l.a.getState().db.users).filter((function(t){return O(e,t)}));return a.a.createElement("div",{key:e.value,style:{width:"100%",padding:7,marginBottom:77}},a.a.createElement(ge.a,Object.assign({title:e.label,icon:e.icon||null,color:Object(S.d)("menu"),style:{padding:"7px"}},h&&(h.userAdmin||h.userModerate)?{iconOnEditable:!0,editable:!0,onEdit:function(e){},placeholder:Object(S.u)("$__groupName")}:{})),a.a.createElement(Rr.a,null,t.sort((function(e,t){var r=l.a.getState().db.users[e].name.toLowerCase(),n=l.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(t){return a.a.createElement(qn.a,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(ts,{data:l.a.getState().db.users[t]}))}))))})))):a.a.createElement(a.a.Fragment,null,b.sort((function(e,t){return e&&e.name&&e.name<t.name||f&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!g[2]||g[2]&&e._id===g[2]?a.a.createElement(qn.a,{key:e._id,xs:12,sm:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:6,md:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:4,lg:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:4,xl:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:3,style:{minWidth:"300px"}},a.a.createElement(ts,{data:e,expanded:!!(g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]])})):!g[2]&&a.a.createElement(qn.a,{key:e._id,xs:12,sm:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:6,md:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:4,lg:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:3,xl:g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]]?12:3},a.a.createElement(ts,{data:e,expanded:!!(g[1]&&g[2]&&"units"===g[1]&&36===g[2].length&&d.users[g[2]])}))})),"tab"===g[0]&&"units"===g[1]&&g[2]&&36===g[2].length&&_.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||f&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return a.a.createElement(qn.a,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ts,{data:e}))}))))),a.a.createElement(xs,null))}))),Os=r(1856),ws=r(1882),js=["label","icon","defaultChecked"];function Es(){Es=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ks=Object(B.a)({formControl:{color:"rgb(150,150,150)",width:"100%",padding:"0",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",fontSize:"14px","& label":{marginTop:"5px"},"& .Mui-focused":{color:"rgb(150,150,150)"},"& +:after":{border:"1px solid rgb(192,178,131)"},"& +:before":{borderBottom:"1px solid rgb(192,178,131)"}},switch:{"& + .MuiSwitch-track":{backgroundColor:"rgb(158, 158, 158)"},"& .MuiSwitch-thumb":{backgroundColor:"rgb(125, 125, 125)"},"& .Mui-checked":{"& + .MuiSwitch-track":{backgroundColor:"rgb(192, 178, 131)"},"& .MuiSwitch-thumb":{backgroundColor:"rgb(192, 178, 131)"},"& .MuiSvgIcon-root":{backgroundColor:"rgb(192, 178, 131)",borderRadius:"50%",width:"20px",height:"20px",color:"rgb(192, 178, 131)"}},"& .Mui-disabled":{"& + .MuiSwitch-track":{opacity:.5},"& .MuiSvgIcon-root":{backgroundColor:"rgb(192, 178, 131)",borderRadius:"50%",width:"14px !important",height:"14px !important",padding:"3px",color:"#ffffffb0 !important",transform:"translate(0, 0, 0, 0.2em)"}}},labelSwitch:{marginLeft:"15px"}}),Ss=function(e){var t=e.label,r=(e.icon,e.defaultChecked),o=Object(ft.a)(e,js),i=Object(n.useState)(r),c=Object(m.a)(i,2),l=c[0],s=c[1],u=ks();return a.a.createElement(Xr.a,{control:a.a.createElement(Os.a,Object.assign({className:u.switch,color:"default",checked:l,onChange:function(e){s(e.target.checked)}},o)),label:t})},Ls=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,o=ks(),i=Object(n.useState)((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t._id)||Object(Nr.a)()),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)(""),g=Object(m.a)(d,2),b=g[0],y=g[1],v=Object(n.useState)(""),x=Object(m.a)(v,2),_=x[0],O=x[1],w=Object(n.useState)([]),j=Object(m.a)(w,2),E=j[0],k=j[1],L=Object(n.useState)({}),C=Object(m.a)(L,2),I=C[0],T=C[1],F=Object(n.useState)({type:"text"}),D=Object(m.a)(F,2),N=D[0],P=D[1];function $(e,t){var r=Object(A.a)(E),n=r.splice(e,1)[0];r.splice(t,0,n),k(r)}Object(n.useEffect)((function(){var t,r,n;u((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t._id)||Object(Nr.a)()),y((null===(r=e.data)||void 0===r?void 0:r.name)?e.data.name:""),k((null===(n=e.data)||void 0===n?void 0:n.elements)?JSON.parse(e.data.elements):[])}),[e.data]);var M=function(){var t=Object(f.a)(Es().mark((function t(r){return Es().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:De.a.post("forms/add",{_id:s,name:b,elements:JSON.stringify(E)}),e.reduxFunction("ASYNC","SET_FORMS",Object(p.a)(Object(p.a)({},l.a.getState().forms),{},Object(h.a)({},s,{_id:s,name:b,elements:JSON.stringify(E)}))),e.onClose&&r&&e.onClose();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement(R.a,{onClickAway:function(){}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden"})},a.a.createElement("div",{style:{width:"100%",maxWidth:"98vw",position:"absolute",zIndex:"9",borderRadius:"5px",height:"auto",margin:"0px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement(Rr.a,{style:{height:"100%",justifyContent:"flex-end",margin:"0px",width:"100%"}},a.a.createElement(qn.a,{item:!0,xs:8,style:{backgroundColor:"#fafbfc",overflowY:"scroll",height:"100vh"}},a.a.createElement("h1",{style:{margin:"20px 15px"}},b),a.a.createElement("div",{id:"form",style:{padding:"10px 15px",display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column",gap:"5px",paddingBottom:"50px"}},null===E||void 0===E?void 0:E.map((function(e,t){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",alignItems:"center",marginBottom:"10px",width:"100%"},onMouseOver:function(){return T(Object(p.a)(Object(p.a)({},I),{},Object(h.a)({},e.id,!0)))},onMouseLeave:function(){return T(Object(p.a)(Object(p.a)({},I),{},Object(h.a)({},e.id,!1)))},key:e.id},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%"}},a.a.createElement("label",{htmlFor:e.id,style:{marginBottom:"5px",display:"flex"}},e.name,e.required?"*":"",":"),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"radio"===e.type||"checkbox"===e.type?a.a.createElement("div",{style:{flexDirection:"column",width:"100%"}},null===e||void 0===e?void 0:e.items.map((function(t,r){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:"ITEM_".concat(e.id,"_").concat(r)},a.a.createElement("input",{type:e.type,id:t,name:e.id,required:!!e.required}),a.a.createElement("label",{htmlFor:t,style:{color:"#aaa"}},t))}))):"textarea"===e.type?a.a.createElement("textarea",{rows:4,required:!!e.required,id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}):a.a.createElement("input",{type:e.type,required:!!e.required,id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center",color:"rgb(171 171 171)"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},I[e.id]?a.a.createElement(a.a.Fragment,null,0===t?null:a.a.createElement(re.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"},onClick:function(){return $(t,t-1)}},"arrow_drop_up"),t===E.length-1?null:a.a.createElement(re.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"},onClick:function(){return $(t,t+1)}},"arrow_drop_down"),a.a.createElement(re.a,{style:{cursor:"pointer"},onClick:function(){return function(e){k(E.filter((function(t){return t.label!==e})))}(e.id)}},"delete"),a.a.createElement(re.a,{style:{cursor:"pointer"},onClick:function(){return P(e)}},"edit")):a.a.createElement(a.a.Fragment,null))))))})))),a.a.createElement(qn.a,{item:!0,xs:4,style:{backgroundColor:"#fafbfc",minHeight:"100vh",height:"100%",display:"flex",flexDirection:"row"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",width:"100%",borderLeft:"3px solid rgb(192,178,131)"}},a.a.createElement("div",{style:{height:"50px",minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"space-between",width:"calc(100% - 0px)",marginTop:"-4px"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(re.a,{style:{margin:"0px 10px"}},"edit_note"),a.a.createElement("div",{style:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"bold",color:"rgb(1, 30, 65)"}},Object(S.u)("$__createForm"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"}},(null===E||void 0===E?void 0:E.length)>0&&b?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"rgb(192, 178, 131)",opacity:"1",cursor:"pointer"},onClick:function(){M()}},a.a.createElement(re.a,null,"save")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"green",opacity:"1",cursor:"pointer"},onClick:function(){M(!0)}},a.a.createElement(re.a,null,"playlist_add_check"))):null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"25px",width:"25px",fontSize:"25px",color:"lightgrey",opacity:"1",cursor:"pointer"},onClick:e.onClose?function(){return e.onClose()}:null},a.a.createElement(re.a,null,"cancel")))),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",right:"0px",padding:"4px 25px",position:"relative",backgroundColor:"rgb(192,178,131)",marginBottom:"10px",alignItems:"center",color:"#fff"}}),a.a.createElement("div",{style:{maxHeight:"75vh",overflowY:"auto",padding:"0px 15px",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",gap:"10px"}},a.a.createElement("div",null,a.a.createElement(W.a,{className:o.formControl,variant:"standard"},a.a.createElement(U.a,{htmlFor:"titleForm",className:o.formControl},Object(S.u)("$__formName")),a.a.createElement(q.a,{id:"titleForm",type:"text",onChange:function(e){return y(e.target.value)},value:b})),a.a.createElement("fieldset",{style:{borderRadius:10,padding:7,marginTop:33}},a.a.createElement("legend",null,Object(S.u)("$__field")),a.a.createElement("form",{id:"adicionar",onSubmit:function(e){e.preventDefault()}},a.a.createElement(W.a,{className:o.formControl,variant:"standard"},a.a.createElement(U.a,{htmlFor:"title",className:o.formControl},Object(S.u)("$__title")),a.a.createElement(q.a,{id:"title",type:"text",onChange:function(e){P(Object(p.a)(Object(p.a)({},N),{},{name:e.target.value}))},value:N.name||""})),a.a.createElement("div",null,a.a.createElement(W.a,{variant:"standard",fullWidth:!0,className:o.formControl},a.a.createElement(U.a,{id:"typeField",className:o.formControl},Object(S.u)("$__type")),a.a.createElement(ws.a,{value:N.type||"text",onChange:function(e){P((function(t){return Object(p.a)(Object(p.a)({},t),{},{type:e.target.value},"radio"===e.target.value||"checkbox"===e.target.value?{items:N.items||[""]}:{})}))},labelId:"typeField",id:"typeField",label:"Tipo de campo"},a.a.createElement(G.a,{value:"text"},Object(S.u)("$__shortText")),a.a.createElement(G.a,{value:"textarea"},Object(S.u)("$__longText")),a.a.createElement(G.a,{value:"radio"},Object(S.u)("$__selection")),a.a.createElement(G.a,{value:"checkbox"},Object(S.u)("$__multiSelection")),a.a.createElement(G.a,{value:"date"},Object(S.u)("$__date")),a.a.createElement(G.a,{value:"number"},Object(S.u)("$__number")))),"radio"===N.type||"checkbox"===N.type?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{htmlFor:"legendRadio"},Object(S.u)("$__options")),null===N||void 0===N||null===(r=N.items)||void 0===r?void 0:r.map((function(e,t){return a.a.createElement("div",{style:{marginBotton:15,width:"100%",clear:"both",position:"relative"},key:t},a.a.createElement(Oe.a,{id:"sideModule_user_fullName",label:"".concat(Object(S.u)("$__option",1)," ").concat(t+1),variant:Object(S.d)("fieldVariant"),name:"option".concat(e+1),InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"delete",color:"red",onClick:function(){var e=Array.from(N.items);1===e.length?e[0]="":e.splice(t,1),P(Object(p.a)(Object(p.a)({},N),{},{items:e}))}})),onChange:function(e){var r=Array.from(N.items);r[t]=e.target.value,0===r.filter((function(e){return""===e})).length&&r.push(""),P(Object(p.a)(Object(p.a)({},N),{},{items:r}))}},value:N.items[t],placeholder:Object(S.u)("$__optionText",1),autoFocus:0===t}))})))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Ss,{label:Object(S.u)("$__required"),defaultChecked:!0,onClick:function(){P(Object(p.a)(Object(p.a)({},N),{},{required:!N.required}))},checked:!!(null===N||void 0===N?void 0:N.required)}),E.length>0?a.a.createElement(Ss,{label:Object(S.u)("$__dependsOnAnotherAnswew"),onClick:function(){P(Object(p.a)(Object(p.a)({},N),{},{depends:!N.depends}))},checked:!!(null===N||void 0===N?void 0:N.depends)}):a.a.createElement(a.a.Fragment,null),(null===N||void 0===N?void 0:N.depends)?a.a.createElement("div",null,E.map((function(e){return a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"},key:e.id},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 0px"}},a.a.createElement("input",Object.assign({type:"radio",id:"R_".concat(e.id),name:"dependsOn"},N&&N.dependsOn&&String(N.dependsOn)===String(e.id)?{defaultChecked:!0}:{},{onClick:function(){P(Object(p.a)(Object(p.a)({},N),{},{dependsOn:e.id}))}})),a.a.createElement("label",{htmlFor:"R_".concat(e.id)},e.name)),N&&N.dependsOn&&N.dependsOn===e.id?a.a.createElement(a.a.Fragment,null,"radio"===e.type||"checkbox"===e.type?null===e||void 0===e?void 0:e.items.map((function(t,r){return a.a.createElement("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",gap:"5px",margin:"3px 15px"},key:"ITEM_".concat(e.id,"_").concat(r)},a.a.createElement("div",null,a.a.createElement("input",Object.assign({type:e.type,id:"R_".concat(t),name:e.id},"checkbox"===e.type&&0===r&&(!N.dependsValue||N.dependsValue&&0===N.dependsValue.length||N.dependsValue&&1===N.dependsValue.length&&N.dependsValue.indexOf(t)>-1)?{defaultChecked:!0}:{},"radio"===e.type?{checked:!(!N||!N.dependsValue||N.dependsValue!==t)}:{},{onClick:function(r){var n=t;"checkbox"===e.type&&(N&&(!N.dependsValue||N.dependsValue&&-1===N.dependsValue.indexOf(t))?(n=Array.from(N.dependsValue||[])).push(t):N&&N.dependsValue&&N.dependsValue.indexOf(t)>-1&&(n=Array.from(N.dependsValue)).splice(N.dependsValue.indexOf(t),1)),P(Object(p.a)(Object(p.a)({},N),{},{dependsValue:n}))}})),a.a.createElement("label",{htmlFor:"R_".concat(t),style:{color:"#aaa"}},t)))})):"textarea"===e.type?a.a.createElement("textarea",{rows:4,onChange:function(e){return P(Object(p.a)(Object(p.a)({},N),{},{dependsValue:e.target.value}))},id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}}):a.a.createElement("input",{type:e.type,onChange:function(e){return P(Object(p.a)(Object(p.a)({},N),{},{dependsValue:e.target.value}))},id:e.id,style:{borderRadius:"5px",width:"100%",height:"auto",resize:"none",padding:"10px 5px",border:"1px solid rgb(150,150,150)",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif'}})):null)}))):null,a.a.createElement("button",{onClick:function(){!function(){var e,t=N.id||"".concat(Math.random().toString(36).slice(2).substr(0,4)).concat(Math.floor(Date.now()*Math.random()).toString(36).substr(0,4)),r=Object(p.a)(Object(p.a)({},N),{},{id:t});if(r.type||(r.type="text"),(null===r||void 0===r||null===(e=r.items)||void 0===e?void 0:e.length)>0&&(r.items=Array.from(r.items.filter((function(e){return""!==e&&void 0!==e&&null!==e})))||null),("checkbox"===r.type||"radio"===r.type)&&0===r.items.filter((function(e){return""!==e&&void 0!==e&&null!==e})).length)return O(Object(S.u)("$__formWarningOptionsListRequire")),void setTimeout((function(){O("")}),4e3);if(!r.type||!r.name)return O(Object(S.u)("$__formWarningNameAndType")),void setTimeout((function(){O("")}),4e3);if(E.filter((function(e){return e.name===N.name&&e.id!==N.id})).length>0)return O("O t\xedtulo para o campo j\xe1 foi definido para outro campo, defina outro nome!"),O(Object(S.u)("$__formWarningFieldNameUsed")),void setTimeout((function(){O("")}),4e3);if(0===E.filter((function(e){return e.id===t})).length)k([].concat(Object(A.a)(E),[r]));else{var n=Array.from(E);n=Array.from(n.map((function(e){return e.id===N.id&&(e=r),e}))),k(Object(A.a)(n))}P({})}()},style:{padding:"7px 30px",border:"rgb(1, 30, 65) 1px solid",background:"linear-gradient(90deg, rgb(1, 30, 65) 0%, rgb(0, 49, 112) 100%)",color:"rgb(192,178,131)",borderRadius:"4px",fontWeight:"600",margin:"10px 0",width:"100%",cursor:"pointer"}},N.id?Object(S.u)("$__save"):Object(S.u)("$__add"))))))),a.a.createElement("p",{style:{color:"red",fontSize:"0.8rem",textAlign:"center"}},_))))))))}));var Cs=Object(u.b)((function(e){return{forms:e.forms}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState({}),c=Object(m.a)(i,2),l=c[0],s=c[1],u=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();return a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",grid:5}},a.a.createElement(_i,{nodeId:u,fields:["text"],showFilters:!0,style:{marginLeft:7},onChange:function(e){o(e)},title:{text:Object(S.u)("$__formName")}}),a.a.createElement(yo.a,{text:Object(S.u)("$__newForm"),icon:"add",onClick:function(){s({new:!0})}})),a.a.createElement(Rr.a,{style:{margin:0,marginTop:33,padding:0,marginLeft:-15}},e.forms&&Object.keys(e.forms).filter((function(t){return!n||!n.text||n&&n.text&&e.forms[t]&&e.forms[t].name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(t,r){return a.a.createElement(qn.a,{xs:12,sm:12,md:3,lg:3,xl:2,key:"".concat(t,"-").concat(r)},a.a.createElement(Ct.a,{style:{marginBottom:15}},a.a.createElement("div",{style:{padding:7,cursor:"pointer"},onClick:function(){s(e.forms[t])}},a.a.createElement("div",{style:{fontSize:"18px",color:"gray",fontWeight:"bold"}},e.forms[t].name),a.a.createElement("div",{style:{fontSize:"12px",color:"gray",marginTop:15}},Object(S.u)("$__items"),": ",JSON.parse(e.forms[t].elements).length))))}))),Object.keys(l).length>0?a.a.createElement(Ls,{data:l,onClose:function(){s({})}}):a.a.createElement(a.a.Fragment,null))})),Is=r(1162);r(1101);var Ts=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Fe)((function(e){var t=a.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(m.a)(t,2),n=r[0],o=r[1];return a.a.createElement("div",null,a.a.createElement(Is.a,{cvc:n.cvc,expiry:n.expiry,focused:n.focus,name:n.name,number:n.number}),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.u)("$__paymentPreffer")),a.a.createElement("div",{style:{borderRadius:15,background:Object(S.d)("ColumnTitleColor"),color:"#FFFFFF",boxShadow:"0 0 3px 7px rgba(0,0,0,0.03)",padding:15}}),a.a.createElement(Oe.a,{id:"sideModule_user_displayName",label:Object(S.u)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},{number:e.target.value}))}},value:n&&n.number?n.number:"",placeholder:Object(S.u)("$__cardNumber",1)})),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.u)("$__forceChangePassword")),a.a.createElement(Te.a,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__forceChangePasswordDescription")))})));function Fs(){Fs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Ds=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=function(){var e=Object(f.a)(Fs().mark((function e(){return Fs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l.a.getState().functions.socket.emit("data",{module:"galaxPay",method:"post",action:"integration"},{action:"reqData",accountData:l.a.getState().session.GlobalData},(function(e){console.log(e),e.error&&(console.log("companyDataError",e.error),console.log(e))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Ts,null),a.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));function Ns(){Ns=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var As=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!0),d=Object(m.a)(u,2),p=d[0],h=d[1];a.a.useEffect((function(){g()}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var g=function(){var e=Object(f.a)(Ns().mark((function e(){var t,r,n,a,i,c=arguments;return Ns().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>0&&void 0!==c[0]&&c[0],n=r,e.next=4,Pe.a.post("/ReqIntegrationToken");case 4:if(a=e.sent,n||!a||!(null===(t=a.data)||void 0===t?void 0:t.token)){e.next=9;break}o({secretKey:"Bearer ".concat(a.data.token)}),e.next=13;break;case 9:return e.next=11,De.a.post("/api/token");case 11:(i=e.sent)&&o({secretKey:"Bearer ".concat(i.data.token)});case 13:h(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},"Integra\xe7\xf5es",a.a.createElement(N.a,null,p?a.a.createElement(ct.a,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginTop:50}},a.a.createElement("legend",null,Object(S.u)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__authorizationToken",1),variant:Object(S.d)("fieldVariant"),name:"secretKey",InputLabelProps:{shrink:!0},InputProps:{multiline:!0,minRows:3,autoComplete:"new-password",type:l?"text":"password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(n.secretKey)}},a.a.createElement(re.a,{icon:"content_copy"})),a.a.createElement(re.a,{icon:l?"visibility_off":"visibility",onClick:function(){s((function(e){return!e}))}}))},value:"".concat(n&&n.secretKey?n.secretKey:""),placeholder:Object(S.u)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(S.u)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.u)("$__newToken"),text:Object(S.u)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(S.c)({message:Object(S.u)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),Ps=r(391),$s=r.n(Ps);function Ms(){Ms=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var zs=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(t.GlobalData?t.GlobalData:{}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState({historyEditor:null}),b=Object(m.a)(g,2),y=b[0],v=b[1];a.a.useEffect((function(){i(t.GlobalData?t.GlobalData:{}),d(t.GlobalData?t.GlobalData:{});var e=z.EditorState.createEmpty(),r=z.EditorState.createEmpty(),n=z.EditorState.createEmpty(),a=z.EditorState.createEmpty(),o=z.EditorState.createEmpty(),c=z.EditorState.createEmpty();t.GlobalData.history&&(e=$s()("<div>".concat(t.GlobalData.history,"</div>")),e=z.ContentState.createFromBlockArray(e.contentBlocks),e=z.EditorState.createWithContent(e)),t.GlobalData.strategicStatement&&(o=$s()("<div>".concat(t.GlobalData.strategicStatement,"</div>")),o=z.ContentState.createFromBlockArray(o.contentBlocks),o=z.EditorState.createWithContent(o)),t.GlobalData.values&&(c=$s()("<div>".concat(t.GlobalData.values,"</div>")),c=z.ContentState.createFromBlockArray(c.contentBlocks),c=z.EditorState.createWithContent(c)),t.GlobalData.vocation&&(r=$s()("<div>".concat(t.GlobalData.vocation,"</div>")),r=z.ContentState.createFromBlockArray(r.contentBlocks),r=z.EditorState.createWithContent(r)),t.GlobalData.legacy&&(n=$s()("<div>".concat(t.GlobalData.legacy,"</div>")),n=z.ContentState.createFromBlockArray(n.contentBlocks),n=z.EditorState.createWithContent(n)),t.GlobalData.message&&(a=$s()("<div>".concat(t.GlobalData.message,"</div>")),a=z.ContentState.createFromBlockArray(a.contentBlocks),a=z.EditorState.createWithContent(a)),v({history:e,vocation:r,legacy:n,message:a,values:c,strategicStatement:o})}),[]);var x=function(){var t=Object(f.a)(Ms().mark((function t(){var r;return Ms().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(o).forEach((function(e){!o[e]||u[e]&&JSON.stringify({a:o[e]})===JSON.stringify({a:u[e]})||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e])))})),console.log(r),t.prev=3,t.next=6,De.a.post("account/save",r);case 6:t.sent&&(i(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),d(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(Rr.a,{style:{marginTop:15}},a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__adminMessage")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.message,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{message:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__strategicStatement")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.strategicStatement,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{strategicStatement:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__vocation")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.vocation,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{vocation:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__history")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.history,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{history:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__values")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.values,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{values:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:6,lg:6,xl:6,style:{marginBottom:33}},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,Object(S.u)("$__legacy")),a.a.createElement(N.a,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.legacy,onEditorStateChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{legacy:M()(Object(z.convertToRaw)(e.getCurrentContent()))})),v(Object(p.a)(Object(p.a)({},y),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(o)!==JSON.stringify(u)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){x()}})):a.a.createElement(a.a.Fragment,null))}));function Ys(e){return a.a.createElement("div",{style:{position:"relative",height:5,backgroundColor:"lightgray",width:"100%",overflow:"hidden",borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}},a.a.createElement("div",{style:{position:"absolute",top:1,left:1,bottom:1,width:"calc(".concat(e.value?e.value:0,"% - 2px)"),overflow:"hidden",background:"".concat(e.background?e.background:Object(S.d)("ColumnTitleColor")),borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}}))}var Bs=r(875),Rs=r(229);function Gs(){Gs=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Hs=Object(u.b)((function(e){return{session:e.session}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=l.a.getState().session,r=a.a.useState(t.GlobalData?t.GlobalData:{}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(t.GlobalData?t.GlobalData:{}),s=Object(m.a)(c,2),u=s[0],d=s[1],g=function(){var r=Object(f.a)(Gs().mark((function r(){var n,a,i,c;return Gs().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n={},Object.keys(o).forEach((function(e){if("file"===e)a=o[e];else if("document"===e){var t=!1;11===o[e].length&&Bs.b.isValid(o[e])&&(t=!0),14===o[e].length&&Bs.a.isValid(o[e])&&(t=!0),t?n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e])):Object(S.c)({message:"".concat(Object(S.u)("$__".concat(e)),": ").concat(Object(S.u)("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!o[e]||u[e]&&JSON.stringify({a:o[e]})===JSON.stringify({a:u[e]})?o[e]||"_id"===e||Object(S.c)({message:"".concat(Object(S.u)("$__".concat(e)),": ").concat(Object(S.u)("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e,o[e]&&"string"===typeof o[e]?o[e].trim():o[e]))})),r.prev=2,i=l.a.getState().functions.socket,!a){r.next=10;break}return r.next=7,Object(Rs.a)(t.account,a);case 7:r.t0=r.sent,r.next=11;break;case 10:r.t0=!0;case 11:(c=r.t0)&&("true"!==String(c)&&(n=Object(p.a)(Object(p.a)({},n),{},{image:c})),i.emit("data",{module:"account",method:"post",action:"save"},n,(function(t){t.error?console.log("companyDataError",t.error):(e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),n)})),d(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),n)))}))),r.next=18;break;case 15:r.prev=15,r.t1=r.catch(2),console.log(r.t1);case 18:case"end":return r.stop()}}),r,null,[[2,15]])})));return function(){return r.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(_e.a,{maxWidthOrHeight:600,img:o&&o.image?o.image:null,onChange:function(e,t){i(Object(p.a)(Object(p.a)({},o),{},{file:t}))},avatar:!0,avatarIcon:"business"})),a.a.createElement(Oe.a,{id:"sideModule_user_fullName",label:Object(S.u)("$__fullCompanyName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"business"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{fullName:e.target.value}))},onBlur:function(e){if(o&&!o.fullName){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";i(Object(p.a)(Object(p.a)({},o),{},{fullName:t}))}}},value:o&&o.fullName?o.fullName:"",placeholder:Object(S.u)("$__fullName",1),autoFocus:!0,disabled:!0}),a.a.createElement(Oe.a,{id:"sideModule_user_displayName",label:Object(S.u)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{name:e.target.value}))}},value:o&&o.name?o.name:"",placeholder:Object(S.u)("$__displayName",1),disabled:!0}),a.a.createElement(Oe.a,{id:"customURL",label:Object(S.u)("$__customURL",1),variant:Object(S.d)("fieldVariant"),name:"customURL",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement("span",{style:{color:"gray",fontSize:12}},".machen.ai")),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{customURL:e.target.value.trim()}))},onBlur:function(e){o&&!o.fullName&&i(Object(p.a)(Object(p.a)({},o),{},{customURL:e.target.value.trim()}))}},value:o&&o.customURL?o.customURL:"",placeholder:Object(S.u)("$__customURL",1),autoFocus:!0}),a.a.createElement(Oe.a,{id:"__documentCPForCNPJ",label:Object(S.u)("$__documentCPForCNPJ",1),variant:Object(S.d)("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"view_comfy_ind"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{document:e.target.value}))}},value:o&&o.document?o.document:"",placeholder:Object(S.u)("$__displayName",1),disabled:!!u.document}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__accountResponsible")),a.a.createElement(N.a,null,a.a.createElement(xi.a,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:o.accountResponsible?[o.accountResponsible]:null,onSelect:function(e){i(Object(p.a)(Object(p.a)({},o),{},{accountResponsible:e[0]}))}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__invoiceResponsible")),a.a.createElement(N.a,null,a.a.createElement(xi.a,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:o.invoiceResponsible?[o.invoiceResponsible]:null,onSelect:function(e){i(Object(p.a)(Object(p.a)({},o),{},{invoiceResponsible:e[0]}))}}))),a.a.createElement("ul",{style:{color:Object(S.d)("color")}},a.a.createElement("li",null,Object(S.u)("$__createdAt"),": ",Object(S.k)(o.created_at)),o.expire_at?a.a.createElement("li",{style:{color:Object(S.d)("menu")}},Object(S.u)("$__expireDate"),": ",Object(S.k)(o.expire_at)):a.a.createElement(a.a.Fragment,null)),JSON.stringify(o)!==JSON.stringify(u)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){g()}})):a.a.createElement(a.a.Fragment,null))})));function Ws(){Ws=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Us=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.session,n=t.db,o=a.a.useState(r.GlobalData?r.GlobalData:{}),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(r.GlobalData?r.GlobalData:{}),d=Object(m.a)(u,2),g=d[0],b=d[1],y=function(){var t=Object(f.a)(Ws().mark((function t(){var r;return Ws().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(c).forEach((function(e){!String(c[e])||g[e]&&JSON.stringify({a:c[e]})===JSON.stringify({a:g[e]})||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e])))})),!r.requireExpirePassword&&r.expiresIn&&(r.expiresIn=null),t.prev=3,t.next=6,De.a.post("account/save",r);case 6:t.sent&&(s(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),b(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{GlobalData:Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)}))),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{grid:7}},a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.u)("$__hideDeletedUsersInTimelines")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.hideDeletedUsers),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{hideDeletedUsers:!c.hideDeletedUsers||null});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__required")),a.a.createElement("i",null,Object(S.u)("$__hideDeletedUsersDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.u)("$__2FactorTokenRequired")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.requireToken),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{requireToken:!c.requireToken||null});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__required")),a.a.createElement("i",null,Object(S.u)("$__2FactorTokenRequiredDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.u)("$__forceChangePassword")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Te.a,{checked:!(!c||!c.requireExpirePassword),onChange:function(e){var t=Object(p.a)(Object(p.a)({},c),{},{requireExpirePassword:!c.requireExpirePassword||null},c.requireExpirePassword?{passwordExpire:null}:{});s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__required")),a.a.createElement("i",null,Object(S.u)("$__forceChangePasswordDescription")),c.requireExpirePassword?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__sessionDuration",1)),a.a.createElement(ze.a,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:c&&c.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(c.passwordExpire)}))[0]:n.passwordExpire.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{passwordExpire:t.value}))}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__language",1)),a.a.createElement(ze.a,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__language",1),variant:Object(S.d)("fieldVariant"),value:c&&c.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(c.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(c.language)}))[0]:n.languages[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{language:t.value}))}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__sessionExpire",1)),a.a.createElement(ze.a,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return Object(S.u)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(Oe.a,Object.assign({},e,{label:Object(S.u)("$__expiresIn",1),variant:Object(S.d)("fieldVariant"),value:c&&c.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(c.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{expiresIn:t.value}))}})),JSON.stringify(c)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){y()}})):a.a.createElement(a.a.Fragment,null))})),qs=Object(B.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var Vs=Object(u.b)((function(e,t){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.planDetails,r=e.data,n=qs(),o=a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.u)("$__upgradeSubscription"));return a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",padding:0,position:"relative"}},a.a.createElement("legend",null,Object(S.u)("$__subscription"),": ",a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.u)(t.label))),a.a.createElement("ul",{className:n.list},a.a.createElement("li",null,Object(S.u)("$__adminLimit",1),": ",r&&r.customAdminsLimit?r.customAdminsLimit:t.settings.admins),a.a.createElement("li",null,Object(S.u)("$__storageSpace",1),": ",r&&r.customStorageSpace?Object(S.a)(r.customStorageSpace):Object(S.a)(t.settings.space)),a.a.createElement("li",null,Object(S.u)("$__BrightAndConnected",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:n.item},Object(S.u)("$__feed",1),": ",t.settings.brightAndConnected.feed?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),t.settings.brightAndConnected.feed?a.a.createElement("li",{className:n.item},Object(S.u)("$__feedDays",1),":",t.settings.brightAndConnected.feedDays?"".concat(t.settings.brightAndConnected.feedDays," ").concat(Object(S.u)("$__days")):Object(S.u)("$__unlimited")):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:n.item},Object(S.u)("$__radarLimit",1),": ",t.settings.brightAndConnected.radarLimit?t.settings.brightAndConnected.radarLimit:Object(S.u)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.u)("$__insights",1),": ",t.settings.brightAndConnected.insight?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o))),a.a.createElement("li",null,Object(S.u)("$__plannings",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:n.item},Object(S.u)("$__limit",1),": ",t.settings.plan.limit?t.settings.brightAndConnected.radarLimit:Object(S.u)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.u)("$__clientPlannings",1),": ",t.settings.plan.planClient?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),t.settings.plan.planClient?a.a.createElement("li",{className:n.item},Object(S.u)("$__clientUserAdmins",1),": ",t.settings.plan.clientAdmin?t.settings.plan.clientAdmin:o):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:n.item},Object(S.u)("$__externalPlanning",1),": ",t.settings.plan.machenPlan?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),a.a.createElement("li",{className:n.item},Object(S.u)("$__professionalTemplates",1),": ",t.settings.plan.templates?a.a.createElement(re.a,{icon:"check",color:Object(S.d)("color"),size:18}):o),a.a.createElement("li",{className:n.item},Object(S.u)("$__guidelineLimit",1),": ",t.settings.plan.guidelineLimit?t.settings.plan.guidelineLimit:Object(S.u)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.u)("$__feedLimit",1),": ",t.settings.plan.feedLimit?t.settings.plan.feedLimit:Object(S.u)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.u)("$__radarLimit",1),": ",t.settings.plan.radarLimit?t.settings.plan.radarLimit:Object(S.u)("$__unlimited")),a.a.createElement("li",{className:n.item},Object(S.u)("$__insightLimit",1),": ",t.settings.plan.insightLimit?t.settings.plan.insightLimit:Object(S.u)("$__unlimited")))),a.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",rel:"noopener noreferrer",style:{fontWeight:"bold",color:Object(S.d)("menu"),marginTop:33}},Object(S.u)("$__viewMoreDetails")))))}));function Js(){Js=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var Xs=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t=l.a.getState(),r=t.session,n=t.db,o=a.a.useState(0),i=Object(m.a)(o,2),s=i[0],u=i[1];a.a.useEffect((function(){}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return p(),function(){clearTimeout(e)}}),[e.history]);var d=window.location.hash.split("/");d[0]=d[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||c.a.push("sp#tab/home"),d[0]&&36===d[0].length&&!l.a.getState().db.cards[d[0]]&&c.a.push("/deniedAccess");var p=function(){var e=Object(f.a)(Js().mark((function e(){var t;return Js().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pe.a.post("/Account_Space");case 3:(t=e.sent)&&u(parseInt(t.data)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),h=n.plans[0].settings.space,g=n.plans[0];r&&r.GlobalData&&String(r.GlobalData.plan)&&n.plans[r.GlobalData.plan]&&n.plans[r.GlobalData.plan].settings&&(h=n.plans[r.GlobalData.plan].settings.space,g=n.plans[r.GlobalData.plan]);var b=s*(100/parseInt(h));return a.a.createElement("div",null,a.a.createElement(Rr.a,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement(qn.a,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{padding:10,background:Object(S.d)("AvatarBackground")}},a.a.createElement(re.a,{icon:"card_membership",size:30,color:"#FFFFFF"})),a.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("menu"),fontWeight:"bolder",marginTop:7}},Object(S.u)("$__subscriptionPlan","*"),": ",Object(S.u)(g.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.u)("$__adminLimit",1),": ",g.settings.admins)))),a.a.createElement(qn.a,{xs:12,sm:6,md:6,lg:6,xl:6,style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{padding:10,background:Object(S.d)("AvatarBackground")}},a.a.createElement(re.a,{icon:"storage",size:30,color:"#FFFFFF"})),a.a.createElement("div",{style:{marginLeft:7,width:"calc(100% - 40px)"}},a.a.createElement("div",{style:{position:"relative",marginTop:7,color:Object(S.d)("menu"),fontWeight:"bolder"}},Object(S.u)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.u)("$__upgradeSubscription"))),a.a.createElement(Ys,{value:Math.ceil(b),background:b>100?"red":null}),a.a.createElement("div",null,a.a.createElement("span",{style:{color:b>100?"red":"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.u)("$__used",1),": ",Object(S.a)(s))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(S.u)("$__of")," ",Object(S.u)("$__accountSpace",1),": ",Object(S.a)(h))))))),a.a.createElement(Rr.a,{style:{}},a.a.createElement(qn.a,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement("div",null,"Dados da conta"),a.a.createElement(N.a,null,a.a.createElement(Hs,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},"Prefer\xeancias",a.a.createElement(N.a,null,a.a.createElement(Us,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(qn.a,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:{padding:7,width:"100%",backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},Object(S.u)("$__subscriptionDetails"),a.a.createElement(N.a,null,a.a.createElement(Vs,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:g}))))))}))),Ks=r(207),Zs=r.n(Ks),Qs=r(1168),eu=(r(1115),r(1116),["onSelect"]),tu=function(e){var t=e.onSelect,r=Object(ft.a)(e,eu);return a.a.createElement(Ks.Panel,Object.assign({},r,{onChange:function(e){t(e.color,e.alpha/100)},animation:"slide-up"}))};var ru=function(e){var t,r,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],l=i[1],s=(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.css)?function(e){var t=e.replace("linear-gradient(90deg,","").replace("radial-gradient(90deg,","").split("rgba("),r=[];return t.forEach((function(e){var t=e.split(") ");if(2===t.length){var n=t[0].split(","),a=(parseInt(t[1].replace(")","").replace("%",""))/100).toFixed(2);r.push({color:"rgb(".concat(n[0].trim(),", ").concat(n[1].trim(),", ").concat(n[2].trim(),")"),offset:"".concat(a.trim()),opacity:"".concat(n[3].trim())})}})),r}(e.value.css):(null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.color)||[];return a.a.createElement(Qs.GradientPickerPopover,{showAnglePicker:!1,showGradientTypePicker:!1,open:c,setOpen:l,width:320,paletteHeight:32,palette:s,onPaletteChange:function(t){!function(t){var r=t.color,n=e.type&&"linear"!==e.type?"radial-gradient(":"linear-gradient(90deg, ";r.forEach((function(e,t){e.color.indexOf("#")>-1&&(n="".concat(n).concat(Object(S.m)(e.color,e.opacity||1)," ").concat(Math.ceil(100*e.offset),"% ").concat(t<r.length-1?",":""," ")),e.color.indexOf("rgb")>-1&&-1===e.color.indexOf("rgba")&&(n="".concat(n,"rgba(").concat(e.color.replace("rgb(","").replace(")",", ".concat(e.opacity||1)),") ").concat(Math.ceil(100*e.offset),"% ").concat(t<r.length-1?",":""," "))})),n="".concat(n,")"),e.onChange&&e.onChange({css:n,palette:r})}({name:"ColumnTitleColor",color:t})}},a.a.createElement(tu,null))};function nu(){nu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var au=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ee)((function(e){var t=l.a.getState().session,r=t.custom,n=a.a.useState(t.custom||{}),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState({}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({}),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(null),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useState(null),L=Object(m.a)(E,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(m.a)(T,2),D=F[0],A=F[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],z=$[1];a.a.useEffect((function(){g(t.custom||{})}),[]),a.a.useEffect((function(){D&&setTimeout((function(){A(!1)}),500)}),[D]);var Y=function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:Object(p.a)(Object(p.a)({},l.a.getState().session.custom),{},Object(h.a)({},t.name,t.value))})),x(Object(p.a)(Object(p.a)({},v),{},Object(h.a)({},t.name,t.value))),c(Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},t.name,t.value)))},B=function(){var t=Object(f.a)(nu().mark((function t(){return nu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(d),x({}),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{custom:d}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var e=Object(f.a)(nu().mark((function e(){var n,a,o;return nu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z(!0),n=Object(p.a)(Object(p.a)({},(null===r||void 0===r?void 0:r.custom)?JSON.parse(null===r||void 0===r?void 0:r.custom):{}),v),c(n),g(n),e.prev=4,!w){e.next=11;break}return e.next=8,Object(Rs.a)(t.account,w);case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=!0;case 12:if(a=e.t0,!C){e.next=19;break}return e.next=16,Object(Rs.a)(t.account,C);case 16:e.t1=e.sent,e.next=20;break;case 19:e.t1=!0;case 20:o=e.t1,a&&o&&(w&&(n=Object(p.a)(Object(p.a)({},n),{},{customLogo:a})),C&&(n=Object(p.a)(Object(p.a)({},n),{},{loginBackground:o})),l.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},{custom:JSON.stringify(n)},(function(e){z(!1),x({})}))),e.next=27;break;case 24:e.prev=24,e.t2=e.catch(4),console.log(e.t2);case 27:case"end":return e.stop()}}),e,null,[[4,24]])})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__logo")),a.a.createElement(_e.a,{maxWidthOrHeight:600,img:r.customLogo,onChange:function(e,t){j(t),Y({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0})))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__loginBackground")),a.a.createElement(_e.a,{maxWidthOrHeight:2e3,img:r.loginBackground,onChange:function(e,t){I(t),Y({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__backgroundColumnsTitle")),a.a.createElement(wr.a,{title:Object(S.u)("$__backgroundColumnsTitle",1),icon:"gradient",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(ru,{value:{css:r.ColumnTitleColor},onChange:function(e){Y({name:"ColumnTitleColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.colorText||null,mode:"RGB",onChange:function(e){Y({name:"colorText",value:e.color})}}),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__text")))))))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__menu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(ru,{value:{css:r.menuColor},onChange:function(e){Y({name:"menuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.menuButtonColor,mode:"RGB",onChange:function(e){Y({name:"menuButtonColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__menuText"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.active,mode:"RGB",onChange:function(e){Y({name:"active",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__menuActiveText"))))))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__submenu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(ru,{value:{css:r.subMenuColor},onChange:function(e){Y({name:"subMenuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColor,mode:"RGB",onChange:function(e){Y({name:"subMenuTextColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__menuTextIconColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColorActive,mode:"RGB",onChange:function(e){Y({name:"subMenuTextColorActive",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__subMenuActiveText"))))))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__complement")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(ru,{value:{css:r.linearProgress},onChange:function(e){Y({name:"linearProgress",value:e.css})}})),a.a.createElement(ct.a,{customColor:r.linearProgress}),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__progress"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.color,mode:"RGB",onChange:function(e){Y({name:"color",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__borderColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.menu,mode:"RGB",onChange:function(e){Y({name:"menu",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.u)("$__primaryText"))))))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.u)("$__cardImageCover"),a.a.createElement(ru,{value:{css:r.AvatarBackground},onChange:function(e){Y({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.avatarIconColor,mode:"RGB",onChange:function(e){Y({name:"avatarIconColor",value:e.color})}})),a.a.createElement(Qc.a,{backgroundColor:r.AvatarBackground,avatarIconColor:r.avatarIconColor,responsive:!0})))),a.a.createElement(qn.a,{md:4},a.a.createElement(Ct.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.u)("$__fields")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.line,mode:"RGB",onChange:function(e){Y({name:"line",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__line"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(N.a,null,a.a.createElement(Zs.a,{enableAlpha:!1,animation:"slide-up",color:r.medium,mode:"RGB",onChange:function(e){Y({name:"medium",value:e.color}),A(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.u)("$__inputAdorment"))),D?a.a.createElement(Oe.a,{label:Object(S.u)("$__field",1),variant:r.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill"}))}}):a.a.createElement(Oe.a,{label:Object(S.u)("$__field",1),variant:r.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"format_color_fill",color:r.medium}))}})))),JSON.stringify(i)!==JSON.stringify(d)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.u)("$__reset"),text:Object(S.u)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){B()},load:M})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.u)("$__save"),text:Object(S.u)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){R()},load:M}))):a.a.createElement(a.a.Fragment,null))})));var ou=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||c.a.push("acc#tab/resume"),a.a.createElement("div",null,t[1]&&"resume"===t[1]?a.a.createElement(N.a,null,a.a.createElement(Xs,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"profile"===t[1]?a.a.createElement(N.a,null,a.a.createElement(zs,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"whiteLabel"===t[1]?a.a.createElement(N.a,null,a.a.createElement(au,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"integrations"===t[1]?a.a.createElement(N.a,null,a.a.createElement(As,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"invoicing"===t[1]?a.a.createElement(N.a,null,a.a.createElement(Ds,null)):a.a.createElement(a.a.Fragment,null))}))),iu=Object(B.a)(Wo);var cu=Object(B.a)(Wo);var lu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n=l.a.getState(),o=n.db,i=n.session;o.cards;return console.log(i),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}},a.a.createElement("input",{type:"file",id:"fileBack",style:{display:"none"}}),a.a.createElement("img",{src:null===i||void 0===i?void 0:i.custom.loginBackground,alt:"background",style:{height:"150px",width:"100%",objectFit:"cover"}}),a.a.createElement("div",{style:{height:"auto",backgroundColor:"none",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"0px",marginTop:"-110px",padding:"0 17px"}},a.a.createElement("img",{src:null===i||void 0===i?void 0:i.image,style:{borderRadius:"50%",border:"2px solid ".concat(Object(S.d)("color")),width:"110px",height:"110px",margin:"5px",zIndex:"998",cursor:"auto"},alt:"Profile"}),a.a.createElement("div",{style:{backgroundColor:"rgb(238,238,238)",padding:"5px 20px 5px 50px",marginLeft:"-40px",zIndex:"0",borderRadius:"0px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.14) 0px 1px 4px 0px",border:"2px solid ".concat(Object(S.d)("color"))}},a.a.createElement("p",{style:{color:Object(S.d)("medium"),fontSize:"1.7rem",fontWeight:"bold",margin:"5px 0px",display:"flex",textAlign:"left",justifyContent:"flex-start"}},null===i||void 0===i?void 0:i.name,a.a.createElement("sup",{style:{fontSize:"1rem !important"}},a.a.createElement(re.a,{style:{cursor:"pointer"},onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o.sideModule),{},{id:null===i||void 0===i?void 0:i._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},l.a.getState().db.users[i._id])}))}},"edit"))),a.a.createElement("p",{style:{fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("colorText"),margin:"0px",textAlign:"left"}},null===i||void 0===i?void 0:i.email),a.a.createElement("p",{style:{margin:"0px",color:Object(S.d)("mediumText"),textAlign:"left",fontSize:"11px"}},null===i||void 0===i||null===(t=i.GlobalData)||void 0===t?void 0:t.name," \u25cf ",null===i||void 0===i||null===(r=i.groups[0])||void 0===r?void 0:r.label)))))})),su=r(1169),uu=r.n(su),du=function(e){var t=e.edit,r=e.data,o=e.setData,i=Object(n.useState)({historyEditor:null}),c=Object(m.a)(i,2),l=c[0],s=c[1],u={width:"100%",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",border:"none",display:t?"flex":"none",justifyContent:"flex-start",borderBottom:"2px solid #eeeeee",borderRadius:"5px"};return a.a.createElement(a.a.Fragment,null,a.a.createElement(Y.Editor,{toolbar:{options:["inline","image","list","link"],inline:{inDropdown:!1,options:["bold","italic","underline"]},list:{inDropdown:!1,options:["unordered"]},link:{inDropdown:!1,options:["link"]}},wrapperClassName:"wrapper-class",editorClassName:"editor-class",toolbarClassName:"toolbar-class",toolbarStyle:u,editorState:null===r||void 0===r?void 0:r.messageD,onEditorStateChange:function(e){o(Object(p.a)(Object(p.a)({},r),{},{message:M()(Object(z.convertToRaw)(e.getCurrentContent())),messageD:e})),s(Object(p.a)(Object(p.a)({},l),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{backgroundColor:"#fff",width:"100%",height:"100%",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",border:"none",margin:"0px"},readOnly:!t}))},pu=Object(B.a)({switch:{"& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:"rgb(125, 125, 125)"},"& .Mui-checked":{"& + .MuiSwitch-track":{backgroundColor:Object(S.d)("color")},"& .MuiSwitch-thumb":{backgroundColor:Object(S.d)("color")},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px",height:"20px",color:Object(S.d)("color")}},"& .Mui-disabled":{"& + .MuiSwitch-track":{opacity:.5},"& .MuiSvgIcon-root":{backgroundColor:Object(S.d)("color"),borderRadius:"50%",width:"20px !important",height:"20px !important",padding:"3px",color:"".concat(Object(S.d)("lightText")," !important"),transform:"translate(0, 0, 0, 0.2em)"}}}}),fu=function(e){var t=e.checked,r=e.setDataNot,o=e.notType,i=e.data,c=e.not,l=e.dataNot,s=Object(n.useState)("block"===t||t),u=Object(m.a)(s,2),d=u[0],f=u[1],g=pu();return a.a.createElement(Kt.a,{title:"block"===t?"Notifica\xe7\xe3o Obrigat\xf3ria: Habilitada pelo Administrador":"",top:!0},a.a.createElement(Xr.a,{control:a.a.createElement(Os.a,{className:g.switch,color:"default",checked:d,onChange:function(e){f(e.target.checked),function(e){var t=l.map((function(t){if(t===i){var r=t.notifications.map((function(t){return t===c?Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},o,e)):t}));return Object(p.a)(Object(p.a)({},t),{},{notifications:r})}return t}));r(t)}(e.target.checked)},disabled:"block"===t,checkedIcon:a.a.createElement(uu.a,null)})}))},hu=function(){var e=Object(n.useState)([{notificationName:"Atividades",notifications:[{title:"Atividades atrasadas",machen:"block",email:"block"},{title:"Atividades do dia",machen:!0,email:!0},{title:"Pr\xf3ximas atividades",machen:!1,email:!1},{title:"Atualiza\xe7\xe3o de status",machen:!0,email:!1},{title:"Voc\xea foi removido(a)",machen:!1,email:!1}]},{notificationName:"Mensagens",notifications:[{title:"Novas mensagens",machen:"block",email:!0},{title:"Rea\xe7\xe3o a minhas mensagens",machen:!1,email:!1}]},{notificationName:"Radar",notifications:[{title:"Novas id\xe9ias",machen:"block",email:!0},{title:"Novas noticias",machen:!1,email:!1}]},{notificationName:"Men\xe7\xf5es",notifications:[{title:"Men\xe7\xf5es",machen:!0,email:!0}]},{notificationName:"Meu dia",notifications:[{title:"Meu dia",machen:"block",email:!0},{title:"Meu dia de outros usu\xe1rios",machen:!1,email:!1}]}]),t=Object(m.a)(e,2),r=t[0],o=t[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"fit-content",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",margin:"0 auto",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,null,"notifications_active"),a.a.createElement("span",{style:{fontWeight:"bold"}},"Gerenciamento de notifica\xe7\xf5es")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"0px 10px",alignItems:"flex-start",padding:"0px 20px",flexWrap:"nowrap",fontSize:"16px"}},a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",flexDirection:"row",width:"100%",marginTop:"20px"}},a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},"Notificar me"),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},"E-mail")),a.a.createElement("div",{style:{color:Object(S.d)("darkText"),display:"flex",flexDirection:"row",width:"100%",fontWeight:"600"}},a.a.createElement("p",{style:{textAlign:"left",width:"60%",paddingLeft:"15px"}},"Notificar me"),a.a.createElement("p",{style:{padding:"0 10px",width:"20%"}},"Machen"),a.a.createElement("p",{style:{padding:"0 10px",width:"25%"}},"E-mail"))),a.a.createElement("div",{style:{display:"grid",width:"100%",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr 1fr",gap:"10px",flexWrap:"wrap",justifyContent:"center",marginBottom:"20px"}},r.map((function(e,t){return a.a.createElement("fieldset",{key:null===e||void 0===e?void 0:e.notificationName,style:{borderColor:"rgb(224 224 224)",borderStyle:"solid",display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",width:"100%",paddingBottom:"0px",gridRow:0===t&&"1 / 3"}},a.a.createElement("legend",{style:{padding:"0px 5px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:Object(S.d)("colorText"),margin:"0px"}},null===e||void 0===e?void 0:e.notificationName),null===e||void 0===e?void 0:e.notifications.map((function(t){return a.a.createElement("div",{key:null===t||void 0===t?void 0:t.title,style:{display:"flex",flexDirection:"row",width:"100%",alignItems:"baseline"}},a.a.createElement("p",{style:{width:"60%"}},null===t||void 0===t?void 0:t.title),a.a.createElement("div",{style:{width:"20%"}},a.a.createElement(fu,{label:"",checked:null===t||void 0===t?void 0:t.machen,setDataNot:o,notType:"machen",data:t,dataNot:r,not:t})),a.a.createElement("div",{style:{width:"20%"}},a.a.createElement(fu,{label:"",checked:null===t||void 0===t?void 0:t.email,setDataNot:o,notType:"email",data:e,dataNot:r,not:t})))})))}))))),a.a.createElement("div",{style:{display:"flex",borderTop:"#e8e8e8 1px solid",alignItems:"center",justifyContent:"flex-end",gap:"20px",padding:"15px 20px"}},a.a.createElement("button",{style:{padding:"7px 25px",border:"1px solid rgb(184 184 184)",backgroundColor:Object(S.d)("disabled"),color:Object(S.d)("darkText"),borderRadius:"4px",fontWeight:"600",cursor:"pointer"}},"CANCELAR"),a.a.createElement("button",{style:{padding:"7px 30px",border:"rgb(1, 30, 65) 1px solid",background:Object(S.d)("ColumnTitleColor"),color:Object(S.d)("colorText"),borderRadius:"4px",fontWeight:"600",cursor:"pointer"}},"SALVAR"))))},mu=function(){var e=Object(n.useState)(!1),t=Object(m.a)(e,2),r=t[0],o=t[1],i=Object(n.useState)({}),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement("div",{style:{width:"95%",display:"flex",gap:"20px",flexDirection:"column",marginBottom:"50px",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{flexGrow:"1",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",width:"100%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"space-between",borderBottom:"#e8e8e8 1px solid",padding:"7px 15px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("span",{style:{fontWeight:"bold"}},"Sobre"),a.a.createElement(re.a,{onClick:function(){return o(!r)},style:{cursor:"pointer"}},r?"cancel":"edit")),a.a.createElement("div",{style:{padding:"10px 20px 20px 20px"}},a.a.createElement(du,{edit:r,data:l,setData:s}))))},gu=function(){var e=l.a.getState(),t=e.db,r=(e.session,t.cards),o=Object(n.useState)([]),i=Object(m.a)(o,2),c=i[0],s=i[1];return Object(n.useEffect)((function(){var e=Object.values(r).filter((function(e){return"plan"===e.type})).map((function(e){return e.name}));s(Object(A.a)(new Set(e))),console.log(c)}),[]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"95%",height:"auto",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.14)",backgroundColor:"#fff",borderRadius:"3px",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",marginBottom:"50px"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",justifyContent:"center",borderBottom:"#e8e8e8 1px solid",marginBottom:"15px",padding:"7px 0px",color:Object(S.d)("colorText"),background:Object(S.d)("ColumnTitleColor")}},a.a.createElement(re.a,null,"history"),a.a.createElement("span",{style:{fontWeight:"bold"}},"Hist\xf3rico de Atividades")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},a.a.createElement("div",{style:{width:"70%"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," atualizou status da ",a.a.createElement("b",null,"Tarefa 1")," para CONCLU\xcdDO")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," removeu o usu\xe1rio ",a.a.createElement("b",null,"Usu\xe1rio 2")," de ",a.a.createElement("b",null,"Tarefa 1"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," adidicionou ",a.a.createElement("b",null,"Tarefa 1")," no dia")),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," adicionou o usu\xe1rio ",a.a.createElement("b",null,"Usu\xe1rio 2")," \xe0 ",a.a.createElement("b",null,"Tarefa 1"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," adicionou o usu\xe1rio ",a.a.createElement("b",null,"Usu\xe1rio 3")," \xe0 ",a.a.createElement("b",null,"Tarefa 1"))),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px",margin:"0px 15px"}},a.a.createElement("div",{style:{backgroundColor:"gray",borderRadius:"50px",border:"2px solid rgb(192,178,131)",width:"20px",height:"20px",margin:"0px"}}),a.a.createElement("p",null,a.a.createElement("b",null,"Usu\xe1rio")," criou ",a.a.createElement("b",null,"Tarefa 1")))),a.a.createElement("div",{style:{height:"100%",borderLeft:"1px solid #b9b9b9",padding:"0px 20px"}},a.a.createElement(Oe.a,{id:"search",label:Object(S.u)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"search",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,null,"search"))},placeholder:Object(S.u)("$__search",1),autoFocus:!0}),null===c||void 0===c?void 0:c.map((function(e){return a.a.createElement("div",{style:{marginTop:"10px",display:"flex",gap:"5px",alignItems:"center"},key:e},a.a.createElement(at.a,null,e.slice(0,2)),a.a.createElement(Xr.a,{required:!0,control:a.a.createElement(Yr.a,{color:"default"}),label:e}))}))))))},bu=function(){var e=l.a.getState(),t=e.db,r=e.session,n=(t.users,t.cards,function(e,t){return!!(l.a.getState().db.users[t]&&l.a.getState().db.users[t].groups&&l.a.getState().db.users[t].groups.length>0&&l.a.getState().db.users[t].groups.filter((function(t){return t.value===e.value})).length>0&&(null===r||void 0===r?void 0:r.groups.some((function(t){return t.label===e.label}))))});return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",flexDirection:"column",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif"}},a.a.createElement("p",null,(null===r||void 0===r?void 0:r.groups.length)>=1?null===r||void 0===r?void 0:r.groups.map((function(e){return e.label})):null===r||void 0===r?void 0:r.groups[0].label),a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"row",flexWrap:"wrap"}},l.a.getState().db.userGroup.filter((function(e){return Object.keys(l.a.getState().db.users).filter((function(t){return n(e,t)})).length>0})).map((function(e){var t=Object.keys(l.a.getState().db.users).filter((function(t){return n(e,t)}));return a.a.createElement(a.a.Fragment,null,t.sort((function(e,t){var r=l.a.getState().db.users[e].name.toLowerCase(),n=l.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(t){return a.a.createElement(qn.a,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(ts,{data:l.a.getState().db.users[t]}))})))})))))},yu=function(){var e=Object(n.useState)("Overview"),t=Object(m.a)(e,2),r=t[0],o=t[1];return a.a.createElement("div",{style:Object(h.a)({width:"calc(100% - 15px)",position:"absolute",zIndex:"9",borderRadius:"5px",backgroundColor:"#eee",height:"auto",margin:"0px",marginLeft:-80},"zIndex",1)},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{item:!0,xs:12,style:{backgroundColor:"#eee",height:"100%",display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column",gap:"5px",marginBottom:"30px"}},a.a.createElement(lu,null),a.a.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"15px",padding:"10px",borderBottom:"1px solid #b9b9b9",width:"100%",justifyContent:"flex-start",marginTop:"0px",marginBottom:"20px",color:"rgb(83 83 83)"}},a.a.createElement(vu,{value:"Overview",check:r,onClick:function(){o("Overview")}},a.a.createElement(re.a,null,"grid_view")," Vis\xe3o Geral")),"Overview"===r?a.a.createElement(mu,null):"Notifications"===r?a.a.createElement(hu,null):"Historic"===r?a.a.createElement(gu,null):"Department"===r?a.a.createElement(bu,null):null)))};function vu(e){var t=e.children,r=e.value,o=e.check,i=e.onClick,c=Object(n.useState)(!1),l=Object(m.a)(c,2),s=l[0],u=l[1];return a.a.createElement("a",{href:"javascript:void(0)",onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},onClick:i,style:{textDecoration:"none",color:"rgb(83 83 83)",display:"flex",flexDirection:"row",gap:"5px",alignItems:"center",justifyContent:"center",fontSize:"15px",padding:"2px 7px",borderRadius:"3px",transition:"0.3s all",backgroundColor:s||r===o?"#cfcfcf":"transparent",cursor:s?"pointer":"default"}},t)}var xu=function(){var e=Object(n.useState)(!1),t=Object(m.a)(e,2),r=t[0],o=t[1],i=Object(n.useState)(!1),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",display:"flex",gap:"20px",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}},a.a.createElement("label",{htmlFor:"fileBack",style:{backgroundColor:"rgb(255 255 255 / 40%)",padding:"5px",color:"#fff",borderRadius:"50%",marginBottom:"-60px",boxShadow:"rgba(0, 0, 0, 0.14) 0px 1px 4px 0px",zIndex:"999",position:"relative",left:"95%",top:"100px",fontSize:"1rem !important",display:"flex",justifyContent:"center",alignItems:"center",cursor:l?"pointer":"default"},onMouseEnter:function(){return s(!0)},onMouseLeave:function(){return s(!1)}},a.a.createElement(P.a,null,"edit")),a.a.createElement("input",{type:"file",id:"fileBack",style:{display:"none"}}),a.a.createElement("img",{src:"https://i1.wp.com/www.iparh.com/wp-content/uploads/2018/06/fundo-azul-curvas-escuro.jpg?fit=1900%2C1188&ssl=1",alt:"background",style:{height:"150px",width:"100%"}}),a.a.createElement("div",{style:{height:"auto",backgroundColor:"none",fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"0px",marginTop:"-110px",padding:"0 17px"}},a.a.createElement("img",{src:"https://machen.azureedge.net/2b4580a8-1039-4922-98e6-b8f1356ff33c-3ab8e3a9-95c2-4a1e-9670-9f7aed772793",style:{borderRadius:"50%",border:"2px solid rgb(192,178,131)",width:"110px",height:"110px",margin:"5px",zIndex:"998",cursor:r?"pointer":"default"},onMouseEnter:function(){return o(!0)},alt:"Profile"}),r?a.a.createElement("label",{htmlFor:"file",style:{borderRadius:"50%",backgroundColor:"rgb(0 0 0 / 75%)",border:"2px solid rgb(192,178,131)",width:"110px",height:"110px",margin:"5px",marginLeft:"-119px",zIndex:"998",color:"#fff",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",transition:"0.5s all",cursor:r?"pointer":"default"},onMouseLeave:function(){return o(!1)}},a.a.createElement(P.a,null,"add_a_photo"),a.a.createElement("p",{style:{padding:"5px",textAlign:"center",margin:"0"}},"Alterar imagem")):null,a.a.createElement("input",{type:"file",id:"file",style:{display:"none"}}),a.a.createElement("div",{style:{backgroundColor:"rgb(238,238,238)",padding:"15px 20px 15px 50px",marginLeft:"-40px",zIndex:"0",borderRadius:"0px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.14) 0px 1px 4px 0px",border:"2px solid rgb(192,178,131)"}},a.a.createElement("p",{style:{color:"rgb(83 83 83)",fontSize:"1.7rem",fontWeight:"bold",margin:"0px",display:"flex",textAlign:"left",justifyContent:"flex-start"}},"Sonne Global"),a.a.createElement("p",{style:{fontFamily:"Soleto, Roboto, Helvetica, Arial, sans-serif",color:"rgb(192,178,131)",margin:"0px",textAlign:"left"}},"empresa@sonne.global")))))},_u=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:Ho,show:!0,auth:!0,search:!1,tabs:[{path:"resume",name:"RESUME",alias:"home",icon:"space_dashboard",show:!0,auth:!0},{path:"dayTasks",name:"DAYTASKS",alias:"dayTasks",icon:"hail",show:!0,auth:!0,AppAccess:["planAdmin","planModerate"]}]},{path:"/bright-and-connected",name:"BRIGHTANDCONNECTED",alias:"brightandconnected",icon:Va.a,component:fo,show:!0,auth:!0,subMenu:!0,searchFields:["tags","text"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0},{path:"feeds",name:"FEEDS",alias:"feeds",icon:"menu_book",show:!0,auth:!0,search:!0,searchFields:["tags","text"]},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,search:!0,searchFields:["tags","text","users","priority"]},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:Po.a,show:!0,auth:!0,search:!0,searchFields:["tags","text","users","priority"]},{path:"allNews",name:"allNews",alias:"allNews",icon:"feed",show:!0,auth:!0,search:!0,searchFields:["tags","text"]},{path:"hideFeeds",name:"HIDEFEEDS",alias:"hideFeeds",icon:"visibility_off",show:!0,auth:!0,search:!0,searchFields:["tags","text"]}]},{path:"/c",name:"Users",alias:"users",icon:"business",component:_s,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","userGroup"],tabs:[{path:"users",name:"USERS",alias:"users",icon:"supervised_user_circle",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]},{path:"units",name:"units",alias:"customersCompaniesAndDivisions",icon:"business",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","userGroup"]},{path:"departments",name:"groupsAndDepartments",alias:"groupsAndDepartments",icon:"group_work",show:!0,auth:!0,permission:1}]},{path:"/forms",name:"Forms",alias:"forms",icon:"ballot",component:Cs,show:!0,auth:!0,search:!0,subMenu:!0,tabs:[{path:"resume",name:"resume",alias:"resume",icon:"ballot",show:!0,auth:!0}]},{path:"/sp",name:"Strategy & Plans",alias:"plan",icon:"view_comfy",component:os,show:!0,auth:!0,search:!0,subMenu:!0,searchFields:["text","tags","users","priority","units","status"],tabs:[{path:"home",name:"home",alias:"home",icon:"home",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"StrategyAndPlans",name:"StrategyAndPlans",alias:"StrategyAndPlans",icon:"view_comfy",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"archived",name:"archivedPlans",alias:"archivedPlans",icon:"archive",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"admin",name:"admin",alias:"admin",icon:"admin_panel_settings",show:!0,auth:!0,AppAccess:["planAdmin"],search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"templates",name:"templates",alias:"templates",icon:"smart_button",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"completed",name:"completed",alias:"completed",icon:"assignment_turned_in",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"trash",name:"trash",alias:"trash",icon:"recycling",show:!0,auth:!0,search:!0,searchFields:["text","tags","users","priority","units","status"],hashId:!1},{path:"dashboard",name:"dashboard",alias:"home",icon:"dashboard",show:!0,auth:!0,permission:4,search:!1,searchFields:[],hashId:!0,templates:!0},{path:"overview",name:"OVERVIEW",alias:"overview",icon:"select_all",show:!0,auth:!0,permission:4,search:!1,hashId:!0,templates:!0},{path:"board",name:"board",alias:"board",icon:"view_week",show:!0,auth:!0,permission:3,search:!1,hashId:!0,templates:!0},{path:"matrix",name:"MATRIX SWOT",alias:"matrix",icon:Ht.a,show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"guidelines",name:"guidelines",alias:"guidelines",icon:"alt_route",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"objectives",name:"objectives",alias:"objectives",icon:"gps_fixed",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"goals",name:"goals",alias:"goals",icon:"flag",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"actions",name:"ACTIONS",alias:"actions",icon:"playlist_play",show:!0,auth:!0,permission:1,search:!1,hashId:!0},{path:"bright-and-connected",name:"feeds",alias:"feeds",icon:"menu_book",show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"radar",name:"radar",alias:"radar",icon:"settings_input_antenna",show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"insight-boards",name:"INSIGHTS",alias:"insights",icon:Po.a,show:!0,auth:!0,permission:3,hashId:!0,templates:!0},{path:"library",name:"library",alias:"library",icon:"folder",show:!0,auth:!0,permission:3,hashId:!0}]},{path:"/t",name:"Tasks",alias:"tasks",component:Oi,icon:"recent_actors",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"],tabs:[{path:"myDay",name:"myDay",alias:"myDay",icon:"today",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"ourDay",name:"ourDay",alias:"ourDay",icon:"reduce_capacity",show:!0,auth:!0,permission:3,AppAccess:["planAdmin","planModerate"],search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"allTasks",name:"allTasks",alias:"allTasks",icon:"how_to_reg",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"myTasks",name:"myTasks",alias:"myTasks",icon:"admin_panel_settings",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unreaded",name:"unreaded",alias:"unreaded",icon:"notifications_active",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"private",name:"private",alias:"private",icon:"private_connectivity",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"unlinkedCards",name:"unlinkedCards",alias:"unlinkedCards",icon:"link_off",show:!0,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"lateTasks",name:"lateTasks",alias:"lateTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]},{path:"nextTasks",name:"nextTasks",alias:"nextTasks",icon:"playlist_play",show:!1,auth:!0,permission:1,search:!0,searchFields:["text","tags","users","plans","priority","units","groups","status","date"]}]},{path:"/tags",name:"Tags",alias:"Tags",component:cs,icon:"turned_in",show:!0,auth:!0,search:!0,subMenu:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:ja,access:["_isDeveloper"],show:!1,auth:!0,search:!1,tabs:[{path:"versions",name:"versions",alias:"versions",icon:"app_registration",show:!0},{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/masterAdmin",name:"masterAdmin",alias:"masterAdmin",icon:"admin_panel_settings",component:Ci,show:!1,access:["_isAdmin"],auth:!0,search:!1,tabs:[{path:"accounts",name:"accounts",alias:"accounts",icon:"account_box",show:!0},{path:"languages",name:"languages",alias:"languages",icon:"translate",show:!0},{path:"feeds",name:"feeds",alias:"feeds",icon:"rss_feed",show:!0}]},{path:"/notifications",name:"Notifications",alias:"Notifications",icon:"notifications",component:zi,show:!1,auth:!0},{collapse:!0,name:"Pages",icon:"image",state:"pageCollapse",show:!1,views:[{path:"/activate",name:"Activate User",mini:"AU",component:function(e){var t=new URLSearchParams(window.location.search),r=a.a.useState({cPassword:null,password:null}),n=Object(m.a)(r,2),o=n[0],i=n[1],l=aa();t.get("token")&&36===t.get("token").length||c.a.push("/");var s=function(){var r=Object(f.a)(na().mark((function r(){var n;return na().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,De.a.post("/user/new-password",{token:t.get("token"),password:o.password});case 3:(n=r.sent)&&(localStorage.setItem("TOKEN",n.data.token),e.callback&&setTimeout((function(){c.a.push("/login")}),3e3)),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),e.callback({fn:"alert",message:"".concat(Object(S.u)("$__invalidRequest",1)," | ").concat(Object(S.u)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"center",confirm:null});case 10:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(){return r.apply(this,arguments)}}();return a.a.createElement("div",{className:l.container,style:{overflow:"auto"}},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement("form",null,a.a.createElement(Gr.a,{db:"cards",login:!0},a.a.createElement(Wr.a,{className:"".concat(l.cardHeader," ").concat(l.textCenter),color:"primary",style:{background:"linear-gradient(60deg, rgba(15,18,35,1), rgba(2,33,88,1))",boxShadow:"0 4px 20px 0 rgba(15,18,35,0.14), 0 7px 10px -5px rgba(15,18,35,0.4)"}},a.a.createElement("h4",{className:l.cardTitle},Object(S.u)("$__createPassword",1))),a.a.createElement(Hr.a,null,a.a.createElement(Ie,{onConfirmed:function(e){i(Object(p.a)(Object(p.a)({},o),{},{password:e}))}})),a.a.createElement(ta,{className:l.justifyContentCenter},o&&o.password&&a.a.createElement(Kn,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return s()}},Object(S.u)("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:ci,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=a.a.useState([]),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(m.a)(i,2),s=l[0],u=l[1],d=a.a.useState(""),p=Object(m.a)(d,2),h=p[0],g=p[1],b=a.a.useState(""),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState(!1),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useState(""),k=Object(m.a)(E,2),L=k[0],C=k[1],I=a.a.useState(""),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(m.a)(N,2),$=P[0],M=P[1],z=a.a.useState(!1),Y=Object(m.a)(z,2),B=Y[0],R=Y[1],G=a.a.useState(0),H=Object(m.a)(G,2),W=H[0],U=H[1],q=a.a.useState(null),V=Object(m.a)(q,2),J=V[0],X=V[1],K=function(e,t){var r=n.indexOf(e),a=Object(A.a)(n);-1===r?a.push(e):a.splice(r,1),o(a)},Z=Vi(),Q=function(){var e=Object(f.a)(qi().mark((function e(t){return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Object(S.v)(t)){e.next=8;break}return e.next=4,Object(ke.f)(t);case 4:e.sent?(C(Object(S.u)("$__emailAlreadyExists",1)),x(""),j(!1)):(C(null),j(!0),Object(ke.h)(h,t)),e.next=10;break;case 8:C(Object(S.u)("$__invalidEmail",1)),x("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=Object(f.a)(qi().mark((function e(){return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(F.length>=6)){e.next=9;break}return u(!0),e.next=4,Object(ke.r)(F,v);case 4:e.sent?(R(!0),M(!1)):M(!0),u(!1),e.next=10;break;case 9:M(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var t=Object(f.a)(qi().mark((function t(){var r;return qi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,De.a.post("user/register-final-step/",{name:h,email:v,token:F,password:J,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){c.a.push("/login")}),3e3)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),u(!1);case 11:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:Z.container,style:{overflow:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",overflow:"auto"}},a.a.createElement(qn.a,{xs:12,sm:10,md:6},a.a.createElement(Gr.a,{db:"cards",className:Z.cardSignup},a.a.createElement("h2",{className:Z.cardTitle},Object(S.u)("$__register",1)),a.a.createElement(Hr.a,null,a.a.createElement("div",null,a.a.createElement(Oe.a,{className:Z.textFields,label:Object(S.u)("$__fullName",1),variant:"standard",name:Object(S.u)("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{className:Z.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){g(e.target.value)}},value:h||"Cristofer Odair",disabled:w}),a.a.createElement(Oe.a,{label:Object(S.u)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",helperText:L,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!L&&v&&Object(S.v)(v)?"":"invalid",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"alternate_email"})),onChange:function(e){j(!1),C(null),x(e.target.value)},onBlur:function(){var e=Object(f.a)(qi().mark((function e(t){return qi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Q(t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:v,placeholder:"email@domain.com",disabled:w}),!w&&a.a.createElement(Ce.a,{icon:"navigate_next",text:Object(S.u)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){Q(v)}}),w&&v&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Oe.a,{label:Object(S.u)("$__emailToken",1),variant:Object(S.d)("fieldVariant"),helperText:Object(S.u)($?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:$?"invalid":"",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"keyboard"})),onChange:function(e){C(null),D(e.target.value)}},value:F,placeholder:"****"}),a.a.createElement(Ce.a,{icon:"reply_all",text:Object(S.u)("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){Object(ke.h)(h,v)}}),!B&&a.a.createElement(Ce.a,{icon:"navigate_next",text:Object(S.u)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){ee()}})),w&&B&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ie,{onConfirmed:function(e){X(e)}}),a.a.createElement(Gi.a,{open:W,onClose:function(){return U(0)},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("div",{style:{position:"relative",width:"80vw",height:"80vh",overflowY:"auto",backgroundColor:"#FFFFFF",padding:"15px",margin:"auto"}},a.a.createElement("iframe",{title:"outModule",id:"policy",style:{position:"relative",top:0,left:0,right:0,bottom:40,width:"100%",height:"calc(100% - 40px)"},width:"100%",height:"100%",onScroll:function(){console.log("scroll")},src:1===W?"https://sonne.global/SONNE-Politica-de-Privacidade-2022-01-07.pdf":"https://sonne.global/SONNE-Termos-de-Servicos-2022-01-07.pdf"}),a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(Kn,{round:!0,color:"custom_color",onClick:function(){return U(0)}},"J\xe1 li"))))),a.a.createElement(Xr.a,{classes:{root:Z.checkboxLabelControl,label:Z.checkboxLabel},control:a.a.createElement(Hi.a,{tabIndex:-1,onClick:function(){return K(1)},checkedIcon:a.a.createElement("div",{className:Z.checkedIcon},a.a.createElement(re.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Z.uncheckedIcon},a.a.createElement(re.a,{size:"16px",color:"red"},"remove")),classes:{checked:Z.checked,root:Z.checkRoot}}),label:a.a.createElement("span",null,Object(S.u)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(1)},style:{color:"blue"}},Object(S.u)("$__privacyPolicy")),".")}),a.a.createElement(Xr.a,{classes:{root:Z.checkboxLabelControl,label:Z.checkboxLabel},control:a.a.createElement(Hi.a,{tabIndex:-1,onClick:function(){return K(2)},checkedIcon:a.a.createElement("div",{className:Z.checkedIcon},a.a.createElement(re.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Z.uncheckedIcon},a.a.createElement(re.a,{size:"16px",color:"red"},"remove")),classes:{checked:Z.checked,root:Z.checkRoot}}),label:a.a.createElement("span",null,Object(S.u)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(2)},style:{color:"blue"}},Object(S.u)("$__servicesTerms")),".")}),a.a.createElement("div",{className:Z.center},n.indexOf(1)>-1&&J&&a.a.createElement(Kn,{round:!0,color:"custom_color",onClick:function(){return te()}},Object(S.u)("$__completeRegistration")))))),s&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},a.a.createElement(Ri,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=Uo();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:12},a.a.createElement("h1",{className:e.title},"404"),a.a.createElement("h2",{className:e.subTitle},"Page not found :("),a.a.createElement("h4",{className:e.description},"Ooooups! Looks like you got lost."))))},show:!0,auth:!0},{path:"/maintenance-mode",name:"Maintenance Mode",mini:"E",component:function(){var e=li();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:12},a.a.createElement("h1",{className:e.title},"\\o/"),a.a.createElement("h2",{className:e.subTitle},"Plataforma em atualiza\xe7\xe3o :)"),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Tente acessar novamente em alguns minutos. Estamos implementando melhorias para melhor produtividade no seu dia a dia."))))},show:!1,auth:!1},{path:"/offline-detect",name:"Offline detect",mini:"O",component:function(){var e=si();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:12},a.a.createElement("h1",{className:e.title},'"/'),a.a.createElement("h2",{className:e.subTitle},"Parece que voc\xea est\xe1 OFF-LINE"),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Verifique a conex\xe3o de sua internet e tente novamente."),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},"Caso voc\xea esteja com conex\xe3o de internet ativa e ainda esteja visualizando esta p\xe1gina ap\xf3s algumas tentativas, favor entrar em contato com nosso suporte."),a.a.createElement("h4",{className:e.description,style:{color:"#FFFFFF"}},a.a.createElement("a",{href:"/login",target:"_self"},"Clique aqui para tentar novamente")))))},show:!1,auth:!1}]},{path:"/calendar",name:"Calendar",icon:"date_range",component:jo,show:!0,auth:!0,search:!0,subMenu:!0,permission:1,searchFields:["text","tags","users","priority","risk","complexity","impact","groups","status"]},{path:"/profile",name:"Profile",icon:"date_range",component:yu,show:!0,auth:!0,permission:0},{path:"/enterprise",name:"Enterprise",icon:"date_range",component:xu,show:!0,auth:!0,search:!0,subMenu:!0,permission:1,searchFields:["text","tags","users","priority","risk","complexity","impact","groups","status"]},{path:"/acc",name:"Account",icon:"business",alias:"account",component:ou,show:!0,auth:!0,subMenu:!0,permission:1,AppAccess:["planAdmin"],tabs:[{path:"resume",name:"resume",alias:"resume",icon:"home",show:!0,auth:!0,AppAccess:["planAdmin"]},{path:"profile",name:"profile",alias:"profile",icon:"badge",show:!0,auth:!0,AppAccess:["masterAdmin"]},{path:"whiteLabel",name:"whiteLabel",alias:"whiteLabel",icon:"palette",show:!0,auth:!0,AppAccess:["masterAdmin"],accountHas:["whiteLabel"]},{path:"integrations",name:"integrations",alias:"plataformsIntegrations",icon:"integration_instructions",show:!0,auth:!0,AppAccess:["masterAdmin"]}]},{path:"/library",name:"library",alias:"library",component:Vo,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=iu();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(S.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(S.d)("menu")}},"Voc\xea j\xe1 utilizou o n\xfamero de usu\xe1rios contratados"),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},"Entre em contato com nossos consultores para solicitar um upgrade do seu plano."))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1},{path:"/deniedAccess",name:"deniedAccess",alias:"deniedAccess",component:function(){var e=cu();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(S.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(S.d)("menu")}},Object(S.u)("$__accessDenied","*")),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},Object(S.u)("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],Ou=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{menu:{position:"relative",borderRight:Object(S.d)("color"),display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"relative",borderRight:Object(S.d)("color"),display:"flex",flexDirection:"column",alignItems:"baseline"},button:{padding:"7px 0px",display:"flex",justifyContent:"center"},buttonExpanded:{padding:"7px 0px",display:"flex",justifyContent:"left",width:"100%"},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function wu(){wu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ju=function(e){var t=l.a.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Object(S.j)(),o=r[0]&&36===r[0].length&&t.cards[r[0]]&&"plan"===t.cards[r[0]].type?Object(et.t)(r[0]):null,i=r&&r.length>0&&36===r[0].length&&t.cards[r[0]]&&t.cards[r[0]].image?t.cards[r[0]].image:Sa.a,s=[];return t.cards[r[0]]&&t.cards[r[0]].client&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client&&t.cards[e].client===t.cards[r[0]].client})).length>1&&Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&t.cards[e].client===t.cards[r[0]].client&&"plan"===t.cards[e].type})).forEach((function(e){s.push(Object(p.a)(Object(p.a)({name:t.cards[e].name},t.cards[e].image?{avatar:t.cards[e].image}:{icon:"view_comfy"}),{},{onClick:function(){c.a.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),a.a.createElement(Ua.a,{title:a.a.createElement(a.a.Fragment,null,t.cards[r[0]].name)},a.a.createElement("div",{style:Object(p.a)({display:"flex",width:"100%",justifyContent:"left",alignItems:"center"},o&&parseInt(o)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate?{cursor:"pointer"}:{}),id:"plan_identification",onClick:function(){(o&&parseInt(o)>3||n.owner||n.planAdmin||n.planEdit||n.planModerate)&&e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:r[0],module:"cardEdit",activeModule:"cardEdit",data:t.cards[r[0]]}))}},a.a.createElement("div",{style:{width:"30px",height:"30px",backgroundColor:"black",marginLeft:"7px",marginRight:"3px",borderRadius:"11px",backgroundImage:'url("'.concat(i,'")'),backgroundSize:"cover",backgroundPosition:"center center"}}),e.expanded&&a.a.createElement("div",{style:{width:"100%",zIndex:1}},t.cards[r[0]].client&&t.users[t.cards[r[0]].client]&&a.a.createElement("div",{style:{fontSize:"12px",fontWeight:"bold",marginLeft:"15px"}},t.users[t.cards[r[0]].client].name),a.a.createElement("div",{style:{fontSize:"12px",marginLeft:"7px",maxWidth:"calc(100% - 60px)",display:"flex",justifyContent:"space-between"},id:"client_plan_switch"},0===s.length?t.cards[r[0]].name:a.a.createElement(V.a,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:s})))))},Eu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.search,o=t.session,i=a.a.useState(!1),s=Object(m.a)(i,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],y=g[1],v=Object(B.a)(Ou)(),x=window.location.pathname.split("/"),_="/".concat(x[1]),O=e.expanded;a.a.useEffect((function(){return n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})})),function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!1}))}}),[n.users.selected]);var w=window.location.hash.split("/");w[0]=w[0].replace("#","");var j="".concat(_,"#").concat(w[0]?w[0]:"tab"),E=Object(S.j)(),k=function(t){d(t);var r=l.a.getState().db.cards;Object.keys(r).forEach((function(e){t&&r[e]&&!r[e]._expanded&&(r[e]._expanded=t),!t&&r[e]&&r[e]._expanded&&(r[e]._expanded=t)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cardsExpanded:t,cards:r}))},L=function(){var t=Object(f.a)(wu().mark((function t(r){var n;return wu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(y(!0),l.a.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,Object(Rt.a)(e,null,!0);case 4:n=t.sent,(l.a.getState().session.cards.adminViewLoader||n)&&(y(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!l.a.getState().session.cards.adminView})}))),t.next=10;break;case 8:y(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!l.a.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(e){c.a.push(e)};return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:O?v.menuExpanded:v.menu},a.a.createElement("div",{className:O?v.buttonExpanded:v.button},a.a.createElement(Ce.a,{icon:O?"menu_open":"read_more",text:O?Object(S.u)("$__collapsingMenu",1):null,title:O?null:Object(S.u)("$__expandingMenu",1),iconColor:Object(S.d)("subMenuTextColor"),textColor:Object(S.d)("subMenuTextColor"),onClick:function(){e.subMenuExpanded(!O)},size:"21px"})),("/files"===window.location.pathname||"/t"===window.location.pathname||"/d"===window.location.pathname||"/sp"===window.location.pathname&&w[0]&&36===w[0].length)&&a.a.createElement(a.a.Fragment,null,u?a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_options_collapseCards"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__collapseCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.u)("$__collapseCards",1),icon:"close_fullscreen",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!1)},size:"21px"})):a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_options_expandingCards"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__expandingCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.u)("$__expandingCards",1),icon:"open_in_full",iconColor:Object(S.d)("subMenuTextColor"),onClick:function(){k(!0)},size:"21px"}))),("/d"===_&&"dayTasks"===w[1]||"/t"===_&&n&&n.users&&n.users.selected&&Object.keys(n.users.selected).filter((function(e){return!0===n.users.selected[e]})).length>0||"/sp"===_&&!w[0])&&E&&(E.owner||E.plan&&(E.planAdmin||E.planModerate))&&a.a.createElement("div",{className:O?v.buttonExpanded:v.button,style:{display:"flex"}},b?a.a.createElement(ce.a,{size:25,style:{margin:"auto",display:"flex"}}):a.a.createElement(Ce.a,{text:O?Object(S.u)("$__adminViewDescription",1):null,title:O?null:Object(S.u)("$__adminViewDescription",1),textColor:l.a.getState().session.cards.adminView?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),iconColor:l.a.getState().session.cards.adminView?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),icon:"groups",id:"sideBar_subMenu_options_setAdminView",onClick:function(){L()},size:"21px"})),"/t"===window.location.pathname&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_options_setAdminView"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__viewInColumns",1):null,textColor:r.viewList?Object(S.d)("subMenuTextColor"):Object(S.d)("color"),iconColor:r.viewList?Object(S.d)("subMenuTextColor"):Object(S.d)("color"),title:O?null:Object(S.u)("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!1}))},size:"21px"})),a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_options_viewInList"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__viewInList",1):null,title:O?null:Object(S.u)("$__viewInList",1),icon:"list",iconColor:r.viewList?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:r.viewList?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{viewList:!0}))},size:"21px"}))),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:v.separator}),w[0]&&36===w[0].length&&r.cards[w[0]]&&a.a.createElement("div",{style:{zIndex:1},id:"sideBar_subMenu_plan_infos"},a.a.createElement(ju,Object.assign({expanded:O},e))),_u.filter((function(e){return e.path===_})).length>0&&_u.filter((function(e){return e.path===_}))[0].tabs&&_u.filter((function(e){return e.path===_}))[0].tabs.length>0&&(_u.filter((function(e){return e.path===_}))[0].hashId&&w[0]&&36===w[0].length||!_u.filter((function(e){return e.path===_}))[0].hashId)&&a.a.createElement(a.a.Fragment,null,_u.filter((function(e){return e.path===_}))[0].tabs.filter((function(e){return!e.hashId&&(!w[0]||w[0]&&w[0].length<36)||e.hashId&&w[0]&&36===w[0].length})).filter((function(e,t){var n=!1,a=w[0]&&36===w[0].length?r.cards[w[0]]:null;return e&&e.AppAccess&&e.AppAccess.length>0?e.AppAccess.forEach((function(e){E[e]&&(n=!0)})):e&&!e.AppAccess&&(n=!0),a&&a.isTemplate&&!e.templates&&(n=!1),e&&e.AppAccess&&e.AppAccess.planAdmin&&!(E&&E.plan&&E.planAdmin)&&(n=!1),a&&a.planType&&("matrix"===e.alias||"guidelines"===e.alias||"objectives"===e.alias||"goals"===e.alias)&&(n=!1),a&&"board"===e.alias&&(!a.planType||a.planType&&"operational"!==a.planType)&&(n=!1),a&&"matrix"===e.alias&&a.planType&&(n=!1),a&&"operational"===a.planType&&"overview"===e.alias&&(n=!1),e.accountHas&&0===e.accountHas.filter((function(e){return o[e]})).length&&(n=!1),!(!(E.owner||E&&E.enabled&&n)||!e.show)})).map((function(e,t){return a.a.createElement("div",{className:O?v.buttonExpanded:v.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},a.a.createElement(Ce.a,{text:O?"matrix"===e.alias?"MATRIX SWOT":Object(S.u)("$__".concat(e.alias),1):null,title:O?null:"matrix"===e.alias?"MATRIX SWOT":Object(S.u)("$__".concat(e.alias),1),icon:e.icon,iconColor:w[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),textColor:w[1]===e.path?Object(S.d)("subMenuTextColorActive"):Object(S.d)("subMenuTextColor"),onClick:function(){C("".concat(j,"/").concat(e.path))},size:"21px"}))}))),w[0]&&36===w[0].length&&r.cards[w[0]]&&r.cards[w[0]].miroBoard&&a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_plan_miroBoard"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__planningBoard",1):null,title:O?null:Object(S.u)("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"planningBoard"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){C("".concat(j,"/","planningBoard"))},size:"21px"})),"/t"===window.location.pathname&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:v.separator}),a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_lastTasks"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__lateTasks",1):null,title:O?null:Object(S.u)("$__lateTasks",1),icon:"event_busy",iconColor:"late"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"late"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){c.a.push("t#tab/lateTasks")},size:"21px"})),a.a.createElement("div",{className:O?v.buttonExpanded:v.button,id:"sideBar_subMenu_nextTasks"},a.a.createElement(Ce.a,{text:O?Object(S.u)("$__nextTasks",1):null,title:O?null:Object(S.u)("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),textColor:"nextTasks"===w[1]?Object(S.d)("color"):Object(S.d)("subMenuTextColor"),onClick:function(){c.a.push("t#tab/nextTasks")},size:"21px"}))))))})),ku=r(643);function Su(){Su=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var Lu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(le.a)($i)((function(e){var t=e.classes,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=function(){var t=Object(f.a)(Su().mark((function t(r,n){return Su().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.subMenuExpanded&&e.setSubMenuExpanded(!1),!r||window.location.pathname===r&&n!==o||c.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!0})):(i(n),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!1})));case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();return a.a.createElement(N.a,{info:{path:"components/Sidebar/Index"}},a.a.createElement("div",{className:t.root},a.a.createElement("div",{className:t.bar,style:{background:Object(S.d)("menuColor")},id:"sideBar"},a.a.createElement("div",{className:t.logoMini,id:"sideBar_logoMini",style:{width:"100%",justifyContent:"space-between",display:"flex",cursor:"pointer",color:Object(S.d)("menuButtonColor"),alignItems:"center"}},a.a.createElement("div",{style:{backgroundImage:'url("'.concat(Object(S.d)("customLogo"),'")'),width:"calc(100% - 70px)",height:"auto",marginLeft:"15px",minHeight:"min-content",cursor:"pointer",paddingTop:"33%",backgroundPosition:"center center",backgroundSize:"contain",backgroundRepeat:"no-repeat"},onClick:function(){u("/d#tab/resume","dashboard")}}),a.a.createElement("div",{style:{padding:"7px",marginRight:"7px",cursor:"pointer"},onClick:function(){e.menuExpand()},id:"sideBar_button_hideMenu"},a.a.createElement(re.a,{icon:"menu",color:"parent",title:"$__hideMenu",size:"22px"}))),a.a.createElement("div",{style:{position:"absolute",top:"100px",bottom:"0px",overflowX:"auto",width:"100%"}},a.a.createElement("div",{className:t.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/d#tab/resume","dashboard")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__dashboard","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_brightAndConnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/bright-and-connected#tab/home","bright-and-connected")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:Va.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"21px",style:{marginRight:"7px"}}),"BRIGHT & CONNECTED")),a.a.createElement("div",{className:t.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/sp#tab/home","StrategyAndPlans")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/t#tab/myTasks","myTasks")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__activities","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/library","library")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__library","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_tags"},a.a.createElement("div",{className:"/tags"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/tags","tags")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__tags","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},a.a.createElement("div",{className:"/calendar"===window.location.pathname?t.itemButtomActive:t.itemButtom,onClick:function(){u("/calendar","calendar")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__calendar","*"))),a.a.createElement("div",{className:t.separator}),a.a.createElement("div",{className:t.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:l.a.getState().chat.open?t.itemButtomActive:t.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!l.a.getState().chat.open}))},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Un,null,a.a.createElement(re.a,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Object(S.u)("$__chat","*"))),a.a.createElement("div",{className:t.item,id:"sideBar_button_calendar"},a.a.createElement("div",{className:t.itemButtom,onClick:function(){window.open("https://support.machen.ai","_blank")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(re.a,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.u)("$__support","*")))),e.subMenu&&a.a.createElement("div",{className:e.subMenuExpanded?t.moduleExpanded:t.module,id:"sideBar_subMenu",style:{background:Object(S.d)("subMenuColor"),borderRight:"4px solid ".concat(Object(S.d)("color"))}},a.a.createElement(Eu,{hashs:s,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),"myDay"!==o&&"timer"!==o&&"chat"!==o&&"/tags"===window.location.pathname&&a.a.createElement("div",{className:t.moduleExpanded,id:"sideBar_session_tags"},a.a.createElement(Wn,{onLoad:function(){e.setSubMenuExpanded(!0)},onExit:function(){return e.setSubMenuExpanded(!1)}})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:15,color:"#c0b283",fontSize:"10px"}},"V:",ku.version))))})));var Cu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().chat;return a.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!t.open}))}},a.a.createElement(Un,null,a.a.createElement(re.a,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));var Iu=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=l.a.getState(),t=e.db,r=e.session,n=a.a.useState(!1),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useRef(null),u=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),d=function(e){s.current&&s.current.contains(e.target)||c(!1)},p=Object.keys(t.cards).filter((function(e){return!t.cards[e].deleted&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&t.cards[e]._users&&t.cards[e]._users[r._id]&&t.cards[e]._users[r._id].myDay&&O()(new Date(1e3*t.cards[e]._users[r._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===u})).map((function(e){return t.cards[e]}));return 0===p.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:s,"aria-controls":i?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){c((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:p.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(re.a,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),p.length>0&&a.a.createElement(It.a,{open:i,anchorEl:s.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:d},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",padding:"0px",fontSize:"14px",fontWeight:"bolder"}},Object(S.u)("$__myDay"))),a.a.createElement(lr.a,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));var Tu=Object(u.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState([]),d=Object(m.a)(u,2),p=d[0],f=d[1],h=a.a.useRef(null),g=Object.keys(l.a.getState().db.cards).filter((function(e){return!!(r.cards[e]&&!r.cards[e].deleted&&"chatGroup"!==r.cards[e].type&&r.cards[e]._parent&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent].requireApproval&&(l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]._users[n._id]&&l.a.getState().db.cards[l.a.getState().db.cards[e]._parent]._users[n._id].approvalResponsible||r.cards[e]._users&&1===Object.keys(r.cards[e]._users).length&&r.cards[e]._users[n._id]))})).map((function(e){return r.cards[e]}));a.a.useEffect((function(){0===g.length&&s(!1)}),[e.cards]);var b=function(e){h.current&&h.current.contains(e.target)||s(!1)};return 0===g.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsApprovalBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:h,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:null===g||void 0===g?void 0:g.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(re.a,{icon:"approval",color:"parent",title:"$__forApproval"}))),g.length>0&&a.a.createElement(It.a,{open:c,anchorEl:h.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom",padding:11}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:b},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{color:"red",fontWeight:"bold",fontSize:14}},Object(S.u)("$__attention",1),": ",a.a.createElement("span",{style:{color:Object(S.d)("menu")}},Object(S.u)("$__thisActivityRequireApproval",1))),g.filter((function(e){return-1===p.indexOf(e._id)})).sort((function(e,t){var r=e.updated_at&&e.updated_at.low?e.updated_at.low:e.updated_at,n=t.updated_at&&t.updated_at.low?t.updated_at.low:t.updated_at;return r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement("div",{key:e._id,style:{display:"grid",width:"100%",border:"solid 1px rgba(0,0,0,0.1)",padding:12,marginTop:7,borderRadius:7}},a.a.createElement(ut.a,{db:"cards",cardId:e._id,onlyOption:!0}),a.a.createElement(st,{nodeId:e._id,onAction:function(){var t=Array.from(p);-1===t.indexOf(e._id)&&t.push(e._id),f(t)}}))}))))))})))})),Fu=Object(B.a)((function(){return{unReaded:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"100%",opacity:1,borderLeft:"solid red 2px"},Readed:{padding:"7px",borderBottom:"solid 1px rgba(0,0,0,0.1)",width:"100%",opacity:.5,maxWidth:"100%"}}}));var Du=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users,timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,c=e.data,s=e.type,u=a.a.useState(!1),d=Object(m.a)(u,2),f=d[0],g=d[1],b=Fu();a.a.useEffect((function(){return function(){}}),[]);var y="cards";c&&c.cardId&&l.a.getState().db.users[c.cardId]&&(y="users");var v=function(){var t=Object(et.j)(c.cardId);e.reduxFunction("IMMEDIATE","SET_NOTIFICATIONS",Object(p.a)(Object(p.a)({},l.a.getState().notifications),{},{total:l.a.getState().notifications.total-t.total})),Object(Ar.a)(e,{readedBy:o._id,id:e.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s}),l.a.getState().db&&l.a.getState().db.cards&&l.a.getState().db.cards[c.cardId]&&e.reduxFunction("IMMEDIATE","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),{},Object(h.a)({},c.cardId,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[c.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),i.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:c.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s},(function(){})),e.onRead&&setTimeout((function(){e.onRead()}),500)},x=Object.keys(r[c.cardId]).filter((function(e){var t;return"all"===s||"deleted"===s&&(null===(t=l.a.getState().db.cards[c.cardId])||void 0===t?void 0:t.deleted)||"deleted"!==s&&l.a.getState().db.cards[c.cardId]&&!l.a.getState().db.cards[c.cardId].deleted&&("comment"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"comment"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"log"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"log"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"timer"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"timer"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"kpi"===s&&Object.keys(r[c.cardId]).filter((function(t){var n;return"kpi"===(null===(n=r[c.cardId][e])||void 0===n?void 0:n.type)&&!r[c.cardId][e].deleted})).length>0||"mentions"===s&&Object.keys(r[c.cardId]).filter((function(t){var n,a;return(null===(n=r[c.cardId][e])||void 0===n||null===(a=n.message)||void 0===a?void 0:a.indexOf(o._id))>-1&&!r[c.cardId][e].deleted})).length>0||"completed"===s&&"completed"===l.a.getState().db.cards[c.cardId].status)})).filter((function(e){return o&&o._id&&r[c.cardId]&&r[c.cardId][e]&&!r[c.cardId][e].deleted&&r[c.cardId][e].user&&r[c.cardId][e].user._id&&r[c.cardId][e].user._id!==o._id&&(!r[c.cardId][e].readedBy||r[c.cardId][e].readedBy&&!r[c.cardId][e].readedBy[o._id])}));return a.a.createElement("div",{className:c.readed?b.Readed:b.unReaded,style:{width:"100%",overflow:"auto"}},c.cardId&&l.a.getState().db.cards[c.cardId]&&a.a.createElement("div",{style:l.a.getState().db.cards[c.cardId]&&"chatGroup"===l.a.getState().db.cards[c.cardId].type?{cursor:"pointer"}:{}},a.a.createElement(ut.a,{setPrivate:function(e){g(e)},db:"cards",data:l.a.getState().db.cards[c.cardId],onlyOption:!(!l.a.getState().db.cards[c.cardId]||"chatGroup"!==l.a.getState().db.cards[c.cardId].type),onOpen:e.onClick||null})),x.length>0&&(!l.a.getState().db.cards[c.cardId].private||l.a.getState().db.cards[c.cardId].private&&(l.a.getState().controls.lockPrivate||f))?a.a.createElement(a.a.Fragment,null,x.sort((function(e,t){return parseInt(r[c.cardId][e].created_at)>parseInt(r[c.cardId][t].created_at)?-1:parseInt(r[c.cardId][e].created_at)<parseInt(r[c.cardId][t].created_at)?1:0})).map((function(t,r){return a.a.createElement("div",{key:"".concat(t),style:{position:"relative",marginBottom:"33px",paddingBottom:15,display:"-webkit-box"}},a.a.createElement(Or.a,{storie:Object(p.a)(Object(p.a)({},l.a.getState().timeline&&l.a.getState().timeline[c.cardId]&&l.a.getState().timeline[c.cardId][t]?l.a.getState().timeline[c.cardId][t]:{}),{},{idRel:t}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:y,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:l.a.getState().timeline[c.cardId][t].files?l.a.getState().timeline[c.cardId][t].files:[],file:r})}}),r+1===x.length?a.a.createElement("div",{style:{position:"absolute",height:"93px",left:0,bottom:"-33px",right:8,background:"linear-gradient(0deg, rgba(255,255,255,1) 34%, rgba(255,255,255,0) 100%)"}},a.a.createElement("div",{style:{position:"absolute",bottom:"0px",display:"flex",justifyContent:"space-between",width:"100%"}},a.a.createElement(k.a,{title:Object(S.u)("$__open",1),text:Object(S.u)("$__open",1),color:Object(S.d)("color"),icon:"launch",onClick:function(){e.onClick&&e.onClick(),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:c.cardId,module:"cardEdit",activeModule:"cardEdit",data:l.a.getState().db.cards[c.cardId]})),v()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),a.a.createElement(k.a,{title:Object(S.u)("$__markAsRead",1),text:Object(S.u)("$__markAsRead",1),color:Object(S.d)("color"),icon:"mark_chat_read",onClick:function(){v()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):a.a.createElement(a.a.Fragment,null))}))):a.a.createElement(a.a.Fragment,null))}));function Nu(){Nu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Au=Object(u.b)((function(e){return{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.session,n=t.timeline,o=t.functions.socket,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useState("comment"),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useRef();a.a.useEffect((function(){return s||(u(!0),j()),function(){u(!1)}}),[]);var j=function(){var t=Object(f.a)(Nu().mark((function t(){var r,n,a,o,i,c,s,u,d,f=arguments;return Nu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=f.length>0&&void 0!==f[0]?f[0]:0,f.length>1&&void 0!==f[1]?f[1]:0,n=f.length>2&&void 0!==f[2]&&f[2],C<(a=r)&&(a=0),!n){t.next=9;break}t.t0={data:[]},t.next=12;break;case 9:return t.next=11,Pe.a.post("/M_UnReadedList",{skip:a,limit:9999999999});case 11:t.t0=t.sent;case 12:if(o=t.t0,i=0,c=0,s=0,t.prev=16,!(n||o&&o.data&&o.data.length>0)){t.next=26;break}return u=Object(p.a)({},l.a.getState().timeline),d=[],t.next=22,new Promise((function(e,t){o.data.forEach((function(t,r){i=t.total,d.push(t.card),t.timeline&&t.timeline.length>0&&t.timeline.forEach((function(e){var t={},r={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.forEach((function(e){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.forEach((function(e){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e.type,Object(p.a)(Object(p.a)({},r[e.type]),{},Object(h.a)({},e._id,e))))})),parseInt(c)<parseInt(e.data.created_at)&&(c=parseInt(e.data.created_at)),(0===s||s>parseInt(e.data.created_at))&&(s=parseInt(e.data.created_at)),u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},u&&u[e.nodeId]?u[e.nodeId]:{}),{},Object(h.a)({},e.data._id,Object(p.a)(Object(p.a)(Object(p.a)({},e.data),e.params),{},{readedBy:t,_reactions:r})))))})),r+1===o.data.length&&e(!0)}))}));case 22:t.sent&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:i>0?i:0,lastNotification:c,firstNotification:s}),e.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),u)),Object(Rt.c)(e,d);case 26:t.next=31;break;case 28:t.prev=28,t.t1=t.catch(16),console.log(t.t1);case 31:case"end":return t.stop()}}),t,null,[[16,28]])})));return function(){return t.apply(this,arguments)}}(),E=function(){var t=Object(f.a)(Nu().mark((function t(){return Nu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.u)("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){y(!1);var t=Object(p.a)({},l.a.getState().timeline);Object.keys(t).forEach((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(n){return l.a.getState().db.cards&&l.a.getState().db.cards[e]&&"chatGroup"!==l.a.getState().db.cards[e].type&&(!t[e][n].readedBy||t[e][n].readedBy&&!t[e][n].readedBy[r._id])})).forEach((function(r){delete t[e][r]}))})),e.reduxFunction("ASYNC","SET_TIMELINE",{timeline:t}),e.reduxFunction("ASYNC","SET_NOTIFICATIONS",{total:0,lastNotification:0,firstNotification:0});try{o.emit("data",{module:"notifications",method:"put",action:"readedAll"},{})}catch(n){console.log(n)}}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),L=function(e){var t,r;(null===e||void 0===e||null===(t=e.target)||void 0===t||null===(r=t.className)||void 0===r?void 0:r.indexOf("ignoreClickAway"))>-1||w.current&&w.current.contains(e.target)||setTimeout((function(){y(!1)}),100)},C=0,I={comment:0,log:0,mentions:0,deleted:0,kpi:0,timer:0,completed:0};if(Object.keys(l.a.getState().db.cards).filter((function(e){var t=l.a.getState().db.cards[e];return!!("chatGroup"!==t.type&&"step"!==t.type&&t._users&&t._users[r._id]&&n[e]&&Object.keys(n[e]).filter((function(t){return r&&r._id&&n&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).length>0)})).filter((function(e){return n[e]})).forEach((function(e,t){Object.keys(n[e]).filter((function(t){return r&&r._id&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).forEach((function(t){var a,o,i,c;(null===(a=l.a.getState().db.cards[e])||void 0===a?void 0:a.deleted)&&(I.deleted=I.deleted+1),"completed"===(null===(o=l.a.getState().db.cards[e])||void 0===o?void 0:o.status)&&(I.completed=I.completed+1),(null===(i=n[e][t])||void 0===i||null===(c=i.message)||void 0===c?void 0:c.indexOf(r._id))>-1&&l.a.getState().db.cards[e]&&!l.a.getState().db.cards[e].deleted&&(I.mentions=I.mentions+1),I[n[e][t].type]=parseInt(I[n[e][t].type])+1,C+=1}))})),0===C&&b&&y(!1),0===C)return a.a.createElement(a.a.Fragment,null);var T=_;return"comment"!==T||I.comment||(T="mentions"),"mentions"!==T||I.mentions||(T="timers"),"timers"!==T||I.mentions||(T="kpi"),"kpi"!==T||I.mentions||(T="log"),"log"!==T||I.log||(T="completed"),"completed"!==T||I.completed||(T="deleted"),"deleted"!==T||I.deleted||(T="all"),a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:w,"aria-controls":b?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){y((function(e){return!e}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:C,color:"secondary"},a.a.createElement(re.a,{icon:0===C?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),a.a.createElement(It.a,{open:b,anchorEl:w.current,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,o=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===o?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:L},a.a.createElement("div",{style:{width:"800px",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",display:"flex"}},a.a.createElement("div",{style:{height:"auto",width:"300px",overflowY:"auto",display:"table"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px",width:"-webkit-fill-available",fontSize:18,color:Object(S.d)("color"),fontWeight:"bold"}},a.a.createElement("div",null,Object(S.u)("$__notifications"))),a.a.createElement("ul",{style:{listStyle:"none",padding:0}},I.comment?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__timeline","*"),text:Object(S.u)("$__timeline","*"),color:"comment"===T?Object(S.d)("menu"):"lightGray",icon:"timeline",onClick:function(){O("comment")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.comment})):a.a.createElement(a.a.Fragment,null),I.mentions?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__mentioned","*"),text:Object(S.u)("$__mentioned","*"),color:"mentions"===T?Object(S.d)("menu"):"lightGray",icon:"person_pin_circle",onClick:function(){O("mentions")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.mentions})):a.a.createElement(a.a.Fragment,null),I.kpi?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__kpi","*"),text:Object(S.u)("$__kpi","*"),color:"kpi"===T?Object(S.d)("menu"):"lightGray",icon:"analytics",onClick:function(){O("kpi")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.kpi})):a.a.createElement(a.a.Fragment,null),I.timer?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__timeSheet","*"),text:Object(S.u)("$__timeSheet","*"),color:"timer"===T?Object(S.d)("menu"):"lightGray",icon:"timer",onClick:function(){O("timer")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.timer})):a.a.createElement(a.a.Fragment,null),I.log?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__update","*"),text:Object(S.u)("$__update","*"),color:"log"===T?Object(S.d)("menu"):"lightGray",icon:"update",onClick:function(){O("log")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.log})):a.a.createElement(a.a.Fragment,null),I.completed?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__completed","*"),text:Object(S.u)("$__completed","*"),color:"completed"===T?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){O("completed")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.completed})):a.a.createElement(a.a.Fragment,null),I.deleted?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__deletedItems","*"),text:Object(S.u)("$__deletedItems","*"),color:"deleted"===T?Object(S.d)("menu"):"lightGray",icon:"delete_sweep",onClick:function(){O("deleted")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:I.deleted})):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.u)("$__all","*"),text:Object(S.u)("$__all","*"),color:"all"===T?Object(S.d)("menu"):"lightGray",icon:"all_inbox",onClick:function(){O("all")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0}))),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(k.a,{title:Object(S.u)("$__clearNotifications",1),text:Object(S.u)("$__clearNotifications",1),color:Object(S.d)("color"),icon:"clear_all",onClick:function(){E()},size:"21px",style:{padding:"0px !important"}})))),a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"600px",backgroundColor:"rgba(247,247,247,1)",overflowY:"auto"}},Object.keys(l.a.getState().db.cards).filter((function(e){var t=l.a.getState().db.cards[e];return!!("chatGroup"!==t.type&&r&&r._id&&t._users&&t._users[r._id]&&n[e]&&Object.keys(n[e]).filter((function(t){return n&&n[e]&&n[e][t]&&!n[e][t].deleted&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).length>0)})).filter((function(e){var t;return"all"===T||"deleted"===T&&(null===(t=l.a.getState().db.cards[e])||void 0===t?void 0:t.deleted)||"deleted"!==T&&l.a.getState().db.cards[e]&&!l.a.getState().db.cards[e].deleted&&("comment"===T&&Object.keys(n[e]).filter((function(t){var r;return"comment"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"log"===T&&Object.keys(n[e]).filter((function(t){var r;return"log"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"kpi"===T&&Object.keys(n[e]).filter((function(t){var r;return"kpi"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"timer"===T&&Object.keys(n[e]).filter((function(t){var r;return"timer"===(null===(r=n[e][t])||void 0===r?void 0:r.type)})).length>0||"mentions"===T&&Object.keys(n[e]).filter((function(t){var a,o;return(null===(a=n[e][t])||void 0===a||null===(o=a.message)||void 0===o?void 0:o.indexOf(r._id))>-1})).length>0||"completed"===T&&"completed"===l.a.getState().db.cards[e].status)})).sort((function(e,t){var a=0,o=0;return n[e]&&Object.keys(n[e]).filter((function(t){return r&&r._id&&n&&n[e]&&n[e][t]&&n[e][t].user&&n[e][t].user._id&&n[e][t].user._id!==r._id&&(!n[e][t].readedBy||n[e][t].readedBy&&!n[e][t].readedBy[r._id])})).forEach((function(t){parseInt(n[e][t].created_at)>a&&(a=parseInt(n[e][t].created_at))})),n[t]&&Object.keys(n[t]).filter((function(e){return n[t][e].user._id!==r._id&&(!n[t][e].readedBy||n[t][e].readedBy&&!n[t][e].readedBy[r._id])})).forEach((function(e){parseInt(n[t][e].created_at)>a&&(o=parseInt(n[t][e].created_at))})),a>o?-1:a<o?1:0})).map((function(e){return a.a.createElement("div",{key:"".concat(e)},a.a.createElement(Du,{type:T,data:{cardId:e},onClick:function(){y(!1)}}))}))))))))})))})),Pu=function(e){var t=e.handlePrevScreen,r=e.name,n=e.prev,o=e.handleClose;return a.a.createElement("div",null,a.a.createElement("p",{style:{marginTop:"2px",height:"80px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",borderBottom:"1px solid #d1d1cf",fontSize:"16px"}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"view_comfy"),r),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",right:"20px",top:"18px",color:"grey"},size:"30px",onClick:o?function(){o()}:null},"close")),n&&a.a.createElement("div",{id:"getElements_58"}," ",a.a.createElement(re.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},onClick:t,size:"30px"},"arrow_back")))},$u=function(e){var t=e.name,r=e.handleEvent,o=e.style,i=e.disabled,c=e.id,l=Object(n.useState)(!1),s=Object(m.a)(l,2),u=s[0],d=s[1],f=u?"rgba(0, 0, 0,0.05)":"white";return a.a.createElement("button",{id:c,onMouseEnter:function(){d(!0)},onMouseLeave:function(){d(!1)},onClick:r,disabled:i,style:Object(p.a)(Object(p.a)({},o),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:f})},t)},Mu=function(e){var t=e.children;return a.a.createElement("div",{style:{height:"100.4vh",width:"100vw",backgroundColor:"rgba(0, 0, 0, 0.5)",position:"absolute",left:"0% !important",right:"0%",top:"0%",bottom:"0%",zIndex:"9999",display:"flex",justifyContent:"center",overflowY:"scroll",overflowX:"hidden"}},t)},zu=function(e){var t=e.children,r=e.widthSize,o=e.id,i=Object(n.useState)({top:"10%",resize:"0.9"}),c=Object(m.a)(i,2),l=c[0],s=c[1];return Object(n.useEffect)((function(){var e=window.innerWidth<1500;s({resize:e?"0.9":"1"})}),[]),a.a.createElement("div",{style:{width:r||"900px",position:"absolute",borderRadius:"5px",backgroundColor:"#fafbfc",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",transform:"scale(".concat(l.resize,")"),alignSelf:"center"},id:o},t)},Yu=function(e){var t=e.tittle,r=e.text;return a.a.createElement("div",{style:{border:"1px solid #ebebeb",marginLeft:"25px",minHeight:"50px",backgroundColor:"white",marginTop:"22px",width:"92%",height:"100px",position:"relative",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("p",{style:{margin:"0px",marginLeft:"22px",marginTop:"16px",fontSize:"16px",fontWeight:"bold"}},t),a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",color:"#757380",marginRight:"10px",position:"absolute",top:"-14px",left:"-14px"}},"info"),a.a.createElement("p",{style:{marginLeft:"22px",marginTop:"0px",display:"flex",position:"relative",fontSize:"14px",color:"#7c828d",maxWidth:"370px"}},r))},Bu=function(e){var t=e.item,r=e.index,o=e.handleItemClick,i=e.selectedPlan,c=Object(n.useState)(null),l=Object(m.a)(c,2),s=l[0],u=l[1],d=function(e){u(e)};return a.a.createElement("li",{id:t.id,onClick:function(){return o(r,t)},onMouseEnter:function(){return d(r)},onMouseLeave:function(){return d(null)},style:{filter:"brightness(".concat((null===i||void 0===i||i.index,"100%"),")"),opacity:(null===i||void 0===i?void 0:i.index)===r?"1":"0.7",border:"2px solid ".concat((null===i||void 0===i||i.index,"#ebebeb")),width:"90%",height:"65px",marginTop:0===r?"15px":"12px",marginLeft:"17px",display:"flex",alignItems:"center",boxShadow:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px",backgroundColor:(null===i||void 0===i?void 0:i.index)===r?"#ebebeb":"white",cursor:"pointer",transform:"scale(".concat(s===r?"1.03":"1",")")}},a.a.createElement(re.a,{size:"35px",style:{alignSelf:"center",color:"#757380",marginLeft:"10px",marginRight:"10px"},icon:t.icon}),a.a.createElement("p",{style:{alignSelf:"center",marginTop:"9px",color:"black",fontWeight:"bold"}},Object(S.u)(t.label)))},Ru=[{label:"$__strategic",value:null,gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif.gif",description:"$__planStrategicDescription",icon:Ht.a,id:"SelectPlan",index:0},{label:"$__tacticAndOrOperational",value:"flow",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gifEstrategico.gif",description:"$__planTaticAndOperationalDescription",icon:"account_tree",id:"c"},{label:"$__flowOrProcess",value:"operational",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif2.gif",description:"$__planFlowOrProcessDescription",icon:"view_week",id:"a"},{label:"$__crm",value:"crm",gif:"https://blobmatrix.blob.core.windows.net/saas/planType_gif3.gif",description:"$__planCrmDescription",icon:"filter_alt",id:"b"}],Gu=function(e){var t=e.handleNextScreen,r=e.handleName,o=e.handleClose,i=Object(n.useState)(!0),c=Object(m.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Pu,{prev:!1,name:Object(S.u)("$__insertThePlanName"),handleClose:o}),a.a.createElement(Rr.a,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(qn.a,{item:!0,xs:12,style:{marginTop:"30px"}},a.a.createElement("p",{style:{outline:"none",alignSelf:"center",fontWeight:"bold",width:"99.3%",backgroundColor:"transparent",border:"none",fontSize:"12px",marginBottom:"4px",marginLeft:"2px",marginTop:"6px"}},Object(S.u)("$__planName")),a.a.createElement("input",{onChange:function(e){var t=e.target.value.slice(-1);s(!t)},onBlur:function(e){return r(e.target.value)},placeholder:Object(S.u)("$__insertThePlanNamePlaceholder"),style:{height:"35px",color:"#7c828d",marginBottom:"5px",outline:"none",alignSelf:"center",width:"99.3%",backgroundColor:"transparent",border:"none",borderBottom:"1px solid #d1d1cf",fontSize:"16px"}})),a.a.createElement(qn.a,{item:!0,xs:12,style:{marginTop:"45px"}},a.a.createElement($u,{handleEvent:t,id:"intro_45",name:Object(S.u)("$__next"),disabled:l,style:{width:"40%",marginLeft:"30%",marginBottom:"45px",border:"2px solid #ebebeb"}}))))};function Hu(){Hu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Wu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=l.a.getState(),n=r.session,a=r.db,o=Object(p.a)({},e),i=Object(p.a)({},e._parent&&l.a.getState().db.cards[e._parent]?l.a.getState().db.cards[e._parent]:{});Object.keys(o).forEach((function(e){o[e]||delete o[e]}));var c=o.name.trim().split("\n"),s=t,u={},d={};(null===o||void 0===o?void 0:o.users)&&o.users.forEach((function(e,t){var r=Object(p.a)({},0===t?Object(p.a)({access:5,isResponsible:!0},(null===i||void 0===i?void 0:i.showInPanel)?{channel:!0}:{}):{access:5});i&&a.cards[i._id]&&a.cards[i._id]._users&&a.cards[i._id]._users[e]&&(r=a.cards[i._id]._users[e]);var n=a.users[e];d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({_id:e,name:n.name,image:n.image||null},r),{},{myDay:null})))}));var m=[];return c.map(function(){var e=Object(f.a)(Hu().mark((function e(t,r){var a,c;return Hu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.trim()&&(c=Object(Nr.a)(),m.push(c),De.a.post("card/add",Object(p.a)(Object(p.a)(Object(p.a)({_id:c},o),i.showInPanel?{channel:!0}:{}),{},{name:t},"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)})),o.channel&&delete o.channel,u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},c,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({_id:c},o),{},{name:t,_users:d,_createdBy:{name:l.a.getState().db.users[n._id].name,image:l.a.getState().db.users[n._id].image,_id:n._id,channel:!!(null===i||void 0===i?void 0:i.showInPanel)}},i._planId?{_planId:i._planId}:{}),"plan"===i.type?{_planId:i._id}:{}),"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)}))),(null===(a=u[c])||void 0===a?void 0:a.users)&&delete u[c].users,s+=1);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),u};function Uu(){Uu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var qu=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.handleClose,r=l.a.getState().session,o=Object(n.useState)(Ru[0]),i=Object(m.a)(o,2),s=i[0],u=i[1],d=Object(n.useState)({intro:!0,type:!1,article:!1}),h=Object(m.a)(d,2),g=h[0],b=h[1],y=Object(n.useState)(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],O=function(e,t){u(Object(p.a)(Object(p.a)(Object(p.a)({},s.name?{name:s.name}:{}),t),{},{index:e}))},w=function(){return a.a.createElement("ul",{id:"testId11",style:{width:"100%",height:"344px",listStyle:"none",marginTop:"13px",padding:"5px 10px 10px 0px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px",paddingLeft:"0",border:"1px solid #ebebeb"}},Ru.map((function(e,t){return a.a.createElement(Bu,{key:e.id,item:e,index:t,handleItemClick:O,selectedPlan:s})})))},j=function(){var n=Object(f.a)(Uu().mark((function n(){var a;return Uu().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return _(!0),a=Object(Nr.a)(),n.next=4,Wu({_id:a,name:s.name,type:"plan",planType:s.value,users:[r._id]},0);case 4:if(!n.sent){n.next=10;break}return n.next=8,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:a});case 8:n.sent&&(c.a.push("sp#".concat(a,"/dashboard")),_(!1),t());case 10:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return a.a.createElement(Mu,null,g.intro&&a.a.createElement(a.a.Fragment,null,a.a.createElement(zu,{id:"Plantype_67",widthSize:"700px"},a.a.createElement(Gu,{handleNextScreen:function(){return b(Object(p.a)(Object(p.a)({},g),{},{intro:!1,type:!0}))},handleName:function(e){u(Object(p.a)(Object(p.a)({},s),{},{name:e}))},handleClose:t}))),a.a.createElement(zu,null,g.type&&a.a.createElement("div",{id:"Plantype_672"},a.a.createElement(Pu,{prev:!0,name:Object(S.u)("$__selectPlanType"),handlePrevScreen:function(){return b(Object(p.a)(Object(p.a)({},g),{},{type:!1,intro:!0}))},handleClose:t}),a.a.createElement(Rr.a,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(qn.a,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",overflow:"hidden"}},a.a.createElement(qn.a,{item:!0,xs:5,style:{marginBottom:"10px",marginTop:"10px"}},a.a.createElement(w,{style:{transition:"0.7s"}})),a.a.createElement(qn.a,{item:!0,xs:7,style:{display:"flex",marginTop:"10px",flexDirection:"column"}},a.a.createElement("div",{style:{padding:"20px",marginLeft:"25px",width:"400px",display:"flex",justifyContent:"center",border:"1px solid #ebebeb",marginTop:"14px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:s.gif,style:{width:"350px",boxShadow:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px",alignSelf:"center",height:"180px",zIndex:"100"}})),a.a.createElement(Yu,{tittle:s.type,text:Object(S.u)(s.description?s.description:Ru[0].description,1)}))),a.a.createElement(qn.a,{item:!0,xs:12},x?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(fe.a,null)):a.a.createElement($u,{id:"Plantype_110",name:Object(S.u)("$__create"),handleEvent:function(){j()},style:{width:"50%",marginLeft:"25%",marginTop:"35px",marginBottom:"45px",border:"2px solid #ebebeb"}})))," ")))}));var Vu=Object(u.b)((function(e){return{users:e.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useRef(null),f=l.a.getState().db,h=Object(S.j)(),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=null;36===g[0].length||g[2]&&36===g[2].length?36===g[0].length?b=g[0]:36===g[2].length&&(b=g[2]):b=null;var y=window.location.pathname.replace("/","").toLowerCase(),v=f.dataType.filter((function(e){return!!(("sp"===y||!e.hash&&!b||e.hash&&b)&&e.view&&Object.keys(e.view).filter((function(e){return e===y})).length>0&&(!e.view[y].pages||g[1]&&e.view[y].pages.indexOf(g[1])>-1||!g[1]&&e.view[y].pages.indexOf("none")>-1))})),x=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(p.a)({type:t.name,_parent:g[0]&&f.cards[g[0]]?g[0]:null},"user"===t.data.type?{}:Object(p.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))};function _(e){"Tab"===e.key&&(e.preventDefault(),u(!1))}return g&&g[1]&&"users"===g[1]&&h.user&&h.userAdmin&&v.push({name:"importUsers",icon:"import_contacts",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{importUsers:!0}))}}),0===v.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"QuickAddBt"},a.a.createElement(rt.a,{ref:d,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1!==v.length||"plan"!==v[0].name?1===v.length?x(v[0],!(!g[1]||"template"!==g[1])):v.length>1&&u((function(e){return!e})):o(!0)}},a.a.createElement(re.a,{usePropagation:!0,size:"27px",color:Object(S.d)("menu")},"add_box")),n&&a.a.createElement(qu,{handleClose:function(){return o(!1)}}),a.a.createElement(It.a,{open:s,anchorEl:d.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:function(e){var t;t=e,d.current&&d.current.contains(t.target)||u(!1)}},a.a.createElement(Tt.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:_},v.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return a.a.createElement(G.a,{key:t,style:{color:Object(S.d)("menu")},onClick:function(){e.onClick?e.onClick():x(e),u(!1)}},a.a.createElement(re.a,{icon:e.icon,style:{margin:"none !important"},color:Object(S.d)("menu")}),a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.u)("$__".concat(e.name),1)))}))))))})))}));function Ju(){Ju=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Xu=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(){var e=l.a.getState(),t=e.db,r=e.timeline,n=e.session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState({}),d=Object(m.a)(u,2),p=d[0],h=d[1],g=a.a.useState("users"),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useRef(null);a.a.useEffect((function(){_()}),[r]);var _=function(){var e=Object(f.a)(Ju().mark((function e(){var t;return Ju().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(Ar.b)(),h(t),p.total>0&&0===p.users&&v("groups"),"groups"===y&&p.total>0&&0===p.groups&&v("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(e){x.current&&x.current.contains(e.target)||s(!1)},w=Object.keys(t.cards).filter((function(e){return t.cards[e]&&t.cards[e]._kpiTimer&&t.cards[e]&&t.cards[e]._users&&Object.keys(t.cards[e]._kpiTimer).filter((function(r){return t.cards[e]._kpiTimer&&t.cards[e]._kpiTimer[r]&&t.cards[e]._kpiTimer[r].userId&&n&&n._id&&t.cards[e]._kpiTimer[r].userId===n._id})).length>0&&Object.keys(t.cards[e]._users).filter((function(e){return n&&n._id&&e===n._id})).length>0})).map((function(e){return t.cards[e]}));return 0===w.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(rt.a,{ref:x,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(J.a,{badgeContent:w.length,color:"secondary",overlap:"rectangular"},a.a.createElement(re.a,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),w.length>0&&a.a.createElement(It.a,{open:c,anchorEl:x.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:O},a.a.createElement("div",{style:{height:"auto",maxHeight:"calc(90vh - 80px)",width:"100%",overflowY:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"7px"}},Object(S.u)("$__timersInProgress")),w.map((function(e,t){return a.a.createElement(ut.a,{db:"cards",key:t,cardId:e._id,notGlobalExpanded:!0,viewTimer:!0})}))))))})))})),Ku=r(266);function Zu(){Zu=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Qu=Object(u.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ku.a)((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),h=Object(m.a)(d,2),g=h[0],b=h[1],y=a.a.useState(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(!1),w=Object(m.a)(O,2),j=w[0],E=w[1],L=a.a.useState("all"),C=Object(m.a)(L,2),I=C[0],T=C[1],F=l.a.getState(),D=F.db,N=F.session,A=Object(S.j)(),P=window.location.hash.split("/");P[0]=P[0].replace("#",""),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.text.length>1&&e.text!==n&&(o(e.text),clearTimeout(t),t=setTimeout((function(){return $()}),500),u(!0)),function(){return clearTimeout(t)}}),[e.text]),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.completed!==x&&e.text&&e.text.length>1&&(u(!0),_(!x),E(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.completed]),a.a.useEffect((function(){var t=setTimeout((function(){}),15e3);return e.deleted!==j&&e.text&&e.text.length>1&&(u(!0),E(!j),_(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.deleted]);var $=function(){var t=Object(f.a)(Zu().mark((function t(){var r;return Zu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(e,{search:e.text,ignoreLoader:!0,deleted:e.deleted,completed:e.completed,cardLoad:"search"});case 2:(r=t.sent)&&setTimeout((function(){M(r)}),1e3);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=Object(f.a)(Zu().mark((function t(r){var n,a,o,i;return Zu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=l.a.getState().db.users[N._id]||{},a=Object(p.a)(Object(p.a)({},l.a.getState().db.cards),r),o=new Promise((function(t,r){t(Object.keys(a).filter((function(t){return"chatGroup"!==a[t].type&&(!a[t].checklist||a[t].checklist&&a[t].showCard)&&(e.deleted&&a[t].deleted||!e.deleted&&!a[t].deleted&&(!e.completed&&a[t]&&"completed"!==a[t].status||e.completed&&a[t]&&"completed"===a[t].status))&&((A.owner||A.planAdmin)&&("plan"!==a[t].type||"plan"===a[t].type&&Object(et.A)(t))||N._id&&a[t]._users&&a[t]._users[N._id]||a[t]._groups&&a[t]._groups.filter((function(e){return n&&n.groups&&n.groups.filter((function(t){return t.value===e.value})).length>0})))&&e.text&&(a[t].name&&e.text&&a[t]&&a[t].name&&a[t].name.toLowerCase().indexOf(e.text.toLowerCase())>-1||a[t]&&e.text&&a[t].description&&a[t].description.toLowerCase().indexOf(e.text.toLowerCase())>-1)&&(!a[t].private||a[t].private&&a[t]._users&&a[t]._users[N._id])})))})),t.next=5,o.then((function(e){return e}));case 5:(i=t.sent)&&(b(i),u(!1),e.onFinish&&e.onFinish(i.length));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{positin:"relative",width:"100%",minHeight:"100px"}},s&&a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ct.a,null)))),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement("div",{style:{width:"177px",padding:7,display:"flex",flexDirection:"column",marginRight:"solid 1px lightgray"}},g.length>1?a.a.createElement("div",{style:{backgroundColor:"all"===I?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.u)("$__allResults","*"),text:Object(S.u)("$__allResults","*"),color:"all"===I?Object(S.d)("menu"):"lightGray",icon:"manage_search",onClick:function(){T("all")},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})):a.a.createElement(a.a.Fragment,null),D.type.filter((function(e){return g.filter((function(t){return D.cards[t].type===e.value})).length>0})).map((function(e,t){return a.a.createElement("div",{key:"".concat(t,"-").concat(e),style:{backgroundColor:"asset"===I?"rgba(0,0,0,0.08)":"",padding:"0 3px",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement(k.a,{title:Object(S.u)("".concat(e.label),"*"),text:Object(S.u)("".concat(e.label),"*"),color:I===e.value?Object(S.d)("menu"):"lightGray",icon:e.icon,onClick:function(){T(e.value)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}),a.a.createElement("div",{style:{backgroundColor:I===e.value?Object(S.d)("menu",1):Object(S.d)("menu",.5),fontSize:9,color:"#FFFFFF",borderRadius:11,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"}},g.filter((function(t){return D.cards[t].type===e.value})).length))}))),a.a.createElement("div",{style:{width:"calc(100% - 177px)",padding:7,display:"flex",flexDirection:"column"}},a.a.createElement(Rr.a,null,D.type.filter((function(e){return"all"!==I&&e.value===I||"all"===I&&g.filter((function(t){return D.cards[t].type===e.value})).length>0})).map((function(t,r){return a.a.createElement("div",{key:"".concat(t,"-").concat(r)},a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)(t.label,1),icon:t.icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),g.filter((function(e){return D.cards[e].type===t.value})).sort((function(e,t){return D.cards[e].name<D.cards[t].name?-1:D.cards[e].name>D.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(qn.a,{key:t,md:12,style:{minWidth:"300px"}},a.a.createElement(ut.a,{cardId:t,db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));function ed(){ed=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var td=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.timeline,n=t.functions.socket,o=l.a.getState().db,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(e.data),h=Object(m.a)(d,2),g=h[0],b=h[1],y=g.name.split("."),v=y[y.length-1],x=a.a.useState(!1),_=Object(m.a)(x,2),w=_[0],j=_[1],E=a.a.useState(y[0]),k=Object(m.a)(E,2),L=k[0],C=k[1],I=a.a.useRef(!0);a.a.useEffect((function(){return function(){I.current=!1}}),[]),"blob"===g.name&&(g.name="".concat(Object(S.u)("$__coverImage","*"),".jpg"),v="jpg");var T="attachment";l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(v.toLowerCase())>-1})).length>0&&(T=l.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(v.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(g.file));var F=function(){var e=Object(f.a)(ed().mark((function e(t){return ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.emit("data",{module:"node",method:"put",action:"update"},Object(p.a)({_id:g._id},t),Object(f.a)(ed().mark((function e(){return ed().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b(Object(p.a)(Object(p.a)({},g),t)),j(!1);case 2:case"end":return e.stop()}}),e)}))))}catch(r){console.log(r)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=Object(p.a)({},o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]?r[g.cardId][g.timelineId]:g.message);return D&&!D.message&&(D=Object(p.a)(Object(p.a)({},D),{},{message:Object(S.u)("$__onlyAttachment")})),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginBottom:"5px",cursor:"pointer"}},e.resume?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"},onClick:function(t){e.openLightBox&&e.openLightBox()}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",height:"33px",alignItems:"center",display:"flex",overflow:"hidden"}},"string"===typeof T&&-1===T.indexOf("https")&&-1===T.indexOf("svg")?a.a.createElement(re.a,{icon:T,size:"33px"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:T,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=T}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"calc(100% - 80px)",maxWidth:"calc(100% - 80px)",minWidth:"150px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},Object(S.b)(g.name,e.searchText)),o.users[g.createdBy]&&a.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},a.a.createElement(Jr.a,{max:7},a.a.createElement(Kt.a,{title:o.users[g.createdBy].displayName?o.users[g.createdBy].displayName:o.users[g.createdBy].name},a.a.createElement(Er,{alt:o.users[g.createdBy].displayName?o.users[g.createdBy].displayName:o.users[g.createdBy].name,src:"".concat(o.users[g.createdBy].image),style:{width:"15px",height:"15px"}},o.users[g.createdBy].name.substr(0,1)))))),e.showParent&&(g.timelineId||g.message)&&(o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]||g.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(Or.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:D,db:"cards",nodeId:g.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&g.cardId&&o.cards[g.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(ut.a,{db:"cards",cardId:g.cardId,showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"15px",display:"flex",alignItems:"center",height:"70px"}},a.a.createElement("div",{style:{position:"absolute",top:"0px",width:"calc(100% - 30px)",borderBottom:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",display:"flex",color:Object(S.d)("color")}},a.a.createElement("div",{style:{width:"357px",textAlign:"center",alignItems:"center",justifyContent:"center",display:"flex",cursor:"pointer"},onClick:function(t){e.onClick&&e.onClick()},onDoubleClick:function(){j(!0)}},w?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},a.a.createElement(Oe.a,{label:Object(S.u)("$__taskTitle"),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){C(e.target.value)},onBlur:function(e){""===e.target.value&&j(!w)},onKeyDown:function(e){13===e.keyCode&&L&&F({name:"".concat(L,".").concat(v)}),27===e.keyCode&&(j(!w),C())}},autoFocus:!0,value:L,placeholder:Object(S.u)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return F({name:"".concat(L,".").concat(v)})}},a.a.createElement(re.a,{color:"green",icon:"save",title:Object(S.u)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){j(!w),C("")}},a.a.createElement(re.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.u)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{width:"100%"}},g.in&&g.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===g.in.db?a.a.createElement(Kt.a,{title:g.in.name},a.a.createElement(Er,{alt:g.in.name,src:g.in.image,style:{width:"15px",height:"15px"}},g.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(wr.a,{title:g.in.name,icon:"User"===g.in.db?null:g.in.type&&o&&o.dataType&&o.dataType.filter((function(e){return e.name===g.in.type}))[0]&&o.dataType.filter((function(e){return e.name===g.in.type}))[0].icon||"$__topic",color:Object(S.d)("medium"),style:{padding:"7px",width:"calc(100% - 30px)",textAlign:"left"},textStyle:!0})),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",padding:"0 15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"33px",marginRight:"7px",alignItems:"center",height:"50px",display:"flex",justifyContent:"center"}},"string"===typeof T&&-1===T.indexOf("https")&&-1===T.indexOf("svg")?a.a.createElement(re.a,{icon:T,size:"33px"}):a.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(T,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),g.name),g.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"42px",clear:"both"}},a.a.createElement(Er,{alt:g.createdBy.name,src:g.createdBy.image,style:{width:"15px",height:"15px"}},g.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},g.createdBy.name," - (",Object(S.k)(g.created_at),")")))),a.a.createElement("div",{style:{width:"130px",textAlign:"center",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",fontSize:"12px"}},O()(new Date(1e3*g.created_at)).format("DD/MM/YYYY HH:mm")),a.a.createElement("div",{style:{width:"130px",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",overflow:"visible"}},o.users[g.createdBy]&&a.a.createElement(Kt.a,{title:o.users[g.createdBy].name},a.a.createElement(a.a.Fragment,null,a.a.createElement(Er,{size:"sm",src:"".concat(o.users[g.createdBy].image)},o.users[g.createdBy].name.substr(0,1))))),a.a.createElement("div",{style:{width:"300px",textAlign:"left",borderRight:"solid 1.5px ".concat(Object(S.d)("color")),paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}}),a.a.createElement("div",{style:{width:"130px",textAlign:"left",paddingLeft:"15px",alignItems:"center",justifyContent:"center",display:"flex"}},a.a.createElement(Kt.a,{title:Object(S.u)("$__showFile")},a.a.createElement(re.a,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(g.timelineId||g.message)&&a.a.createElement(Kt.a,{title:Object(S.u)("$__viewMessage")},a.a.createElement(re.a,{size:"20px",onClick:function(){u(!s)}},"feedback")))))),(g.timelineId||g.message)&&s&&(o.cards[g.cardId]&&r[g.cardId]&&r[g.cardId][g.timelineId]||g.message)&&a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Or.a,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:D,db:"cards",nodeId:g.cardId})))}));function rd(){rd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var nd=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ku.a)((function(e){var t=a.a.useState(""),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState([]),g=Object(m.a)(d,2),b=g[0],y=g[1],v=l.a.getState().db.dataType,x=[],_=window.location.hash.split("/");_[0]=_[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return O()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var O=function(){var t=Object(f.a)(rd().mark((function t(){var r,n;return rd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Pe.a.get("/Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(n=Object(p.a)({},b),r.data.forEach((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.file._id,Object(p.a)(Object(p.a)(Object(p.a)({},n[e.file._id]||{}),e.file),{},{cardId:e.cardId||null,createdBy:e.createdBy||null,user:e.user,message:e.message,timelineId:e.timelineId})))})),e.onFinish&&e.onFinish(r.data.length),y(n),u(!1));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",{style:{positin:"relative",width:"100%"}},s&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ct.a,null)),a.a.createElement(Rr.a,null,Object.keys(b).length>0&&a.a.createElement(qn.a,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ge.a,{title:Object(S.u)("$__files",1),icon:v.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(S.d)("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(b).map((function(t,r){return x.push(b[t]),a.a.createElement(qn.a,{key:t,md:12},a.a.createElement(td,{data:b[t],searchText:e.text,resume:!0,showParent:!0,openLightBox:function(){var r;r=b[t]._id,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:x,file:r}),e.onAction&&e.onAction()}}))}))))))}))),ad=r(1170),od=r.n(ad),id=function(e){return{avatar:{width:"30px",height:"30px",backgroundSize:"cover",borderRadius:"50%"},component:{zIndex:"10",display:"flex",alignItems:"center",justifyContent:"center"},selectedName:{display:"inline-flex",cursor:"pointer"},selectedNameText:{textDecoration:"none",fontSize:"12px",fontFamily:"Soleto"}}};function cd(){cd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var ld=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(od()(id)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=l.a.getState().functions.socket,i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useRef(null),h=function(e){d.current&&d.current.contains(e.target)||u(!1)};function g(e){"Tab"===e.key&&(e.preventDefault(),u(!1))}var b=a.a.useRef(s);a.a.useEffect((function(){!0===b.current&&!1===s&&d.current.focus(),b.current=s}),[s]);var y=function(){var e=Object(f.a)(cd().mark((function e(){return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.emit("data",{module:"user",method:"post",action:"logout"},{},(function(){})),localStorage.clear(),setTimeout((function(){window.location.href="/login"}),500);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=e.classes,x={name:(null===n||void 0===n?void 0:n.name)||null,_id:(null===n||void 0===n?void 0:n._id)||null,image:(null===n||void 0===n?void 0:n.image)||null};return x&&x.name?a.a.createElement("div",{className:v.component},a.a.createElement("div",{className:v.selectedName,onClick:function(e){u((function(e){return!e}))}},a.a.createElement("div",{ref:d,className:v.selectedNameText,style:{color:Object(S.d)("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(Ua.a,{title:a.a.createElement(a.a.Fragment,null,x.name)},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"33px",height:"33px",borderRadius:"50%",border:"solid 1px ".concat(Object(S.d)("menu"))}},x.image?a.a.createElement("div",{style:{display:"flex",width:"90%",height:"90%",backgroundImage:'url("'.concat(x.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%"}}):a.a.createElement(re.a,{icon:"user",color:Object(S.d)("menu")})))))),a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(It.a,{open:s,anchorEl:d.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var o=t.TransitionProps,i=t.placement;return a.a.createElement(Lt.a,Object.assign({},o,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),a.a.createElement(Ct.a,null,a.a.createElement(R.a,{onClickAway:h},a.a.createElement(Tt.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:g},a.a.createElement(G.a,{onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},r.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(p.a)({type:"user"},r.users[n._id])}))}},Object(S.u)("$__myProfile",1)),a.a.createElement(G.a,{onClick:function(){return y()}},Object(S.u)("$__logout",1))))))})))):null})));var sd=Object(u.b)((function(e){return{controls:e.controls,chatNotifications:e.chat.notifications}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ku.a)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=t.chat,i=a.a.useState(""),s=Object(m.a)(i,2),u=s[0],d=s[1],f=a.a.useState(0),h=Object(m.a)(f,2),g=h[0],b=h[1],y=a.a.useState(0),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(!1),w=Object(m.a)(O,2),j=w[0],E=w[1],L=a.a.useState(!1),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.a.useState("asset"),D=Object(m.a)(F,2),P=D[0],$=D[1],M=Object(S.j)(),z=a.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),Y=Object(m.a)(z,2),B=Y[0],G=Y[1],H=a.a.useRef(null),W=window.location.hash.split("/");W[0]=W[0].replace("#",""),a.a.useEffect((function(){return U(),function(){}}),[e]);var U=function(){var e={};_u.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=_u.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Object(S.u)("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&W[0]&&r.cards[W[0]]&&(t="".concat(Object(S.u)("$__".concat(e.alias),1),": ").concat(r.cards[W[0]].name)),e.tabs&&e.tabs.length>0&&e.tabs.filter((function(e){return e.path===W[1]})).length>0&&(a=Object(S.u)("$__".concat(e.tabs.filter((function(e){return e.path===W[1]}))[0].alias),1),n=e.tabs.filter((function(e){return e.path===W[1]}))[0].icon),G({title:t,icon:n,sTitle:a,sIcon:null})};return a.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:e.expanded?30:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},a.a.createElement(Rr.a,null,a.a.createElement(qn.a,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&a.a.createElement(rt.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},a.a.createElement(re.a,{icon:"menu",title:"$__showMenu",size:"27px",color:Object(S.d)("menu")})),a.a.createElement("div",{id:"top_pageTitle",style:{color:Object(S.d)("menu"),marginLeft:"22px",fontSize:"12px",fontWeight:"bold"}},B.sTitle?"".concat(B.title," - ").concat("matrix"===B.sTitle.toLowerCase()?"MATRIX SWOT":B.sTitle):B.title)),a.a.createElement(N.a,null,a.a.createElement(qn.a,{xs:12,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-start",alignItems:"center",zIndex:"10 !important"},id:"top_search"},a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 15px)",zIndex:"10 !important"}},a.a.createElement(Oe.a,{ref:H,label:Object(S.u)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==u?a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"close",onClick:function(){d(""),E(!1),T(!1)}})):null,onChange:function(e){d(e.target.value),E(!0),T(!0)}},value:u,placeholder:Object(S.u)("$__searchInMachen")}),""!==u&&u.length>1&&a.a.createElement(R.a,{onClickAway:function(){d(""),E(!1),T(!1)}},a.a.createElement(It.a,{open:!!u,anchorEl:H.current,role:void 0,transition:!0,disablePortal:!0,style:{position:"absolute",zIndex:10,bottom:0,left:"5px",right:"5px",width:"100%",minWidth:"400px",maxWidth:"800px"}},(function(e){var t=e.TransitionProps;e.placement;return a.a.createElement(Lt.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),a.a.createElement(Ct.a,{style:{zIndex:"3",boxShadow:"0 7px 15px rgba(0,0,0,0.33) !important"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",borderBottom:"solid 2px rgba(0,0,0,0.22)",backgroundColor:"#f1f1f1",justifyContent:"space-between"}},a.a.createElement("div",{style:{backgroundColor:"asset"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.u)("$__asset","*"),text:Object(S.u)("$__asset","*"),color:"asset"===P?Object(S.d)("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){$("asset"),E(!0),T(!0),b(0),_(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"completed"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.u)("$__completed","*"),text:Object(S.u)("$__completed","*"),color:"completed"===P?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){$("completed"),E(!0),T(!0),b(0),_(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"deleted"===P?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.u)("$__deleted","*"),text:Object(S.u)("$__deleted","*"),color:"deleted"===P?Object(S.d)("menu"):"lightGray",icon:"delete_forever",onClick:function(){$("deleted"),E(!0),T(!0),b(0),_(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0}))),"0"!==String(g)||"0"!==String(x)||j||I?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{textAlign:"center",fontSize:"16px",color:"red",marginTop:33,marginBottom:33}},Object(S.u)("$__noResultsFound")),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(N.a,null,a.a.createElement(Qu,{text:u||"",onFinish:function(e){b(e),E(!1)},onAction:function(){d(""),E(!1),b(0),_(0)},completed:"completed"===P,deleted:"deleted"===P})),a.a.createElement(N.a,null,a.a.createElement(nd,{text:u||"",onFinish:function(e){_(e),T(!1)},onAction:function(){d(""),b(0),_(0)}}))):a.a.createElement(a.a.Fragment,null))))})))))),a.a.createElement(qn.a,{xs:5,sm:4,md:4,lg:4,xl:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"center",zIndex:2001,marginBottom:"15px",marginTop:"15px"}},a.a.createElement("div",{id:"top_quickAdd"},a.a.createElement(N.a,null,a.a.createElement(Vu,{hashs:W}))),a.a.createElement(N.a,null,a.a.createElement(Cu,null)),a.a.createElement("div",{id:"top_notifications"},a.a.createElement(N.a,null,a.a.createElement(Au,{loader:!(!e.loaders||!e.loaders.notifications)}))),a.a.createElement("div",{id:"top_timers"},a.a.createElement(N.a,null,a.a.createElement(Xu,null))),a.a.createElement("div",{id:"top_requireApproval"},a.a.createElement(N.a,null,a.a.createElement(Tu,null))),a.a.createElement("div",{id:"top_myDay"},a.a.createElement(N.a,null,a.a.createElement(Iu,null))),a.a.createElement("div",{id:"top_moreOptions"},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:l.a.getState().controls.unlockedPrivates,color:"secondary"},a.a.createElement(V.a,{transparent:!0,count:50,size:"27px",icon:"settings",title:Object(S.u)("$__settings"),btColor:"lightgray",options:[].concat(Object(A.a)(M&&M.user&&(M.userAdmin||M.userModerate)?[{name:"$__usersAndContacts",icon:"account_box",onClick:function(){c.a.push("c#tab/users")}},{name:"$__customersCompaniesAndDivisions",icon:"business",onClick:function(){c.a.push("c#tab/units")}}]:[]),Object(A.a)(M&&M.user&&M.userAdmin&&M.plan&&M.planAdmin?[{name:"$__forms",icon:"ballot",onClick:function(){c.a.push("forms")}}]:[]),[{name:"$__support",icon:"help_outline",onClick:function(){window.open("https://support.machen.ai","_blank")}},n&&(n._access&&n._access.master||n.isAdmin)&&{name:"$__APPSettings",icon:"engineering",onClick:function(){window.open("/masterAdmin#tab/languages","_self")},show:"hover"},n&&"701bbca1-e1e4-4ea0-ada8-30f74ae74894"===n._id&&{name:"DEV",icon:"code",onClick:function(){c.a.push("plataformAdministrator")},show:"hover"}],Object(A.a)(l.a.getState().controls.hidePrivate?[]:[{name:Object(S.u)(l.a.getState().controls.lockPrivate?"$__lockMyPrivateActivities":"$__unlockMyPrivateActivities",1),icon:l.a.getState().controls.lockPrivate?"private_connectivity":"lock_open",color:l.a.getState().controls.lockPrivate?"lightgray":null,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{lockPrivate:!l.a.getState().controls.lockPrivate},l.a.getState().controls.lockPrivate?{}:{unlockedPrivates:0}))},show:"hover"}]),[{name:Object(S.u)(l.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),icon:l.a.getState().chat.notifications?"notifications_active":"notifications_off",color:l.a.getState().chat.notifications?"green":"lightgray",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},o),{},{notifications:!l.a.getState().chat.notifications}))},show:"hover"}],Object(A.a)(l.a.getState().controls.unlockedPrivates>0?[{name:Object(S.u)("$__lockMyPrivateActivities",1),icon:"private_connectivity",color:"red",count:l.a.getState().controls.unlockedPrivates,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().controls),{},{unlockedPrivates:0,lockPrivate:!1}))},show:"hover"}]:[]),Object(A.a)(l.a.getState().session&&l.a.getState().session._access&&l.a.getState().session._access.masterAdmin>0?[{name:Object(S.u)("$__accountSettings",1),icon:"settings_applications",color:"lightgray",onClick:function(){c.a.push("acc#tab/resume")},show:"hover"}]:[]))}))),a.a.createElement("div",{style:{width:"33px",height:"33px",marginLeft:"15px",backgroundColor:"#cccccc",minWidth:"33px",borderRadius:"50%"},id:"top_user"},a.a.createElement(ld,null)))))}))),ud=function(e){return{root:{position:"relative",width:"100%",cursor:"pointer"},user:{display:"flex",margin:"auto",height:"37px",alignItems:"center"},userExtended:{display:"flex",height:"37px",alignItems:"center"},userActive:{display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:Object(S.d)("color",.33)},userActiveExtended:{display:"inherit",height:"37px",alignItems:"center",backgroundColor:Object(S.d)("color",.33),justifyContent:"left"},name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",fontWeight:"bold",fontSize:"14px",color:Object(S.d)("darkText"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)"},lastMessage:{position:"absolute",top:"30px",left:"36px",right:"15px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(S.d)("medium"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},lastMessageUnReaded:{position:"absolute",top:"30px",left:"36px",right:"15px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",fontWeight:"bold",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(S.d)("medium"),boxShadow:"-5px 3px 7px 1px rgba(0,0,0,0.05)",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},access:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"30px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",color:Object(S.d)("color"),boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)"},accessEditing:{position:"absolute",top:"33px",left:"45px",right:"0px",height:"auto",minHeight:"290px",padding:"7px",border:"1px solid ".concat(Object(S.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",fontWeight:"bold",color:Object(S.d)("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}}}},dd=r(533);var pd=Object(u.b)((function(e){return{store:{chat:e.chat,timeline:e.timeline,cards:e.db.cards,users:e.db.users,adminView:e.db.adminView,session:e.session,usersStatus:e.usersStatus}}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(ud)((function(e){var t=e.classes,r=e.store,n=r.chat,o=r.session,i=r.timeline,c=r.usersStatus,s=!!e.expanded,u=Object(S.j)(),d=Object(p.a)({},l.a.getState().db.users),f={};d=(d=Object.keys(d).filter((function(e){return e!==o._id&&"user"===d[e].type})).map((function(t){return e.store.users[t]})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))).map((function(t){t.unReadedCount=0;var r={};r=Object.keys(r).filter((function(e){return r[e]&&r[e].user&&r[e].user._id===t._id&&"comment"===r[e].type})).map((function(e){return r[e]}));var n=Object(p.a)({},e.store.users[t._id]&&i[t._id]?e.store.users[t._id]&&i[t._id]:{});n=Object.keys(n).filter((function(e){return n[e]&&"comment"===n[e].type})).map((function(e){return n[e]}));var a=[].concat(Object(A.a)(r),Object(A.a)(n));return a=a.sort((function(e,t){return Math.ceil(e.created_at)<Math.ceil(t.created_at)?-1:1})).map((function(e){return e})),"boolean"!==typeof t?(f=Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},t._id,Object(p.a)(Object(p.a)({},e.store.users[t._id]),{},{type:"user",_lastMessage:a[a.length-1]?a[a.length-1]:null,unReadedCount:r.filter((function(e){return e.user._id!==o._id&&"comment"===e.type&&!e.deleted&&(!e.readedBy||e.readedBy&&!e.readedBy[o._id])})).length}))),t._lastMessage=a[a.length-1]?a[a.length-1]:null,t.unReadedCount=r.filter((function(e){return e.user._id!==o._id&&"comment"===e.type&&!e.deleted&&(!e.readedBy||e.readedBy&&!e.readedBy[o._id])})).length):(t._lastMessage=null,t.unReadedCount=0),t}));var m=Object.keys(l.a.getState().db.cards).filter((function(t){return"chatGroup"===l.a.getState().db.cards[t].type&&!l.a.getState().db.cards[t].deleted&&(l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[o._id]||!l.a.getState().db.cards[t].private&&e.store.adminView&&u&&(u.owner||u.admin))})).map((function(e){return l.a.getState().db.cards[e]}));m&&m.length>0&&m.filter((function(e){return!(!e._users||!e._users[o._id])})).forEach((function(e){var t;i[e._id]&&Object.keys(i[e._id]).length>0&&(t=Object.keys(i[e._id]).filter((function(t){return i[e._id]&&i[e._id][t]&&"comment"===i[e._id][t].type})).sort((function(t,r){return i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)>parseInt(i[e._id][r].created_at)?-1:i[e._id][t]&&i[e._id][r]&&String(i[e._id][t].created_at)&&String(i[e._id][r].created_at)&&parseInt(i[e._id][t].created_at)<parseInt(i[e._id][r].created_at)?1:0}))),f=e&&e._id&&t&&t.length>0&&i[e._id]&&i[e._id][t[0]]&&i[e._id][t[0]].created_at?Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{type:"group",_lastMessage:i[e._id][t[0]]}))):Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{type:"group"})))}));var g=Object.keys(f).filter((function(t){return(!l.a.getState().db.cards[t]||l.a.getState().db.cards[t]&&!l.a.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(f[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||f[t]._parent&&l.a.getState().db.users[f[t]._parent]&&l.a.getState().db.users[f[t]._parent].name&&l.a.getState().db.users[f[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(s||!s&&f[t]&&f[t]._lastMessage)&&(!e.onLine||e.onLine&&c.users&&c.users[t])})).sort((function(e,t){var r=f[e]._lastMessage&&String(f[e]._lastMessage.created_at)?Math.ceil(f[e]._lastMessage.created_at):0,n=f[t]._lastMessage&&String(f[t]._lastMessage.created_at)?Math.ceil(f[t]._lastMessage.created_at):0;return s?f[e].name.toLowerCase()<f[t].name.toLowerCase()?-1:f[e].name.toLowerCase()>f[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(e,t){var r=f[e];return{_id:e,name:r.name,image:r.image||null,lastMessage:r.lastMessage||null,deleted:r.deleted||!1,_parent:r._parent||null}})),b=function(r){var o=r.index,i=r.style,c=g[o];return a.a.createElement("div",{style:i},a.a.createElement("div",{className:n&&n.nodeId===c._id?s?t.userActiveExtended:t.userActive:s?t.userExtended:t.user,style:Object(p.a)({height:55,display:"flex",justifyContent:"center",alignItems:"center",margin:"auto",cursor:"pointer"},n&&n.nodeId===c._id?{backgroundColor:"rgba(250,250,250,0.1)"}:{}),onClick:function(){e.openChat(c._id)}},a.a.createElement(Ua.a,{title:a.a.createElement(a.a.Fragment,null,c.name?c.name:c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",!c.name&&c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"")},a.a.createElement("div",{style:{width:"100%"}},s?a.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"left",alignItems:"center",marginTop:"10px"}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:Object(dd.a)(c._id),color:"secondary",style:{width:"37px",display:"flex",alignItems:"center"}},a.a.createElement(Jl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement(at.a,{alt:c.displayName?c.displayName:c.name,src:"".concat(c.image),style:{width:"29px",height:"29px",marginTop:"-10px"}}),c._parent&&e.store.users[c._parent]&&e.store.users[c._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[c._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null)))),a.a.createElement("div",{style:{fontSize:"14px",maxWidth:"calc(100% - 30px)",paddingLeft:"7px",color:"gray",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},c.name?c.name:c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",!c.name&&c.name&&c.name.split(" ").lenth>0?c.name.split(" ")[0]:"",c._parent&&e.store.users[c._parent]?a.a.createElement("div",{style:{fontSize:10,color:"lightgray",marginTop:"-7px"}},e.store.users[c._parent].name):a.a.createElement(a.a.Fragment,null))):a.a.createElement(J.a,{overlap:"rectangular",badgeContent:Object(dd.a)(c._id),color:"secondary",style:{display:"flex",alignItems:"center",padding:0,width:"80%",marginTop:"16px"}},a.a.createElement(Jl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(p.a)(Object(p.a)({width:33,height:33,marginTop:"-10px"},c.deleted?{border:"solid 2px red"}:{}),{},{borderRadius:"50%",backgroundColor:c.image?"none":"lightgray",backgroundImage:'url("'.concat(c.image,'")'),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",display:"flex",justifyContent:"center",alignItems:"center"})},a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontWeight:"bold",letterSpacing:"-2px !important"}},c.image?"":"".concat(c.name.substr(0,1).toUpperCase()).concat(c.name.split(" ").length>1?" ".concat(c.name.split(" ")[1].substr(0,1).toUpperCase()):""))),c._parent&&e.store.users[c._parent]&&e.store.users[c._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(e.store.users[c._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null))))))))};return a.a.createElement(pi.a,{style:{width:"100%",height:"100%"}},(function(e){var t=e.height;e.width;return a.a.createElement(di.a,{height:t,itemCount:g.length,itemSize:55,width:s?295:58,itemData:g,style:{height:"100%"}},b)}))}))),fd=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{menu:{position:"absolute",borderRight:Object(S.d)("color"),background:Object(S.d)("ColumnTitleColor"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"absolute",borderRight:Object(S.d)("color"),top:0,left:0,right:0,bottom:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column",alignItems:"baseline",paddingLeft:"15px",paddingRight:"15px",boxShadow:"inset 4px 0px 3px 0px rgb(0 0 0 / 17%)"},button:{padding:"7px 0px",display:"flex",justifyContent:"center"},buttonColor:{padding:"12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color"),alignItems:"center",width:"-webkit-fill-available"},buttonColorExpanded:{position:"relative",float:"left",padding:"12px",display:"flex",backgroundColor:Object(S.d)("color"),alignItems:"center",width:"100%"},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function hd(){hd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var md=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().chat,r=a.a.useState("chats"),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(""),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!1),g=Object(m.a)(h,2),b=g[0],y=g[1],v=Object(B.a)(fd)(),x=window.location.hash.split("/");x[0]=x[0].replace("#",""),a.a.useEffect((function(){i("chats"),y(e.expanded)}),[e.expanded]);var _=function(){var r=Object(f.a)(hd().mark((function r(n,a){var o;return hd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=l.a.getState().db.cards[n]?"cards":"users",d(""),l.a.getState().db[o]&&l.a.getState().db[o][n]&&!l.a.getState().db[o][n]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{db:a,nodeId:n,loading:"users"!==a})):e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{db:a,nodeId:n,loading:!1})),e.subMenuExpanded(!1),i("chats");case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:b?v.menuExpanded:v.menu,style:{paddingTop:5}},b&&("internalGroups"===o||"externalGroups"===o)&&a.a.createElement("div",{className:b?v.buttonColorExpanded:v.buttonColor,style:{marginTop:"-15px"}},a.a.createElement(Ce.a,{text:b?Object(S.u)("$__newGroup","*"):null,title:b?null:Object(S.u)("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),a.a.createElement("div",{className:v.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},b?a.a.createElement("div",{className:v.textField,style:{width:"100%"}},a.a.createElement(Oe.a,{className:v.noLabelLight,label:Object(S.u)("$__search","*"),variant:"standard",autoFocus:!0,value:u,InputProps:{endAdornment:a.a.createElement(je.a,{position:"start"},a.a.createElement(re.a,{color:Object(S.d)("colorText")},"search")),onChange:function(e){d(e.target.value)}}})):a.a.createElement(Ce.a,{title:b?null:Object(S.u)("$__search","*"),icon:"search",iconColor:Object(S.d)("colorText"),textColor:Object(S.d)("colorText"),onClick:function(){e.subMenuExpanded(!0)}})),a.a.createElement("div",{style:{position:"absolute",top:b?50:40,bottom:7,overflowY:"auto",overflowX:"hidden",left:b?7:0,paddingLeft:b?5:0,right:0,paddingTop:7}},a.a.createElement(pd,{expanded:b,openChat:function(e){return _(e,"cards")},find:u,onLine:e.onLine}))))}));var gd=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1];return a.a.useEffect((function(){i(e.typing)}),[e.typing]),o&&e.nodeId&&e.nodeId!==t._id&&o.me&&o.me[e.nodeId]?a.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal"}},Object(S.u)("$__typing"),"..."):e.nodeId&&o&&o[e.nodeId]&&Object.keys(o[e.nodeId]).filter((function(r){return t&&t._id&&r!==t._id&&o[e.nodeId][r]})).length>0?a.a.createElement("div",{style:{marginLeft:15,fontSite:12,color:"lightgray",fontWeight:"normal",display:"flex",alignItems:"center"}},Object.keys(o[e.nodeId]).filter((function(r){return r!==t._id&&o[e.nodeId][r]})).map((function(t,r){var n="";if(l.a.getState().db.cards[e.nodeId]._users[t].name)n=l.a.getState().db.cards[e.nodeId]._users[t].name;else if(l.a.getState().db.cards[e.nodeId]._users[t].name){var o=l.a.getState().db.cards[e.nodeId]._users[t].name.split(" ");n="".concat(o[0]).concat(o.length>1?" ".concat(o[o.length-1]):"")}return a.a.createElement(Kt.a,{title:n,key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:n,src:l.a.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),a.a.createElement("span",{style:{marginLeft:7}},Object(S.u)("$__typing"),"...")):a.a.createElement(a.a.Fragment,null)})),bd=r(1171),yd=r.n(bd),vd=function(e){return Object(p.a)(Object(p.a)({},Z.k),{},{menu:{position:"relative",borderRight:Object(S.d)("color")},menuExpanded:{position:"relative",borderRight:Object(S.d)("color")},button:{position:"relative",float:"left",width:"100%",padding:"7px"},avatarGroup:{"& .MuiAvatar-root":{width:"22px !important",height:"22px !important"}},buttonColor:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px 12px",marginLeft:"-12px",display:"flex",justifyContent:"center",backgroundColor:Object(S.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(S.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};var xd=Object(u.b)((function(e){return{usersStatus:e.usersStatus&&e.usersStatus?e.usersStatus:{}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState(e.usersStatus),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1];return a.a.useEffect((function(){return i(e.usersStatus),function(){}}),[e.usersStatus]),a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{id:"chat_menu",title:"".concat(Object(S.u)("$__showOnlyOnline","*")," ").concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length>0?" (".concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length,")"):""),text:"".concat(Object(S.u)("$__showOnlyOnline","*")," ").concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length>0?" (".concat(Object.keys(o.users).filter((function(e){return o.users[e]&&e!==t._id})).length,")"):""),color:Object(S.d)("colorText"),icon:u?"toggle_on":"toggle_off",onClick:function(){d((function(e){return!e})),e.onClick&&e.onClick(!u)},size:"25px",textSize:"11px",transparent:!0}))}));function _d(){_d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Od=Object(u.b)((function(e){var t=e.chat;return{nodeId:t.nodeId,chatOpen:t.open,notifications:t.notifications}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(vd)((function(e){var t=e.classes,r=e.nodeId,n=e.chatOpen,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(!1),v=Object(m.a)(y,2),x=v[0],_=v[1],O=new Audio(yd.a),w=Object(S.j)();a.a.useEffect((function(){(function(){var t=Object(f.a)(_d().mark((function t(){var r,n;return _d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=l.a.getState().functions.socket){t.next=3;break}return t.abrupt("return");case 3:r.on("timeline.COMMENT",function(){var t=Object(f.a)(_d().mark((function t(r){var n,o,i,c,s;return _d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"users"===r.db&&r.idRel===l.a.getState().session._id&&r.comment&&"comment"===r.comment.type&&r.comment.user&&r.comment.user._id&&!l.a.getState().db.users[r.comment.user._id]&&Object(ke.m)(e,r.comment.user._id),("users"===r.db||"users"!==r.db&&"comment"===r.comment.type&&l.a.getState().db.cards[r.idRel]&&"chatGroup"===l.a.getState().db.cards[r.idRel].type)&&(n=null,r.filesCount&&r.files&&r.files.length===r.filesCount&&(n=parseInt(r.comment.created_at)-30),r.comment.user._id!==l.a.getState().session._id&&j(n)),Object(Ar.h)(e,r),l.a.getState().chat.notifications&&(r.comment.idRel===l.a.getState().session._id||l.a.getState().db.users[r.comment.idRel]||l.a.getState().db.cards[r.comment.idRel]&&"chatGroup"===l.a.getState().db.cards[r.comment.idRel].type&&l.a.getState().db.cards[r.comment.idRel]._users[l.a.getState().session._id])&&l.a.getState().db.users[r.comment.user._id]&&"comment"===r.comment.type&&((null===r||void 0===r||null===(o=r.comment)||void 0===o||null===(i=o.user)||void 0===i?void 0:i._id)!==l.a.getState().session._id&&O.play(),r.comment.nodeId=r.node,c=Object(p.a)(Object(p.a)({},r.comment),{},{nodeId:r.comment._parent,idRel:r.node}),r.comment.idRel!==l.a.getState().session._id||l.a.getState().chat.open||((s=new Notification("".concat(r.comment.user.name," ").concat(Object(S.u)("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:Object(S.u)("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),s.close()},Object(S.c)({message:Object(S.u)("$__newMessage",1),content:a.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){E(c.user._id,"users"),e.stopPropagation()}},a.a.createElement(Or.a,{storie:c,noReactions:!0,inverted:!0})),hideiconvariant:!0,variant:"info",persist:!1,horizontal:"right",confirm:null})));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),n={},r.on("timeline.TYPING",(function(e){n[e.typingUser]&&clearTimeout(n[e.typingUser]),n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.typingUser,setTimeout((function(){}),3e3)))})),r.on("stream",(function(e){document.getElementById("#streamVideo")&&document.getElementById("#streamVideo").attr("src",e)})),r.on("timeline.DEL",(function(t){var r=l.a.getState().session,n=l.a.getState().timeline[t.idRel]&&l.a.getState().timeline[t.idRel][t.id]?t.idRel:r._id;l.a.getState().timeline&&l.a.getState().timeline[n]&&l.a.getState().timeline[n][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),{},Object(h.a)({},n,Object(p.a)(Object(p.a)({},l.a.getState().timeline[n]),{},Object(h.a)({},t.id,Object(p.a)(Object(p.a)({},l.a.getState().timeline[n][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))}));case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}})()()}),[]);var j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},E=function(){var t=Object(f.a)(_d().mark((function t(r,n){return _d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!0,db:n,nodeId:r,loading:!1}));case 1:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!n)return a.a.createElement(a.a.Fragment,null);var L=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||!l.a.getState()||!(l.a.getState().lightBox&&l.a.getState().lightBox.open||l.a.getState().sideModule&&l.a.getState().sideModule.id)){var r=document.getElementsByClassName("Toastify__toast").length,n=document.getElementsByClassName("forwardMessage").length;0===r&&0===n&&e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!1}))}};if(!n)return a.a.createElement(a.a.Fragment,null);var C=r&&l.a.getState().db.cards&&l.a.getState().db.cards[r]?"cards":"users",I=l.a.getState().db[C][r]?l.a.getState().db[C][r]:null;return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:3e3,backgroundColor:"rgba(250,250,250,0.7)",backdropFilter:"blur(3px)"}},a.a.createElement(R.a,{onClickAway:function(){L()}},a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.a)({position:"fixed"},window.innerWidth>600?{top:77,left:77,right:77,bottom:77}:{top:50,left:7,right:7,bottom:7}),window.innerWidth>600?{zIndex:3}:{zIndex:6e3}),{},{boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)",borderRadius:"15px",overflow:"hidden"})},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,height:40,background:Object(S.d)("ColumnTitleColor"),display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{position:"absolute",left:13}},a.a.createElement(k.a,{id:"chat_menu",title:Object(S.u)("$__menu","*"),color:Object(S.d)("colorText"),icon:"menu",onClick:function(){s((function(e){return!e})),c&&_(!1)},size:"25px",transparent:!0})),c?a.a.createElement("div",{style:{position:"absolute",left:45,color:Object(S.d)("colorText")}},a.a.createElement(k.a,{id:"addGroup",title:Object(S.u)("$__createChatGroup","*"),icon:"add_circle_outline",onClick:function(){L(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))},size:"25px",transparent:!0,color:Object(S.d)("colorText")})):a.a.createElement(a.a.Fragment,null),c?a.a.createElement("div",{style:{position:"absolute",left:80}},a.a.createElement(xd,{onClick:function(e){_(e)}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",left:c?320:53,right:80,color:Object(S.d)("colorText"),fontSize:"12px",fontWeight:"bold"}},r&&I?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Jl.a,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:r},a.a.createElement(at.a,{alt:I.displayName?I.displayName:I.name,src:I.image?"".concat(I.image):null,style:{width:"30px",height:"30px"}})),a.a.createElement("div",{style:{fontSize:"14px"}},I.name," ",a.a.createElement("span",{style:{fontSize:10,fontWeight:"normal"}},l.a.getState().usersStatus&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[r]&&"away"===l.a.getState().usersStatus.users[r].status&&l.a.getState().usersStatus.users[r].updatedAt?"(".concat(Object(S.u)("$__lastSeeTime"),": ").concat(Object(S.k)(l.a.getState().usersStatus.users[r].updatedAt),")"):"")),r&&l.a.getState().db.cards[r]&&"chatGroup"===l.a.getState().db.cards[r].type&&l.a.getState().db.cards[r]._users&&Object.keys(l.a.getState().db.cards[r]._users).length>0&&a.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},a.a.createElement(Jr.a,{max:150},Object.keys(l.a.getState().db.cards[r]._users).length>0&&Object.keys(l.a.getState().db.cards[r]._users).filter((function(e,t){return t<18})).map((function(e,t){var n="";if(l.a.getState().db.cards[r]._users[e].name)n=l.a.getState().db.cards[r]._users[e].name;else if(l.a.getState().db.cards[r]._users[e].name){var o=l.a.getState().db.cards[r]._users[e].name.split(" ");n="".concat(o[0]).concat(o.length>1?" ".concat(o[o.length-1]):"")}if(t<17)return a.a.createElement(Kt.a,{title:n,key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:n,src:l.a.getState().db.cards[r]._users[e].image||null},n.substr(0,1)));if(17===t){var i=Object.keys(l.a.getState().db.cards[r]._users).length-17;return a.a.createElement(Kt.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(l.a.getState().db.cards[r]._users).filter((function(e,t){return t>16&&l.a.getState().db.cards[r]._users[e]&&l.a.getState().db.cards[r]._users[e].name})).map((function(e,t){return a.a.createElement("li",null,l.a.getState().db.cards[r]._users[e].name)}))),key:t},a.a.createElement(at.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}return a.a.createElement(a.a.Fragment,null)})))),a.a.createElement(gd,{nodeId:r})):a.a.createElement("div",null,Object(S.u)("$__chats",1))),a.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},r?a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{id:"chat_files",title:Object(S.u)("$__files","*"),color:Object(S.d)("colorText"),icon:"folder_special",onClick:function(){b((function(e){return!e}))},size:"25px",transparent:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement(k.a,{id:"chat_settings",title:Object(S.u)(l.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),color:Object(S.d)("colorText"),icon:l.a.getState().chat.notifications?"notifications_active":"notifications_off",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{notifications:!l.a.getState().chat.notifications}))},size:"25px",transparent:!0}),r&&l.a.getState().db.cards[r]&&"chatGroup"===l.a.getState().db.cards[r].type&&l.a.getState().db.cards[r]._users&&l.a.getState().db.cards[r]._users[l.a.getState().session._id]&&(parseInt(l.a.getState().db.cards[r]._users[l.a.getState().session._id].access)>4||w&&w.user&&w.plan&&w.userAdmin&&w.planAdmin)&&a.a.createElement(k.a,{id:"chat_settings",title:Object(S.u)("$__preffers","*"),color:Object(S.d)("colorText"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:r,activeModule:"cardEdit",db:"cards",data:Object(p.a)({},l.a.getState().db.cards[r]?l.a.getState().db.cards[r]:{})})),L(!0)},size:"25px",transparent:!0}),a.a.createElement(k.a,{id:"chat615_closeButton",title:Object(S.u)("$__close","*"),color:Object(S.d)("colorText"),icon:"close",onClick:function(){L(!0),_(!1)},size:"25px",transparent:!0}))),a.a.createElement("div",{style:Object(p.a)({position:"absolute",top:40,left:0,bottom:0,backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px"},c?{width:"311px"}:{width:"60px"})},a.a.createElement(md,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!1})),_(!1)},chat:!0,subMenuExpanded:function(e){s(e),_(!1)},expanded:c,onLine:x})),a.a.createElement("div",{style:{position:"absolute",left:c?312:55,top:40,right:g&&r?333:0,bottom:0,backgroundColor:"white"}},r?a.a.createElement(xe.a,{types:["comment"],nodeId:r,db:l.a.getState().db.cards[r]?"cards":"users",confirmRead:!0,hideCards:!0,chat:!0}):a.a.createElement(a.a.Fragment,null)),g&&r?a.a.createElement("div",{style:{position:"absolute",top:40,right:0,bottom:0,width:"333px",backgroundColor:"#f1f3f4",zIndex:100,boxShadow:"-4px 0px 7px 3px rgba(0,0,0,0.1)"}},a.a.createElement(Ir,{nodeId:r,dark:!1})):a.a.createElement(a.a.Fragment,null)))))}))),wd=r(529),jd=r.n(wd),Ed=function(e){var t;return{root:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"100vh",zIndex:100},rootHide:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100},topLogo:{position:"fixed",top:"0px",left:"0px",width:"100%",height:"50px",display:"flex",alignItems:"center",zIndex:100,justifyContent:"space-between"},bar:{backgroundColor:Object(S.d)("menu"),position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:100},item:{height:"66px",alignItems:"center",width:"100%",display:"flex"},itemButtom:{padding:"7px",color:Object(S.d)("color",.8),"&:hover":{color:Object(S.d)("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"7px"},display:"flex",alignItems:"center",cursor:"pointer"},itemButtomActive:{width:"100%",padding:"7px",color:Object(S.d)("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"7px",display:"flex",alignItems:"center",cursor:"pointer"},themeExample:(t={},Object(h.a)(t,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(h.a)(t,e.breakpoints.down("sm"),{left:"0 !important",right:"auto !important"}),t),module:{position:"fixed",top:"0px",left:"147px",width:"70px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px"},moduleExpanded:{position:"fixed",top:"0",left:"147px",width:"311px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",zIndex:"100 !important",borderRight:"solid 4px ".concat(Object(S.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(S.d)("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(S.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},mainButton:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center"},logoImg:{width:111,marginLeft:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function kd(){kd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(le.a)(Ed)((function(e){var t=l.a.getState().chat,r=e.classes,n=a.a.useState(null),o=Object(m.a)(n,2),i=o[0],s=o[1],u=window.location.hash.split("/");u[0]=u[0].replace("#","");var d=function(){var r=Object(f.a)(kd().mark((function r(n,a,o){var l,u=arguments;return kd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:l=u.length>3&&void 0!==u[3]?u[3]:"users",!n||window.location.pathname===n&&a!==i||c.a.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!0,db:l,nodeId:o})):(s(a),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return r.stop()}}),r)})));return function(e,t,n){return r.apply(this,arguments)}}(),h=Object(Ar.b)();return e.expanded?a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.bar},a.a.createElement("div",{className:r.topLogo,id:"sideBar_logoMini"},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:jd.a,className:r.logoImg,style:{width:"111px",marginLeft:"15px"}}),a.a.createElement(k.a,{title:Object(S.u)("$__hideMenu",1),color:Object(S.d)("color"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})),a.a.createElement("div",{style:{position:"absolute",top:"120px",bottom:"0px",overflowX:"auto",width:"100%"}},a.a.createElement("div",{className:r.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/d","dashboard")}},a.a.createElement(re.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.u)("$__dashboard","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:t.open?r.itemButtomActive:r.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!t.open}))}},a.a.createElement(J.a,{overlap:"rectangular",badgeContent:h&&h.total?h.total:0,color:"secondary"},a.a.createElement(re.a,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Object(S.u)("$__chat","*"))),a.a.createElement("div",{className:r.separator}),a.a.createElement("div",{className:r.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/sp","StrategyAndPlans")}},a.a.createElement(re.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.u)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/t","myTasks")}},a.a.createElement(re.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.u)("$__mytasks","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/library","library")}},a.a.createElement(re.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.u)("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.u)("$__library","*"))),a.a.createElement("div",{className:r.item,id:"sideBar_button_brightandconnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?r.itemButtomActive:r.itemButtom,onClick:function(){d("/bright-and-connected","bright-and-connected")}},a.a.createElement(re.a,{icon:Va.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):a.a.createElement("div",{className:r.rootHide},a.a.createElement("div",{className:r.mainButton,id:"sideBar_logoMini"},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:jd.a,className:r.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),a.a.createElement(k.a,{title:Object(S.u)("$__showMenu",1),color:Object(S.d)("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));var Sd=Object(u.b)((function(e){return{card:e.card}}),(function(e){return Object(T.b)(I,e)}))((function(e){return console.log("AQUI PRECISA SER CRIADO O PAINEL DE MODELOS DE FLUXOS"),a.a.createElement(Cn.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:!!e.card.action},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(wr.a,{title:Object(S.u)("$__".concat(e.card.action),1),icon:"label",onCancel:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)}))}})))}));function Ld(){Ld=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Cd=Object(u.b)((function(e){return{board:e.controls.board}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.db,n=t.session;a.a.useEffect((function(){o()}),[e.board]);var o=function(){var t=Object(f.a)(Ld().mark((function t(){return Ld().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(Rt.b)(e,{cardLoad:"childrens",idRel:e.board});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(!e.board)return a.a.createElement(a.a.Fragment,null);var i=window.location.hash.split("/");i[0]=i[0].replace("#","");var c=r.cards[e.board],s=c._parent?r.cards[c._parent]:null,u=s&&s._parent!==i[0]&&r.cards[s._parent]&&r.cards[s._parent]._users&&r.cards[s._parent]._users[n._id]?r.cards[s._parent]:null;return a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backdropFilter:"blur(3px)"}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 100px)",height:"83vh",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("colorText"),display:"flex",justifyContent:"flex-start",alignItems:"center"}},u&&u._id&&a.a.createElement("div",{style:{marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center"}},a.a.createElement(wr.a,{title:"".concat((null===u||void 0===u?void 0:u.name)||Object(S.u)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===u||void 0===u?void 0:u.icon)||u.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===u.type}))[0]&&r.dataType.filter((function(e){return e.name===u.type}))[0].icon||"$__topic",iconTitle:"$__".concat(u.type),color:Object(S.d)("colorText"),backClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{board:u._id}))}}),a.a.createElement("div",{style:{marginTop:-5}},a.a.createElement(re.a,{icon:"navigate_next",color:Object(S.d)("textColor")}))),a.a.createElement("div",null,a.a.createElement(wr.a,{title:"".concat((null===c||void 0===c?void 0:c.name)||Object(S.u)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===c||void 0===c?void 0:c.icon)||c.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===c.type}))[0]&&r.dataType.filter((function(e){return e.name===c.type}))[0].icon||"$__topic",iconTitle:"$__".concat(c.type),color:Object(S.d)("textColor")}))),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(k.a,{id:"close_kanban",title:Object(S.u)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{board:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px",height:"calc(100% - 50px)"}},a.a.createElement(N.a,null,a.a.createElement(rc,{nodeId:e.board}))))))}));function Id(){Id=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Td=Object(u.b)((function(e){return{toCopyMove:e.controls.toCopyMove}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState((null===n||void 0===n?void 0:n.name)||""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState({}),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useState(!1),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(m.a)(w,2),E=j[0],L=j[1],C=a.a.useState({}),I=Object(m.a)(C,2),T=I[0],F=I[1];if(a.a.useEffect((function(){return e.toCopyMove&&l.a.getState().db.cards[e.toCopyMove]?(o(l.a.getState().db.cards[e.toCopyMove]),u("".concat(l.a.getState().db.cards[e.toCopyMove].name," (").concat(Object(S.u)("$__copy","*"),")")||!1)):(o({}),u("")),function(){o({}),u("")}}),[e.toCopyMove]),"{}"===JSON.stringify(n)||!n)return a.a.createElement(a.a.Fragment,null);var D=function(){var t=Object(f.a)(Id().mark((function t(){var r,a;return Id().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(!0),r={},Object.keys(n).forEach((function(e){-1===e.indexOf("_")&&"created_at"!==e&&"updated_at"!==e&&(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,n[e])))})),r=Object(p.a)(Object(p.a)(Object(p.a)({},n),r),{},{idRel:b&&b._id?b._id:n._parent?n._parent:null,name:s,status:"notStarted"}),Object.keys(r).forEach((function(e){0===e.indexOf("_")&&delete r[e],"string"!==typeof r[e]&&"boolean"!==typeof r[e]&&delete r[e]})),r._oldId=n._id,t.prev=6,t.next=9,Object(et.F)(e,!0,Object(p.a)(Object(p.a)({},r),{},{_oldId:n._id}),r.idRel);case 9:if(!(a=t.sent)||!a._id){t.next=15;break}return t.next=13,Object(et.i)(e,n._id,a._id,T);case 13:t.sent&&setTimeout(Object(f.a)(Id().mark((function t(){return Id().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:a._id});case 2:return t.next=4,Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:n._id});case 4:F({}),O(!1),L(!1),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}));case 8:case"end":return t.stop()}}),t)}))),1e3);case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(6),console.log("ERROR",t.t0);case 20:case"end":return t.stop()}}),t,null,[[6,17]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement(Gi.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement(R.a,{onClickAway:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("color")}},Object(S.u)("$__duplicate")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(k.a,{id:"close_duplicate",title:Object(S.u)("$__close","*"),color:Object(S.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},_?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(gr,{onSelect:function(e){y(e)},ignoreTypes:["chatGroup"]})):a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.u)("$__selectTarget",1),text:Object(S.u)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){O(!0)},size:"14px",textSize:"14px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},a.a.createElement(a.a.Fragment,null,b&&b.type&&["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal"].indexOf(b.type)>-1&&(b.type.indexOf(n.type)>-1||n.type.indexOf(b.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(S.u)("$__youAreDuplicating"),": ",Object(S.u)("$__".concat(b.type))," ",Object(S.u)("$__for"),": ",Object(S.u)("$__".concat(b.type)),".",Object(S.u)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null),a.a.createElement(Oe.a,{label:Object(S.u)("$__copyAs",1),variant:Object(S.d)("fieldVariant"),name:"copyAs",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"clear",onClick:function(){u(n.name)}})),onChange:function(e){u(e.target.value)}},value:s,placeholder:Object(S.u)("$__copyAs_placeholder",1)}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.u)("$__options")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyUsers,onClick:function(e){F(Object(p.a)(Object(p.a)({},T),{},{copyUsers:!T.copyUsers}))},name:"copyUsers",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__copyUsersAccess")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyTimeline,onClick:function(e){F(Object(p.a)(Object(p.a)({},T),{},{copyTimeline:!T.copyTimeline}))},name:"copyTimeline",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__copyTimelineIfExists")),a.a.createElement("div",null,a.a.createElement(Te.a,{checked:!!T.copyTags,onClick:function(e){F(Object(p.a)(Object(p.a)({},T),{},{copyTags:!T.copyTags}))},name:"copyTags",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.u)("$__copyTagsIfExists")))),E?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(ct.a,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(k.a,{title:Object(S.u)("$__cancel",1),text:Object(S.u)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:null}))},size:"12px",textSize:"12px"}),a.a.createElement(k.a,{title:Object(S.u)("$__duplicateAllLinkedItems",1),text:Object(S.u)("$__duplicateAllLinkedItems",1),color:Object(S.d)("menu"),icon:"dynamic_feed",onClick:function(){D(!0)},size:"12px",textSize:"12px",transparent:!0}))))))))})),Fd=r(1182);function Dd(){Dd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var Nd=Object(u.b)((function(e){return{addCard:e.controls.addCard}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({}),r=Object(m.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!1),g=Object(m.a)(d,2),b=g[0],y=g[1],v=a.a.useState(null),x=Object(m.a)(v,2),_=x[0],w=x[1],j=a.a.useState([l.a.getState().session._id]),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.createRef(),T=a.a.createRef(),F=a.a.createRef(),D=a.a.createRef(),N=a.a.createRef({});a.a.useEffect((function(){return"{}"!==JSON.stringify(e.addCard)&&e.addCard._parent&&l.a.getState().db.cards[e.addCard._parent]?o(l.a.getState().db.cards[e.addCard._parent]):(o({}),y(!1),u(!1)),function(){o({}),y(!1),u(!1)}}),[e.addCard]),a.a.useEffect((function(){!function(){if(n.automationUsers&&"doNotChange"!==n.automationUsers&&"remove"!==n.automationUsers&&n._users&&Object.keys(n._users).length>0){var e=l.a.getState().db.users[l.a.getState().session._id]||{},t=Object(p.a)(Object(p.a)({},"add"===n.automationUsers?Object(h.a)({},e._id,{_id:e._id,name:e.name,image:e.image||null}):{}),n._users),r=[];Object.keys(t).sort((function(e,r){return t[e].isResponsible?-1:1})).filter((function(e){return e})).forEach((function(e,t){e&&-1===r.indexOf(e)&&r.push(e)})),JSON.stringify(r)!==JSON.stringify(L)&&C(r)}}()}),[n]);var A=function(){var t=Object(f.a)(Dd().mark((function t(r){var a,o,i,c,s,u,d,f;return Dd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(F&&F.current&&F.current.error)){t.next=3;break}return w(F.current.error),t.abrupt("return");case 3:(a=F.current||{}).error&&delete a.error,Object.keys(a).length>0&&(a.formId=n.form),y(!0),N&&(!N.current||N.current&&!N.current.loading)&&(N.current=Object(p.a)(Object(p.a)({},N.current),{},{loading:!0}),d=Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({name:I.current.value,_parent:n._id,myDay:!!(e.myDay||(null===(o=e.initialData)||void 0===o?void 0:o.myDay)||(null===(i=e.addCard)||void 0===i?void 0:i.myDay)),type:(null===(c=e.addCard)||void 0===c||null===(s=c.initialData)||void 0===s?void 0:s.type)||e.type||"task",status:e.status?e.status:"notStarted",users:L},a),r?{checklist:!0}:{}),T&&T.current&&T.current.value?{description:T.current.value}:{}),D&&D.current&&D.current.getValue()?{value:D.current.getValue()}:{}),e.initialData?e.initialData:{}),(null===n||void 0===n?void 0:n.childrenAutoTag)&&(null===n||void 0===n?void 0:n._tags)&&(null===n||void 0===n?void 0:n._tags.length)>0?{_tags:n._tags}:{}),(null===n||void 0===n?void 0:n.setIcon)?{icon:null===n||void 0===n?void 0:n.setIcon}:{}),n&&n.automationDueDateType&&"add"===n.automationDueDateType&&(d=Object(p.a)(Object(p.a)({},d),{},{startDate:O()("".concat(O()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add((null===n||void 0===n?void 0:n.automationDueDate)||1,"days").unix("X")})),n&&n.automationStatusType&&"replace"===n.automationStatusType&&(d=Object(p.a)(Object(p.a)({},d),{},{status:n.automationStatus||"notStarted"},n.automationStatus&&"completed"===n.automationStatus?{completed_at:O()().unix("x")}:{})),(f=Wu(d,(null===(u=e.addCard)||void 0===u?void 0:u.rows)||0,e))&&(e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{cards:Object(p.a)(Object(p.a)({},l.a.getState().db.cards),f)})),e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}})))),N.current=Object(p.a)(Object(p.a)({},N.current),{},{loading:!1});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return!e.addCard||"{}"!==JSON.stringify(e.addCard)&&0!==Object.keys(e.addCard).length?a.a.createElement(Gi.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",justifyContent:"center",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",margin:"auto",boxShadow:"0px 0px 10px 3px rgba(0,0,0,0.2)"}},a.a.createElement("div",{style:{position:"relative",width:"400px",backgroundColor:"#FFFFFF",padding:"9px",height:"40px",margin:"auto",background:Object(S.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("colorText")}},n.shortCutTitle?n.shortCutTitle:Object(S.u)("$__new")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5,display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"assistant_navigation",title:Object(S.u)("$__selectTarget","*"),color:Object(S.d)("colorText"),icon:"assistant_navigation",onClick:function(){u((function(e){return!e}))},size:"20px",transparent:!0}),a.a.createElement(k.a,{id:"close_addCard",title:Object(S.u)("$__close","*"),color:Object(S.d)("colorText"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},s?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(gr,{onSelect:function(e){o(l.a.getState().db.cards[e._id])},ignoreTypes:["chatGroup"]})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},a.a.createElement("div",null,a.a.createElement("div",{id:"addCard_321",style:{width:"calc(100% - 0px)",maxHeight:"70vh",overflowY:"auto"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},n.shortCutTitle?n.shortCutTitle:e.placeHolder?e.placeHolder:Object(S.u)(e.checklist&&!e.myDay?"$__newSimpleTask":"$__newSubActivity")),e.explain?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3,color:Object(S.d)("menu")}},e.explain):a.a.createElement(a.a.Fragment,null),a.a.createElement(Fd.a,{ref:I,style:{width:"100%",padding:7,border:"none",borderBottom:"solid 1px ".concat(Object(S.d)("color")),background:"none",resize:"none",fontFamily:"inherit",fontSize:14},onKeyDown:function(t){var r,n,a=t.which||t.keyCode;return 13!==a||t.shiftKey?13===a&&t.shiftKey&&I.current&&I.current.value&&0===I.current.value.trim().length?(t.preventDefault(),void(I.current.value="")):void(27===a&&e.onCancel&&e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))):(t.preventDefault(),void(I.current&&I.current.value&&I.current.value.trim().length>0&&A(!((!e.checklist&&!(null===(r=e.addCard)||void 0===r?void 0:r.checklist)||e.myDay)&&!(null===(n=e.initialData)||void 0===n?void 0:n.checklist)))))},autoFocus:!0}),n.requireDescription&&a.a.createElement(Oe.a,{inputRef:T,label:Object(S.u)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(je.a,{position:"end"},a.a.createElement(re.a,{icon:"description",color:"lightgray"}))},placeholder:Object(S.u)("$__description",1)}),n&&n.form&&l.a.getState().forms[n.form]?a.a.createElement("div",{style:Object(p.a)({},_?{border:"solid 1px red",padding:7}:{})},a.a.createElement(jt,{formId:n.form,onChange:function(e,t){console.log(t),F.current=Object(p.a)(Object(p.a)({},e),{},{error:t}),w(null)}}),_?a.a.createElement("span",{style:{color:"red"}},Object(S.u)(_)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),n.requireValue&&a.a.createElement(wt,{label:Object(S.u)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:D,ref:D}),!n.showInPanel&&a.a.createElement(xi.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:n,noLimit:!0,multiple:!0,onSelect:function(e){C(e)},selected:L,transparent:!0})),b?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(ct.a,null)):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:33}},a.a.createElement(k.a,{id:"addModal_cancelButton",title:Object(S.u)("$__cancel",1),text:e.placeHolder||Object(S.u)("$__cancel",1),color:Object(S.d)("medium"),icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{addCard:{}}))},size:"25px"}),a.a.createElement("div",{id:"addCard_441"},a.a.createElement(k.a,{id:"sideModule_saveButton",title:n.shortCutButtonToAdd?n.shortCutButtonToAdd:e.placeHolder||Object(S.u)("$__save",1),text:n.shortCutButtonToAdd?n.shortCutButtonToAdd:e.placeHolder||Object(S.u)("$__save",1),color:"green",icon:"save",onClick:function(){var t,r;!I.current.value||I.current.value&&""===I.current.value.trim()?I.current.focus():A(!((!e.checklist&&!(null===(t=e.addCard)||void 0===t?void 0:t.checklist)||e.myDay)&&!(null===(r=e.initialData)||void 0===r?void 0:r.checklist)))},size:"25px"}))))))))):a.a.createElement(a.a.Fragment,null)})),Ad=[{id:"top_user",tittle:"$__tour_step1_name",text:["$__tour_step1_line1","$__tour_step1_line2","$__tour_step1_line3"]},{id:"chatNotificationsBt",tittle:"$__tour_step2_name",text:["$__tour_step2_line1","$__tour_step2_line2","$__tour_step2_line3"]},{id:"sideBar_button_dashboard",tittle:"$__tour_step3_name",text:["$__tour_step3_line1","$__tour_step3_line2","$__tour_step3_line3"]},{id:"sideBar_button_brightAndConnected",tittle:"$__tour_step4_name",text:["$__tour_step4_line1","$__tour_step4_line2","$__tour_step4_line3"]},{id:"sideBar_button_myTasks",tittle:"$__tour_step5_name",text:["$__tour_step5_line1","$__tour_step5_line2","$__tour_step5_line3"]},{id:"sideBar_button_library",tittle:"$__tour_step6_name",text:["$__tour_step6_line1","$__tour_step6_line2","$__tour_step6_line3"]},{id:"sideBar_button_tags",tittle:"$__tour_step7_name",text:["$__tour_step7_line1","$__tour_step7_line2","$__tour_step7_line3"]},{id:"sideBar_button_calendar",tittle:"$__tour_step8_name",text:["$__tour_step8_line1","$__tour_step8_line2","$__tour_step8_line3"]},{id:"sideBar_button_StrategyAndPlans",tittle:"$__tour_step9_name",text:["$__tour_step9_line1","$__tour_step9_line2","$__tour_step9_line3"],show:!1,click:!0},{id:"QuickAddBt",tittle:"$__tour_step10_name",show:!1,click:!0},{id:"Plantype_67",tittle:"$__tour_step11_name",fake:!0,buttonId:"intro_45",handleClose:"getElements_40",click:!0,position:"left",margin:"-10px"},{id:"Plantype_672",tittle:"$__tour_step12_name",text:["$__tour_step12_line1","$__tour_step12_line2"],fake:!0,handleBack:"getElements_58",handleClose:"getElements_40",buttonId:"Plantype_110",click:!0,position:"left",scale:"0.9",margin:"-10px",change:!0,test:!0}],Pd=[{id:"quick_388",tittle:"$__tour_step13_name",show:!1,click:!0,wait:!0,position:"left"},{id:"quick_417",tittle:"$__tour_step14_name",text:["$__tour_step14_line1","$__tour_step14_line2","$__tour_step14_line3"],click:!0,position:"right"},{id:"sideBar_subMenu_plan_overview",tittle:"$__tour_stepStrategic1_name",text:["$__tour_stepStrategic1_line1","$__tour_stepStrategic1_line2","$__tour_stepStrategic1_line3"],show:!1,click:!0,maskValue:5,position:"right"},{id:"Agilev2_Column_552",tittle:"$__tour_stepStrategic2_name",click:!0,show:!1,position:"top",margin:"0px 0px 50px 0px"},{id:"addCard_321",tittle:"$__tour_stepStrategic3_name",click:!0,input:!0,maskValue:5},{id:"addCard_441",tittle:"$__tour_stepStrategic4_name",click:!0,show:!1,maskValue:0,last:!0}],$d=[{id:"quick_388",tittle:"$__tour_step13_name",show:!1,click:!0,wait:!0,position:"left"},{id:"quick_417",tittle:"$__tour_step14_name",text:["$__tour_step14_line1","$__tour_step14_line2","$__tour_step14_line3"],click:!0,position:"right"},{id:"sideBar_subMenu_plan_board",tittle:"$__tour_stepFlux1",text:["$__tour_stepFlux_line1","$__tour_stepFlux_line2","$__tour_stepFlux_line3"],show:!1,click:!0},{id:"AgileKanbanIndex_256",tittle:"$__tour_stepFlux2",show:!1,click:!0},{id:"AgileKanbanIndex_282",tittle:"$__tour_stepFlux3",show:!1,click:!0},{id:"AgileKanbanColumn_304",tittle:"$__tour_stepFlux4",show:!1,click:!0},{id:"addCard_321",tittle:"$__tour_stepFlux5",click:!0,input:!0,maskValue:5},{id:"addCard_441",tittle:"$__tour_stepFlux6",click:!0,show:!1,maskValue:0,last:!0}],Md=r(1178),zd=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"block",zIndex:9999}},a.a.createElement("div",{style:{backgroundColor:"#fff",position:"relative",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",margin:"15% auto",padding:"20px",border:"1px solid #888",width:"80%",TextAlign:"center",borderRadius:"5px",maxWidth:"400px"}},a.a.createElement("h2",{style:{display:"flex",fontSize:"23px",fontWeight:"bold",justifyContent:"center"}},Object(S.u)("$__tourTitleIntro")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("p",{style:{width:"320px",fontWeight:"bolder",textAlign:"center",fontSize:"17px"}},Object(S.u)("$__endTourDesc"))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("button",{onClick:function(){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{disabledTour:!0})),e.handleEnd()},style:{padding:"10px 20px",backgroundColor:"#2ea44f",color:"#fff",borderRadius:"5px",border:"none",marginTop:"30px",cursor:"pointer",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}},Object(S.u)("$__letsStart")))))})),Yd=function(e){var t=e.handleStart,r=e.handleEnd,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)(!1),u=Object(m.a)(s,2),d=u[0],f=u[1],h={width:"90%",height:"50px",backgroundColor:Object(S.d)("menu"),color:Object(S.d)("color"),fontWeight:"bold",borderRadius:"5px",filter:c?"brightness(0.90)":"brightness(1)",marginRight:"10px",cursor:"pointer",border:"1px solid grey"},g=Object(p.a)(Object(p.a)({},h),{},{backgroundColor:"white",filter:d?"brightness(0.98)":"brightness(1)",color:"black"});return a.a.createElement("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"block",zIndex:9999}},a.a.createElement("div",{style:{backgroundColor:"#fff",position:"relative",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",margin:"10% auto",padding:"20px",border:"1px solid #888",width:"80%",TextAlign:"center",borderRadius:"5px",maxWidth:"400px"}},a.a.createElement("div",{style:{display:"flex",flexFlow:"column",alignItems:"center",marginBottom:"20px"}},a.a.createElement("h2",{style:{display:"flex",fontSize:"26px",fontWeight:"bold",justifyContent:"center"}}," ",Object(S.u)("$__tourTitleIntro")),a.a.createElement("p",{style:{width:"240px",fontWeight:"bolder",textAlign:"center",fontSize:"19px",marginBottom:"30px"}},Object(S.u)("$__tourIntro")),a.a.createElement("button",{onMouseEnter:function(){l(!0)},onMouseLeave:function(){l(!1)},onClick:t,style:h},Object(S.u)("$__letsStart")),a.a.createElement("div",{style:{width:"90%",borderBottom:"1px solid grey",display:"flex",justifyContent:"center",marginBottom:"25px",marginTop:"25px",position:"relative"}},a.a.createElement("span",{style:{top:"-10px",position:"absolute",backgroundColor:"white",paddingRight:"10px",paddingLeft:"10px"}}," ",Object(S.u)("$__or"))),a.a.createElement("button",{onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)},onClick:r,style:g},a.a.createElement("p",{style:{marginTop:"10px"}},Object(S.u)("$__skipTour","*"))))))},Bd=(r(1831),function(){var e=l.a.getState().session,t=Object(n.useState)([]),r=Object(m.a)(t,2),o=r[0],i=r[1],c=Object(n.useState)(!0),s=Object(m.a)(c,2),u=s[0],d=s[1],f=Object(n.useState)([]),h=Object(m.a)(f,2),g=h[0],b=h[1],y=Object(n.useState)(0),v=Object(m.a)(y,2),x=v[0],_=v[1],O=Object(n.useState)(!1),w=Object(m.a)(O,2),j=w[0],E=w[1],k=Object(n.useState)(!0),L=Object(m.a)(k,2),C=L[0],I=L[1],T=Object(n.useState)(!0),F=Object(m.a)(T,2),D=F[0],N=F[1],A=Object(n.useState)(0),P=Object(m.a)(A,2),$=P[0],M=P[1],z=Object(n.useState)(!1),Y=Object(m.a)(z,2),B=Y[0],R=Y[1],G=Object(n.useState)(""),H=Object(m.a)(G,2),W=H[0],U=H[1],q=Object(n.useState)("mask"),V=Object(m.a)(q,2),J=V[0],X=V[1],K=a.a.useRef({});Object(n.useEffect)((function(){e.disabledTour&&-1===window.location.hostname.indexOf("a1b2c")&&(K.current={disabledTour:!0});var t=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");t?(i(Pd),E(!0)):r?(i($d),E(!0)):i(Ad)}),[]);var Z=function(e){var t=e.text,r=e.children,n=e.tittle;return a.a.createElement("div",null,a.a.createElement("h1",{style:{fontWeight:"bolder",fontSize:"22px"}},Object(S.u)(n,1)),void 0!==t&&t.map((function(e,t){return a.a.createElement("div",{key:t},console.log(e,Object(S.u)(e)),a.a.createElement("h1",{style:{fontSize:"18px",display:"flex",fontWeight:"bolder",marginTop:"25px",color:"grey"}},Object(S.u)(e.trim(),1)),r)})))},Q=a.a.useCallback((function(){var e;!function(){var e=document.getElementById(o[x].id);e&&e.removeEventListener("click",Q),e&&e.removeEventListener("change",Q)}();var t=document.getElementById(null===(e=o[x+1])||void 0===e?void 0:e.id),r=o[x+1];if(t)te(r),_((function(e){return e+1}));else{if(x===o.length-1)return;setTimeout((function(){Q(x)}),300)}}),[x,o]),ee=function(){var e=setInterval((function(){var t=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");t?(_(0),i(Pd),clearInterval(e)):r&&(_(0),i($d),clearInterval(e))}),200)};function te(e){"undefined"!==typeof e.show||"undefined"!==typeof e.fake?d(!1):(d(!0),M(0)),"undefined"!==typeof e.maskValue&&M(e.maskValue),"undefined"!==typeof e.click&&N(!1)}Object(n.useEffect)((function(){K.current.disabledTour||o&&function e(){if(o.length>0){var t=document.getElementById(o[0].id);if(t&&0===x)te(o[x]),t.addEventListener("click",Q);else setTimeout((function(){e()}),300)}}()}),[o]),Object(n.useEffect)((function(){if(!K.current.disabledTour){if(0===x)return;if(x<o.length)document.getElementById(o[x].id)&&function(){if(o.length>0){var e,t=document.getElementById(o[x].id);if(void 0!==(null===(e=o[x])||void 0===e?void 0:e.input))t.addEventListener("change",Q);else{var r,n,a,i,c,l;if(void 0!==(null===(r=o[x])||void 0===r?void 0:r.show))t.addEventListener("click",Q);else if(void 0!==(null===(n=o[x])||void 0===n?void 0:n.fake)){var s=document.getElementById(o[x].buttonId);s&&s.addEventListener("click",Q)}else t.addEventListener("click",Q);if(void 0!==(null===(a=o[x])||void 0===a?void 0:a.last)&&t.addEventListener("click",(function(){return re(!0)})),void 0!==(null===(i=o[x])||void 0===i?void 0:i.change)){var u=document.getElementById(o[x].buttonId);u&&u.addEventListener("click",ee),u&&u.addEventListener("click",X("maskHide"))}if(void 0!==(null===(c=o[x])||void 0===c?void 0:c.handleClose)){var d=document.getElementById(o[x].handleClose);d&&d.addEventListener("click",(function(){return re()}))}if(void 0!==(null===(l=o[x])||void 0===l?void 0:l.handleBack)){var p=document.getElementById(o[x].handleBack);p&&p.addEventListener("click",(function(){return re()}))}}}}()}}),[x]);var re=function(e){I(!1),e&&R(!0),De.a.post("/user/preffers",{disabledTour:!0})};return Object(n.useEffect)((function(){if(!K.current.disabledTour){var e;if(0===x&&"quick_388"===(null===(e=o[x])||void 0===e?void 0:e.id))var t=setInterval((function(){var e=document.getElementById("loadBar"),r=setInterval((function(){document.contains(e)||(clearInterval(r),setTimeout((function(){X("mask"),U("upd")}),900))}),100);clearInterval(t)}),1e3);o&&b(function(e,t,r){var n={padding:"10px 20px",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px",backgroundColor:Object(S.d)("menu"),color:Object(S.d)("color"),borderRadius:"5px",border:"none",marginRight:"10px",cursor:"pointer",position:"absolute",right:"20px",bottom:"20px"},o=Object(p.a)(Object(p.a)({},n),{},{boxShadow:"none",backgroundColor:"transparent",color:"black",border:"none",right:"none",bottom:"7px",left:"10px"});return e.map((function(e){var i=e.text,c=e.id,l=e.tittle,s=e.margin,u=e.position;e.scale;return{selector:"#"+c,content:a.a.createElement(a.a.Fragment,null,0===r&&"maskHide"===J?null:a.a.createElement(a.a.Fragment,null,a.a.createElement(Z,{text:Object(S.u)(i),tittle:l}),a.a.createElement("div",{style:{paddingTop:i?"50px":"25px"}},t&&a.a.createElement("button",{id:"Tour_173",onClick:function(){return Q()},style:n}," ",Object(S.u)("$__next")," "),a.a.createElement("button",{onClick:function(){return re()},style:o},a.a.createElement("p",{style:{borderBottom:"1px solid black",marginTop:"20px"}},Object(S.u)("$__skipTour","*")))))),style:{fontSize:"12px",fontWeight:"bolder",borderRadius:"5px",color:"#333",boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px",fontFamily:"Helvetica, Arial, sans-serif",margin:s||"10px",display:0===r&&"maskHide"===J||window.innerWidth<1480&&11===r?"none":"block"},position:u||"bottom"}}))}(o,u,x))}}),[o,u,x,J]),K.current.disabledTour?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,j?a.a.createElement(Md.a,{maskClassName:J,disableFocusLock:!0,rounded:5,update:W,disableDotsNavigation:!0,showNavigation:!1,showNumber:!1,disableInteraction:D,closeWithMask:!1,goToStep:x,steps:g,isOpen:C,showButtons:!1,maskSpace:$,onRequestClose:function(){return re()}}):a.a.createElement(Yd,{handleEnd:function(){E(!0),re()},handleStart:function(){return E(!0)}}),B&&a.a.createElement(zd,{handleEnd:function(){re(),R(!1)}}))});function Rd(){Rd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var Gd=function(){var e=Object(f.a)(Rd().mark((function e(t,r){var n,a,o;return Rd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=l.a.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),l.a.getState().db&&l.a.getState().db[o]&&l.a.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},Object(h.a)({},o,Object(p.a)(Object(p.a)({},l.a.getState().db[o]),{},Object(h.a)({},r._id,Object(p.a)(Object(p.a)({},l.a.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Hd=r(1179),Wd=function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,backgroundColor:"rgba(0,0,0,0.66) !important"},wrapper:{position:"absolute",top:"70px",left:"0",right:"0",bottom:"0",height:"calc(100vh - 60px)"},mainPanel:{overflow:"auto",position:"absolute",top:"0",left:"0",right:"0",bottom:"0",maxHeight:"calc(100vh - 72px)",padding:15},content:{marginTop:"0px",padding:"15px"},container:Object(p.a)(Object(p.a)({},Z.f),{},{height:"-webkit-fill-available",overflowY:"auto"}),map:{marginTop:"0px"},mainPanelSidebarMini:Object(h.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},Ud=function(){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{position:"relative",minHeight:"100vh",display:"flex !important",margin:"0",border:"0",color:Z.I,alignItems:"center",backgroundSize:"cover",backgroundPosition:"center center",height:"100%",overflow:"auto","& footer":{position:"absolute",bottom:"0",width:"100%",border:"none !important"},"&:before":{backgroundColor:"rgba("+Object(Z.q)(Z.b)+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}};r(1832),r(1833);var qd,Vd=Object(u.b)((function(e){return{usersStatus:e.usersStatus.users,chat:e.chat,socket:e.functions.socket}}),(function(e){return Object(T.b)(I,e)}))((function(e){return a.a.createElement(a.a.Fragment,null)})),Jd=r(1960),Xd=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:Z.p[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(p.a)(Object(p.a)({},Z.e),{},{minHeight:"50px"}),flex:{flex:1},title:Object(p.a)(Object(p.a)({},Z.k),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:Z.I,letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:Z.I}}),appResponsive:{top:"8px"},primary:Object(p.a)({backgroundColor:Z.w[0],color:Z.I},Z.j),info:Object(p.a)({backgroundColor:Z.s[0],color:Z.I},Z.j),success:Object(p.a)({backgroundColor:Z.B[0],color:Z.I},Z.j),warning:Object(p.a)({backgroundColor:Z.H[0],color:Z.I},Z.j),danger:Object(p.a)({backgroundColor:Z.i[0],color:Z.I},Z.j),list:Object(p.a)(Object(p.a)({},Z.k),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:Z.I,paddingTop:"0",paddingBottom:"0"}),listItem:Object(h.a)({float:"left",position:"relative",display:"block",width:"auto",margin:"0",padding:"0"},e.breakpoints.down("sm"),{zIndex:"999",width:"100%",paddingRight:"15px"}),navLink:{color:Z.I,margin:"0 5px",paddingTop:"15px",paddingBottom:"15px",fontWeight:"500",fontSize:"12px",textTransform:"uppercase",borderRadius:"3px",lineHeight:"20px",position:"relative",display:"block",padding:"10px 15px",textDecoration:"none","&:hover,&:focus":{color:Z.I,background:"rgba("+Object(Z.q)(Z.p[17])+", 0.2)"}},listItemIcon:{marginTop:"-3px",top:"0px",position:"relative",marginRight:"3px",width:"20px",height:"20px",verticalAlign:"middle",color:"inherit",display:"inline-block"},listItemText:{flex:"none",padding:"0",minWidth:"0",margin:0,display:"inline-block",position:"relative",whiteSpace:"nowrap"},navLinkActive:{backgroundColor:"rgba("+Object(Z.q)(Z.I)+", 0.1)"},drawerPaper:Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({border:"none",bottom:"0",transitionProperty:"top, bottom, width",transitionDuration:".2s, .2s, .35s",transitionTimingFunction:"linear, linear, ease"},Z.c),{},{width:Z.l},Z.c),{},{position:"fixed",display:"block",top:"0",height:"100vh",right:"0",left:"auto",visibility:"visible",overflowY:"visible",borderTop:"none",textAlign:"left",paddingRight:"0px",paddingLeft:"0"},Z.D),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:Z.b,opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:Z.I},top:"-2px"}}},Kd=Object(B.a)(Xd);function Zd(e){var t=Kd(),r=e.color,n=x()(Object(h.a)({}," "+t[r],r));return a.a.createElement(ca.a,{position:"static",className:t.appBar+n},a.a.createElement(Jd.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},a.a.createElement("div",{style:{maxWidth:"222px"}},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Object(S.d)("customLogo"),style:{width:"100%"}})))))}function Qd(){Qd=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var ep=Object(j.b)(w.a)(qd||(qd=Object(d.a)(["\n&&&.Toastify__toast-container {\n min-width:407px !important;\n z-index:333333 !important;\n}\n.Toastify__toast {\n z-index::333333 !important;\n }\n.Toastify__toast-body {\n z-index::333333 !important;\n }\n.Toastify__progress-bar { }\n"]))),tp=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=Object.assign({},(Object(g.a)(e),e)),n=l.a.getState().session,o=a.a.useState({}),i=Object(m.a)(o,2),u=i[0],d=i[1],b=a.a.useState(!1),v=Object(m.a)(b,2),_=v[0],w=v[1],j=a.a.useState(!1),k=Object(m.a)(j,2),L=k[0],I=k[1],T=a.a.useState(!0),F=Object(m.a)(T,2),A=F[0],P=F[1],$=a.a.useState(!1),M=Object(m.a)($,2),z=M[0],Y=M[1],R=a.a.useState(!0),G=Object(m.a)(R,2),H=G[0],W=G[1],U=a.a.useState(!1),q=Object(m.a)(U,2),V=q[0],J=q[1],K=Object(B.a)(_?Wd:Ud),Z=a.a.useRef({}),Q=K(),ee=a.a.createRef(),ne=Q.mainPanel+" "+x()((t={},Object(h.a)(t,Q.mainPanelSidebarMini,!0),Object(h.a)(t,Q.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),ae=a.a.createRef(),oe=a.a.createRef();a.a.useEffect((function(){oe.current={offline:!1};var t=function(){var t=Object(f.a)(Qd().mark((function t(r){var a;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("WHITELABEL:::",r),t.next=3,Pe.a.post("/WhiteLabel",{url:r});case 3:(a=t.sent)&&((null===a||void 0===a?void 0:a.data)&&(d(a.data),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},n),{},{custom:Object(p.a)(Object(p.a)({},n.custom),a.data)}))),se());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=window.location.hostname;(r=r.replace(".machen.ai",""))&&-1===r.indexOf("software")&&-1===r.indexOf("hom2022")&&-1===r.indexOf("localhost")?t(r):se()}),[]),a.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),fe(t)})),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),_&&(fe(e),de(),ie(!0))}),[_]);var ie=function(){var e=Object(f.a)(Qd().mark((function e(t){var r,n,a,o;return Qd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe.current={offline:!1},window.addEventListener("dragover",(function(e){e.preventDefault()}),!1),window.addEventListener("drop",(function(e){e.preventDefault()}),!1),0,n=setInterval((function(){1}),1e3),a=setTimeout((function(){}),5e4),o=setInterval((function(){se(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(n),clearInterval(o),n=0,r=O()().tz("America/Sao_Paulo").unix("X"),a=setTimeout((function(){le("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(f.a)(Qd().mark((function e(t){var i;return Qd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===oe||void 0===oe||null===(i=oe.current)||void 0===i?void 0:i.offline)||(se(!0),clearInterval(o),o=setInterval((function(){se(!0)}),36e4),clearTimeout(a),n||(n=setInterval((function(){1}),1e3)),le("online"),r&&O()().tz("America/Sao_Paulo").unix("X")-r>30&&ce());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},le=function(){var e=Object(f.a)(Qd().mark((function e(t){return Qd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:("online"===t&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[n._id]&&"online"!==l.a.getState().usersStatus.users[n._id].status||"away"===t&&l.a.getState().usersStatus.users&&l.a.getState().usersStatus.users[n._id]&&"away"!==l.a.getState().usersStatus.users[n._id].status)&&l.a.getState().functions.socket.emit("socketStatus",{socketStatus:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var t=Object(f.a)(Qd().mark((function t(r){var a,o,i,s,d,f,m,g,b,y,v,x,O,j,E,k,S,L,C,I,T,F,D,N,$,M=arguments;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=M.length>1&&void 0!==M[1]?M[1]:0,!oe.current||oe.current.offline){t.next=75;break}if(r){t.next=50;break}return t.prev=3,t.next=6,Pe.a.post("/VerifySession");case 6:return o=t.sent,i=o&&o.data&&o.data.user&&o.data.user.language?{locale:o.data.user.language}:{all:!0},"#tab/languages"===window.location.hash&&(i={all:!0}),t.next=11,Pe.a.post("/M_Languages_V3",i);case 11:if(!(s=t.sent)){t.next=42;break}return t.next=15,new Promise((function(e,t){var r={};s.data.forEach((function(t,n){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},t.alias.name.toLowerCase(),{alias:t.alias.name.toLowerCase(),locales:t.locales})),n+1===s.data.length&&e(r)}))}));case 15:if(d=t.sent,!(o&&o.data&&o.data.token)){t.next=40;break}if(localStorage.setItem("TOKEN",o.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},o.data.user),(null===o||void 0===o||null===(f=o.data)||void 0===f||null===(m=f.user)||void 0===m||null===(g=m.GlobalData)||void 0===g?void 0:g.custom)?{custom:Object(p.a)(Object(p.a)(Object(p.a)({},n.custom),JSON.parse(null===o||void 0===o||null===(b=o.data)||void 0===b||null===(y=b.user)||void 0===y||null===(v=y.GlobalData)||void 0===v?void 0:v.custom)),{},{custom:null===o||void 0===o||null===(x=o.data)||void 0===x||null===(O=x.user)||void 0===O||null===(j=O.GlobalData)||void 0===j?void 0:j.custom},u)}:{})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)({},o.data.users?o.data.users:{})})),!d||!o){t.next=36;break}if(e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),(!_||_&&JSON.stringify(_)!==JSON.stringify(o.data.user))&&JSON.stringify(_)!==JSON.stringify(o.data.user)&&w(Object(p.a)({},o.data.user)),"Notification"in window){t.next=27;break}console.log("Esse browser n\xe3o suporta notifica\xe7\xf5es desktop"),t.next=30;break;case 27:if("denied"===Notification.permission){t.next=30;break}return t.next=30,Notification.requestPermission();case 30:return"/"!==window.location.pathname&&0!==_u.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||c.a.push("/d#tab/resume"),be(),ue(),t.abrupt("return",!0);case 36:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),w(!1);case 38:t.next=42;break;case 40:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(p.a)({},d)),A&&P(!1);case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(3),console.log(t.t0),5===a?(Y(!0),_&&w(!1),A&&P(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):se(r,a+1);case 48:t.next=73;break;case 50:return t.prev=50,t.next=53,Pe.a.post("/VerifySession",{ignoreUsers:!0});case 53:if(E=t.sent,k=l.a.getState().session,!(E&&E.data&&E.data.token)){t.next=65;break}if(localStorage.setItem("TOKEN",E.data.token),e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},E.data.user),(null===E||void 0===E||null===(S=E.data)||void 0===S||null===(L=S.user)||void 0===L||null===(C=L.GlobalData)||void 0===C?void 0:C.custom)?{custom:Object(p.a)(Object(p.a)(Object(p.a)({},n.custom),JSON.parse(null===E||void 0===E||null===(I=E.data)||void 0===I||null===(T=I.user)||void 0===T||null===(F=T.GlobalData)||void 0===F?void 0:F.custom)),{},{custom:null===E||void 0===E||null===(D=E.data)||void 0===D||null===(N=D.user)||void 0===N||null===($=N.GlobalData)||void 0===$?void 0:$.custom},u)}:{})),l.a.getState().functions.socket.emit("socketStatus",{socketStatus:"online"}),!(E.data&&k&&k._id&&E.data.user&&k._id!==E.data.user._id)){t.next=63;break}return window.location.reload(),t.abrupt("return");case 63:t.next=68;break;case 65:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300);case 68:t.next=73;break;case 70:t.prev=70,t.t1=t.catch(50),a>5?(localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),"/login"!==window.location.pathname&&setTimeout((function(){window.open("/login","_self")}),300)):setTimeout((function(){se(r,a+1)}),3e3);case 73:t.next=76;break;case 75:console.log("OFFLINE");case 76:case"end":return t.stop()}}),t,null,[[3,44],[50,70]])})));return function(e){return t.apply(this,arguments)}}(),ue=function(){var t=Object(f.a)(Qd().mark((function t(){var r,n;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(ke.n)(e),t.prev=1,t.next=4,Pe.a.get("/Tags_List");case 4:(r=t.sent)&&r.data&&(r.data.forEach((function(e){e._count=parseInt(e._count),e._countOthers=parseInt(e._countOthers)})),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{tag:r.data?r.data:[]}))),t.next=13;break;case 8:t.prev=8,t.t0=t.catch(1),console.group("Layout-ReqTags::ERR::"),console.log(t.t0),console.groupEnd();case 13:return t.prev=13,t.next=16,Pe.a.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{userGroup:n.data?n.data:[]})),t.next=25;break;case 20:t.prev=20,t.t1=t.catch(13),console.group("Layout-ReqGrpups::ERR::"),console.log(t.t1),console.groupEnd();case 25:case"end":return t.stop()}}),t,null,[[1,8],[13,20]])})));return function(){return t.apply(this,arguments)}}(),de=function(){var t=Object(f.a)(Qd().mark((function t(){return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Rt.b)(e,{cardLoad:"chat"});case 2:return t.next=4,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",ini:!0,limit:1});case 4:return t.next=6,Object(Ar.f)(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[l.a.getState().session._id],db:"users",type:"comment",ini:!0});case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),fe=function(){var t=Object(f.a)(Qd().mark((function t(r){var n,a,o=arguments;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>1&&void 0!==o[1]&&o[1],!(_&&"/"!==window.location.pathname&&"/login"!==window.location.pathname&&e&&e.reduxFunction)){t.next=32;break}if(!Z||!Z.current||Z.current.initialLoader){t.next=24;break}return Z.current={initialLoader:!0},t.next=6,Object(Pe.a)("/Forms_List");case 6:return(n=t.sent)&&n.data&&n.data.length>0&&(a={},n.data.filter((function(e){return e.data._id})).forEach((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e.data._id,Object(p.a)({},e.data)))})),e.reduxFunction("ASYNC","SET_FORMS",Object(p.a)({},a))),t.next=10,Object(Rt.b)(e,{cardLoad:"myDay"});case 10:return t.next=12,Object(Rt.b)(e,{cardLoad:"favorites"});case 12:return t.next=14,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"plans"});case 14:return t.next=16,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 16:return t.next=18,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"steps"});case 18:return t.next=20,Object(Rt.b)(Object(p.a)({},e),{cardLoad:"approval",ignoreLoader:!0});case 20:return t.next=22,Object(Rt.b)(e,{cardLoad:"links",limit:9,skip:0});case 22:return t.next=24,Object(Rt.b)(e,{cardLoad:"insights",limit:9,skip:0});case 24:return t.next=26,Object(Rt.d)(e);case 26:if(!t.sent){t.next=30;break}return P(!1),t.abrupt("return",!0);case 30:t.next=33;break;case 32:return t.abrupt("return",!0);case 33:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ge=function(){},be=function(){var t=Object(f.a)(Qd().mark((function t(){var r;return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Hd.a)("https://ws.machen.ai",{transports:["websocket","polling"],auth:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(xe(r),e.reduxFunction("ASYNC","SET_FUNCTIONS",{socket:r})),t.abrupt("return",!0);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ye=function(){var e=Object(f.a)(Qd().mark((function e(t){return Qd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"login"===t.fn?(localStorage.setItem("TOKEN",t.token),setTimeout((function(){window.open("/d#tab/resume","_self")}),1e3)):"alert"===t.fn&&Object(S.c)(Object(p.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var t=Object(f.a)(Qd().mark((function t(r){return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:localStorage.setItem("TOKEN",null),e.reduxFunction("ASYNC","CLEAR_SESSION"),setTimeout((function(){window.open("/login","_self")}),300);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),xe=function(t){t.on("global",(function(e){"version"===e.fn&&Object(S.c)({message:Object(S.u)("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&ve(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){Object(et.l)(Object(p.a)(Object(p.a)({},e),{},{store:l.a.getState(),_sessionId:n._id}),t)})),t.on("copy.LOAD",(function(t){Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:t._id})})),t.on("card.ADD",(function(t){t._id&&Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){Object(et.k)(e,t)})),t.on("card.MYDAY",(function(t){Object(et.z)(e,t)})),t.on("card.TIMER",(function(t){t&&t.type&&"stop"===t.type&&(console.log("card.TIMER",t),Object(et.m)(e,t))})),t.on("card.UPDATE",(function(t){Object(et.n)(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(f.a)(Qd().mark((function t(r){return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(et.c)(e,r);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("card.ACCESS_DELETE",(function(t){Object(et.a)(e,t)})),t.on("card.ACCESS_REMOVE",(function(t){Object(et.b)(e,t)})),t.on("card.REORDER",(function(t){Object(et.C)(e,t)})),t.on("card.DELETE",(function(t){Object(et.o)(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){Object(et.K)(e,t)})),t.on("kanban.REORDER",(function(t){Object(lt.e)(e,t)})),t.on("unlinkChildrens",(function(t){Object(et.K)(e,t)})),t.on("card.changePlanId",(function(t){var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=l.a.getState().sessionLoads.cards.load,a=y()("".concat(JSON.stringify({idRel:r[0],cardLoad:"plan"}))).toString();r[0]===t.planId||Object.keys(n).length>0&&n[a]?Object(Rt.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):Object(et.f)(e,t)})),t.on("node.UPDATE",(function(t){Gd(e,t)})),t.on("column.UPD",(function(t){Object(et.P)(e,t)})),t.on("column.DELETE",(function(t){Object(et.p)(e,t)})),t.on("column.REORDER",(function(t){Object(et.D)(e,t)})),t.on("column.CARDS",(function(t){Object(et.g)(e,t)})),t.on("user.UPD",(function(t){Object(ke.c)(e,t)})),t.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(p.a)(Object(p.a)({},l.a.getState().usersStatus.users),{},Object(h.a)({},t.user,Object(p.a)(Object(p.a)({},t),{},{status:t.status,updatedAt:t.updatedAt})))})})),t.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(p.a)(Object(p.a)({},l.a.getState().usersStatus.users),{},Object(h.a)({},t.user,null))})})),t.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",Object(p.a)(Object(p.a)({},l.a.getState().usersStatus),{},{users:Object(p.a)({},t.users)}))})),t.on("user.ACCESS",(function(t){Object(ke.c)(e,t)})),t.on("userGroup.UPD",(function(t){An(e,t)})),t.on("feed.ADD",(function(t){!function(e,t){var r=Object(h.a)({},t._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[t._id]&&l.a.getState().db.feeds[t._id].feed?{feed:l.a.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds&&l.a.getState().db.feeds[t._id]&&l.a.getState().db.feeds[t._id]._parent?l.a.getState().db.feeds[t._id]._parent:{}),{},Object(h.a)({},t._parent,Object(p.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{feeds:Object(p.a)(Object(p.a)({},l.a.getState().db.feeds),r)}))}(e,t)})),t.on("language.UPD",(function(t){Object(S.n)(e,t)})),t.on("tag.UPD",(function(t){An(e,t)})),t.on("tag.DEL",(function(t){$n(e,t,!0)})),t.on("tag.UNLINK",(function(t){Yn(e,t,!0)})),t.on("logout",(function(e){e.user===l.a.getState().session._id&&ve()})),t.on("notifications.ADD",function(){var t=Object(f.a)(Qd().mark((function t(r){return Qd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.a.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(p.a)(Object(p.a)({},l.a.getState().notifications),{},Object(h.a)({},r.notify._id,r.notify)));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.on("chat.STATUS",(function(t){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)(Object(p.a)({},l.a.getState().db.users),{},Object(h.a)({},t.user,Object(p.a)(Object(p.a)({},l.a.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),t.on("chat.READED",(function(t){(l.a.getState().db.cards[t.id]||l.a.getState().db.users[t.id]||l.a.getState().db.users[t.readedBy])&&Object(Ar.a)(e,t)})),t.on("chat.INTERACT",(function(t){Object(Ar.e)(e,t),l.a.getState().db.cards[t.id]||l.a.getState().db.users[t.id]||l.a.getState().db.users[t.readedBy]}));var r=setTimeout((function(){}),5e3);t.on("disconnect",(function(){oe.current={offline:!0},r=setTimeout((function(){I(!0)}),5e3)})),t.on("connect",(function(){var e;setTimeout((function(){t.emit("data",{module:"user",method:"post",action:"logout"},{notThis:!0})}),2e3),(null===oe||void 0===oe||null===(e=oe.current)||void 0===e?void 0:e.offline)&&(oe.current={offline:!1},ce()),se(!0),clearTimeout(r),I(!1)}))};return A?a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},a.a.createElement(he,null)):(z&&"/offline-detect"!==window.location.pathname&&c.a.push("offline-detect"),z||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||c.a.push("login"),a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:_&&H?"calc(150px + ".concat(V?"264px":"0px",")"):"0px",right:"0px"},onContextMenu:function(){}},_?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:Q.wrapper},a.a.createElement("div",{className:ne,ref:ae,id:"mainPannel"},a.a.createElement("div",{className:Q.container},a.a.createElement(N.a,null,a.a.createElement(s.d,null,function t(n){var o=_;return n.filter((function(e){if(e.auth&&(!e.AppAccess||e&&e.AppAccess&&o&&o._access)){var t=!e.access&&!e.AppAccess;if(e.access&&e.access.forEach((function(e){o&&o[e]&&(t=!0)})),e.AppAccess&&e.AppAccess.forEach((function(e){o&&o._access&&o._access[e]&&(t=!0)})),t)return!0}return!1})).map((function(o,i){var c;return c=o.component,o.views&&o.views.length>0&&t(o.views),a.a.createElement(s.b,{path:o.path,component:function(){return a.a.createElement("div",{style:Object(p.a)({},H&&(e.search||o.subMenu)?{position:"absolute",left:48,top:0,right:0,bottom:0,overflow:"auto"}:{})},a.a.createElement(N.a,{info:{path:"layouts/index",component:"Sidebar"}},a.a.createElement(X.a,{xsDown:!0},H&&a.a.createElement(Lu,Object.assign({routes:n,handleDrawerToggle:ge,menuExpand:function(){W((function(e){return!e}))},subMenu:!(!e.search&&!o.subMenu),setSubMenuExpanded:function(e){J(e)},subMenuExpanded:!(!e.search&&!o.subMenu||!V)},r)))),a.a.createElement(c,null))},key:i,expanded:!(!e.search&&!o.subMenu||!H),subMenu:!(!e.search&&!o.subMenu||!H||!V)})}))}(_u),a.a.createElement(s.a,{from:"/",to:"/d#tab/resume"}))))),a.a.createElement(N.a,null,a.a.createElement(Cd,null)),a.a.createElement(N.a,null,a.a.createElement(En,null))),a.a.createElement(X.a,{smDown:!0},a.a.createElement(sd,{menuExpand:function(){W((function(e){return!e}))},expanded:H})),a.a.createElement(N.a,null,a.a.createElement(pe,null)),a.a.createElement(me,null),a.a.createElement(N.a,null,a.a.createElement(D,null)),a.a.createElement(N.a,null,a.a.createElement(E.a,{open:L,className:Q.backdrop,style:{backdropFilter:"blur(7px) sepia(90%)"}},a.a.createElement("div",{style:{position:"absolute",left:"0px",right:"0px",top:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",fontSize:"33px",flexDirection:"column"}},a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(re.a,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Object(S.u)("$__noInternetConnection","*"))))),a.a.createElement("div",null),a.a.createElement(N.a,null,a.a.createElement(Od,{expanded:H,subMenuExpanded:V})),a.a.createElement(N.a,null,a.a.createElement(Sd,null)),a.a.createElement(N.a,null,a.a.createElement(Nd,null)),a.a.createElement(N.a,null,a.a.createElement(Td,null)),a.a.createElement(N.a,null,a.a.createElement(C,null)),a.a.createElement(N.a,null,a.a.createElement(Bd,null)),a.a.createElement(Vd,null)):a.a.createElement("div",null,a.a.createElement("div",{className:Q.wrapper,ref:ee},a.a.createElement(Zd,null),a.a.createElement("div",{className:Q.fullPage,style:{backgroundImage:'url("'.concat((null===u||void 0===u?void 0:u.loginBackground)?u.loginBackground:Object(S.d)("loginBackground"),'")')}},a.a.createElement("div",{style:{backgroundImage:u.loginBackground,minHeight:"100vh !important"}}),a.a.createElement(N.a,null,a.a.createElement(s.d,null,function e(t){return t.map((function(t,r){return t.views?e(t.views):(n=t.component,!t.auth&&n?a.a.createElement(s.b,{path:t.path,component:function(){return a.a.createElement(n,{callback:function(e){ye(e)}})},key:r}):null);var n}))}(_u),a.a.createElement(s.a,{from:"*",to:z?"/offline-detect":"/login"}))),a.a.createElement(N.a,null,a.a.createElement(te,{white:!0}))))),a.a.createElement(N.a,null,a.a.createElement(ep,{pauseOnFocusLoss:!0}))))})),rp=(r(1837),function(e){var t=e.store,r=e.history;return a.a.createElement(u.a,{store:t},a.a.createElement(s.c,{history:r},a.a.createElement(s.b,{exact:!0,patch:"/:params",component:tp})))});r(210).config(),-1===window.location.hostname.indexOf("192.168")&&-1===window.location.hostname.indexOf("localhost")&&-1===window.location.hostname.indexOf("hom2022.machen")&&-1===window.location.hostname.indexOf("homologation.machen")&&-1===window.location.hostname.indexOf("a1b2c3d4.machen")&&-1===window.location.hostname.indexOf("sonne.machen")&&(console.log=function(){}),Object(o.render)(a.a.createElement(rp,{store:l.a,history:c.a}),document.getElementById("root"))},188:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(6),i=r(1),c={tags:Object(n.a)(Object(n.a)({},o.k),{},{position:"absolute",width:"100%",right:"0px",bottom:"-6px",userSelect:"none",height:"6px",marginBottom:"0px",display:"flex",justifyContent:"flex-end",overflow:"hidden","& .tag":{width:"15px",marginRight:"3px",cursor:"pointer",height:"6px",borderRadius:" 0px 0px 3px 3px"}}),tagsOver:Object(n.a)(Object(n.a)({},o.k),{},{position:"relative",width:"100%",userSelect:"none",marginTop:"5px",marginBottom:"5px",height:"auto",overflow:"hidden","& .tag":{fontSize:"12px",padding:"0 5px",margin:"3px",borderRadius:" 5px",color:Object(i.d)("light")}})},l=r(0),s=r.n(l),u=r(3),d=r(10),p=r(324),f=r(345),h=r(147),m=r(157),g=Object(m.a)(c);t.a=function(e){var t=g(),r=s.a.useState(!!e.showOptions),o=Object(a.a)(r,2),c=o[0],l=o[1],m=s.a.useState(!1),b=Object(a.a)(m,2),y=b[0],v=b[1],x=u.a.getState().db[e.dbNode?e.dbNode:"tag"]||{};return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:c||e.expanded?t.tagsOver:t.tags,onClick:function(t){e.options&&e.options.length>0&&!c&&l(!0),t.stopPropagation()},onMouseOver:function(){v(!0)},onMouseLeave:function(){setTimeout((function(){v(!1)}),500)}},x&&x.length>0&&e.options&&e.options.filter((function(e){return e.value})).filter((function(e,t){return u.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0})).map((function(t,r){var a;a=u.a.getState().db.tag.filter((function(e){return e.value===t.value}))[0];var o=x.filter((function(e){return e.value===a.value})).length>0&&x.filter((function(e){return e.value===a.value}))[0].color?x.filter((function(e){return e.value===a.value}))[0].color:Object(i.d)("medium");return s.a.createElement("div",{key:r,className:"tag",style:Object(n.a)({position:"relative",float:"left",whiteSpace:"nowrap",backgroundColor:o},e.rounded?{borderRadius:"7px !important"}:{}),onClick:function(){e.colorPicker||e.showOptions||l(!1)}},!e.showOptions&&c&&e.colorPicker?s.a.createElement(p.a,{label:a.label,color:o,_id:a.value,onChange:function(e){var t=a;t.color=e,u.a.getState().functions.socket.emit("tag.UPD",t)}}):(c||e.expanded)&&s.a.createElement("div",{className:"tag",style:Object(n.a)({backgroundColor:o,color:a.color?Object(i.s)(a.color,!0):"#FFFFFF",display:"flex",alignItems:"center"},e.rounded?{borderRadius:"7px !important"}:{})},a.parent&&u.a.getState().db.tag.filter((function(e){return e.value===a.parent})).length>0?s.a.createElement("div",{style:{fontSize:8,marginRight:3}},u.a.getState().db.tag.filter((function(e){return e.value===a.parent}))[0].label," / "):s.a.createElement(s.a.Fragment,null),a.label))})),!e.showOptions&&c&&!e.expanded&&y&&s.a.createElement("div",{style:{position:"absolute",top:"0",right:"0"}},s.a.createElement(h.a,{title:Object(i.u)("$__hideTags")},s.a.createElement(s.a.Fragment,null,s.a.createElement(f.a,{onClick:function(t){e.showOptions||l(!1)}},s.a.createElement(d.a,{size:"22px",color:Object(i.d)("medium"),icon:"visibility_off"})))))))}},189:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(7),a=r(59),o=r(0),i=r.n(o),c=r(94),l=r.n(c),s=r(157),u=r(2),d=r(6),p={cardHeader:{padding:"0.75rem 1.25rem",marginBottom:"0",borderBottom:"none",background:"transparent",zIndex:"3 !important","&$cardHeaderPlain,&$cardHeaderImage,&$cardHeaderContact,&$cardHeaderSignup,&$cardHeaderIcon,&$cardHeaderStats,&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader, &$customCardHeader":{margin:"0 15px",padding:"0",position:"relative",color:d.I},"&:first-child":{borderRadius:"calc(.25rem - 1px) calc(.25rem - 1px) 0 0"},"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{"&:not($cardHeaderIcon):not($cardHeaderImage):not($cardHeaderText)":{borderRadius:"3px",marginTop:"-20px",padding:"15px"}},"&$cardHeaderStats svg":{fontSize:"36px",lineHeight:"56px",textAlign:"center",width:"36px",height:"36px",margin:"10px 10px 4px"},"&$cardHeaderStats .fab,&$cardHeaderStats .fas,&$cardHeaderStats .far,&$cardHeaderStats .fal,&$cardHeaderStats .material-icons":{fontSize:"36px",lineHeight:"56px",width:"56px",height:"56px",textAlign:"center",overflow:"unset",marginBottom:"1px"},"&$cardHeaderStats$cardHeaderIcon":{textAlign:"right"},"&$cardHeaderImage":{marginLeft:"15px",marginRight:"15px",marginTop:"-30px",borderRadius:"6px"},"&$cardHeaderText":{display:"inline-block"}},cardHeaderPlain:{marginLeft:"0px",marginRight:"0px","&$cardHeaderImage":{margin:"0 !important"}},cardHeaderImage:{position:"relative",padding:"0",zIndex:"1","& img":{width:"100%",borderRadius:"6px",pointerEvents:"none",boxShadow:"0 5px 15px -8px rgba("+Object(d.q)(d.b)+", 0.24), 0 8px 10px -5px rgba("+Object(d.q)(d.b)+", 0.2)"},"& a":{display:"block"}},cardHeaderContact:{margin:"0 15px",marginTop:"-20px"},cardHeaderSignup:{marginLeft:"20px",marginRight:"20px",marginTop:"-40px",padding:"20px 0",width:"100%",marginBottom:"15px"},cardHeaderStats:{"& $cardHeaderIcon":{textAlign:"right"},"& h1,& h2,& h3,& h4,& h5,& h6":{margin:"0 !important"}},cardHeaderIcon:{"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{background:"transparent",boxShadow:"none"},"& .fab,& .fas,& .far,& .fal,& .material-icons":{width:"33px",height:"33px",textAlign:"center",lineHeight:"33px"},"& svg":{width:"24px",height:"24px",textAlign:"center",lineHeight:"33px",margin:"5px 4px 0px"}},cardHeaderText:{},warningCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.G)},successCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.A)},dangerCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.h)},infoCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.r)},primaryCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.v)},roseCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.y)},customCardHeader:{color:d.I,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(u.a)({},d.g)}},f=["className","children","color","plain","image","contact","signup","stats","icon","text"],h=Object(s.a)(p);function m(e){var t,r=h(),o=e.className,c=e.children,s=e.color,u=e.plain,d=e.image,p=e.contact,m=e.signup,g=e.stats,b=e.icon,y=e.text,v=Object(a.a)(e,f),x=l()((t={},Object(n.a)(t,r.cardHeader,!0),Object(n.a)(t,r[s+"CardHeader"],s),Object(n.a)(t,r.cardHeaderPlain,u),Object(n.a)(t,r.cardHeaderImage,d),Object(n.a)(t,r.cardHeaderContact,p),Object(n.a)(t,r.cardHeaderSignup,m),Object(n.a)(t,r.cardHeaderStats,g),Object(n.a)(t,r.cardHeaderIcon,b),Object(n.a)(t,r.cardHeaderText,y),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:x},v),c)}},191:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(83),i=(r(164),r(106)),c=r(1);t.default=function(e){var t=e.tittle,r=e.icon,n=e.data;return a.a.createElement("div",{style:{height:"100%",width:"100%"}},a.a.createElement(i.a,null,(function(i){return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},a.a.createElement(o.a,{styles:e.styles?e.styles:{},tittle:Object(c.u)("$__".concat(t)),icon:r,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),!e.load&&i?a.a.createElement("div",{style:{width:"100%",height:"fitContent",fontWeight:"bolder",flex:"1 1 auto",display:"flex",justifyContent:"center",fontSize:"200%"}},a.a.createElement("p",{style:{textAlign:"center",fontSize:"calc(3.5em + (2 - 14) * ((100vh - 200px) / (1400 - 200)))",margin:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},n)):a.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{alignSelf:"center"}}," ",a.a.createElement("div",{className:"loader"}))))})))}},193:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(59),a=r(0),o=r.n(a),i=r(157),c=r(885),l=["children","className"],s=Object(i.a)({grid:{padding:"0 15px"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({item:!0},i,{className:t.grid+" "+a}),r)}},20:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(10),c=r(176),l=r(129),s=r(345),u=r(477),d=r(392),p=r(157),f=r(1),h=Object(p.a)((function(e){return{root:{"& .MuiIconButton-root":{padding:"3px",fontSize:"none !important"}},iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.2)"}},iconButtonStyleWhite:{padding:"3px !important",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},shadow:{boxShadow:"0 0px 5px rgb(0 0 0 / 20%)"},iconText:{display:"flex",alignItens:"center"},iconText_Text:{marginLeft:"15px"},badge:{fontSize:"11px",whiteSpace:"nowrap"}}}));t.a=function(e,t){var r=h();return o.a.createElement("div",{className:r.root,style:Object(n.a)({},e.style?e.style:{})},o.a.createElement(l.a,{title:e.title?e.title:"INSERT_BUTTON_TITLE"},o.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingLeft:7,paddingRight:7}},e.text&&o.a.createElement(u.a,Object.assign({disabled:!!e.load||!!e.disabled,onClick:e.onClick?function(t){t.preventDefault(),t.stopPropagation(),e.onClick()}:null},e.shadow?{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite," ").concat(r.shadow)}:{className:"".concat(e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite)},e.buttonStyle?{style:e.buttonStyle}:{}),o.a.createElement("div",{className:r.iconText},e.load?o.a.createElement("div",null,o.a.createElement(c.a,{size:25,style:{margin:"auto",display:"flex"}}),o.a.createElement("span",{style:{marginLeft:"15px",color:"lightgray"}},e.loadText?e.loadText:Object(f.u)("$__saving"))):o.a.createElement("div",{style:{display:"flex",alignItems:"center"}},e.icon?o.a.createElement(d.a,{overlap:"rectangular",badgeContent:e.badgeContent,classes:{badge:r.badge},color:"secondary"},o.a.createElement(i.a,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Object(f.d)("menu"),icon:e.icon?e.icon:"help_outline"})):o.a.createElement(o.a.Fragment,null),o.a.createElement("span",{style:Object(n.a)(Object(n.a)({},e.textSize?{fontSize:e.textSize}:{}),{},{marginLeft:"5px",color:e.textColor?e.textColor:e.color?e.color:Object(f.d)("menu"),whiteSpace:"nowrap"})},e.text)))),!e.text&&o.a.createElement(s.a,{onClick:e.onClick?function(t){e.onClick(),t.preventDefault(),t.stopPropagation()}:null,className:e.transparent?r.iconButtonStyleTransaparent:r.iconButtonStyleWhite},o.a.createElement(d.a,{badgeContent:e.badgeContent,color:"secondary",classes:{badge:r.badge},overlap:"rectangular"},o.a.createElement(i.a,{usePropagation:!!e.usePropagation,size:e.size?e.size:"22px",color:e.color?e.color:Object(f.d)("menu"),icon:e.icon?e.icon:"help_outline"}))))))}},21:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(59),a=r(0),o=r.n(a),i=r(157),c=r(885),l=["children","className"],s=Object(i.a)({grid:{padding:"0 15px !important"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({item:!0},i,{className:t.grid+" "+a}),r)}},228:function(e,t,r){"use strict";var n=r(7),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(73),s=r.n(l),u=r(14),d=r(13),p=r(15),f=r(3),h=r(20),m=r(45),g=r(9),b=r.n(g),y=r(267),v=r(271),x=r(155),_=r(10),O=r(153),w=r(60),j=r(27),E=r(292),k=r(1888),S=r(1879),L=r(1878),C=r(1880),I=r(1203),T=r(724),F=r(147),D=r(157),N=r(453),A=(r(496),r(1)),P=Object(D.a)(N.a);var $=JSON.stringify({status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),M=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(d.b)(p,e)}))((function(e){var t,r,i=e.field,l=P(),s=f.a.getState(),u=s.db,d=s.searchs,p=c.a.useState(Object(a.a)({},JSON.parse($))),h=Object(o.a)(p,2),m=h[0],g=h[1],D=c.a.useState(null),N=Object(o.a)(D,2),M=N[0],z=N[1],Y=JSON.parse($);c.a.useEffect((function(){var t;if(e.onChange){var r={};Object.keys(m).forEach((function(e){Y[e]||(r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,m[e]))),Y[e]&&JSON.stringify($[e])!==JSON.stringify(m[e])&&(r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},e,m[e])))})),e.onChange(r)}(null===e||void 0===e||null===(t=e.preffers)||void 0===t?void 0:t.searchButton)||e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},f.a.getState().searchs),{},Object(n.a)({},e.nodeId,Object(a.a)(Object(a.a)({},JSON.parse($)),m))))}),[m]),c.a.useEffect((function(){var t=Object(a.a)(Object(a.a)({},JSON.parse($)),d[e.nodeId]||{});JSON.stringify(t)!==JSON.stringify(m)&&g(t)}),[i]),c.a.useEffect((function(){e.searchs&&!e.searchs[e.nodeId]&&g(JSON.parse($))}),[e.searchs]);var B=window.location.hash.split("/");B[0]=B[0].replace("#",""),36!==B[0].length&&(B[0]=null);var R=function(t,r){var o,i,c=m[t]||{};"all"===r?Object.keys(c).forEach((function(e){c[e]=!0})):(c.all&&Object.keys(c).forEach((function(e){c[e]=!1})),c.all=!1),(null===e||void 0===e||null===(o=e.preffers)||void 0===o||null===(i=o.unique)||void 0===i?void 0:i.status)&&Object.keys(c).forEach((function(e){c[e]=!1})),g(Object(a.a)(Object(a.a)({},m),{},Object(n.a)({},t,Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},r,"all"===r||!c[r])))))},G=function(t){var r;return c.a.createElement(k.a,{style:{width:"100%"},expanded:M===t,onChange:function(){z(M===t?null:t)}},c.a.createElement(L.a,{style:{minWidth:"100%"},expandIcon:c.a.createElement(_.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},c.a.createElement("div",{style:{color:Object(A.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left"}},Object(A.u)("$__".concat(t))),c.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(m[t]).filter((function(e,r){return m[t][e]&&"all"!==e})).map((function(e,t){return c.a.createElement(F.a,{title:Object(A.u)(u.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:u.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),c.a.createElement(S.a,{style:{minWidth:"100%"}},c.a.createElement(I.a,{style:{width:"100%"}},(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.unique[t])?c.a.createElement(c.a.Fragment,null):c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{checked:!(!m[t]||!m[t].all),onChange:function(){R("priority","all")},color:"default"}),label:Object(A.u)("$__allPriorities")}),u.priority.map((function(e,r){return c.a.createElement(c.a.Fragment,{key:r},c.a.createElement(C.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:c.a.createElement(x.a,{indeterminate:!(!m[t]||!m[t].all),checked:!(!m[t]||!m[t][e.value]),onChange:function(){R(t,e.value)},color:"default"}),label:Object(A.u)(e.label)}))})))))};return"admin"===i?c.a.createElement(w.a,{checked:!!m.admin,onChange:function(e){g(Object(a.a)(Object(a.a)({},m),{},{admin:!m.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"text"===i?c.a.createElement("div",{className:l.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:l.noLabelLight,label:Object(A.u)("$__search","*"),autoFocus:!0,value:m.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(_.a,{color:Object(A.d)("color")},"search")),onChange:function(e){g(Object(a.a)(Object(a.a)({},m),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"tagsByText"===i?c.a.createElement("div",{className:l.textField,style:{width:"100%"}},c.a.createElement(j.a,{className:l.noLabelLight,label:Object(A.u)("$__searchTags","*"),value:m.tagsByText||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:c.a.createElement(T.a,{position:"start"},c.a.createElement(_.a,{color:Object(A.d)("color")},"search")),onChange:function(e){g(Object(a.a)(Object(a.a)({},m),{},{tagsByText:e.target.value}))}}})):"date"===i?c.a.createElement(c.a.Fragment,null,c.a.createElement(y.a,{type:"datetime",onChangeStartDate:function(t){var r,n={startDate:b()(t).unix("x")};(!(null===(r=f.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||f.a.getState().searchs[e.nodeId].endDate<b()(t).unix("x"))&&(n=Object(a.a)(Object(a.a)({},n),{},{endDate:b()("".concat(b()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),g(Object(a.a)(Object(a.a)({},m),n))},onChangeEndDate:function(e){g(Object(a.a)(Object(a.a)({},m),{},{endDate:b()(e).unix("x")}))},range:!0,horizontal:!0,startDate:(null===m||void 0===m?void 0:m.startDate)?new Date(1e3*m.startDate):null,endDate:(null===m||void 0===m?void 0:m.endDate)?new Date(1e3*m.endDate):null,onClear:function(){g(Object(a.a)(Object(a.a)({},m),{},{startDate:null,endDate:null}))}})):"tags"===i?c.a.createElement(v.a,{dbNode:"tag",options:f.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:(null===m||void 0===m?void 0:m.tags)||[],placeholder:Object(A.u)("$__tags"),onChange:function(e){g(Object(a.a)(Object(a.a)({},m),{},{tags:e}))}}):"status"===i?c.a.createElement(k.a,{style:{width:"100%",padding:0},expanded:"status"===M,onChange:function(){z("status"===M?null:"status")}},c.a.createElement(L.a,{style:{minWidth:"100%"},expandIcon:c.a.createElement(_.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},c.a.createElement("div",{style:{color:Object(A.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left"}},Object(A.u)("$__status")),c.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===m||void 0===m?void 0:m.status)&&Object.keys(m.status).filter((function(e,t){return(m.status[e]||m.status.all)&&"all"!==e})).map((function(e,t){return c.a.createElement(F.a,{title:Object(A.u)(u.status.filter((function(t){return t.value===e}))[0].label,1),key:t},c.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:u.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),c.a.createElement(S.a,{style:{minWidth:"100%"}},c.a.createElement(I.a,{style:{width:"100%"}},c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{checked:!(!m.status||!m.status.all),onChange:function(){R("status","all")},color:"default"}),label:Object(A.u)("$__allStatus")}),u.status.map((function(e,t){return c.a.createElement(c.a.Fragment,{key:t},c.a.createElement(C.a,{style:{minWidth:"100%"},control:c.a.createElement(x.a,{indeterminate:!(!m.status||!m.status.all),checked:!(!m.status||!m.status[e.value]),onChange:function(){R("status",e.value)},color:"default"}),label:Object(A.u)(e.label)}))}))))):"priority"===i?G("priority"):"complexity"===i?G("complexity"):"risk"===i?G("risk"):"impact"===i?G("impact"):"users"===i?c.a.createElement("div",{style:{marginTop:5}},c.a.createElement(O.a,Object.assign({includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:f.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!0,onSelect:function(e){g(Object(a.a)(Object(a.a)({},m),{},{users:e}))},selected:(null===m||void 0===m?void 0:m.users)||[],transparent:!0},(null===e||void 0===e||null===(t=e.fieldsProps)||void 0===t?void 0:t.users)||{}))):"responsible"===i?c.a.createElement("div",{style:{marginTop:5}},c.a.createElement(O.a,Object.assign({text:Object(A.u)("$__FilterByResponsible"),includeMe:!0,avatarSize:"23px",permission:!0,data:f.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!1,onSelect:function(e){g(Object(a.a)(Object(a.a)({},m),{},{responsible:e}))},selected:(null===m||void 0===m?void 0:m.responsible)||[],transparent:!0},(null===e||void 0===e||null===(r=e.fieldsProps)||void 0===r?void 0:r.responsible)||{}))):"userGroups"===i?c.a.createElement(E.a,{data:{values:m.userGroups||[]},options:f.a.getState().db.userGroup?f.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){g(Object(a.a)(Object(a.a)({},m),{},{userGroups:e}))},colorPickerCallBack:function(e){},noAdd:!0}):c.a.createElement(c.a.Fragment,null)}));var z=JSON.stringify({status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}});t.a=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(d.b)(p,e)}))((function(e){var t,r,i=f.a.getState().searchs,l=c.a.useState(!1),u=Object(o.a)(l,2),d=u[0],p=u[1],g=c.a.useState(Object(a.a)({},JSON.parse(z))),b=Object(o.a)(g,2),y=b[0],v=b[1],x=c.a.useState(e.nodeId?e.nodeId:s()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),_=Object(o.a)(x,2),O=_[0],w=_[1],j=c.a.useRef(!0);c.a.useEffect((function(){return j.current=!0,function(){j.current=!1}}),[]),c.a.useEffect((function(){var e=Object(a.a)(Object(a.a)({},JSON.parse(z)),i[O]||{});JSON.stringify(e)!==JSON.stringify(y)&&j.current&&v(e)}),[O]),c.a.useEffect((function(){e.onChange&&e.onChange(Object(a.a)({},y||{}))}),[y]),c.a.useEffect((function(){j.current&&w(e.nodeId?e.nodeId:s()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]);var E=window.location.hash.split("/");return E[0]=E[0].replace("#",""),36!==E[0].length&&(E[0]=null),c.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},c.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},null===(t=e.fields)||void 0===t?void 0:t.map((function(t,r){return c.a.createElement("div",{key:"".concat(t,"_").concat(r),style:{position:"relative"}},c.a.createElement(M,{nodeId:O,field:t,onChange:e.onChange?function(e){j.current&&v(e)}:null}))})),JSON.stringify(y)!==z?c.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){p(!d)}},c.a.createElement(m.a,{reverse:!0,icon:"clear_all",text:Object(A.u)("$__removeFilter","*"),onClick:function(){!function(){var t=Object(a.a)({},f.a.getState().searchs);t[O]&&delete t[O],e.reduxFunction("IMMEDIATE","SET_SEARCH",t),j.current&&v(Object(a.a)({},JSON.parse(z))),e.onSearch&&e.onSearch()}()}})):c.a.createElement(c.a.Fragment,null),(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.searchButton)?c.a.createElement(h.a,{color:Object(A.d)("menu"),icon:"search",onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(a.a)(Object(a.a)({},f.a.getState().searchs),{},Object(n.a)({},O,Object(a.a)(Object(a.a)({},JSON.parse(z)),y)))),e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(A.u)("$__search")),text:"".concat(Object(A.u)("$__search"))}):c.a.createElement(c.a.Fragment,null)))}))},229:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),a=(r(1137),r(39),r(57));function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};u(x,c,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,c)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),u(w,s,"Generator"),u(w,c,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var i=function(){var e=Object(n.a)(o().mark((function e(t,r){var i,c,l,s,u,d=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>2&&void 0!==d[2]&&d[2],c=d.length>3?d[3]:void 0,(l=r).originalName=l.name,(s=new FormData).append("file",l,l.name),s.append("id",t),e.next=9,new Promise(function(){var e=Object(n.a)(o().mark((function e(t,r){var n,i,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!c||!c.onUploadProgress){e.next=10;break}return n=c.onUploadProgress,e.next=5,a.a.post("Upload/",s,{onUploadProgress:n,headers:{"Content-Type":"multipart/form-data"}});case 5:i=e.sent,console.log(i),i&&(u=i.data),e.next=15;break;case 10:return e.next=12,a.a.post("Upload/",s,{headers:{"Content-Type":"application/json; multipart/form-data; charset=UTF-8"}});case 12:l=e.sent,console.log(l),l&&(u=l.data);case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(0),c&&c.onUploadError&&c.onUploadError(e.t0),r(!1);case 21:return e.prev=21,t(!0),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[0,17,21,24]])})));return function(t,r){return e.apply(this,arguments)}}());case 9:if(!e.sent){e.next=18;break}if(i){e.next=15;break}return e.abrupt("return","https://machen.azureedge.net/".concat(u.file));case 15:return e.abrupt("return",u);case 16:e.next=19;break;case 18:return e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()},24:function(e,t,r){"use strict";r.d(t,"k",(function(){return T})),r.d(t,"N",(function(){return oe})),r.d(t,"q",(function(){return pe})),r.d(t,"a",(function(){return U})),r.d(t,"b",(function(){return q})),r.d(t,"c",(function(){return W})),r.d(t,"d",(function(){return G})),r.d(t,"e",(function(){return ce})),r.d(t,"f",(function(){return H})),r.d(t,"g",(function(){return z})),r.d(t,"h",(function(){return K})),r.d(t,"i",(function(){return re})),r.d(t,"j",(function(){return le})),r.d(t,"l",(function(){return I})),r.d(t,"m",(function(){return F})),r.d(t,"n",(function(){return D})),r.d(t,"o",(function(){return L})),r.d(t,"p",(function(){return P})),r.d(t,"r",(function(){return X})),r.d(t,"s",(function(){return ne})),r.d(t,"t",(function(){return Q})),r.d(t,"u",(function(){return ee})),r.d(t,"v",(function(){return O})),r.d(t,"w",(function(){return x})),r.d(t,"x",(function(){return _})),r.d(t,"y",(function(){return Z})),r.d(t,"z",(function(){return B})),r.d(t,"A",(function(){return se})),r.d(t,"B",(function(){return ue})),r.d(t,"C",(function(){return $})),r.d(t,"D",(function(){return M})),r.d(t,"E",(function(){return S})),r.d(t,"F",(function(){return v})),r.d(t,"G",(function(){return w})),r.d(t,"H",(function(){return N})),r.d(t,"I",(function(){return de})),r.d(t,"J",(function(){return R})),r.d(t,"K",(function(){return J})),r.d(t,"L",(function(){return V})),r.d(t,"M",(function(){return E})),r.d(t,"O",(function(){return ae})),r.d(t,"P",(function(){return A})),r.d(t,"Q",(function(){return te}));var n=r(22),a=r(7),o=r(2),i=r(8),c=r(3),l=r(73),s=r.n(l),u=r(39),d=r(57),p=r(229),f=r(9),h=r.n(f),m=r(63),g=r(634),b=r(1);r(479);function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var v=function(){var e=Object(i.a)(y().mark((function e(t){var r,n,a,i,l,s,u,d,p,f=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=f.length>1&&void 0!==f[1]&&f[1],n=f.length>2?f[2]:void 0,a=f.length>3&&void 0!==f[3]?f[3]:null,(i=window.location.hash.split("/"))[0]=i[0].replace("#",""),36!==i[0].length&&(i[0]=null),l=Object(o.a)({},n),s=l._id?Object(o.a)({},c.a.getState().db.cards[l._id]):{},u=null,l.order&&String(l.order.low)&&(l.order=l.order.low),"chatGroup"===l.type&&l._planId&&(delete l._planId,delete l._parent,delete l.idRel),Object.keys(l).map((function(e){return"file"===e&&(u=l[e],delete l.file),(l[e]&&l[e].low||l[e]&&l[e].low&&"0"===String(l[e].low))&&(l[e]=l[e].low),l})),l._id&&(!l._id||36===l._id.length)){e.next=20;break}return a?(l.idRel=a,l._parent=a,"plan"===c.a.getState().db.cards[a].type&&(l._planId=a),"plan"!==c.a.getState().db.cards[a].type&&c.a.getState().db.cards[a]._planId&&(l._planId=c.a.getState().db.cards[a]._planId)):(window.location.pathname.indexOf("sp")>-1&&!l._parent&&(l._parent=l._parent?l._parent:i[0]?i[0]:null),l._parent&&(l.idRel=a||l._parent),window.location.pathname.indexOf("sp")>-1&&i[0]&&36===i[0].length&&(l._planId=i[0])),e.next=16,j(t,Object(o.a)(Object(o.a)({},l),{},{oldData:s}),u,r);case 16:return d=e.sent,e.abrupt("return",d);case 20:return e.next=22,E(t,Object(o.a)(Object(o.a)({},l),{},{oldData:s}),u,r);case 22:if(p=e.sent,!(l&&l.type&&l.type.indexOf("guideline")>-1&&"guideline"!==l.type&&Object.keys(c.a.getState().db.cards).filter((function(e){return(c.a.getState().db.cards[e]._planId===i[0]||c.a.getState().db.cards[e]._parent===i[0])&&!0===c.a.getState().db.cards[e]._selected})).length>0)){e.next=26;break}return e.next=26,w(l._id);case 26:return e.abrupt("return",p);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(i.a)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.post("timer/start",{idRel:r,startTime:String(h()().unix("X")),type:"start"});case 2:if(!(n=e.sent)){e.next=7;break}return console.log(n),F(t,Object(o.a)({},n.data)),e.abrupt("return",Object(o.a)(Object(o.a)({},n.data),{},{created_at:String(h()().unix("X"))}));case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),_=function(){var e=Object(i.a)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.put("timer/stop",{idRel:r});case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var i,l;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.delete("timer/run/".concat(n),{idRel:r});case 2:if(i=e.sent,(l=c.a.getState().db.cards[r]._kpiTimer)[n]&&delete l[n],!i){e.next=8;break}return t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r]),{},{_kpiTimer:l})))})),e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(i.a)(y().mark((function e(t){var r,n,i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=window.location.hash.split("/"))[0]=r[0].replace("#",""),n=Object.keys(c.a.getState().db.cards).filter((function(e){return!(c.a.getState().db.cards[e]._planId!==r[0]&&c.a.getState().db.cards[e]._parent!==r[0]||!0!==c.a.getState().db.cards[e]._selected||!c.a.getState().db.cards[e].type||!(c.a.getState().db.cards[e].type.indexOf("guideline")>-1))}))[0],i=Object.keys(c.a.getState().db.cards).filter((function(e){return(c.a.getState().db.cards[e]._planId===r[0]||c.a.getState().db.cards[e]._parent===r[0])&&!0===c.a.getState().db.cards[e]._selected&&c.a.getState().db.cards[e].type&&-1===c.a.getState().db.cards[e].type.indexOf("guideline")})),u.a.put("matrix/aspects",{_id:n,_parent:r[0],aspects:i}),t&&t.reduxFunction&&t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n]),{},{_aspects:i})))})),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var l,s,u,d,p,f,m,g,b=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=b.length>3&&void 0!==b[3]&&b[3],s=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),u=c.a.getState(),d=u.session,p=u.db,(f=window.location.hash.split("/"))[0]=f[0].replace("#",""),m=new Promise(function(){var e=Object(i.a)(y().mark((function e(u,m){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{"add","myTask"!==r.type&&"chatGroup"!==r.type||(r.myTask=!0),r.status||(r.status="notStarted"),s.emit("data",{module:"cards",method:"post",action:"add"},r,function(){var e=Object(i.a)(y().mark((function e(i){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._users=Object(a.a)({},d._id,{name:p.users[d._id].name?p.users[d._id].name:null,displayName:p.users[d._id].displayName?p.users[d._id].displayName:null,image:p.users[d._id].image?p.users[d._id].image:null,access:5,_id:d._id}),!(r.type&&r.type.indexOf("guideline")>-1)){e.next=4;break}return e.next=4,w(i.id);case 4:r.myTask&&delete r.myTask,r._loaded=!0,r._loadTimeline=!0,i.id&&(l||t.reduxFunction("ASYNC","SET_MODULE",Object(o.a)(Object(o.a)({},c.a.getState().sideModule),{},{id:i.id,data:Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().sideModule.data),r),{},{_id:i.id})})),r._id=i.id,parseInt(r.order)>=0&&(r.order={low:r.order}),r=Object(o.a)(Object(o.a)({},r),i.data),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},r),{},{created_at:h()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:h()().tz("America/Sao_Paulo").unix("x")}})))})),k(t,r._id,Object(a.a)({},i.log._id,Object(o.a)(Object(o.a)({},i.log),{},{_parent:r._id}))),n?E(t,Object(o.a)({},r),n,l):"tab"===f[0]&&"myDay"===f[1]&&(R(t,{_id:i.id,userId:d._id,option:!0},{new:!0,user:d._id,cardId:r._id,cardData:Object(o.a)({},r)}),k(t,r._id,Object(a.a)({},i.log._id,Object(o.a)(Object(o.a)({},i.log),{},{_parent:r._id}))))),u(Object(o.a)(Object(o.a)({},r),{},{created_at:h()().tz("America/Sao_Paulo").unix("x"),updated_at:{low:h()().tz("America/Sao_Paulo").unix("x")}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}catch(m){console.log(m)}case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=8,m;case 8:return g=e.sent,e.abrupt("return",g);case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),E=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var l,s,u;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=Object(o.a)({},r),u=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),!n){e.next=7;break}return e.next=5,Object(p.a)(l._id,n);case 5:s=e.sent,l.image=s;case 7:return(!n||n&&s)&&(t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},l._id,Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[l._id]),l),{},{_users:Object(o.a)({},c.a.getState().db.cards[l._id]._users)})))})),u.emit("data",{module:"cards",method:"put",action:"update220527"},l,function(){var e=Object(i.a)(y().mark((function e(r){var n,i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l.order&&parseInt(l.order)>=0&&(l.order={low:l.order}),r&&r.log&&r.log._id&&k(t,l._id,Object(a.a)({},r.log._id,Object(o.a)(Object(o.a)({},r.log),{},{_parent:[l._id]}))),n=c.a.getState(),i=n.db,!(l.type&&l._id&&l.type.indexOf("guideline")>-1&&"guideline"!==l.type&&Object.keys(i.cards).filter((function(e){return i.cards[e]._parent===l._id&&i.dataType.filter((function(t){return t.name===i.cards[e].type&&"swot"===t.module})).length>0})))){e.next=6;break}return e.next=6,w(l._id);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),k=function(e,t,r){var n=c.a.getState().timeline[t]?c.a.getState().timeline[t]:{};n=Object(o.a)(Object(o.a)({},n),r),e.reduxFunction("ASYNC","SET_TIMELINE",Object(o.a)(Object(o.a)({},c.a.getState().timeline),{},Object(a.a)({},t,n)))},S=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"restore"},{_id:r._id},function(){var e=Object(i.a)(y().mark((function e(n){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(t,{cardId:r._id},!1);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),L=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var a,o,l,s=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=s.length>3&&void 0!==s[3]&&s[3],o=c.a.getState(),l=o.db,n?C(t,{cardId:r._id,childrens:r.childrensDelete},!0):(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"delete"},{_id:r._id,deleted:!0,childrensDelete:a,client:l.cards[r._id]&&l.cards[r._id].client?l.cards[r._id].client:l.cards[r._id]&&l.cards[r._id]._planId&&l.cards[l.cards[r._id]._planId]&&l.cards[l.cards[r._id]._planId].client?l.cards[l.cards[r._id]._planId].client:null},function(){var e=Object(i.a)(y().mark((function e(n){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(t,{cardId:r._id,childrens:a},!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),C=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object(o.a)({},c.a.getState().db.cards);if(n[t.cardId]=Object(o.a)(Object(o.a)({},n[t.cardId]),{},{deleted:r},n[t.cardId]&&n[t.cardId]._selected?{_selected:!1}:{}),t.childrens){var a=ne(t.cardId);Object.keys(a).forEach((function(e){n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{deleted:r})}))}e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),n)}))},I=function(e,t){c.a.getState().db.cards[t._id]&&!c.a.getState().db.cards[t._id]._selected&&t&&t._selected&&delete t._selected,e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._id]),{},{_aspects:t.aspects})))})),e.reduxFunction("ASYNC","preLoader",Object(o.a)(Object(o.a)({},c.a.getState().preLoader),{},{autoSave:!0}))},T=function(){var e=Object(i.a)(y().mark((function e(t,r){var n,l,s;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,new Promise(function(){var e=Object(i.a)(y().mark((function e(a,o){var i,l,s,u;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r&&r.cardData&&r.cardData._parent)||c.a.getState().db.cards[r.cardData._parent]){e.next=7;break}return e.next=3,Object(m.b)(t,{idRel:r.cardData._parent,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(l=e.sent)&&l[r.cardData._parent]&&(n={_requireApproval:!!l[r.cardData._parent].requireApproval||null}),e.next=8;break;case 7:(null===r||void 0===r||null===(i=r.cardData)||void 0===i?void 0:i._parent)&&c.a.getState().db.cards[r.cardData._parent]&&(s=c.a.getState().db.cards[r.cardData._parent],n={_requireApproval:!!s.requireApproval||null});case 8:if(c.a.getState().db.cards[r.cardId]){e.next=15;break}return e.next=11,Object(m.b)(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 11:(u=e.sent)&&u.cards&&u.cards[r.cardId]&&a(u.cards[r.cardId]),e.next=16;break;case 15:a(c.a.getState().db.cards[r.cardId]);case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:(l=e.sent)&&(s=c.a.getState().db.tag,c.a.getState().db.cards&&l&&(r.cardData&&r.cardData._tags&&r.cardData._tags.length>0&&r.cardData._tags.forEach((function(e){l&&l._tags&&0===l._tags.filter((function(t){return t.value===e.value})).length&&s.filter((function(t){return t.value===e.value})).forEach((function(e){e.count=e.count+1}))})),l._tags&&l._tags.forEach((function(e){r.cardData._tags&&0===r.cardData._tags.filter((function(t){return t.value===e.value})).length&&s.filter((function(t){return t.value===e.value})).forEach((function(e){e.count=e.count-1}))}))),(!r.new||r.new&&r.user!==g.a._id)&&t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)(Object(o.a)({},l||{}),r.cardData),{},{_notifications:c.a.getState().db.cards&&l&&l._notifications?l._notifications:{comment:0,log:0,timer:0,kpi:0},createdBy:r.user?r.user:null},n))),tag:s})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(e,t){console.log(t);var r=c.a.getState().db.cards[t.cardId]||null;r&&e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)(Object(o.a)({},r),{},{_kpiTimer:Object(o.a)(Object(o.a)({},t._kpiTimer),t.startTime?{created_at:t.startTime}:{})})))}))},D=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]?c.a.getState().db.cards[r._id]:{}),r)))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),N=function(){var e=Object(i.a)(y().mark((function e(t,r){var n,i,l,s,u,d;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),i=n.db,l=i.cards,s=l[r],(u=window.location.hash.split("/"))[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null),d={},Object.keys(i.cards).filter((function(e){return i.cards[e]&&!i.cards[e].deleted&&(i.cards[e]._planId===u[0]||i.cards[e]._parent===u[0])})).forEach((function(e){d=Object(o.a)(Object(o.a)({},d),{},Object(a.a)({},e,i.cards[e]))})),Object.keys(d).forEach((function(e){d[e]&&d[e].type&&-1===d[e].type.indexOf("guideline")&&-1===d[e].type.indexOf("objective")&&-1===d[e].type.indexOf("goal")&&(d[e]=Object(o.a)(Object(o.a)({},d[e]),{},{_selected:!1}))})),s&&s._aspects&&s._aspects.length>0&&s._aspects.forEach((function(e){d[e]&&(d[e]=Object(o.a)(Object(o.a)({},d[e]),{},{_selected:!0}))})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},l),d)}));case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),A=function(e,t){if(c.a.getState().db.cards[t._cardColumn]){var r=Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board].columns[t._columnId]),t._columnData),i=Object(n.a)(c.a.getState().db.cards[t._cardColumn].boards[t._board].columnOrder);t._columnsOrder&&(i=t._columnsOrder),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._cardColumn,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board]),{},{columnOrder:i,columns:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._cardColumn].boards[t._board].columns),{},Object(a.a)({},t._columnId,r))})))})))}))}N(e)},P=function(e,t){if(c.a.getState().db.cards[t._parent]){var r=Object(n.a)(c.a.getState().db.cards[t._parent].boards[t._board].columnOrder),i=Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board].columns);delete i[t._deleted],r.splice(r.indexOf(t._deleted),1),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._parent,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r,columns:i})))})))}))}},$=function(e,t){var r=c.a.getState().db.cards,n=t.cards;n&&n.length>0&&(n.forEach((function(e,t){r=Object(o.a)(Object(o.a)({},r),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},r[e]),{},{order:"".concat(t+1)})))})),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),r)})))},M=function(e,t){if(c.a.getState().db.cards[t._parent]){var r=t._order;e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t._parent,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent]),{},{boards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards),{},Object(a.a)({},t._board,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[t._parent].boards[t._board]),{},{columnOrder:r})))})))}))}},z=function(e,t){var r=c.a.getState().db,n=Object(a.a)({},t.cardId,Object(o.a)(Object(o.a)({},r.cards[t.cardId]),{},{boards:Object(o.a)(Object(o.a)({},r.cards[t.cardId].boards),{},Object(a.a)({},t.boardId,Object(o.a)(Object(o.a)({},r.cards[t.cardId].boards[t.boardId]),{},{columns:t.columns})))}));e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},r),{},{cards:Object(o.a)(Object(o.a)({},r.cards),n)}))},Y=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var i,l;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h()().tz("America/Sao_Paulo").unix("x"),l=Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),n&&n.data&&n.data._users&&n.data._users[r.userId]?n.data._users[r.userId]:{}),{},{myDay:!r.checklist&&r.option?i:null}),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)(Object(o.a)({},n&&n.data?n.data:{}),c.a.getState().db.cards[r._id]),{},{_users:Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),n&&n.data&&n.data._users?n.data._users:{}),{},Object(a.a)({},r.userId,l))})))}));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),B=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]),{},{_users:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?r.createDate:null})))})))}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),R=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h()().unix("x"),Y(t,r,n);try{u.a.post("/cards/setMyDay",Object(o.a)(Object(o.a)({},r),{},{createDate:i})),c.a.getState().sideModule.id&&c.a.getState().sideModule.id===r._id&&t.reduxFunction("ASYNC","SET_MODULE",Object(o.a)(Object(o.a)({},c.a.getState().sideModule),{},{data:Object(o.a)(Object(o.a)({},c.a.getState().sideModule.data?c.a.getState().sideModule.data:{}),{},{_users:Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users?c.a.getState().db.cards[r._id]._users:{}),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r._id]&&c.a.getState().db.cards[r._id]._users&&c.a.getState().db.cards[r._id]._users[r.userId]?c.a.getState().db.cards[r._id]._users[r.userId]:{}),{},{myDay:r.option?i:null})))})}))}catch(l){console.log(l)}case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),G=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.a.put("/cards/moveTo",Object(o.a)({},r));case 3:if(!e.sent){e.next=7;break}return H(t,r),e.abrupt("return",!0);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),Object(b.c)({message:"".concat(Object(b.u)("$__tryAgainOrContactSupport",1),". ERROR: cMoveTo->API~887"),variant:"error",persist:!1,horizontal:"right"});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,r){return e.apply(this,arguments)}}(),H=function(){var e=Object(i.a)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState().db.cards,e.next=3,new Promise(function(){var e=Object(i.a)(y().mark((function e(t,a){var i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(r.cardId);case 2:(i=e.sent)&&i.length>0?i.forEach((function(e,a){n[e]&&(n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{_planId:r.planId})),a+1===i.length&&t(!0)})):t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:e.sent&&(n[r.cardId]&&(n[r.cardId]=Object(o.a)(Object(o.a)({},n[r.cardId]),{},{_parent:r.newRel,_planId:r.planId})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),n)})));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),W=function(){var e=Object(i.a)(y().mark((function e(t,r){var n,i,l,s;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.a.getState().db.cards[r.cardId]){e.next=7;break}return e.next=3,Object(m.b)(t,{idRel:r.cardId,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:(n=e.sent)&&(i=c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users?c.a.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(i).forEach((function(e){e!==r.userId&&i[e].isResponsible&&delete i[e].isResponsible})),l=c.a.getState().db.cards[r.cardId]?c.a.getState().db.cards[r.cardId]:{},n&&n.cards&&n.cards[r.cardId]&&(l=n.cards[r.cardId]),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)({},l),{},{_users:Object(o.a)(Object(o.a)({},i),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},r.userData?r.userData:{}),c.a.getState().db.users&&c.a.getState().db.users[r.userId]?c.a.getState().db.users[r.userId]:{}),l&&l._users&&l._users[r.userId]?l._users[r.userId]:{}),r.isResponsible?{isResponsible:!0}:{}),(String(r.approvalResponsible),{approvalResponsible:r.approvalResponsible})),r.access?{access:r.access}:{})))})))}))),e.next=10;break;case 7:s=c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users?c.a.getState().db.cards[r.cardId]._users:{},r.isResponsible&&Object.keys(s).forEach((function(e){e!==r.userId&&s[e].isResponsible&&delete s[e].isResponsible})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},r.cardId,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r.cardId]?c.a.getState().db.cards[r.cardId]:{}),{},{_users:Object(o.a)(Object(o.a)({},s),{},Object(a.a)({},r.userId,Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},c.a.getState().db.cards[r.cardId]&&c.a.getState().db.cards[r.cardId]._users&&c.a.getState().db.cards[r.cardId]._users[r.userId]?c.a.getState().db.cards[r.cardId]._users[r.userId]:{}),s[r.userId]?s[r.userId]:{}),r.userData?r.userData:{}),r.isResponsible?{isResponsible:!0}:{}),(String(r.approvalResponsible),{approvalResponsible:r.approvalResponsible})),r.access?{access:r.access}:{})))})))}));case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),U=function(e,t){if(!c.a.getState().db.cards[t.cardId])return!0;var r=Object(o.a)({},c.a.getState().db.cards[t.cardId]);r._users[t.userId]&&delete r._users[t.userId],e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)({},r)))}))},q=function(e,t){if(!c.a.getState().db.cards[t.cardId])return!0;var r=Object(o.a)({},c.a.getState().db.cards[t.cardId]);t.userIds&&t.userIds.length>0&&t.userIds.forEach((function(e){r._users[e]&&delete r._users[e]})),e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)({},r)))}))},V=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{u.a.put("cards/unlinkChildrens",{cardId:r.cardId,planId:r._planId})}catch(t){console.log(t)}return e.abrupt("return",!0);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),J=function(){var e=Object(i.a)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState().db.cards,Object.keys(n).filter((function(e){return n[e]._parent===r.cardId&&"step"!==n[e].type&&(!n[e].checklist||n[e].checklist&&n[e].showCard)})).forEach((function(e){n[e]._parent=r.planId})),r.cards&&r.cards.length>0&&r.cards.forEach((function(e){n[e]&&(n[e]=Object(o.a)(Object(o.a)({},n[e]),{},{_parent:r.planId}))})),n&&n[r.cardId]&&(n[r.cardId]=Object(o.a)(Object(o.a)({},n[r.cardId]),{},{_parent:r.planId})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:n}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),X=function e(t,r){var n=t&&t.color?t.color:null,a=!(!t.color||!r);if(t._parent&&c.a.getState().db.cards[t._parent]){var o=e(c.a.getState().db.cards[t._parent],!0);if(o.color)return o}return{parent:a,color:n,parentId:t.color?t._id:null}},K=function e(t){var r=c.a.getState(),n=r.db,i=r.session,l=c.a.getState().db.cards[t];if(c.a.getState().db.cards[t]){var s={};return(!c.a.getState().db.cards[t].private||c.a.getState().db.cards[t].private&&c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[i._id])&&(s=Object(a.a)({},t,{_id:l._id,type:l.type,name:l.name,icon:l.type&&n&&n.dataType?n.dataType.filter((function(e){return e.name===l.type}))[0].icon:"topic"})),l._parent&&(s=Object(o.a)(Object(o.a)({},e(l._parent)),s)),s}return{}},Z=function(){var e=Object(i.a)(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket).emit("data",{module:"cards",method:"put",action:"link"},r,function(){var e=Object(i.a)(y().mark((function e(t){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Q=function(e){var t=c.a.getState(),r=t.db,n=t.session,a=Object(o.a)({},r.cards[e]);if(r.cards[e]){var i=0;return a&&a._users&&Object.keys(a._users).length>0&&a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))]&&a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))].access&&(i=parseInt(a._users[Object.keys(a._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),a&&a._parent&&r.cards[a._parent]&&r.cards[a._parent]._users&&Object.keys(r.cards[a._parent]._users).length>0&&r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access&&parseInt(r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)>parseInt(i)&&(i=parseInt(r.cards[a._parent]._users[Object.keys(r.cards[a._parent]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),r.cards[e]._planId&&r.cards[r.cards[e]._planId]&&r.cards[r.cards[e]._planId]._users&&Object.keys(r.cards[r.cards[e]._planId]._users).length>0&&r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))]&&parseInt(r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)>parseInt(i)&&(i=parseInt(r.cards[r.cards[e]._planId]._users[Object.keys(r.cards[r.cards[e]._planId]._users).find((function(e){return e.indexOf(n._id)>-1}))].access)),i}return 0},ee=function e(t){var r,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=c.a.getState(),u=s.db,d=s.session,p=Object(o.a)({},t?u.cards[t]:{}),f={};if(l.allPlataform)return Object.keys(u.users).filter((function(e){return!u.users[e].deleted&&"user"===u.users[e].type})).forEach((function(e){var t="user";(!u.users[e]||u.users[e]&&u.users[e]._parent&&u.users[u.users[e]._parent]&&u.users[e]._parent!==d.account)&&(t="external"),(!u.users[e]||u.users[e]&&u.users[e]._parent&&!u.users[u.users[e]._parent])&&(t="consultant"),f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]||{}),{},{_id:e,type:t})))})),f;((null===l||void 0===l?void 0:l.noInternal)||Object.keys(u.users).filter((function(e){return"user"===u.users[e].type&&u.users[e]._parent===d._account&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"user"})))})),(null===p||void 0===p?void 0:p.client)&&u.users[p.client]&&Object.keys(u.users).filter((function(e){return u.users[e]._parent===p.client&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"external"},u.users[e]._parent?{_parent:u.users[e]._parent}:{})))})),(null===p||void 0===p?void 0:p._planId)&&(null===(r=u.cards[p._planId])||void 0===r?void 0:r.client)&&u.users[u.cards[p._planId].client]&&Object.keys(u.users).filter((function(e){var t;return u.users[e]._parent===(null===(t=u.cards[p._planId])||void 0===t?void 0:t.client)&&!u.users[e].deleted})).forEach((function(e){f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},u.users[e]),{},{_id:e,type:"external"},u.users[e]._parent?{_parent:u.users[e]._parent}:{})))})),(null===p||void 0===p?void 0:p._users)&&Object.keys(p._users).forEach((function(e){if(e!==d._id){var t="user";(!u.users[e]||u.users[e]&&u.users[e]._parent&&u.users[u.users[e]._parent]&&u.users[e]._parent!==d.account)&&(t="external"),(!u.users[e]||u.users[e]&&u.users[e]._parent&&!u.users[u.users[e]._parent])&&(t="consultant"),f=Object(o.a)(Object(o.a)({},f),{},Object(a.a)({},e,Object(o.a)(Object(o.a)({},p._users[e]),{},{_id:e,type:t},p._users[e]._parent?{_parent:p._users[e]._parent}:{})))}})),l&&!l.onlyCard)&&(!l.noPlan&&p._planId&&(null===(n=u.cards[p._planId])||void 0===n?void 0:n._users[d._id])&&(f=Object(o.a)(Object(o.a)({},f),e(p._planId,{noPlan:!0,noInternal:!0}))),p._parent&&(null===(i=u.cards[p._parent])||void 0===i?void 0:i._users[d._id])&&(f=Object(o.a)(Object(o.a)({},f),e(p._parent,{noPlan:!0,noInternal:!0}))));if(null===l||void 0===l?void 0:l.isArray){var h=[];return Object.keys(f).forEach((function(e){0===h.filter((function(t){return t._id===e})).length&&h.push(f[e])})),h}return f},te=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t===r)return!1;if(!t)return!1;var n=!1,a=c.a.getState().db.cards[t]?c.a.getState().db.cards[t]:null;return!!a&&(a&&a.isTemplate?n=!0:a&&a._planId&&a._planId!==a._id&&c.a.getState().db.cards[a._planId]?n=e(a._planId,r||t):a&&a._parent&&c.a.getState().db.cards[a._parent]&&(n=e(a._parent,r||t)),n)},re=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var a,o,c,l=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=l.length>3&&void 0!==l[3]?l[3]:{},o=new Promise(function(){var e=Object(i.a)(y().mark((function e(t,o){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.post("/cards/copy",{from:r,to:n,options:a});case 2:e.sent&&t(!0);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.next=4,o;case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),ne=function e(t){var r=c.a.getState().db.cards,n=Object(a.a)({},t,!0);return Object.keys(r).filter((function(e){return r[e]._parent===t})).map(function(){var t=Object(i.a)(y().mark((function t(r,a){var i;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(i=e(r))&&(n=Object(o.a)(Object(o.a)({},n),i));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),n},ae=function(){var e=Object(i.a)(y().mark((function e(t,r){var n,l,s,u;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?c.a.getState().db.cards[t.data._id]:{},l=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),u=s=r,"completed"===s.status?u=Object(o.a)(Object(o.a)({},u),{},{completed_at:{low:h()().unix("X")}}):s=Object(o.a)(Object(o.a)({},u),{},{completed_at:null});try{l.emit("data",{module:"cards",method:"put",action:"status"},Object(o.a)({_id:n._id},s),Object(i.a)(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n._id]),u)))}));case 1:case"end":return e.stop()}}),e)}))))}catch(d){console.log(d)}case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),oe=function(){var e=Object(i.a)(y().mark((function e(t,r){var n,i,l,s;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.data&&t.data._id?c.a.getState().db.cards[t.data._id]:{},i=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),s=l=r,"completed"===l.status?s=Object(o.a)(Object(o.a)({},s),{},{completed_at:{low:h()().unix("X")}}):l.status&&(s=Object(o.a)(Object(o.a)({},s),{},{completed_at:{low:null}})),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},n._id,Object(o.a)(Object(o.a)({},c.a.getState().db.cards[n._id]),s)))}));try{i.emit("data",{module:"cards",method:"put",action:"update220527"},Object(o.a)({_id:n._id},l))}catch(u){console.log(u)}case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),ie=function(){var e=Object(i.a)(y().mark((function e(t){var r,n,a,o,l,s=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s.length>1&&void 0!==s[1]?s[1]:null,n=s.length>2?s[2]:void 0,a=c.a.getState().db.cards,o=[],!((l=Object.keys(a).filter((function(e){return a[e]&&a[e]._parent&&(a[e]._parent===t||a[e]._parent===n)&&(!r||"completed"===r&&"completed"!==a[e].status||"completed"!==r&&a[e]._parentCompleted&&a[e]._parentCompleted.cardId&&(a[e]._parentCompleted.cardId===t||a[e]._parentCompleted.cardId===n))}))).length>0)){e.next=13;break}return e.next=8,new Promise((function(e,n){l.forEach(function(){var n=Object(i.a)(y().mark((function n(a,i){var c;return y().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ie(a,r,t);case 2:c=n.sent,-1===o.indexOf(a)&&o.push(a),c&&c.length>0?c.forEach((function(t,r){-1===o.indexOf(t)&&o.push(t),r+1===c.length&&i+1===l.length&&e(!0)})):e(!0);case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())}));case 8:if(!e.sent){e.next=11;break}return e.abrupt("return",o);case 11:e.next=14;break;case 13:return e.abrupt("return",[]);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=Object(i.a)(y().mark((function e(t,r,n){var a,i;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(r,n);case 2:a=e.sent,i=c.a.getState().db.cards,a&&a.length>0&&a.forEach((function(e){i[e]=Object(o.a)(Object(o.a)({},i[e]),{},{status:n,completed_at:"completed"===n?{low:h()().unix("X")}:null},"completed"===n?{_parentCompleted:{cardId:r,completed_at:{low:h()().unix("X")}}}:{_parentCompleted:null})})),i[r]=Object(o.a)(Object(o.a)({},i[r]),{},{status:n,completed_at:"completed"===n?{low:h()().unix("X")}:null}),t.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:i}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),le=function(e){var t=c.a.getState(),r=t.session,n=c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._notifications?c.a.getState().db.cards[e]._notifications:{};Object.keys(n).map((function(e){return n[e]=parseInt(n[e])}));var a=0;return Object.keys(n).filter((function(e){return"total"!==e})).forEach((function(t){c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._users&&c.a.getState().db.cards[e]._users[r._id]&&c.a.getState().timeline[e]&&parseInt(n[t])<Object.keys(c.a.getState().timeline[e]).filter((function(r){return c.a.getState().timeline[e][r]&&!c.a.getState().timeline[e][r].deleted&&c.a.getState().timeline[e][r].type&&c.a.getState().timeline[e][r].type===t})).length?(n[t]=c.a.getState().timeline&&c.a.getState().timeline[e]&&Object.keys(c.a.getState().timeline[e]).length>0?Object.keys(c.a.getState().timeline[e]).filter((function(n){return!(!(r&&r._id&&parseInt(c.a.getState().timeline[e][n].created_at)>1650666142&&!c.a.getState().timeline[e][n].deleted&&c.a.getState().timeline[e][n].type===t&&c.a.getState().timeline[e][n].user&&c.a.getState().timeline[e][n].user._id!==r._id)||c.a.getState().timeline[e][n].readedBy&&(!c.a.getState().timeline[e][n].readedBy||c.a.getState().timeline[e][n].readedBy[r._id]))})).length:0,a+=parseInt(n[t])):(n[t]=parseInt(n[t]),a+=parseInt(n[t]))})),Object(o.a)(Object(o.a)({},n),{},{total:a})},se=function(e){var t=c.a.getState(),r=t.session,n=t.db;return!(e&&36===e.length&&n.cards[e]&&!n.cards[e].isTemplate&&n.cards[e]._users&&!n.cards[e]._users[r._id]&&n.cards[e]._account&&n.cards[e]._account!==s()(r.account).toString())},ue=function(e){var t=c.a.getState(),r=t.session,n=t.db;return!(e&&36===e.length&&n.cards[e]&&!n.cards[e].isTemplate&&n.cards[e]._account&&n.cards[e]._account!==s()(r.account).toString())},de=function(){var e=Object(i.a)(y().mark((function e(t,r){var n;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.a.post("/Card_Count",{id:r._id});case 2:(n=e.sent)&&parseInt(n.data)>0&&"completed"!==r.status?Object(b.c)({message:Object(b.u)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(b.u)("$__concludeAll"),text:Object(b.u)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){oe(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&ce(t,r._id,"completed"===r.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(b.u)("$__cancel"),text:Object(b.u)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(oe(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&ce(t,r._id,"completed"===r.status?"inProgress":"completed"));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),pe=function(e,t){var r=Array.from(e),n=c.a.getState().db;return t&&((t.startDate||t.endDate)&&(r=r.filter((function(e){return!!(e&&t.startDate&&e.startDate&&e.startDate>=t.startDate&&t.endDate&&e.endDate&&e.endDate<=t.endDate)})).map((function(e){return e}))),t.text&&(r=r.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(t.text.toLowerCase())>-1)})).map((function(e){return e}))),t.status&&(r=r.filter((function(e){return!(e.status&&!(e&&e.status&&t.status&&t.status[e.status]))})).map((function(e){return e}))),t.priority&&(r=r.filter((function(e){return!!(e&&e.priority&&t.priority[e.priority]||t.priority.null&&!e.priority)})).map((function(e){return e}))),t.users&&t.users.length>0&&(r=r.filter((function(e){return!!(e&&e._users&&Object.keys(e._users).filter((function(e){return t.users.indexOf(e)>-1})).length>0)})).map((function(e){return e}))),t.responsible&&t.responsible.length>0&&(r=r.filter((function(e){return!!(e&&e._users&&Object.keys(e._users).filter((function(r){return!!(e._users[r].isResponsible&&t.responsible.indexOf(r)>-1||t.responsible.indexOf(r)>-1&&!e._users[r].isResponsible&&1===Object.keys(e._users).length)})).length>0)})).map((function(e){return e}))),t.units&&t.units.length>0&&(r=t.units.indexOf("all")>-1?r.filter((function(e){return!(e._planId&&(!e._planId||!n.cards[e._planId]||n.cards[e._planId].client))})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){return!!(n.cards[e].client&&t.units.indexOf(n.cards[e].client)>-1)})).forEach((function(t){e._planId&&e._planId===n.cards[t]._id&&(r=!0)})),r})).map((function(e){return e}))),t.groups&&t.groups.length>0&&(r=t.groups.indexOf("ALL")>-1?r.filter((function(e){return!(e._planId&&(!e._planId||!n.cards[e._planId]||n.cards[e._planId].client))})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){return!!(n.cards[e].client&&t.groups.indexOf(n.cards[e].client)>-1)})).forEach((function(t){e._planId&&e._planId===n.cards[t]._id&&(r=!0)})),r})).map((function(e){return e}))),t.plans&&t.plans.length>0&&(r=r.filter((function(e){return t.plans.indexOf(e._planId)>-1})).map((function(e){return e}))),t.tags&&t.tags.length>0&&(r=r.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var r=!1;return t.tags.forEach((function(t){t.value===e.value&&(r=!0)})),r})).length>0})).map((function(e){return e}))),t&&t.tagsByText&&(r=r.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){return e.label&&e.label.indexOf(t.tagsByText)>-1})).length>0})).map((function(e){return e})))),r}},249:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(14),i=r(13),c=r(15),l=r(3),s=r(38),u=r(703),d=r(2),p=r(8),f=r(5),h=r(167),m=r(7),g=r(273),b=r(265),y=r(45),v=r(137),x={messagesContainer:{height:"100%",width:"100%"}},_=r(78),O=r(533);function w(){w=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var j=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))((function(e){var t=e.messages,r=e.type,o=e.nodeId,i=Object(O.a)(o),c=a.a.useRef(!0),s=a.a.createRef(),u=a.a.useRef({autoScrolling:!0}),f=a.a.useRef({}),h=a.a.useRef({}),j=a.a.useRef();a.a.useEffect((function(){return c.current=!0,u.current={autoScrolling:!0},h.current={},E(),function(){c.current=!1,u.current={autoScrolling:!0},h.current={}}}),[e.nodeId,e.type]),Object(n.useEffect)((function(){parseInt(i)>0&&c.current&&u.current.autoScrolling&&E()}),[e.nodeId,e.type,t]),Object(n.useEffect)((function(){c.current&&s.current&&C(!0)}),[t,s]),Object(n.useEffect)((function(){var e,r;t.length>0&&c.current&&((!(null===(e=u.current)||void 0===e?void 0:e.mounted)||(null===u||void 0===u||null===(r=u.current)||void 0===r?void 0:r.messagesLength)&&t.length>u.current.messagesLength)&&(u.current=Object(d.a)(Object(d.a)({},u.current),{},{loading:!1,messagesLength:t.length}),u.current.mounted||(u.current=Object(d.a)(Object(d.a)({},u.current),{},{mounted:!0}))))}),[t]);var E=function(){var t=Object(p.a)(w().mark((function t(){var n;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.a.getState().functions.socket,Object(_.a)(e,{readedBy:l.a.getState().session._id,id:e.nodeId,db:e.db,type:r}),n.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:l.a.getState().session._id,id:e.nodeId,db:e.db,type:r},(function(){setTimeout((function(){u.current=Object(d.a)(Object(d.a)({},u.current),{},{cleanMessages:!1})}),50)})),l.a.getState().chats.unreadeds[e.nodeId]&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},l.a.getState().chats),{},{unreadeds:Object(d.a)(Object(d.a)({},l.a.getState().chats.unreadeds),{},Object(m.a)({},e.nodeId,0))}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var r=Object(p.a)(w().mark((function r(){var n,a,o;return w().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=l.a.getState().db.users[e.nodeId]?"users":"cards",r.next=3,Object(_.f)(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:n,type:"comment",limit:!0,skip:t.length});case 3:(a=r.sent)&&(C(!0),o={reqMessages:!1},a.total<20&&(o=Object(d.a)(Object(d.a)({},o),{},{timelineEnd:!0})),u.current=Object(d.a)(Object(d.a)(Object(d.a)({},u.current),o),{},{reqMessages:!1}));case 5:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();function S(e){var r=t[e];return f.current[r._id]+11||83}function L(r){var n,o=r.index,i=r.style,u=t[o];return(!h.current.lastMessage||h&&h.current&&h.current.lastMessage&&h.current.lastMessage<u.created_at)&&(h.current=Object(d.a)(Object(d.a)({},h.current),{},{lastMessage:u.created_at})),a.a.createElement("div",{style:i},a.a.createElement(v.a,{storie:u,openLightBox:function(t){c.current&&e.openLightBox(t)},hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId,showUserName:!!(null===(n=l.a.getState().db)||void 0===n?void 0:n.cards[e.nodeId]),onResize:function(e){!function(e,t){var r;f.current=Object(d.a)(Object(d.a)({},f.current),{},Object(m.a)({},e,t)),(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.resetAfterIndex)&&s.current.resetAfterIndex(0)}(u._id,e)}}))}var C=a.a.useCallback((function(){var e,r=t.length-1,n="end",a=u.current.length||0,o=(null===u||void 0===u||null===(e=u.current)||void 0===e?void 0:e.visibleStartIndex)||20;s&&s.current?u.current.autoScrolling?(n="end",s.current.scrollToItem(t.length,n)):(n="start",r=t.length-a+o+1,s.current.scrollToItem(r<20?20:r,n)):c.current&&setTimeout((function(){console.log("XSD",s,s.current,c.current),C()}),100)}),[s]),I=0;return f.current&&Object.keys(f.current).length&&Object.keys(f.current).forEach((function(e){I=I+f.current[e]+11})),a.a.createElement("div",{style:x.messagesContainer,ref:j},a.a.createElement(b.a,{style:x.messagesContainer},(function(e){var r=e.height,n=e.width;return a.a.createElement(g.b,{className:"List",height:r,itemCount:t.length,itemSize:S,ref:s,width:n,onItemsRendered:function(e){u.current=Object(d.a)(Object(d.a)(Object(d.a)({},u.current),e),{},{length:t.length})},overscanCount:33,onScroll:function(e){var t,r=(null===j||void 0===j||null===(t=j.current)||void 0===t?void 0:t.offsetHeight)||0;"backward"===e.scrollDirection&&e.scrollOffset<300&&(u.current=Object(d.a)(Object(d.a)({},u.current),{},{autoScrolling:!1}),u.current.reqMessages||u.current.timelineEnd||(u.current=Object(d.a)(Object(d.a)({},u.current),{},{reqMessages:!0}),k())),e.scrollOffset>r+I-300&&(u.current=Object(d.a)(Object(d.a)({},u.current),{},{autoScrolling:!0}),i&&!u.current.cleanMessages&&(u.current=Object(d.a)(Object(d.a)({},u.current),{},{cleanMessages:!0}),E()))}},L)})),parseInt(i)>0&&!h.current.autoScrolling?a.a.createElement("div",{style:{position:"absolute",bottom:"33px",right:"15px",width:"33px",height:"33px"}},a.a.createElement(y.a,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){C(!0)}})):a.a.createElement(a.a.Fragment,null))})),E=r(20),k=r(10),S=r(74),L=r(27),C=r(34),I=r(21),T=r(33),F=r(266),D=r(57);function N(){N=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var A=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))(Object(T.a)(F.a)((function(e){var t=a.a.useState(""),r=Object(f.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(f.a)(i,2),l=c[0],s=c[1],u=a.a.useState([]),d=Object(f.a)(u,2),h=d[0],m=d[1],g=window.location.hash.split("/");g[0]=g[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return b()}),1e3);return s(!0),function(){return clearTimeout(t)}}}),[e.text]);var b=function(){var t=Object(p.a)(N().mark((function t(){var r;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,console.log({text:e.text.trim(),nodeId:e.nodeId,db:e.db,type:"comment"}),t.next=4,D.a.post("/M_Timeline_Search",{text:e.text.trim(),nodeId:e.nodeId,db:e.db,type:"comment"});case 4:(r=t.sent)&&r.data&&(e.onFinish&&e.onFinish(),m(r.data),s(!1)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("/SEARCH/MESSAGES/SearchMessages():::",t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%",maxHeight:"70vh"}},a.a.createElement("div",{style:{positin:"relative",width:"100%"}},l&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(S.a,null)),a.a.createElement(C.a,null,Object.keys(h).length>0&&a.a.createElement(I.a,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(h).map((function(t,r){return a.a.createElement("div",{key:t,style:{position:"relative",float:"left",width:"calc(100% - 20px)",marginLeft:"10px",marginRight:"10px",marginBottom:"22px",clear:"both"}},a.a.createElement(v.a,{messageClick:e.onAction?function(){}:null,searchText:e.text.trim(),storie:h[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))}))),P=r(724),$=r(1);var M=Object(o.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(i.b)(c,e)}))(Object(T.a)(F.a)((function(e){var t=a.a.useState(""),r=Object(f.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(f.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),d=Object(f.a)(u,2),p=d[0],h=d[1],m=window.location.hash.split("/");return m[0]=m[0].replace("#",""),a.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},l?a.a.createElement(a.a.Fragment,null,a.a.createElement(L.a,{label:Object($.u)("$__searchInChat"),variant:Object($.d)("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(P.a,{position:"end"},a.a.createElement(k.a,{icon:"close",color:"lightgray",onClick:function(){o(""),h(!1),s(!1)}})),onChange:function(e,t){o(e.target.value),h(!0)},onBlur:function(){""===n&&(o(""),h(!1),s(!1))}},placeholder:Object($.u)("$__searchInChat"),value:Object($.q)(n).toLowerCase(),autoFocus:!0})):a.a.createElement(E.a,{title:Object($.u)("$__search",1),color:"grey",icon:"search",onClick:function(e){s((function(e){return!e}))},transparent:!0}),""!==n&&n.length>1&&p&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(S.a,null)),""!==n&&n.length>1&&a.a.createElement("div",{style:{position:"absolute",top:"50px",right:"15px",backgroundColor:"#FFFFFF",height:"auto",overflow:"hidden",overflowY:"auto",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.1)",maxHeight:"90vh",maxWidth:"666px",zIndex:2001}},a.a.createElement(A,{nodeId:e.nodeId,db:e.db,text:n,onFinish:function(e){h(!1)},onAction:function(t){e.onAction&&e.onAction(t),o(""),h(!1),s(!1)}})))}))),z=r(157),Y=r(663);function B(){B=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var R=Object(z.a)(Y.a),G=Object(o.b)((function(e,t){var r=e.timeline;t.nodeId;return{timeline:r}}),(function(e){return Object(i.b)(c,e)}))((function(e){var t=R(),r=l.a.getState().session,o=a.a.useState(!1),i=Object(f.a)(o,2),c=i[0],s=i[1],u=e.timeline,m=a.a.useRef(!0);a.a.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]);var g=e.type||"comment",b=Object(n.useRef)(),y=e.nodeId?l.a.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},v=l.a.getState().db.users[e.nodeId]?"users":"cards";Object(n.useEffect)((function(){return b.current={mounted:!0},function(){b&&b.current&&b.current.mounted&&(b.current.mounted=!1)}}),[]);var x=[],O=[];l.a.getState().db.cards[e.nodeId]&&u[e.nodeId]&&Object.keys(u[e.nodeId]).forEach((function(t){return O.push(u[e.nodeId][t])}));"kpi"===g&&function e(t){Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]._parent===t&&l.a.getState().db.cards[e].kpi_useParent&&l.a.getState().db.cards[e].kpi_type===l.a.getState().db.cards[t].kpi_type})).forEach((function(t){l.a.getState().timeline[t]&&Object.keys(l.a.getState().timeline[t]).filter((function(e){return"kpi"===l.a.getState().timeline[t][e].type&&!l.a.getState().timeline[t][e].deleted})).map((function(e){return O.push(l.a.getState().timeline[t][e])})),e(t)}))}(e.nodeId),l.a.getState().db.users[e.nodeId]&&(u&&u[r._id]&&Object.keys(u[r._id]).filter((function(t){return u[r._id]&&u[r._id][t]&&u[r._id][t].user&&u[r._id][t].user._id===e.nodeId&&0===O.filter((function(e){return e._id===t})).length})).forEach((function(e){O.push(u[r._id][e])})),u&&u[e.nodeId]&&Object.keys(u[e.nodeId]).filter((function(t){return u[e.nodeId]})).forEach((function(t){O.push(u[e.nodeId][t])})),O=Object.keys(O).sort((function(e,t){return parseInt(O[e].created_at)<parseInt(O[t].created_at)?-1:parseInt(O[e].created_at)>parseInt(O[t].created_at)?1:0})).filter((function(t){return O[t].user&&O[t].user._id&&(O[t].user._id===r._id||O[t].user._id===e.nodeId)})).map((function(e){return O[e]}))),e.kpi_type&&(O=Object.keys(O).filter((function(t){return O[t].kpi_type===e.kpi_type||O[t].reply})).map((function(e){return O[e]})));var w=y&&y.kpi_ini?parseFloat(y.kpi_ini):0;if(a.a.useEffect((function(){if(m.current){var t=function(){var t=Object(p.a)(B().mark((function t(){var r;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.type?e.type:"comment",t.next=3,Object(_.f)(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(d.a)({ids:e.nodeId,db:v,type:r},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:O.filter((function(e){return e.type===r})).length>0?O.filter((function(e){return e.type===r})).length-1:0,reqChildrens:!1}));case 3:m.current&&s(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();m.current&&O.filter((function(e){return e.type===g})).length<10&&(s(!0),t())}}),[g,e.nodeId]),c)return a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},a.a.createElement(h.a,null));var E=Object.keys(O).length>0&&Object.keys(O).filter((function(e){return!(O[e].deleted&&!(O[e].deleted&&O[e].user&&O[e].user._id&&O[e].user._id===r._id)||!(O[e].type===g||O[e].reply&&Object.keys(O).filter((function(t){return O[t]&&O[t]._id===O[e].reply&&O[t].type===g})).length>0))})).sort((function(e,t){return O[e].created_at<O[t].created_at?-1:O[e].created_at>O[t].created_at?1:0})).map((function(e){var t=O[e];return w=parseFloat(parseFloat(w)+parseFloat(t.value)),t.balance=w,t.files&&Object.keys(t.files).length>0&&Object.keys(t.files).forEach((function(e,r){var n=t.files[e];x.push(n)})),t}));return a.a.createElement("div",null,a.a.createElement("div",{className:t.timeline},a.a.createElement("div",{className:e.showHeader?t.timelineSimpleWithHeader:t.timelineSimple,style:{zIndex:1}},E&&E.length>0?a.a.createElement(j,{messages:E,hideCards:!!e.hideCards,db:e.db,type:g,nodeId:e.nodeId,openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:x,file:r})}}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),e.noSearch?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",top:0,right:0}},a.a.createElement(M,{db:v,nodeId:e.nodeId,onAction:function(e){}}))))}));t.a=Object(o.b)(null,(function(e){return Object(i.b)(c,e)}))((function(e){var t=e.nodeId,r=l.a.getState().session,n=l.a.getState().db.users[t]?"users":"cards",o=!!e.disabledSend&&e.disabledSend;return t&&e.disabledSend&&(!l.a.getState().db.cards[t]||l.a.getState().db.cards[t]&&l.a.getState().db.cards[t].onlyAdminsSendMessages&&l.a.getState().db.cards[t]._users&&l.a.getState().db.cards[t]._users[r._id]&&l.a.getState().db.cards[t]._users[r._id].access<4)&&(o=!0),"users"===n&&l.a.getState().db.users&&l.a.getState().db.users[t]&&l.a.getState().db.users[t].deleted&&(o=!0),a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",zIndex:0}},a.a.createElement("div",{style:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:o?"0px":"70px"}},a.a.createElement(s.a,null,a.a.createElement(G,e))),o?l.a.getState().db.cards[t]&&"chatGroup"===l.a.getState().db.cards[t].type?a.a.createElement("div",{style:{position:"absolute",alignItems:"center",textAlign:"center",bottom:0,left:0,right:0,padding:15,backgroundColor:"linear-gradient(33deg, rgba(250, 250, 250, 1), rgba(240,240,240, 1))",justifyContent:"center",fontSize:"16px",fontWeight:"bold",color:Object($.d)("menu")}},Object($.u)("$__onlyAdminsCanSendMessages",1)):a.a.createElement(a.a.Fragment,null):a.a.createElement(s.a,null,a.a.createElement(u.a,{db:e.db?e.db:"cards",nodeId:t,editorStyle:{padding:"7px"}})))}))},250:function(e,t,r){"use strict";var n=r(8),a=r(5),o=r(0),i=r.n(o),c=r(1139),l=r.n(c),s=r(1140),u=r.n(s),d=r(15),p=r(13),f=r(14),h=r(58),m=r(10),g=r(45),b=r(1189),y=r(33),v=(r(1478),function(){return{root:{},viewer:{alignItems:"center",justifyContent:"center",display:"flex"},image:{width:"100%",backgroundRepeat:"no-repeat",backgroundSize:"cover"},avatarImage:{marginTop:"7px",width:"170px",height:"170px",borderRadius:"50%",boxShadow:"0px 0px 7px 7px rgba(0,0,0,0.2)"},addImage:{width:"100%",padding:"15px","&:hover":{}},cropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"}},circleCropper:{overflow:"hidden","& .cropper-container":{width:"100% !important",overflow:"hidden !important"},"& .cropper-view-box":{borderRadius:"50%"}}}}),x=r(1);function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(T([])));O&&O!==r&&n.call(O,i)&&(v=O);var w=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var O=i.a.createRef(null);t.a=Object(f.b)((function(e){return{store:e}}),(function(e){return Object(p.b)(d,e)}))(Object(y.a)(v)((function(e){var t=i.a.useState(null),r=Object(a.a)(t,2),o=r[0],c=r[1],s=i.a.useState(!1),d=Object(a.a)(s,2),p=d[0],f=d[1],y=i.a.useState(null),v=Object(a.a)(y,2),w=v[0],j=v[1],E=i.a.useState([]),k=Object(a.a)(E,2),S=k[0],L=k[1],C=i.a.useRef(null),I=e.classes;i.a.useEffect((function(){T()}),[e.files,e.img]);var T=function(){var t=S;e.files&&(Object.keys(e.files).forEach((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),L(t))},F=function(){var t=Object(n.a)(_().mark((function t(r){var n,a,o,i,l,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=O.current.getCroppedCanvas().toDataURL(),c(n),j(null),f(!1),a=C.current.files[0].name,o=C.current.files[0].type,t.next=8,D(n,a,o);case 8:return i=t.sent,t.prev=9,l=new Promise((function(t){return u.a.imageFileResizer(i,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,i.type.replace("image/",""),50,0,(function(e){t(D(e,a,o))}))})),t.next=13,l.then((function(e){return e}));case 13:(s=t.sent)&&e.onChange&&e.onChange(n,s),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(9),console.log(t.t0);case 20:case"end":return t.stop()}}),t,null,[[9,17]])})));return function(e){return t.apply(this,arguments)}}(),D=function(e,t,r){return fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:r})}))};return i.a.createElement("div",{className:I.root},i.a.createElement("div",{className:I.viewer,style:{}},!o&&!e.img&&e.avatar&&e.avatarIcon&&i.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(x.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(x.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(m.a,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!o&&!e.img?e.avatar&&(o||e.img)?i.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(x.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(x.d)("AvatarBackground"),backgroundImage:'url("'.concat(o||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):i.a.createElement(i.a.Fragment,null):i.a.createElement("img",{alt:"MACHEN_IMAGE",className:e.avatar?I.avatarImage:I.image,src:"".concat(o||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=o||e.img},width:"100%",onClick:function(){!function(){if(S&&S.length>0){var t=S.filter((function(t){return e.img&&e.img.indexOf(t.file)>-1}));t.length>0&&e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:t,file:t[0]._id})}}()}})),i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.onChange?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{padding:"7px"},onClick:function(){C.current.click()}},i.a.createElement(g.a,{text:Object(x.u)(o||e.img?"$__changeImage":"$__addImage",1),icon:o||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),i.a.createElement("input",{type:"file",onChange:function(e){!function(e){f(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){j(t.result),f(!0)},t.readAsDataURL(r)}else f(!1)}(e.target)},ref:C,id:"file-picker",name:"image",accept:e.accept||".jpg,.jpeg,.png,.gif",style:{display:"none"}})):i.a.createElement(i.a.Fragment,null),e.onDelete&&(o||e.img)?i.a.createElement("div",{style:{padding:"7px"},onClick:function(){e.onDelete()}},i.a.createElement(g.a,{text:Object(x.u)("$__removeImage",1),icon:"hide_image",textColor:"color",iconColor:"color"})):i.a.createElement(i.a.Fragment,null)),i.a.createElement(b.a,{fullWidth:!0,onClose:function(){return f(!1)},"aria-labelledby":"simple-dialog-title",open:p},i.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},i.a.createElement(h.a,{title:Object(x.u)("$__cropImage",1),icon:"crop",onSave:function(){F()},onCancel:function(){f(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),i.a.createElement(l.a,{className:e.avatar?I.circleCropper:I.cropper,ref:O,src:w||null,style:{height:"50vh",width:"100%",margin:"auto",padding:"0px"},aspectRatio:e.ignoreAspect?null:e.aspectRatio?e.aspectRatio:e.avatar?1:16/9,guides:!e.noGuides,viewMode:String(e.viewMode)?e.viewMode:2,checkOrientation:e.checkOrientation||!1})))})))},266:function(e,t,r){"use strict";t.a={}},267:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(715),c=r.n(i),l=r(1181),s=r(10),u=r(20),d=(r(496),r(1));r(1479);var p=o.a.forwardRef((function(e,t){return o.a.createElement("div",{style:{display:"flex",width:"100%",padding:"7px 7px",fontSize:"12px",fontWeight:400,lineHeight:1.5,color:"#212529",backgroundColor:"#fff",border:"1px solid #ced4da",borderRadius:3,transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",appearance:"none",justifyContent:"space-between"},onClick:e.onClick},o.a.createElement("label",{onClick:e.onClick,ref:t,style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.value||e.placeholder),o.a.createElement(s.a,{size:"22px",color:Object(d.d)("color"),icon:"today",onClick:e.onClick}))}));t.a=function(e){return Object(i.registerLocale)("pt",l.a),o.a.createElement("div",{style:Object(n.a)(Object(n.a)(Object(n.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},o.a.createElement("div",{style:Object(n.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},o.a.createElement(c.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:Object(d.u)("$__pleaseSelectStartDate"),selected:e.startDate?e.startDate:null,onChange:e.onChangeStartDate?function(t){e.onChangeStartDate(t)}:null,selectsStart:!0,startDate:e.startDate?e.startDate:null,endDate:e.endDate?e.endDate:null,maxDate:!e.range&&e.maxDate?e.maxDate:null},e.type&&"datetime"===e.type?{timeInputLabel:Object(d.u)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:o.a.createElement(p,null),showYearDropdown:!0}))),e.range?o.a.createElement("div",{style:Object(n.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},o.a.createElement(c.a,Object.assign({locale:"pt",placeholderText:Object(d.u)("$__pleaseSelectEndDate"),selected:e.endDate?e.endDate:null,onChange:e.onChangeEndDate?function(t){e.onChangeEndDate(t)}:null,selectsEnd:!0,startDate:e.startDate?e.startDate:null,endDate:e.endDate?e.endDate:null,minDate:e.minDate?e.minDate:e.range&&e.startDate?e.startDate:null},e.type&&"datetime"===e.type?{timeInputLabel:Object(d.u)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{maxDate:e.maxDate?e.maxDate:null,customInput:o.a.createElement(p,null),showYearDropdown:!0}))):o.a.createElement(o.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?o.a.createElement("div",{style:Object(n.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},o.a.createElement(u.a,Object.assign({color:Object(d.d)("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Object(d.u)("$__clearDate","*"),text:Object(d.u)("$__clearDate","*")}))):o.a.createElement(o.a.Fragment,null))}},27:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(1853),c=r(157),l=r(1),s=r(6),u=o.a.forwardRef((function(e,t){var r={root:Object(n.a)(Object(n.a)({},s.k),{},{color:Object(l.d)("mediumText"),padding:0,width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px"},"& label":{marginTop:"-10px",fontSize:"12px"},"& label.MuiFormLabel-filled":{color:Object(l.d)("mediumText"),marginTop:"standard"===Object(l.d)("fieldVariant")||"filled"===Object(l.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(l.d)("mediumText"),marginTop:"standard"===Object(l.d)("fieldVariant")||"filled"===Object(l.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(l.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:Object(l.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(l.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:Object(l.d)("line")},"&::before":{borderBottomColor:Object(l.d)("line")},"&::after":{borderBottomColor:Object(l.d)("line")},"&.Mui-focused":{borderBottomColor:Object(l.d)("line"),"&::before":{borderBottomColor:Object(l.d)("line")},"&::after":{borderBottomColor:Object(l.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(l.d)("fieldVariant")?0:"filled"===Object(l.d)("fieldVariant")?"-15px":0,borderRadius:Object(l.d)("fieldRadius"),"& fieldset":{borderColor:Object(l.d)("line")},"&::before":{borderBottomColor:Object(l.d)("line")},"&::after":{borderBottomColor:Object(l.d)("line")},"&.Mui-focused":{borderBottomColor:Object(l.d)("line"),"&::before":{borderBottomColor:Object(l.d)("line")},"&::after":{borderBottomColor:Object(l.d)("line")}}}})},a=Object(c.a)(r)();return o.a.createElement(i.a,Object.assign({},e,{ref:t,className:a.root}))}));t.a=u},271:function(e,t,r){"use strict";var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(104),l=r(157),s=r(1973),u=r(33),d=Object(u.a)((function(e){return{root:{border:"none",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.05)","& .MuiIcon-root":{color:"rgba(250,250,250,0.33)"},"& .MuiIcon-root:hover":{color:"rgba(250,250,250,0.77)"},padding:0}}}))(s.a);function p(e){var t=i.a.useState(!1),r=Object(a.a)(t,2),o=r[0],c=r[1];return i.a.createElement(d,{style:Object(n.a)(Object(n.a)({},e.style?e.style:{}),o?{}:{paddingLeft:10,paddingRight:10}),deleteIcon:e.deleteIcon?e.deleteIcon:null,label:e.label,onMouseOver:function(){c(!0)},onMouseLeave:function(){c(!1)},onDelete:e.onDelete&&o?function(){e.onDelete()}:null,onClick:e.onClick?function(t){e.onDelete()}:null})}var f=r(27),h=r(1853),m=r(1),g=r(6),b=Object(u.a)({root:Object(n.a)(Object(n.a)({},g.k),{},{padding:0,width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(m.d)("color")},"& label.MuiFormLabel-filled":{color:Object(m.d)("color"),marginTop:"standard"===Object(m.d)("fieldVariant")||"filled"===Object(m.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(m.d)("color"),marginTop:"standard"===Object(m.d)("fieldVariant")||"filled"===Object(m.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(m.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(m.d)("fieldRadius"),"& fieldset":{borderColor:Object(m.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(m.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(m.d)("fieldRadius"),"& fieldset":{borderColor:Object(m.d)("line")},"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")},"&.Mui-focused":{borderBottomColor:Object(m.d)("line"),"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(m.d)("fieldVariant")?0:"filled"===Object(m.d)("fieldVariant")?"-15px":0,borderRadius:Object(m.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(m.d)("line")},"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")},"&.Mui-focused":{borderBottomColor:Object(m.d)("line"),"&::before":{borderBottomColor:Object(m.d)("line")},"&::after":{borderBottomColor:Object(m.d)("line")}}}})})(h.a),y=r(324),v=r(884),x=r(664),_=Object(l.a)(x.a);t.a=function(e){var t=_(),r=i.a.useState([]),o=Object(a.a)(r,2),l=o[0],s=o[1];i.a.useEffect((function(){s(e.value)}),[e.value]);var u=function(t){var r=Array.from(l);r.splice(r.findIndex((function(e){return e.value===t.value})),1),s(r),e.onChange&&e.onChange(r)};return i.a.createElement(c.a,{className:e.dark?e.noLabel?t.noLabel:t.labelTop:e.noLabel?t.noLabelLight:t.labelTopLight,value:l,options:e.options?e.options.sort((function(t,r){var n,a,o="".concat(t.parent&&(null===(n=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===n?void 0:n.label.toUpperCase().substr(0,5))||"".concat(null===t||void 0===t?void 0:t.label.toUpperCase().substr(0,3))," ").concat(null===t||void 0===t?void 0:t.label.toUpperCase()),i="".concat(r.parent&&(null===(a=e.options.filter((function(e){return e.value===r.parent}))[0])||void 0===a?void 0:a.label.toUpperCase().substr(0,5))||"".concat(null===r||void 0===r?void 0:r.label.toUpperCase().substr(0,3))," ").concat(null===r||void 0===r?void 0:r.label.toUpperCase());return o<i?-1:o>i?1:0})):[],getOptionLabel:function(e){return e&&e.label?Object(m.u)(e.label,1):""},filterSelectedOptions:!!e.filterSelectedOptions,name:"autoComplete_".concat(e.name||""),style:{width:"100%"},multiple:e.multiple||!1,limitTags:e.multiple?e.limitTags?e.limitTags:2:null,freeSolo:e.freeSolo||!1,disableClearable:e.disableClearable||!1,disabled:e.disabled,groupBy:e.groupByParent?function(e){return e.parent||"noParent"}:null,renderOption:e.groupByParent?null:function(e){return i.a.createElement("div",{style:Object(n.a)({zIndex:3e3},e.color?{paddingLeft:7,borderLeft:"solid 3px ".concat(e.color)}:{})},e.label)},renderGroup:function(t){return i.a.createElement("li",{key:t.key},t.group&&e.options.filter((function(e){return e.value===t.group})).length>0?i.a.createElement("div",{style:{fontSize:10,color:Object(m.d)("menu"),backgroundColor:t.color||"#b7b7b7",padding:3}},e.options.filter((function(e){return e.value===t.group}))[0].label):i.a.createElement(i.a.Fragment,null),i.a.createElement("div",{style:Object(n.a)({},e.options.filter((function(e){return e.value===t.group})).length>0&&e.options.filter((function(e){return e.value===t.group}))[0].color?{borderLeft:"solid 2px ".concat(e.options.filter((function(e){return e.value===t.group}))[0].color)}:{})},t.children))},renderInput:function(t){return e.dark?i.a.createElement(b,Object.assign({},t,{label:Object(m.u)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(n.a)(Object(n.a)({},t.InputProps),e.InputProps)})):i.a.createElement(f.a,Object.assign({},t,{label:Object(m.u)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(n.a)(Object(n.a)({},t.InputProps),e.InputProps)}))},renderTags:function(t,r){return t.map((function(t,r){return i.a.createElement("div",{key:r},e.colorPicker&&t&&t.label?i.a.createElement(y.a,{label:t&&t.label?t.label:null,color:t.color,_id:t.value,onChange:function(r){var n=t;n.color=r,e.colorPickerCallBack&&e.colorPickerCallBack(n)}},i.a.createElement(p,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Object(m.s)(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(v.a,{style:{color:Object(m.s)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){u(t)}})):t&&t.label?i.a.createElement(p,{label:t&&t.label?t.label:null,style:{backgroundColor:t.color||"#b7b7b7",boxShadow:"0 0 7px 3px rgba(0,0,0,0.05)",color:Object(m.s)(t.color||"#b7b7b7",!0)},deleteIcon:i.a.createElement(v.a,{style:{color:Object(m.s)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){u(t)}}):i.a.createElement(i.a.Fragment,null))}))},onChange:function(t,r){e.onChange&&e.onChange(r);var n=[];e.multiple?(r.forEach((function(e){e&&e.label?n.push(e):n.push({label:e})})),s(n)):s(r)},dbNode:e.dbNode?e.dbNode:"tag",add:!(!e.add||!0!==e.add),inNode:e.inNode?e.inNode:null,secondaryParent:e.secondaryParent?e.secondaryParent:null,ws:!0,api:e.api?e.api:null})}},291:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(392),i=r(33),c=r(157),l=r(14),s=r(13),u=r(15),d=Object(i.a)((function(e){return{badge:{backgroundColor:"#44b700",color:"#44b700",boxShadow:"0 0 0 2px ".concat(e.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"$ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}}))(o.a),p=Object(i.a)((function(e){return{badge:{backgroundColor:"#ffb100",color:"#ffb100",boxShadow:"0 0 0 2px ".concat(e.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"$ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}}))(o.a),f=Object(c.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));t.a=Object(l.b)((function(e,t){return{status:e.usersStatus&&e.usersStatus.users&&e.usersStatus.users[t.userId]&&e.usersStatus.users[t.userId].status?e.usersStatus.users[t.userId].status:null}}),(function(e){return Object(s.b)(u,e)}))((function(e){var t=f();return a.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?a.a.createElement(p,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children):a.a.createElement(d,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children))}))},292:function(e,t,r){"use strict";var n=r(8),a=r(5),o=r(0),i=r.n(o),c=r(14),l=r(13),s=r(15),u=r(271),d=r(33),p=r(442);function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}t.a=Object(c.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(l.b)(s,e)}))(Object(d.a)(p.a)((function(e){var t,r=i.a.useState((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values)||[]),o=Object(a.a)(r,2),c=o[0],l=o[1];i.a.useEffect((function(){var t;if(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values){var r=[];e.data.values.filter((function(e){return e.value})).forEach((function(e){r.push(e)})),l(r)}}),[e.data]);var s=function(){var t=Object(n.a)(f().mark((function t(r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),l(r);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return i.a.createElement("div",null,i.a.createElement(u.a,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:e.options?e.options:[],style:{width:"100%"},name:e.name?e.name:"multInput",ws:!e.noAdd,add:!0,colorPicker:!0,multiple:!0,freeSolo:!0,disableClearable:!0,disabled:!!e.disabled,value:c,placeholder:e.placeholder||null,onChange:function(e){s(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))})))},299:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n={tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:{iniDate:null,endDate:null,dateStatus:[],status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},kpiType:[],iniKpiValue:null,endKpiValue:null}}},3:function(e,t,r){"use strict";var n=r(13),a=r(1183),o=r(1119),i=r(47),c=r(22),l=r(2),s={notifications:[]},u={copy:[],selected:[],action:null},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1?arguments[1]:void 0;return"SET_CARD"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_CARD"===t.action?Object(l.a)({},u):e},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_CARDS"===t.action&&t.value?Object(l.a)({},t.value):e},f={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},notifications:!0},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;return"SET_CHAT"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLOSE_CHAT"===t.action?Object(l.a)({},f):e},m={timelines:{},unreadeds:{},drafts:{}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;return"SET_CHATS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_CHATS"===t.action?Object(l.a)({},m):e},b={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,hidePrivate:!1,lockPrivate:!1,unlockedPrivates:0,board:null,toCopyMove:null,addCard:{},importUsers:!1,agileOrderBy:"name",agileOrderDesc:"DESC"},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;return"SET_CONTROL"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"RESET_CONTROLS"===t.action?Object(l.a)({},e):e},v=r(634),x={},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;return"SET_FUNCTIONS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_FORMS"===t.action&&t.value?Object(l.a)({},t.value):e},w={},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},E={open:!1,miro:!1,files:[],file:0},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"LIGHTBOX"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"LIGHTBOX_CLOSE"===t.action?Object(l.a)({},E):e},S={total:0,lastNotification:0,firstNotification:0},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;return"SET_NOTIFICATIONS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},C={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},T=r(299),F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T.a,t=arguments.length>1?arguments[1]:void 0;return"SEARCH"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"SEARCH_CLEAR"===t.action?T.a:e},D=r(529),N=r.n(D),A=r(1125),P=r.n(A),$={custom:{ColumnTitleColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",customLogo:N.a,loginBackground:P.a,linearProgress:"linear-gradient(90deg, rgba(90,35,130,0) 0%, rgba(67,18,102,1) 30%, rgba(67,18,102,1) 70%, rgba(90,35,130,0) 100%)",AvatarBackground:"radial-gradient(rgba(114,47,162,1) 0%, rgba(67,18,102,1) 100%)",AvatarIconColor:"#FFFFFF",active:"rgb(192,178,131)",color:"rgb(192,178,131)",colorText:"rgb(192,178,131)",dark:"rgb(8,27,49)",darkText:"rgb(8,27,49)",disabled:"rgb(200,200,200)",fieldRadius:"3px",fieldVariant:"standard",light:"#FFFFFF",lightText:"#FFFFFF",line:"rgb(192,178,131)",locale:"pt-BR",subMenuColor:"linear-gradient(90deg, rgba(233,233,233,1) 0%, rgba(237,237,237,1) 100%)",subMenuTextColor:"rgb(125,125,125)",subMenuTextColorActive:"rgb(192,178,131)",medium:"rgb(125,125,125)",mediumText:"rgb(150,150,150)",menu:"rgb(67,18,102)",menuColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",menuButtonColor:"rgb(192,178,131)",timelineMyMessage:"#ebe3f1"},cards:{load:[],adminViewLoader:!1,adminView:!1,loaded:!1,expanded:!1,hide:{image:!1,description:!1,dates:!1,kpi:!1,kpiChart:!1,kpiChange:!1}},timeline:{load:[]},sideModuleWindow:!1,dashboard:{period:"$__last7Days"},period:"$__last7Days",users:{},showDeleted:!1,showPrivate:!1,disabledTour:!1},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_SESSION"===t.action?Object(l.a)({},e):e},z={cards:{load:{}},timeline:{load:{}}},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,t=arguments.length>1?arguments[1]:void 0;return"SET_SESSION_LOADS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_SESSION_LOADS"===t.action?Object(l.a)({},e):e},B={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B,t=arguments.length>1?arguments[1]:void 0;return"SET_MODULE"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_MODULE"===t.action?Object(l.a)({},B):e},G={},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,t=arguments.length>1?arguments[1]:void 0;return"SET_TIMELINE"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},W={},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;return"SET_TIMELINE_LOADER"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},q={cards:{},timeline:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0;return"TO_LOAD"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},J={users:{}},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=arguments.length>1?arguments[1]:void 0;return"SET_USERS_STATUS"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"CLEAR_USERS_STATUS"===t.action?Object(l.a)({},e):e},K={typing:{}},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,t=arguments.length>1?arguments[1]:void 0;return"SET_TYPING"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):"RESET_TYPING"===t.action?Object(l.a)({},K):e},Q={},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=arguments.length>1?arguments[1]:void 0;return"SET_SEARCH"===t.action&&t.value?Object(l.a)({},t.value):e},te={},re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0;return"SET_OVERVIEW_NAV"===t.action&&t.value?Object(l.a)({},t.value):e},ne=r(476);function ae(){ae=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var oe=ae().mark(le),ie=ae().mark(se);function ce(e){return e.next&&e.next(),!0}function le(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ne.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(ne.b)(ce,e);case 4:case"end":return t.stop()}}),oe)}function se(){return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ne.a)([Object(ne.e)("ASYNC",le),Object(ne.d)("IMMEDIATE",le)]);case 2:case"end":return e.stop()}}),ie)}var ue=Object(a.a)(),de=Object(n.f)(Object(n.c)({alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"NEW_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:[].concat(Object(c.a)(e.notifications),[Object(l.a)({key:t.value.options.key},t.value)])});case"CLOSE_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:e.notifications.map((function(e){return t.dismissAll||e.key===t.value?Object(l.a)(Object(l.a)({},e),{},{dismissed:!0}):Object(l.a)({},e)}))});case"REMOVE_ALERT":return Object(l.a)(Object(l.a)({},e),{},{notifications:e.notifications.filter((function(e){return e.key!==t.value}))});default:return e}},card:d,cards:p,chat:h,chatTyping:Z,chats:g,controls:y,db:v.a,functions:_,languages:j,lightBox:k,notifications:L,overviewNav:re,preLoader:I,search:F,searchs:ee,session:M,sessionLoads:Y,sideModule:R,timeline:H,timelineLoader:U,toLoad:V,usersStatus:X,forms:O}),Object(n.a)(ue,Object(o.routerMiddleware)(i.a)));ue.run(se);t.a=de},324:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(1177),s=r(546),u=r(20),d=r(545),p=r(346),f=r(544),h=r(1),m=r(39);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=function(e){var t=c.a.useState(!1),r=Object(o.a)(t,2),i=r[0],b=r[1],y=c.a.useState(e.color?e.color:"rgba(200,200,200,1)"),v=Object(o.a)(y,2),x=v[0],_=v[1],O=c.a.useRef(null),w=function(t){O.current&&O.current.contains(t.target)||(b(!1),e.onClose&&e.onClose())},j=function(){var t=Object(a.a)(g().mark((function t(r){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.onChange&&e.onChange(r),b(!i),!e._id){t.next=5;break}return t.next=5,m.a.put("node/update",{_id:e._id,color:r});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return c.a.createElement("div",{className:"cardColorPicker",style:Object(n.a)({},e.style?e.style:{}),onClick:function(e){e.stopPropagation(),e.preventDefault()},onDrag:function(e){e.preventDefault(),e.stopPropagation()},onDragStart:function(e){e.preventDefault(),e.stopPropagation()},onDragEnter:function(e){e.preventDefault(),e.stopPropagation()},onDragCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragEnterCapture:function(e){e.preventDefault(),e.stopPropagation()},onDragOver:function(e){e.preventDefault(),e.stopPropagation()}},e.children?c.a.createElement("div",{ref:O,style:{margin:3,cursor:"pointer"},onClick:function(e){b((function(e){return!e}))}},c.a.createElement("div",{onClick:function(e){}},e.children)):c.a.createElement("div",{ref:O,style:Object(n.a)(Object(n.a)({},e.label?{borderRadius:7,padding:7,color:x?Object(h.s)(x,!0):"#FFFFFF",fontSize:12}:{width:e.size?e.size:21,height:e.size?e.size:21}),{},{margin:3,backgroundColor:x,borderRadius:e.size?e.size:21,cursor:"pointer"}),onClick:function(){b((function(e){return!e}))}},e.label?e.label:""),c.a.createElement(f.a,{open:i,anchorEl:O.current,role:void 0,transition:!0,disablePortal:!!e.disablePortal},(function(t){var r=t.TransitionProps;t.placement;return c.a.createElement(d.a,Object.assign({},r,{style:{transformOrigin:"right center"}}),c.a.createElement(p.a,null,c.a.createElement(s.a,{onClickAway:w},c.a.createElement("div",{style:{position:"relative",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px 5px rgba(0,0,0,0.17)",borderRadius:7},onClick:function(e){e.stopPropagation()}},c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",marginTop:"-5px",justifyContent:"end"}},c.a.createElement(u.a,{title:Object(h.u)("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){_(e.color?e.color:"rgba(200,200,200,1)"),b(!i)},size:"30px"}),e.color?c.a.createElement(u.a,{title:Object(h.u)("$__removeColor",1),color:"red",icon:"format_color_reset",onClick:function(){j(null)},size:"30px"}):c.a.createElement(c.a.Fragment,null),c.a.createElement(u.a,{title:Object(h.u)("$__saveColor",1),color:"green",icon:"save",onClick:function(){j(x)},size:"30px"})),c.a.createElement(l.a,{color:x,onChange:function(e,t){_("rgba(".concat(e.rgb.r,", ").concat(e.rgb.g,", ").concat(e.rgb.b,", ").concat(e.rgb.a,")")),t.stopPropagation()},disableAlpha:!0}),c.a.createElement("div",{style:{clear:"both"}})))))})))}},331:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(9),c=r.n(i),l=r(10),s=r(142),u=r(147),d=r(1);t.a=function(e){var t=e.data;if(!(t&&t._users&&Object.keys(t._users).length>0))return o.a.createElement(o.a.Fragment,null);var r=t._users?t._users:{};return o.a.createElement("div",null,r&&Object.keys(r).length>0&&0===Object.keys(r).filter((function(t){return"null"!==String(t)&&(!e.customDefine||e.customDefine&&e.customDefine.name&&r[t]&&r[t][e.customDefine.name])})).length?Object(d.u)("$__selectUsers"):o.a.createElement("div",{style:{display:"flex"}},Object.keys(r).filter((function(t){return"null"!==String(t)&&(!e.customDefine||e&&e.customDefine&&e.customDefine.name&&r&&r[t]&&r[t][e.customDefine.name])})).sort((function(e,t){return r[e].isResponsible?-1:r[t].isResponsible?1:r[e].name<r[t].name?-1:r[e].name>r[t].name?1:0})).filter((function(t,n){return!!(n<=(e.noLimit?7:e.limit?e.limit:7)&&r[t]&&r[t].name)})).map((function(t,a){var i=!1,p=!!(Object.keys(r).length>1&&r[t].isResponsible),f=!(!e.customDefine||!e.customDefine.name)&&!!(Object.keys(r).length>1&&r[t][e.customDefine.name]);r[t].myDay&&r[t].myDay&&c()(1e3*parseInt(r[t].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===c()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(i=!0);var h=e.noLimit?7:e.limit?e.limit:7;if(a<h)return o.a.createElement("div",{key:t,style:{marginLeft:-7,position:"relative"}},o.a.createElement(u.a,{title:"".concat(r[t].name).concat(i?" (".concat(Object(d.u)("$__inMyDay"),")"):""),key:t},o.a.createElement("div",{overlap:"circular",alt:r[t].name,src:r[t].image||null,style:Object(n.a)(Object(n.a)({width:i||p?"30px":e.avatarSize?e.avatarSize:"24px",height:i||p?"30px":e.avatarSize?e.avatarSize:"24px",borderRadius:"50%"},e.customDefine?{border:f?e.customDefine.avatarBorder||"3px green solid":"none"}:{border:p?"3px deepskyblue solid":i?"2px #ff8800 solid":"none"}),{},{backgroundImage:r[t].image?'url("'.concat(r[t].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"})},r[t].image?"":r[t].name.substr(0,1))),i&&o.a.createElement("div",{style:{position:"absolute",backgroundColor:"#ff8800",width:"14px",height:"14px",borderRadius:"14px",display:"flex",alignItems:"center",justifyContent:"center",right:"7px",bottom:0}},o.a.createElement(l.a,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(a===h){var m=Object.keys(r).length-h;return o.a.createElement(u.a,{title:o.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(r).sort((function(e,t){return r[e].isResponsible?-1:r[t].isResponsible?1:r[e].name<r[t].name?-1:r[e].name>r[t].name?1:0})).filter((function(e,t){return!!(t>=h&&r[e]&&r[e].name)})).map((function(t,a){return o.a.createElement("li",{key:t,style:{display:"flex",alignItems:"center"}},o.a.createElement(s.a,{overlap:"circular",alt:r[t].name,src:r[t].image||null,style:Object(n.a)(Object(n.a)({width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:r[t].isResponsible?"3px deepskyblue solid":r[t].myDay?"2px #ff8800 solid":"none"},e.customDefine?{border:r[t][e.customDefine.name]?"3px green solid":"none"}:{border:r[t].isResponsible?"3px deepskyblue solid":r[t].myDay?"2px #ff8800 solid":"none"}),{},{marginRight:7})},r[t].name.substr(0,1)),r[t].name)}))),key:a},o.a.createElement(s.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(m)},o.a.createElement("span",{style:{fontSize:10}},"+".concat(m))))}return o.a.createElement(o.a.Fragment,null)}))))}},332:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(364),s=r.n(l),u=r(9),d=r.n(u),p=r(10),f=r(532),h=r(153),m=r(27),g=r(20),b=r(33),y=r(14),v=r(13),x=r(15),_=r(3),O=r(1),w=r(24),j=r(439),E=r(660),k=(r(771),r(38));function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(772);t.a=Object(y.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(v.b)(x,e)}))(Object(b.a)(j.a)((function(e){var t,r=e.classes,i=_.a.getState(),l=i.db,u=i.session,b=l.cards,y=c.a.useState(!1),v=Object(o.a)(y,2),x=v[0],j=v[1],L=c.a.useState(!1),C=Object(o.a)(L,2),I=C[0],T=C[1],F=c.a.useState({}),D=Object(o.a)(F,2),N=D[0],A=D[1],P=e.data,$=c.a.useState([]),M=Object(o.a)($,2),z=M[0],Y=M[1],B=c.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT06:00")),R=Object(o.a)(B,2),G=R[0],H=R[1],W=c.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT07:00")),U=Object(o.a)(W,2),q=U[0],V=U[1],J=c.a.useState(!1),X=Object(o.a)(J,2),K=X[0],Z=X[1],Q=c.a.useState(0),ee=Object(o.a)(Q,2),te=ee[0],re=ee[1],ne=c.a.useState(1),ae=Object(o.a)(ne,2),oe=ae[0],ie=ae[1],ce="time"===P.kpi_type&&P.kpi_ini?parseFloat(P.kpi_ini):0,le="time"===P.kpi_type&&P.kpi_fin?parseFloat(P.kpi_fin):0;c.a.useEffect((function(){t&&clearTimeout(t),de(),ue(e.data._id)}),[I]),c.a.useEffect((function(){t&&clearTimeout(t),de(),ue(e.data._id)}),[JSON.stringify(e.card[e.data._id])]);var se=[e.data._id],ue=function e(t,r){var n=Object.keys(b).filter((function(e){return b[e].kpi_useParent&&b[e]._parent===t}));return n.length>0?n.forEach((function(t){e(t,!0),se.push(t),Y(Array.from(new Set(se)))})):r||Y(se),n},de=function(){var t=Object(a.a)({},_.a.getState().db.cards[e.data._id]);if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===u._id})).length>0){var r=Object(a.a)({},t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===u._id}))[0]]);r.diff=d()().tz("America/Sao_Paulo").unix("x")-r.created_at,r&&r.updated_at&&(r.diff=parseInt(r.updated_at)-parseInt(r.created_at)),pe(r,!!r.updated_at)}else j(!1),A({}),T(!1);0===Object.keys(N).length&&e.manualAdd&&(A({created_at:d()(G).tz("America/Sao_Paulo").unix("X"),updated_at:d()(q).tz("America/Sao_Paulo").unix("X")}),pe({created_at:d()(G).tz("America/Sao_Paulo").unix("X"),updated_at:d()(q).tz("America/Sao_Paulo").unix("X")},!!N.updated_at))},pe=function(e,r){var n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(a.a)({},e),c=!1;if(i.diff?n=parseInt(i.diff):(n=parseInt(e.updated_at-e.created_at),e.updated_at-e.created_at<0&&(n=null)),n||K)if(n<60)i.diffText="".concat(i.diff," ").concat(Object(O.u)("$__seconds",1)),o||ie(0);else if(n>=3600){var l=Math.trunc(n/3600);n-=3600*l;var s=Math.trunc(n/60)>0?Math.trunc(n/60):0,u=(n-=60*s)>0?n:0;i.diffText="".concat(l," hora").concat(l>1?"s":""," ").concat(s," ").concat(Object(O.u)("$__minutes",1)," ").concat(u," ").concat(Object(O.u)("$__seconds",1)),o||(ie(l),re(s))}else{var p=Math.trunc(n/60)>0?Math.trunc(n/60):0,f=(n-=60*p)>0?n:0;i.diffText="".concat(p," ").concat(Object(O.u)("$__minutes",1)," ").concat(f," ").concat(Object(O.u)("$__seconds",1)),o||(ie(0),re(p))}else i.diffText=Object(O.u)("$__theEndMustBeGreaterThanTheBeginning");A(Object(a.a)(Object(a.a)({},N),i)),e.updated_at?(i.diff=parseInt(e.updated_at)-parseInt(e.created_at),x||j(!0)):(i.diff=d()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),I||(T(!0),c=!0)),r||e.updated_at||!c||(t=setTimeout((function(){de()}),1e3))};if(!P)return null;var fe=function(){var t=Object(n.a)(S().mark((function t(){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(w.w)(e,P._id);case 2:(r=t.sent)&&(pe(r),T(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),he=function(){var t=Object(n.a)(S().mark((function t(){var r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return T(!1),t.next=3,Object(w.x)(e,P._id);case 3:(r=t.sent)&&A(Object(a.a)(Object(a.a)({},N),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),me=Object(a.a)({},E.model),ge=[],be=[],ye={};z.forEach((function(e){ye=Object(a.a)(Object(a.a)({},ye),l.cards[e]._timeline||{})})),ye=Object.keys(ye).filter((function(e){return"kpi"===ye[e].type})).map((function(e){return ye[e]}));var ve="time"!==P.kpi_type?parseFloat(ce):0,xe=parseFloat(ce)-parseFloat(le);xe<0&&(xe*=-1),ye&&Object.keys(ye).length>0&&Object.keys(ye).sort((function(e,t){return ye[e].created_at<ye[t].created_at?-1:1})).forEach((function(e,t){ve=parseFloat(ve)+parseFloat(ye[e].value),ge.push({meta:ye[e].value,total:ve,value:parseFloat(ce)>parseFloat(le)?100-Math.floor(100*ve/xe):Math.floor(100*ve/xe)}),be.push(t+1),t+1===Object.keys(ye).length&&(me=Object(a.a)(Object(a.a)({},me),{},{data:{labels:be,series:[[].concat(ge)]},options:Object(a.a)(Object(a.a)({},me.options),{},{low:0,high:100,plugins:[s.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Object(O.h)(e,"time"===P.kpi_type?"number":P.kpi_type)+"<br>"+Object(O.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var _e=ce<le?le-ce:ce-le;ye&&Object.keys(ye).length>0&&Object.keys(ye).forEach((function(e){_e=parseFloat(_e)+parseFloat(ye[e].value)}));var Oe=Math.ceil(ce<le?le-ce:ce-le);return(Oe=100*Math.ceil(_e)/Oe-100)<0&&(Oe*=-1),e.data?c.a.createElement("div",{className:r.root},c.a.createElement("fieldset",null,c.a.createElement("legend",{style:{color:Object(O.d)("color")}},e.manualAdd?Object(O.u)("$__timerLog",1):Object(O.u)("$__timer",1)),e.manualAdd&&c.a.createElement(c.a.Fragment,null,K?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement(m.a,{label:Object(O.u)("$__initialDate",1),variant:Object(O.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"date",inputProps:{max:d()().format("YYYY-MM-DD"),autoComplete:"start-date",onChange:function(e){d()(e.target.value).isValid()&&H(e.target.value);var t=N.updated_at-N.created_at;pe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(e.target.value," 00:00:00")).unix("X"),updated_at:d()("".concat(e.target.value," 00:00:00")).unix("X")+t}),!0,!0)}},value:G}))):c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement(m.a,{label:Object(O.u)("$__initialDate",1),variant:Object(O.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{max:q,autoComplete:"start-date",onChange:function(e){d()(e.target.value).isValid()&&(H(e.target.value),pe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:G})),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"watch_later"}),c.a.createElement(m.a,{label:Object(O.u)("$__finalDate",1),variant:Object(O.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:G,autoComplete:"new-password",onChange:function(e){d()(e.target.value).isValid()&&(V(e.target.value),pe(Object(a.a)(Object(a.a)({},N),{},{updated_at:d()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:q}))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"more_time"}),c.a.createElement("div",{style:{display:"flex",alignItems:"center"}},c.a.createElement(m.a,{label:Object(O.u)("$__hours",1),variant:Object(O.d)("fieldVariant",1),name:"hours",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,autoComplete:"hours",onChange:function(e){ie(e.target.value),Z(!0),G.indexOf("T")>-1&&H(G.substring(0,10)),pe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X"),updated_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X")+60*e.target.value*60+60*te}),!0,!0)}},value:oe,style:{paddingLeft:7,paddingRight:7}}),c.a.createElement(m.a,{label:Object(O.u)("$__minutes",1),variant:Object(O.d)("fieldVariant",1),name:"minutes",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,max:59,autoComplete:"new-password",onChange:function(e){re(e.target.value),Z(!0),G.indexOf("T")>-1&&H(G.substring(0,10)),pe(Object(a.a)(Object(a.a)({},N),{},{created_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X"),updated_at:d()("".concat(G.substring(0,10)," 00:00:00")).unix("X")+60*oe*60+60*e.target.value}),!0,!0)}},value:te,style:{paddingLeft:7,paddingRight:7}}),c.a.createElement(g.a,{title:Object(O.u)("$__reset",1),icon:"update_disabled",color:Object(O.d)("menu"),onClick:function(){Z(!1),H("".concat(G," 00:00:00"))},size:"17px",style:{marginLeft:3,marginRight:3,backgroundColor:"rgba(0,0,0,0.05)",padding:3},transparent:!0}))),c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}}),N&&N.diffText&&c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},N.diffText)),parseInt(l.cards[P._id]._users[u._id].access)>=3?c.a.createElement(k.a,null,c.a.createElement(h.a,{includeMe:!0,data:l.cards[P._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){pe(Object(a.a)(Object(a.a)({},N),{},{to:e}),!0)}})):c.a.createElement(c.a.Fragment,null)),x||e.manualAdd?c.a.createElement("div",null,!e.manualAdd&&N&&N.created_at&&N.updated_at&&N.diffText&&d()(1e3*N.created_at).isValid()&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"schedule"}),c.a.createElement("div",{className:"text"},d()(1e3*N.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"watch_later"}),c.a.createElement("div",{className:"text"},d()(1e3*N.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",icon:"hourglass_full"}),c.a.createElement("div",{className:"text"},N.diffText))),N.created_at<N.updated_at?c.a.createElement(k.a,null,c.a.createElement(f.a,{manualAdd:!!e.manualAdd,data:P,timer:N,manualEntry:K,callBack:function(){j(!1),e.callBack&&e.callBack()}})):c.a.createElement(c.a.Fragment,null)):c.a.createElement("div",{className:r.time},I?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",onClick:function(){Object(O.c)({message:Object(O.u)("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){he()}})}},"pause_circle_filled"),c.a.createElement("div",{className:"text"},N.diffText)):c.a.createElement(c.a.Fragment,null,le&&ve?c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:60*le<ve?"red":"color",icon:"schedule"}),c.a.createElement("div",{className:"text",style:{color:60*le<ve?"red":"grey"}},Object(O.u)("$__timeLeft",1),": ",60*le-ve>-60&&60*le-ve<60?"".concat(60*le-ve," ").concat(Object(O.u)("$__seconds",1)," "):"".concat(Math.trunc((60*le-ve)/60)," ").concat(Object(O.u)("$__minutes",1)," ").concat(60*le-ve-60*Math.trunc((60*le-ve)/60)," ").concat(Object(O.u)("$__seconds",1)," "))):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{className:r.timeInfo},c.a.createElement(p.a,{color:"color",onClick:function(){fe()},title:Object(O.u)("$__playRegisterLogWork")},"play_circle_outline"),c.a.createElement("span",{style:{marginLeft:7,color:Object(O.d)("color")}},Object(O.u)("$__startStopWatch"))))))):c.a.createElement("div",null,"NO DATA RECEIVED")})))},333:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(1),i={containerNoShadow:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",minWidth:"150px",display:"flow-root"}),container:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",minWidth:"150px",display:"flow-root",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(o.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(o.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"relative",float:"left",width:"100%",height:"auto",display:"block"},indicators:{position:"relative",float:"left",height:"auto",zIndex:"0 !important"},indicatorsIcon:{position:"relative",float:"left",margin:"0px 0px","& MuiBadge-badge":{position:"relative",float:"left"}},image:{position:"relative",float:"left",width:"100%",marginTop:"7px",maxWidth:"100%",display:"none"},imagePreview:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%"},imagePreviewList:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",paddingTop:"48%","@media screen and (max-width: 800px)":{width:"100%"}},PreLoader:{top:"calc(50% - 25px)",left:"calc(50% - 25px)",position:"absolute"},description:{position:"relative",float:"left",padding:"5px",minHeight:"75px",width:"100%",overflow:"hidden",textOverflow:"ellipses"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(o.d)("medium"),fontSize:"10px",display:"flex"},lateDates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:"red",fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{minHeight:"20px",minWidth:"40px",zIndex:"0 !important"},users:{position:"absolute",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};t.a=i},34:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(59),a=r(0),o=r.n(a),i=r(157),c=r(885),l=["children","className"],s=Object(i.a)({grid:{margin:"0",width:"100%"}});function u(e){var t=s(),r=e.children,a=e.className,i=Object(n.a)(e,l);return o.a.createElement(c.a,Object.assign({container:!0},i,{className:t.grid+" "+a}),r)}},340:function(e,t,r){"use strict";var n,a=r(86),o=r(7),i=r(2),c=r(8),l=r(5),s=r(0),u=r.n(s),d=r(71),p=r(76),f=r(9),h=r.n(f),m=r(14),g=r(13),b=r(15),y=r(3),v=r(20),x=r(50),_=r(10),O=r(27),w=r(33),j=r(661),E=r(1),k=r(24),S=r(172);function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var C,I=d.b.div(n||(n=Object(a.a)(["\n","\n","\n","\n","\n","\n","\n width:calc(100%) !important\n"])),(function(e){return e.selectable&&e.selected?"\n opacity:1":e.selectable?"\n opacity:0.5":""}),(function(e){return e.locked?"cursor:no-drop !important":"cursor:pointer"}),(function(e){return e.priority&&e.showCard,""}),(function(e){return!e.selectable&&e.selected?"border-bottom:solid 5px ".concat(Object(E.d)("color")):""}),(function(e){return e.isDragDisable?"":e.isDragging?"\n opacity:0.88\n max-width:320px":""}),(function(e){return e.inLine?"position:relative\n float:left\n margin:1px\n width:calc(20% - 7px)\n // maxWidth:320px\n ":"\n width:calc(100%) !important\n margin:1px 0px 1px 0px\n "})),T=Object(m.b)((function(){return{}}),(function(e){return Object(g.b)(b,e)}))(Object(w.a)(j.a)((function(e){var t=e.classes,r=y.a.getState().db,n=e.data&&e.data._id?y.a.getState().db.cards[e.data._id]:{},a=u.a.useState(n.name?n.name:""),o=Object(l.a)(a,2),s=o[0],d=o[1],p=u.a.useState(!1),f=Object(l.a)(p,2),h=f[0],m=f[1],g=u.a.useState(!1),b=Object(l.a)(g,2),w=b[0],j=b[1],C=function(){var t=Object(c.a)(L().mark((function t(r){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.N)(Object(i.a)(Object(i.a)({},e),{},{data:{_id:n._id}}),r),m(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var e=Object(c.a)(L().mark((function e(){return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(E.c)({message:Object(E.u)("$__confirmDeleteThisFullDescription",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){C({deleted:!0})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return u.a.createElement(I,Object.assign({},e.provided&&e.provided.draggableProps,e.key?{key:e.key}:{},{ref:e.provided&&e.provided.innerRef,isDragging:e.snapshot&&e.snapshot.isDragging,isDragDisable:n.isDragDisable||e.isDragDisable||!1,inLine:e.inLine,selectable:e.showSelected,selected:n._selected,priority:n.priority?r.priority.filter((function(e){return String(e.value)===String(n.priority)}))[0].color:null,locked:e.locked||!1,className:e.showCard?t.cardContainer:t.container}),u.a.createElement("div",e.provided&&e.provided.dragHandleProps,h?u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px",display:"flex",alignItems:"center"}},u.a.createElement("div",{style:{width:"calc(100% - 50px)",display:"flex"}},u.a.createElement(O.a,{label:Object(E.u)("$__taskTitle"),variant:Object(E.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){d(e.target.value)},onBlur:function(e){""===e.target.value&&m(!h)},onKeyDown:function(e){13===e.keyCode&&s&&C({name:s}),27===e.keyCode&&(m(!h),d())}},autoFocus:!0,value:s,placeholder:Object(E.u)("$__taskTitlePlaceholder")})),u.a.createElement("div",{style:{display:"flex"}},u.a.createElement("div",{onClick:function(){return C({name:s})}},u.a.createElement(_.a,{color:"green",icon:"save",title:Object(E.u)("$__save","*"),size:e.actionsSize||"25px"})),u.a.createElement("div",{onClick:function(){m(!h),d("")}},u.a.createElement(_.a,{color:Object(E.d)("medium"),icon:"cancel",title:Object(E.u)("$__cancel","*"),size:e.actionsSize||"25px"}))))):u.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:function(){j(!0)},onMouseLeave:function(){j(!1)}},u.a.createElement("div",Object.assign({style:{width:"100%",padding:"0px 7px",wordBreak:"break-word"},onDoubleClick:function(){m(!h)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?u.a.createElement(x.a,{db:"cards",cardId:e.data._id,viewTimer:!0,viewAllName:!0}):n.name?n.name:Object(E.u)("$__new",1)),"completed"!==n.status||e.showCard?u.a.createElement(u.a.Fragment,null):u.a.createElement("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:"rgba(0,0,0,0.05)",display:"flex",alignItems:"center"}},u.a.createElement("div",{style:{position:"absolute",top:"50%",marginLeft:15,height:1,width:"calc(100% - 50px)",backgroundColor:"rgba(0,0,0,0.1)"}}),n.completed_at?u.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},Object(E.k)(n.completed_at)):u.a.createElement(u.a.Fragment,null)),w&&e.permission&&!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&u.a.createElement("div",{style:{display:"flex",alignItems:"center"}},u.a.createElement(v.a,{title:Object(E.u)("$__undoConclude",1),color:"lightgrey",icon:"delete_forever",onClick:function(){return T()},transparent:!0}),n.checklist?u.a.createElement(v.a,{title:Object(E.u)("$__turnIntoActivity",1),color:"lightgrey",icon:"change_circle",onClick:function(){Object(E.c)({message:Object(E.u)("$__confirmTurnIntoActivity",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){C({checklist:null})}})},transparent:!0}):u.a.createElement(u.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&u.a.createElement(v.a,{title:"completed"!==n.status?Object(E.u)("$__conclude",1):Object(E.u)("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){n._hasStep?Object(S.a)(Object(i.a)(Object(i.a)({},e),{},{nodeId:n._id})):Object(k.I)(e,n)},transparent:!0}))),e.locked?u.a.createElement("div",{style:{position:"absolute",backgroundColor:"rgba(233,233,233,0.88)",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},u.a.createElement("div",{style:{display:"flex"}},u.a.createElement(_.a,{color:"lightgray",icon:"lock",size:"22px"}))):u.a.createElement(u.a.Fragment,null))}))),F=r(60),D=r(45);function N(){N=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var A=d.b.div(C||(C=Object(a.a)(["\n background-color:none\n ","\n "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""}));t.a=Object(m.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(g.b)(b,e)}))((function(e){var t=y.a.getState(),r=t.db,n=t.session,a=y.a.getState().functions.socket,s=u.a.useState(!1),d=Object(l.a)(s,2),f=d[0],m=d[1],g=h()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),b=window.location.hash.split("/");b[0]=b[0].replace("#",""),36!==b[0].length&&(b[0]=null);var x={};y.a.getState().db[e.db]&&y.a.getState().db[e.db][e.nodeId]&&(x=y.a.getState().db[e.db][e.nodeId]);var _=Object.keys(y.a.getState().db.cards).filter((function(t){return!(e.myDay||"step"===y.a.getState().db.cards[t].type||!(!e.noChecklist&&y.a.getState().db.cards[t]&&!y.a.getState().db.cards[t].deleted&&y.a.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!y.a.getState().db.cards[t].deleted&&y.a.getState().db.cards[t]._parent===e.nodeId))||!(!(e.myDay&&r.cards[t]._users&&r.cards[t]._users[n._id]&&r.cards[t]._users[n._id].myDay&&h()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===g&&y.a.getState().db.cards[t])||y.a.getState().db.cards[t].deleted)})).sort((function(e,t){var n=r.cards[e]&&r.cards[e].order&&!r.cards[e].order.low?parseInt(r.cards[e].order):r.cards[e].order&&r.cards[e].order.low?parseInt(r.cards[e].order.low):0,a=r.cards[t]&&r.cards[t].order&&!r.cards[t].order.low?parseInt(r.cards[t].order):r.cards[t].order&&r.cards[t].order.low?parseInt(r.cards[t].order.low):0;return n<a?-1:n>a?1:0})).map((function(e){return e})),O=function(){var t=Object(c.a)(N().mark((function t(n){var c,l,s,u,d;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m(!1),c=n.destination,l=n.source,s=n.draggableId,c){t.next=4;break}return t.abrupt("return",!1);case 4:if(c.droppableId!==l.droppableId||c.id!==l.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(u=Array.from(_.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){var n=r.cards[e].order||0;String(n.low)&&(n=parseInt(n.low));var a=r.cards[t].order||0;return String(a.low)&&(a=parseInt(a.low)),n<a?-1:n>a?1:0})).map((function(e){return e})))).splice(l.index,1),t.next=10,setTimeout(500);case 10:return u.splice(c.index,0,s),t.next=13,setTimeout(500);case 13:return a.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),d=Object(i.a)({},y.a.getState().db.cards),t.next=17,new Promise((function(e,t){u.forEach((function(t,r){d=Object(i.a)(Object(i.a)({},d),{},Object(o.a)({},t,Object(i.a)(Object(i.a)({},d[t]),{},{order:"".concat(r+1)}))),r+1===u.length&&e(!0)}))}));case 17:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(i.a)(Object(i.a)({},r),{},{cards:Object(i.a)(Object(i.a)({},r.cards),d)})),t.abrupt("return");case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=function(){var e=Object(c.a)(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(c.a)(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=_.filter((function(e){return"completed"!==r.cards[e].status})).sort((function(e,t){var n=r.cards[e]&&r.cards[e].order&&!r.cards[e].order.low?parseInt(r.cards[e].order):r.cards[e].order&&r.cards[e].order.low?parseInt(r.cards[e].order.low):0,a=r.cards[t]&&r.cards[t].order&&!r.cards[t].order.low?parseInt(r.cards[t].order):r.cards[t].order&&r.cards[t].order.low?parseInt(r.cards[t].order.low):0;return n<a?-1:n>a?1:0}));return u.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.permission?u.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",padding:"3px 10px",justifyContent:"center"}},u.a.createElement("div",{style:{marginRight:15}},Object(E.u)("$__requireConcludedByStep")),u.a.createElement(F.a,{checked:!!x.listStepLock,onChange:function(){Object(k.N)(Object(i.a)(Object(i.a)({},e),{},{data:{_id:x._id}}),{listStepLock:!x.listStepLock})},name:"listStepLock",inputProps:{"aria-label":"secondary checkbox"}}),u.a.createElement(v.a,{title:Object(E.u)("$__openBoard"),text:Object(E.u)("$__openBoard"),color:"lightgrey",textColor:"lightgrey",icon:"open_in_new",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().control),{},{board:e.nodeId})),e.reduxFunction("ASYNC","CLEAR_MODULE")},size:"25px"})):u.a.createElement(u.a.Fragment,null),e.showProgress&&_.length>0?u.a.createElement("div",{style:{position:"relative",width:"100%"}},u.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:Object(E.d)("menu"),fontWeight:"bold"}},_.filter((function(e){return"completed"===r.cards[e].status})).length,"/",u.a.createElement("span",{style:{fontWeight:"normal"}},_.length)),u.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},u.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:Object(E.d)("menu"),width:"".concat(100/_.length*_.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):u.a.createElement(u.a.Fragment,null),_.filter((function(e){return"completed"!==r.cards[e].status})).length>0?u.a.createElement(p.a,{onDragEnd:O,onDragStart:w,onDragUpdate:j},u.a.createElement(p.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return u.a.createElement(A,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),S.map((function(t,n){return u.a.createElement(p.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(a,o){return u.a.createElement(T,{dragStatus:f,provided:a,snapshot:o,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!(r.cards[t].checklist&&(!r.cards[t].checklist||!e.showCard&&!r.cards[t].showCard)),permission:e.permission,locked:x.listStepLock&&n>0&&"completed"!==r.cards[S[n-1]].status})}))})),t.placeholder)}))):u.a.createElement(u.a.Fragment,null),(e.permission||e.myDay)&&u.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},u.a.createElement(D.a,{text:Object(E.u)("$__new","*"),icon:"add_box",iconColor:Object(E.d)("color"),onClick:function(){var t,r,n,a,o;e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().control),{},{myDay:!!e.myDay,addCard:{myDay:!!e.myDay,_parent:(null===(t=x)||void 0===t?void 0:t._id)||null,rows:_.length,type:x&&x.type&&(null===(r=x)||void 0===r||null===(n=r.type)||void 0===n?void 0:n.indexOf("guideline"))>-1?"objective":"objective"===(null===(a=x)||void 0===a?void 0:a.type)?"goal":(null===(o=x)||void 0===o||o.type,"task")}}))},style:{padding:7}}),e.myDay?u.a.createElement(u.a.Fragment,null):u.a.createElement(D.a,{text:Object(E.u)("$__newSimpleTask","*"),icon:"playlist_add",iconColor:Object(E.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().control),{},{myDay:e.myDay||!1,checklist:!0,addCard:{_parent:x._id,rows:_.length,type:x.type.indexOf("guideline")>-1?"objective":"objective"===x.type?"goal":(x.type,"task"),checklist:!0}}))},style:{padding:7}})),_.filter((function(e){return"completed"===r.cards[e].status})).length>0?u.a.createElement(u.a.Fragment,null,_.filter((function(e){return"completed"===r.cards[e].status})).sort((function(e,t){var n=0,a=0;return r.cards[e].completed_at&&r.cards[e].completed_at.low&&(n=parseInt(r.cards[e].completed_at.low)),r.cards[t].completed_at&&r.cards[t].completed_at.low&&(a=parseInt(r.cards[t].completed_at.low)),n>a?-1:n<a?1:0})).map((function(t,n){return u.a.createElement("div",{key:"".concat(t).concat(n)},u.a.createElement(T,{dragStatus:f,data:r.cards[t],db:"cards",selectable:!0,noDelete:!!e.noDelete&&e.noDelete,showCard:!(r.cards[t].checklist&&(!r.cards[t].checklist||!e.showCard&&!r.cards[t].showCard)),permission:e.permission,locked:x.listStepLock&&n>0&&S[n-1]&&r.cards[S[n-1]]&&"completed"!==r.cards[S[n-1]].status}))}))):u.a.createElement(u.a.Fragment,null))}))},376:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(9),s=r.n(l),u=r(15),d=r(3),p=r(13),f=r(14),h=r(155),m=r(20),g=r(10),b=r(27),y=r(331),v=r(142),x=r(723),_=r(546),O=r(545),w=r(477),j=r(285),E=r(722),k=r(346),S=r(544),L=r(147),C=r(157),I=r(724),T=r(24),F=r(1),D=r(77),N=r(39);function A(){A=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var P=Object(C.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0,borderRadius:"50%"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},"& .MuiAvatarGroup-avatar":{border:"none",zIndex:0,borderRadius:"50%"}}}}));t.a=Object(f.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(p.b)(u,e)}))((function(e){var t=P(),r=c.a.useRef(null),i=d.a.getState(),l=i.db,u=i.session,p=c.a.useState(l.cards[e._id]||{}),f=Object(o.a)(p,2),C=f[0],$=f[1],M=c.a.useState(!!e.open),z=Object(o.a)(M,2),Y=z[0],B=z[1],R=c.a.useState([]),G=Object(o.a)(R,2),H=G[0],W=G[1],U=c.a.useState([]),q=Object(o.a)(U,2),V=q[0],J=q[1],X=c.a.useState(""),K=Object(o.a)(X,2),Z=K[0],Q=K[1],ee=c.a.useState(!1),te=Object(o.a)(ee,2),re=te[0],ne=te[1],ae=c.a.useState(!1),oe=Object(o.a)(ae,2),ie=oe[0],ce=oe[1],le=c.a.useState(Object(T.u)(C._id)),se=Object(o.a)(le,2),ue=se[0],de=se[1];c.a.useEffect((function(){return de(Object(T.u)(C._id)),function(){}}),[e.users]),c.a.useEffect((function(){l.cards[e._id]&&JSON.stringify(l.cards[e._id])!==JSON.stringify(C)&&($(l.cards[e._id]),de(Object(T.u)(C._id)))}),[e.cards]);var pe=Object(F.j)(),fe=Object(T.t)(C._id),he=!1;fe>3&&(he=!0),!he&&pe.plan&&pe.planAdmin&&(he=!0);var me=window.location.hash.split("/");function ge(e){"Tab"===e.key&&(e.preventDefault(),B(!1))}me[0]=me[0].replace("#","");var be=function(){var t=Object(a.a)(A().mark((function t(r,n){var a,o;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=1,C&&"plan"===C.type&&(a=3),n?a=n:C._planId&&l.cards[C._planId]&&l.cards[C._planId]._users&&l.cards[C._planId]._users[r]&&l.cards[C._planId]._users[r].access&&(a=C._parent&&l.cards[C._parent]&&l.cards[C._parent]._users&&l.cards[C._parent]._users[r]&&l.cards[C._parent]._users[r].access&&parseInt(l.cards[C._parent]._users[r].access)>parseInt(l.cards[C._planId]._users[r].access)?parseInt(l.cards[C._parent]._users[r].access):parseInt(l.cards[C._planId]._users[r].access)),o=!!(C&&C._users&&C._users[r]),t.next=6,Object(D.b)(e,r,a,C._id,o);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),ye=function(){var e=Object(a.a)(A().mark((function e(t){return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:N.a.put("cards/removeAccess/",{cardId:C._id,userIds:H}),W([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var t=Object(a.a)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:V.forEach((function(t){Object(T.J)(e,{_id:C._id,userId:t,option:!0})})),ce(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),xe=function(e){var t=e.data;return c.a.createElement(j.a,null,t.label,c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}}))},_e=function(t){var r=t.pr,a=!1;e.permission&&(a=!0);var o=!1;C._users&&C._users[r]&&C._users[r].myDay&&C._users[r].myDay&&s()(1e3*parseInt(C._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===s()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0);var i=!!(Object.keys(ue).length>1&&ue[r]&&ue[r].isResponsible),l=!!(e.customDefine&&e.customDefine.name&&Object.keys(ue).length>1&&ue[r]&&ue[r][e.customDefine.name]),u=ue[r]?ue[r]:C._users[r];return c.a.createElement(j.a,{onClick:a?function(){}:null,disabled:!a},c.a.createElement("div",{style:Object(n.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},a?{}:{cursor:"pointer"})},c.a.createElement("div",{style:Object(n.a)(Object(n.a)({width:"33px",height:"33px",borderRadius:"50%"},e.customDefine?{border:l?"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:u.image?'url("'.concat(u.image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center",marginRight:7}),src:u.image||null},!u.image&&u&&u.name?u.name.substr(0,1):""),u.name||u.name,c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},!e.customDefine&&C._users[r]&&!C._users[r].isResponsible&&he?c.a.createElement(m.a,{title:Object(F.u)("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){Object(F.c)({message:Object(F.u)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Object(D.l)(e,{cardId:C._id,userId:r})}})},size:"25px"}):c.a.createElement(c.a.Fragment,null),e.customDefine&&C._users[r]&&he?c.a.createElement(m.a,{title:Object(F.u)(C._users[r][e.customDefine.name]?"$__removeThe".concat(e.customDefine.name):"$__defineAs".concat(e.customDefine.name),1),color:C._users[r][e.customDefine.name]?"green":"lightgray",icon:e.customDefine&&e.customDefine.icon||"check",onClick:function(){Object(F.c)({message:Object(F.u)(C._users[r][e.customDefine.name]?"$__confirmUnSetAs".concat(e.customDefine.name):"$__confirmSetAs".concat(e.customDefine.name),1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Object(D.q)(e,{cardId:C._id,userId:r,param:e.customDefine.name,on:!C._users[r][e.customDefine.name]})}})},size:"25px"}):c.a.createElement(c.a.Fragment,null),e.customDefine?c.a.createElement(c.a.Fragment,null):c.a.createElement(h.a,Object.assign({},ie?{checked:!!(o||V.indexOf(r)>-1)}:{checked:!!C._users[r]},{disabled:!(!ie||!o),onClick:a?function(){if(ie){var e=Array.from(V);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),J(e)}else!function(e){var t=Array.from(H);C._users[e]&&-1===t.indexOf(e)?(t.push(e),W(t)):C._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),W(t)):C._users[e]||be(e)}(r)}:null,color:"default"}))),H.indexOf(r)>-1&&c.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}})))};return c.a.createElement("div",{id:"quickUser",onClick:function(e){e.stopPropagation()}},c.a.createElement(w.a,{ref:r,"aria-controls":Y?"menu-list-grow":void 0,"aria-haspopup":"true",id:"quick_388","aria-label":"menu",onClick:function(t){(e.permission||C&&C._users&&C._users[u._id]&&C._users[u._id].access&&parseInt(C._users[u._id].access)>3)&&(B((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},c.a.createElement(y.a,Object.assign({data:C||{}},e&&e.customDefine?{customDefine:e.customDefine}:{}))),c.a.createElement(S.a,{open:Y,anchorEl:r.current,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return c.a.createElement(O.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",minHeight:"50px",overflowY:"auto"},id:"quick_417"}),c.a.createElement(k.a,null,c.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:H&&H.length>0||V&&V.length>0?"50px":0,display:"flex",justifyContent:"space-between"}},c.a.createElement(_.a,{onClickAway:function(){B(!1),ce(!1),J([])}},c.a.createElement("div",null,re&&c.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},c.a.createElement(b.a,{id:"quickUser_Search",label:Object(F.u)("$__searchByName",1),variant:Object(F.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(I.a,{position:"end",style:{cursor:"pointer"},onClick:function(){Q(""),ne(!1)}},c.a.createElement(g.a,{icon:"close"})),onChange:function(e){Q(e.target.value)},onBlur:function(e){}},value:Z,placeholder:Object(F.u)("$__searchByName",1),autoFocus:!0})),c.a.createElement(E.a,{autoFocusItem:Y,id:"menu-list-grow",onKeyDown:ge},ie?c.a.createElement("div",{style:{position:"relative",overflow:"auto"}},c.a.createElement(j.a,{disabled:!0},Object(F.u)("$__selectUsersToMyDay","*")),Object.keys(C._users).filter((function(e){return e!==u._id})).sort((function(e,t){var r,n,a,o;return(null===(r=C._users[e])||void 0===r?void 0:r.name)&&(null===(n=C._users[t])||void 0===n?void 0:n.name)&&C._users[e].name.toLowerCase()<C._users[t].name.toLowerCase()?-1:(null===(a=C._users[e])||void 0===a?void 0:a.name)&&(null===(o=C._users[t])||void 0===o?void 0:o.name)&&C._users[e].name.toLowerCase()>C._users[t].name.toLowerCase()?1:0})).map((function(e){return c.a.createElement(_e,{pr:e,key:e})}))):c.a.createElement("div",null,e.types&&e.types.indexOf("teams")>-1?c.a.createElement(c.a.Fragment,null,c.a.createElement(j.a,{disabled:!0},Object(F.u)("$__usersGroups","*")),d.a.getState().db.userGroup.map((function(e){return c.a.createElement(xe,{data:e,key:e.value})}))):c.a.createElement(c.a.Fragment,null),c.a.createElement(j.a,{disabled:!0},Object(F.u)("$__users","*")),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"user"!==ue[t].type||ue[t].deleted||ue[t]._parent||!(!e.customDefine||e.customDefine&&C._users[t]))})).sort((function(e,t){return ue[e].name<ue[t].name?-1:ue[e].name>ue[t].name?1:0})).map((function(e){return ue&&ue[e]&&ue[e]._id&&c.a.createElement(_e,{pr:e,key:e})})),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"external"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).length>0&&c.a.createElement(j.a,{disabled:!0},Object(F.u)("$__UnityUsers","*")),Object.keys(ue).filter((function(t){return(!Z||Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)&&"external"===ue[t].type&&!ue[t].deleted&&(!e.customDefine||e.customDefine&&C._users[t])})).sort((function(e,t){return ue[e].name<ue[t].name?-1:ue[e].name>ue[t].name?1:0})).map((function(e){return ue&&ue[e]&&ue[e]._id&&c.a.createElement(_e,{pr:e,key:e})})),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"consultant"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).length>0&&c.a.createElement(j.a,{disabled:!0},Object(F.u)("$__planningUsers","*")),Object.keys(ue).filter((function(t){return!(Z&&!(Z&&ue[t].name.toLowerCase().indexOf(Z.toLowerCase())>-1)||"consultant"!==ue[t].type||ue[t].deleted||!(!e.customDefine||e.customDefine&&C._users[t]))})).sort((function(e,t){return ue[e].name<ue[t].name?-1:ue[e].name>ue[t].name?1:0})).filter((function(e){return ue&&ue[e]&&ue[e]._id})).map((function(e){return c.a.createElement(_e,{pr:e,key:e})})))),re||ie?c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:15,top:10}},c.a.createElement(m.a,{title:Object(F.u)("$__searchUser",1),color:Object(F.d)("menu"),icon:"search",onClick:function(){ne(!0)},size:"25px"})),e.customDefine||re||ie||!he?ie?c.a.createElement("div",{style:{position:"absolute",right:15,top:10}},c.a.createElement(m.a,{title:Object(F.u)("$__back",1),color:Object(F.d)("menu"),icon:"arrow_back",onClick:function(){ce(!1)},size:"25px"})):c.a.createElement(c.a.Fragment,null):c.a.createElement("div",{style:{position:"absolute",right:45,top:10}},c.a.createElement(m.a,{title:Object(F.u)("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){ce(!0)},size:"25px"}))))),H&&H.length>0&&c.a.createElement("div",{style:{position:"absolute",bottom:"0px",padding:"7px",backgroundColor:"red",width:"100%",display:"flex",justifyContent:"space-between",color:"#FFFFFF",alignItems:"center",zIndex:10},onClick:function(e){e.preventDefault(),e.stopPropagation()}},Object(F.u)("$__confirmSelectedUsersRemove"),c.a.createElement(m.a,{title:Object(F.u)("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){ye()},size:"25px",transparent:!0})),ie&&V&&V.length>0&&c.a.createElement("div",{style:{position:"absolute",bottom:"0px",padding:"7px",backgroundColor:"orange",width:"100%",display:"flex",justifyContent:"space-between",color:"#FFFFFF",alignItems:"center"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},c.a.createElement(x.a,{style:{flexWrap:"wrap"}},V.map((function(e,t){return e&&d.a.getState().db.users[e]?c.a.createElement(L.a,{title:d.a.getState().db.users[e].name,key:e},c.a.createElement(v.a,{alt:d.a.getState().db.users[e].name,src:d.a.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},d.a.getState().db.users[e].name.substr(0,1))):c.a.createElement(c.a.Fragment,null)}))),c.a.createElement(m.a,{title:Object(F.u)("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){ve()},size:"25px",transparent:!0}))))})))}))},38:function(e,t,r){"use strict";var n=r(30),a=r(31),o=r(40),i=r(41),c=r(0),l=r.n(c),s=r(530),u=r.n(s),d=r(479),p=r(1),f=r(39),h=function(e){Object(o.a)(r,e);var t=Object(i.a)(r);function r(e){var a;return Object(n.a)(this,r),(a=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},a}return Object(a.a)(r,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t});var r={hostname:window.location.hostname,pathname:window.location.pathname,hash:window.location.hash,message:e.message,stack:t.componentStack,component:t.componentStack};f.a.post("/ErrorBoundary/add",{_id:Object(d.a)(),uid:u.a.MD5(JSON.stringify(r)).toString(),origin:"web",error:r}),console.log({SUPPORT_ID:u.a.MD5(JSON.stringify(e)).toString(),error:{hostname:window.location.hostname,pathname:window.location.pathname,hash:window.location.hash,message:e.message,stack:t.componentStack,component:t.componentStack}})}},{key:"render",value:function(){return this.state.hasError?l.a.createElement("div",null,Object(p.u)("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(l.a.Component);t.a=h},384:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M20.45,5.43,19,4l-1.79,1.8,1.41,1.41ZM13,1.52H11v3h2Zm7,12h3v-2H20ZM9,17.67v4.81h6V17.67a6,6,0,1,0-6,0ZM4,13.48v-2H1v2ZM6.76,5.82,5,4,3.56,5.43l1.8,1.79Z"}),a.default.createElement("path",{d:"M20.45,5.43,19,4l-1.79,1.8,1.41,1.41ZM13,1.52H11v3h2Zm7,12h3v-2H20ZM9,17.67v4.81h6V17.67a6,6,0,1,0-6,0ZM4,13.48v-2H1v2ZM6.76,5.82,5,4,3.56,5.43l1.8,1.79Z"})),"Ideas");t.default=o},39:function(e,t,r){"use strict";var n=r(8),a=r(387),o=r.n(a);function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};u(x,c,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,c)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),u(w,s,"Generator"),u(w,c,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var c=o.a.create({baseURL:"https://ws.machen.ai"});o.a.defaults.withCredentials=!0,c.interceptors.request.use(function(){var e=Object(n.a)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=localStorage.getItem("TOKEN"))&&(t.headers.Authorization="Bearer ".concat(r),t.headers.Accept="application/json;charset=UTF-8;application/x-www-form-urlencoded"),e.abrupt("return",t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c.interceptors.response.use(function(){var e=Object(n.a)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){var t=Promise.reject(e.response);return e&&e.response&&e.response.status&&401===e.response.status&&"/login"!==window.location.pathname&&"/register"!==window.location.pathname&&"/activate"!==window.location.pathname&&(localStorage.setItem("TOKEN",null),localStorage.clear(),window.open("/login","_self")),t})),t.a=c},429:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(10),l=r(157),s=r(1185),u=r(1),d=Object(l.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Object(u.d)("medium")},box:{width:"70vw",height:"80vh",backgroundColor:"#FFFFFF",boxShadow:"0 0 6px rgba(0,0,0,0.3)",padding:"30px",overflowY:"auto"},title:{fontSize:"20px",fontWeight:"bold",marginBottom:"7px"},iconList:{},list:{position:"relative",width:"100%",float:"left",marginBottom:"30px"},icon:{position:"relative",float:"left",width:"50px",height:"50px"}}}));function p(e){var t=d(),r=i.a.useState(!1),o=Object(a.a)(r,2),l=o[0],p=o[1],h=i.a.useState(e.icon?e.icon:"add_photo_alternate"),m=Object(a.a)(h,2),g=m[0],b=m[1];return i.a.useEffect((function(){b(e.icon)}),[e.icon]),i.a.createElement("div",{style:Object(n.a)({},e.style?e.style:{})},l?i.a.createElement(s.a,{className:t.backdrop,open:l,onClick:function(){return p(!1)}},i.a.createElement("div",{className:t.box},f&&Object.keys(f).map((function(r,n){return i.a.createElement("div",{key:n,className:t.list},i.a.createElement("div",{className:t.title},r),i.a.createElement("div",{className:t.iconList},f[r]&&f[r].map((function(r,n){return i.a.createElement("div",{key:n,className:t.icon},i.a.createElement(c.a,{icon:r,size:"30px",color:e.color?e.color:Object(u.d)("color"),onClick:function(){b(r),p(!1),e.callBack&&e.callBack(r),e.onChange&&e.onChange(r)}}))}))))})))):i.a.createElement(c.a,{icon:g,color:e.color?e.color:Object(u.d)("color"),size:e.size||"30px",onClick:function(){e.onChange&&p(!0)}}))}var f={Action:["3d_rotation","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","add_shopping_cart","addchart","admin_panel_settings","alarm","alarm_add","alarm_off","alarm_on","all_inbox","all_out","analytics","anchor","android","announcement","api","app_blocking","arrow_circle_down","arrow_circle_up","arrow_right_alt","article","aspect_ratio","assessment","view_comfy","view_comfy_ind","view_comfy_late","view_comfy_return","view_comfy_returned","view_comfy_turned_in","autorenew","backup","backup_table","batch_prediction","book","bookmark","bookmark_border","bookmarks","bug_report","build","build_circle","cached","calendar_today","calendar_view_day","camera_enhance","cancel_schedule_send","card_giftcard","card_membership","card_travel","change_history","check_circle","check_circle_outline","chrome_reader_mode","class","close_fullscreen","code","comment_bank","commute","compare_arrows","contact_support","contactless","copyright","credit_card","dashboard","date_range","delete","delete_forever","delete_outline","description","dns","done","done_all","done_outline","donut_large","donut_small","drag_indicator","dynamic_form","eco","eject","euro_symbol","event","event_seat","exit_to_app","explore","explore_off","extension","face","fact_check","favorite","favorite_border","feedback","filter_alt","find_in_page","find_replace","fingerprint","flaky","flight_land","flight_takeoff","flip_to_back","flip_to_front","g_translate","gavel","get_app","gif","grade","grading","group_work","help","help_center","help_outline","highlight_alt","highlight_off","history","history_toggle_off","home","horizontal_split","hourglass_disabled","hourglass_empty","hourglass_full","http","https","important_devices","info","input","integration_instructions","invert_colors","label","label_important","label_off","language","launch","leaderboard","line_style","line_weight","list","lock","lock_open","login","loyalty","markunread_mailbox","maximize","mediation","minimize","model_training","next_plan","not_accessible","not_started","note_add","offline_bolt","offline_pin","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_with","outlet","pageview","pan_tool","payment","pending","pending_actions","perm_camera_mic","perm_contact_calendar","perm_data_setting","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","pets","picture_in_picture","picture_in_picture_alt","plagiarism","play_for_work","polymer","power_settings_new","pregnant_woman","preview","print","privacy_tip","query_builder","question_answer","quickreply","receipt","record_voice_over","redeem","remove_shopping_cart","reorder","report_problem","restore","restore_from_trash","restore_page","room","rounded_corner","rowing","rule","schedule","search","search_off","settings","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_voice","shop","shop_two","shopping_bag","shopping_basket","shopping_cart","smart_button","source","speaker_notes","speaker_notes_off","spellcheck","star_rate","stars","sticky_note_2","store","subject","subtitles_off","supervised_user_circle","supervisor_account","support","swap_horiz","swap_horizontal_circle","swap_vert","swap_vertical_circle","sync_alt","system_update_alt","tab","tab_unselected","table_view","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","theaters","thumb_down","thumb_up","thumbs_up_down","timeline","toc","today","toll","touch_app","tour","track_changes","translate","trending_down","trending_flat","trending_up","turned_in","turned_in_not","update","upgrade","verified","verified_user","vertical_split","view_agenda","view_array","view_carousel","view_column","view_day","view_headline","view_list","view_module","view_quilt","view_sidebar","view_stream","view_week","visibility","visibility_off","voice_over_off","watch_later","wifi_protected_setup","work","work_off","work_outline","wysiwyg","youtube_searched_for","zoom_in","zoom_out"],Alert:["add_alert","auto_delete","error","error_outline","notification_important","warning"],Av:["4k","5g","add_to_queue","airplay","album","art_track","av_timer","branding_watermark","call_to_action","closed_caption","closed_caption_disabled","control_camera","equalizer","explicit","fast_forward","fast_rewind","featured_play_list","featured_video","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","forward_10","forward_30","forward_5","games","hd","hearing","hearing_disabled","high_quality","library_add","library_add_check","library_books","library_music","loop","mic","mic_none","mic_off","missed_video_call","movie","music_video","new_releases","not_interested","note","pause","pause_circle_filled","pause_circle_outline","play_arrow","play_circle_filled","play_circle_outline","playlist_add","playlist_add_check","playlist_play","queue","queue_music","queue_play_next","radio","recent_actors","remove_from_queue","repeat","repeat_one","replay","replay_10","replay_30","replay_5","shuffle","skip_next","skip_previous","slow_motion_video","snooze","sort_by_alpha","speed","stop","stop_circle","subscriptions","subtitles","surround_sound","video_call","video_label","video_library","video_settings","videocam","videocam_off","volume_down","volume_mute","volume_off","volume_up","web","web_asset"],Communication:["add_ic_call","alternate_email","business","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","cancel_presentation","chat","chat_bubble","chat_bubble_outline","clear_all","comment","contact_mail","contact_phone","contacts","desktop_access_disabled","dialer_sip","dialpad","domain_disabled","domain_verification","duo","email","forum","forward_to_inbox","hourglass_bottom","hourglass_top","import_contacts","import_export","invert_colors_off","list_alt","live_help","location_off","location_on","mail_outline","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","message","mobile_screen_share","more_time","nat","no_sim","pause_presentation","person_add_disabled","person_search","phone","phone_disabled","phone_enabled","phonelink_erase","phonelink_lock","phonelink_ring","phonelink_setup","portable_wifi_off","present_to_all","print_disabled","qr_code","qr_code_scanner","read_more","ring_volume","rss_feed","screen_share","sentiment_satisfied_alt","speaker_phone","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","stop_screen_share","swap_calls","textsms","unsubscribe","voicemail","vpn_key","wifi_calling"],Content:["add","add_box","add_circle","add_circle_outline","amp_stories","archive","backspace","ballot","biotech","block","calculate","clear","contant_copy","content_cut","content_paste","create","delete_sweep","drafts","dynamic_feed","file_copy","filter_list","flag","font_download","foward","gesture","how_to_reg","how_to_vote","inbox","insights","link","link_off","low_priority","mail","markunread","move_to_inbox","next_week","outlined_flag","policy","push_pin","redo","remove","remove_circle","remove_circle_outline","reply","reply_all","report","report_off","save","save_alt","select_all","send","sort","square_foot","text_format","unarchive","undo","waves","weekend","where_to_vote"],Device:["access_alarm","access_time","ad_units","add_alarm","add_to_home_screen","airplanemode_active","airplanemode_inactive","battery_alert","battery_charging_full","battery_full","battery_std","battery_unknown","bluetooth","bluetooth_connected","bluetooth_disabled","bluetooth_searching","brightness_auto","brightness_high","brightness_low","brightness_medium","data_usage","developer_mode","devices","dvr","gps_fixed","gps_not_fixed","gps_off","graphic_eq","location_disabled","location_searching","mobile_friendly","mobile_off","nfc","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","sd_storage","settings_system_daydream","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_null","signal_cellular_off","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_off","storage","usb","wallpaper","widgets","wifi_lock","wifi_tethering"],Editor:["add_comment","attach_file","attach_money","bar_chart","border_all","border_bottom","border_clear","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","bubble_chart","drag_handle","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_reset","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_list_numbered_rtl","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underlined","functions","height","highlight","horizontal_rule","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_photo","linear_scale","merge_type","mode_comment","monetization_on","money_off","multiline_chart","notes","pie_chart","post_add","publish","scatter_plot","score","short_text","show_chart","space_bar","strikethrough_s","subscript","superscript","table_chart","table_rows","text_fields","title","vertical_align_bottom","vertical_align_center","vertical_align_top","wrap_text"],File:["attach_email","attachment","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_quere","cloud_upload","create_new_folder","folder","folder_open","folder_shared","request_quote","rule_folder","snippet_folder","text_snippet","topic"],Hardware:["browser_not_supported","cast","cast_connected","cast_for_education","computer","desktop_mac","desktop_windows","developer_board","device_hub","device_unknown","devices_other","dock","gamepad","headset","headset_mic","keyboard","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_hide","keyboard_return","keyboard_tab","keyboard_voice","laptop","laptop_chromebook","laptop_mac","laptop_windows","memory","mouse","phone_android","phone_iphone","phonelink","phonelink_off","point_of_sale","power_input","router","scanner","security","sim_card","smartphone","speaker","speaker_group","tablet","tablet_android","tablet_mac","toys","tv","videogame_asset","watch"],Home:["sensor_door","sensor_window"],Image:["add_a_photo","add_photo_alternate","add_to_photos","adjust","assistant","assistant_photo","audiotrack","bedtime","blur_circular","blur_linear","blur_off","blur_on","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","broken_image","brush","burst_mode","camera","camera_alt","camera_front","camera_rear","camera_roll","center_focus_strong","center_focus_weak","collections","collections_bookmark","color_lens","colorize","compare","control_point","control_point_duplicate","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","dehaze","details","edit","euro","exposure","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_none","filter_tilt_shift","filter_vintage","flare","flash_auto","flash_off","flash_on","flip","flip_camera_android","flip_camera_ios","gradient","grain","grid_off","grid_on","hdr_off","hdr_on","hdr_strong","hdr_weak","healing","image","image_aspect_ratio","image_not_supported","image_search","iso","landscape","leak_add","leak_remove","lens","linked_camera","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loupe","monochrome_photos","motion_photos_on","motion_photos_paused","movie_creation","movie_filter","music_note","music_off","nature","nature_people","navigate_before","navigate_next","palette","panorama","panorama_fish_eye","panorama_horizontal","panorama_vertical","panorama_wide_angle","photo","photo_album","photo_camera","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","picture_as_pdf","portrait","receipt_long","remove_red_eye","rotate_90_degrees_ccw","rotate_left","rotate_right","shutter_speed","slideshow","straighten","style","switch_camera","switch_video","tag_faces","texture","timelapse","timer","timer_10","timer_3","timer_off","tonality","transform","tune","view_comfy","view_compact","vignette","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_sunny"],Maps:["360","add_business","add_location","add_location_alt","add_road","agriculture","alt_route","atm","beenhere","bike_scooter","category","cleaning_services","compass_calibration","departure_board","design_services","directions","directions_bike","directions_boat","directions_bus","directions_car","directions_railway","directions_run","directions_subway","directions_transit","directions_walk","edit_attributes","edit_location","edit_road","electric_bike","electric_car","electric_moped","electric_scooter","electrical_services","ev_station","fastfood","flight","handyman","home_repair_service","hotel","hvac","layers","layers_clear","local_activity","local_airport","local_atm","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_printshop","local_see","local_shipping","local_taxi","map","maps_ugc","medical_services","menu_book","miscellaneous_services","money","moped","multiple_stop","museum","my_location","navigation","near_me","near_me_disabled","no_meals","no_transfer","not_listed_location","pedal_bike","person_pin","person_pin_circle","pest_control","pest_control_rodent","pin_drop","place","plumbing","rate_review","restaurant","restaurant_menu","run_circle","satellite","set_meal","store_mall_directory","streetview","subway","terrain","traffic","train","tram","transfer_within_a_station","transit_enterexit","trip_origin","two_wheeler","wine_bar","wrong_location","zoom_out_map"],Navigation:["app_settings_alt","apps","arrow_back","arrow_back_ios","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_right","arrow_upward","campaign","cancel","check","chevron_left","chevron_right","close","double_arrow","east","expand_less","expand_more","first_page","fullscreen","fullscreen_exit","home_work","last_page","legend_toggle","menu","menu_open","more_horiz","more_vert","north","north_east","north_west","payments","refresh","south","south_east","south_west","subdirectory_arrow_left","subdirectory_arrow_right","switch_left","switch_right","unfold_less","unfold_more","west"],Notification:["account_tree","adb","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","bluetooth_audio","confirmation_number","directions_off","disc_full","drive_eta","enhanced_encryption","event_available","event_busy","event_note","folder_special","live_tv","mms","more","network_check","network_locked","no_encryption","ondemand_video","personal_video","phone_bluetooth_speaker","phone_callback","phone_forwarded","phone_in_talk","phone_locked","phone_missed","phone_paused","power","power_off","priority_high","sd_card","sms","sms_failed","support_agent","sync","sync_disabled","sync_problem","system_update","tap_and_play","time_to_leave","tv_off","vibration","voice_chat","vpn_lock","wc","wifi","wifi_off"],Places:["ac_unit","airport_shuttle","all_inclusive","apartment","baby_changing_station","backpack","bathtub","beach_access","bento","business_center","carpenter","casino","charging_station","checkroom","child_care","child_friendly","corporate_fare","countertops","do_not_step","do_not_touch","dry","elevator","escalator","escalator_warning","family_restroom","fence","fire_extinguisher","fitness_center","food_bank","foundation","free_breakfast","golf_course","grass","hot_tub","house","house_siding","kitchen","meeting_room","microwave","night_shelter","no_cell","no_drinks","no_flash","no_food","no_meeting_room","no_photography","no_stroller","pool","rice_bowl","roofing","room_preferences","room_service","rv_hookup","smoke_free","smoking_rooms","soap","spa","sports_bar","stairs","storefront","stroller","tapas","tty","umbrella","wash","water_damage","wheelchair_pickup"],Social:["6_ft_apart","architecture","book_online","cake","clean_hands","connect_without_contact","construction","coronavirus","deck","domain","elderly","emoji_emotions","emoji_events","emoji_flags","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","engineering","fireplace","follow_the_signs","group","group_add","history_edu","king_bed","leave_bags_at_home","location_city","masks","military_tech","mood","mood_bad","nights_stay","notifications","notifications_active","notifications_none","notifications_off","notifications_paused","outdoor_grill","pages","party_mode","people","people_alt","people_outline","person","person_add","person_add_alt_1","person_outline","person_remove","plus_one","poll","psychology","public","public_off","reduce_capacity","sanitizer","school","science","self_improvement","sentiment_dissatisfied","sentiment_satisfied","sentiment_very_dissatisfied","sentiment_very_satisfied","share","sick","single_bed","sports","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_handball","sports_hockey","sports_kabaddi","sports_mma","sports_motorsports","sports_rugby","sports_soccer","sports_tennis","sports_volleyball","thumb_down_alt","thumb_up_alt","whatshot"],Toggle:["check_box","check_box_outline_blank","indeterminate_check_box","radio_button_checked","radio_button_unchecked","star","star_border","star_half","star_outline","toggle_off","toggle_on"]}},439:function(e,t,r){"use strict";t.a=function(e){return{root:{position:"relative"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"calc(100% - 15px)",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},dataSave:{padding:"7px"},fieldSet:{padding:"7px",width:"calc(100% - 50px)"},progress:{},progressPercentage:{}}}},441:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0),a=r.n(n),o=r(3),i=r(95),c=r(1),l=r(24);function s(e){var t=o.a.getState(),r=t.db,n=t.session,s=Object(l.h)(e.id),u=Object(c.j)();if(0===Object.keys(s).length)return a.a.createElement(a.a.Fragment,null);var d=Object.keys(s).filter((function(e,t){return s[e].icon&&s[e].type&&s[e].name})).map((function(t,o){var d=Object(l.t)(t);return a.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:o},a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&((u.planAdmin||u.planModerate)&&("plan"!==r.cards[s[t]._id].type||"plan"===r.cards[s[t]._id].type&&Object(l.A)(s[t]._id))||d>=1)&&(!r.cards[s[t]._id].private||r.cards[s[t]._id].private&&r.cards[s[t]._id]._users&&r.cards[s[t]._id]._users[n._id])?function(r){e.open(s[t]._id),r.stopPropagation()}:null},a.a.createElement(i.a,{overlap:"rectangular",icon:s[t].icon,title:"".concat(Object(c.u)("$__".concat(s[t].type),"*"),": ").concat(s[t].name),size:"16px",color:Object(c.d)("color")}),a.a.createElement("span",{style:{marginLeft:"5px"}},s[t].name)),a.a.createElement("div",{style:{clear:"both"}}))}));return a.a.createElement("div",{style:{width:"calc(100% - 5px)"},onClick:function(e){e.stopPropagation()}},e.showLegend?a.a.createElement("fieldset",{style:{marginBottom:"14px",width:"100%"}},a.a.createElement("legend",null,Object(c.u)(e.legend||"$__connectedIn",1)),d):d,a.a.createElement("div",{style:{clear:"both"}}))}},442:function(e,t,r){"use strict";t.a={instruction:{},picture:{}}},45:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(0),i=r.n(o),c=r(94),l=r.n(c),s=r(157),u=r(95),d=r(6),p={button:Object(n.a)(Object(n.a)({},d.k),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(n.a)(Object(n.a)({},d.k),{},{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",width:"fit-content",userSelect:"none","&$reverse":{},"& :hover":{}}),reverse:{flexDirection:"row-reverse"},iconButton:{width:"21px",height:"21px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"10%"},icon:{fontSize:"21px"},onlyIcon:{fontSize:"21px"},text:{marginLeft:"7px",marginRight:"7px"}},f=r(1),h=Object(s.a)(p);t.a=function(e){var t,r,o=h(),c=e.text,s=l()((t={},Object(a.a)(t,o.button,!0),Object(a.a)(t,o.reverse,!!e.reverse),t)),d=l()((r={},Object(a.a)(r,o.buttonText,!0),Object(a.a)(r,o.reverse,!!e.reverse),r));return i.a.createElement("div",{className:e.text?d:s,onClick:function(){return e.onClick?e.onClick():null},style:Object(n.a)({},e.style)},i.a.createElement("div",{className:o.iconButton,style:{color:e.iconColor?Object(f.d)(e.iconColor):Object(f.d)("color"),backgroundColor:e.iconBackground?Object(f.d)(e.iconBackground):"none"}},e.icon?i.a.createElement(u.a,{className:e.iconBackground?o.icon:o.onlyIcon,size:e.size?e.size:null,icon:e.icon,color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(n.a)({},e.style?e.style:{})}):i.a.createElement(u.a,{className:e.iconBackground?o.icon:o.onlyIcon,icon:"stop_circle",color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(n.a)({},e.style?e.style:{})})),c&&i.a.createElement("div",{className:o.text,style:{color:e.textColor?Object(f.d)(e.textColor):Object(f.d)("medium")}},c))}},453:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(664),i=r(1);t.a=function(){return Object(n.a)(Object(n.a)({},o.a),{},{appBar:{boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"fixed",width:"100%",zIndex:"100",color:"#FFFFFF",border:"0",minHeight:"0px",display:"flex",height:"50px",justifyContent:"center",userSelect:"none"},container:{},separator:{position:"absolute",left:"0px",right:"0px",bottom:"-2px",height:"2px",backgroundColor:Object(i.d)("line")},search:{position:"absolute",left:"62px",right:"0px",bottom:"-35px",height:"33px",boxShadow:"0 3px 3px rgba(0,0,0,0.33)",display:"block",padding:"0 15px",zIndex:1,backgroundColor:Object(i.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},searchMobile:{position:"absolute",left:"0px",right:"0px",paddingLeft:"15px",bottom:"-35px",height:"33px",boxShadow:"0 3px 3px rgba(0,0,0,0.33)",display:"block",padding:"0 15px",backgroundColor:Object(i.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(n.a)(Object(n.a)({},a.k),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:"inherit",paddingTop:"0.625rem",paddingBottom:"0.625rem",margin:"0 !important",letterSpacing:"unset","&:hover,&:focus":{background:"transparent"}}),logo:{position:"fixed",padding:"7px 0px",margin:"0",display:"flex",zIndex:"4",alignItems:"center",justifyContent:"center"},logoMini:{transition:"all 300ms linear",opacity:1,textAlign:"center",width:"40px",maxHeight:"40px",marginLeft:"10px",marginRight:"8px",color:"inherit"},logoImg:{width:"100%"},logoNormal:Object(n.a)(Object(n.a)({},a.k),{},{margin:"auto",transition:"all 300ms linear",opacity:"1",transform:"translate3d(0px, 0, 0)",textTransform:"uppercase",fontSize:"18px",whiteSpace:"nowrap",fontWeight:"400",overflow:"hidden",color:"".concat(Object(i.d)("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Object(i.d)("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Object(i.d)("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Object(i.d)("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})}},457:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(0),o=r.n(a),i=r(20),c=r(64),l=r(10),s=r(376),u=r(67),d=r(69),p=r(14),f=r(13),h=r(15),m=r(3),g=r(47),b=r(1),y=r(24);t.default=Object(p.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(f.b)(h,e)}))((function(e){var t,r,a,p,f=e.reduxFunction,h=e.cards,v=e.styles,x=e.preview,_=e.edit,O=e.handleRemoveObject,w=e.id,j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=m.a.getState().session,k=Object(b.j)(),S=Object(y.t)(j[0]);return o.a.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden"}},!x&&o.a.createElement(u.a,{style:{marginTop:"0",height:"100%"}},_?o.a.createElement("div",{style:Object(n.a)({width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3"},v)},o.a.createElement(l.a,{size:24,style:Object(n.a)({alignSelf:"center",marginLeft:"12.5px",color:v.color?v.color:"rgba(0, 0, 0, 0.67)"},v)},"blur_on"),o.a.createElement("p",{style:Object(n.a)({margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:v.color?v.color:"rgba(0, 0, 0, 0.67)"},v)},Object(b.u)("$__planResume",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{onClick:function(){return O(w)},style:{height:"25px",color:v.color?v.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:v.color?v.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(c.a,{title:Object(b.u)("$__planResume",1),icon:"blur_on",color:v.color?v.color:"rgba(0, 0, 0, 0.67)",style:{background:v.backgroundColor?v.backgroundColor:"white",padding:"12.8px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},moreButton:!0,optionsProps:{transparent:!0,btColor:v.color?v.color:"rgba(0, 0, 0, 0.67)"},options:S&&parseInt(S)>3||k.owner||k.planAdmin||k.planEdit||k.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){f("ASYNC","SET_MODULE",Object(n.a)(Object(n.a)({},m.a.getState().sideModule),{},{db:"cards",id:j[0],module:"cardEdit",activeModule:"cardEdit",data:h[j[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),o.a.createElement(d.a,null,o.a.createElement("div",null,o.a.createElement("div",{style:{width:"100%",color:Object(b.d)("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Object(b.u)("$__name",1),":")," ",null===(t=h[j[0]])||void 0===t?void 0:t.name),o.a.createElement("div",{style:{width:"100%",color:Object(b.d)("menu")}},o.a.createElement("span",{style:{fontWeight:"bold"}},Object(b.u)("$__description",1),":")," ",null===(r=h[j[0]])||void 0===r?void 0:r.description),!(null===(a=h[j[0]])||void 0===a?void 0:a.isTemplate)&&h[j[0]]&&(null===(p=h[j[0]])||void 0===p?void 0:p._users)&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Object(b.d)("menu"),fontWeight:"bold"}},Object(b.u)("$__users","*"),":"),o.a.createElement(s.a,{_id:j[0],noLimit:!0,avatarSize:"33px",permission:!0}))),"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"===E.account?o.a.createElement(i.a,{color:Object(b.d)("menu"),icon:"monitoring",onClick:function(){g.a.push("sp#".concat(j[0],"/statistics"))},size:"15px",title:"".concat(Object(b.u)("$__tagsStatistics")),text:"".concat(Object(b.u)("$__tagsStatistics"))}):o.a.createElement(o.a.Fragment,null))))}))},458:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(7),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(148),u=r(262),d=r(83),p=(r(164),r(106)),f=r(3),h=r(9),m=r.n(h),g=r(1),b=r(10);t.default=function(e){var t=f.a.getState().db,r=Object(c.useState)({index:0,showQuantity:10,number:10,finalIndex:10}),h=Object(i.a)(r,2),y=h[0],v=h[1],x=Object(c.useState)({}),_=Object(i.a)(x,2),O=_[0],w=_[1],j=window.location.hash.split("/");j[0]=j[0].replace("#",""),Object(c.useEffect)((function(){Object.keys(e.filter).length>0&&v(e.filter)}),[e.filter]),Object(c.useEffect)((function(){var r={};e.planCards&&!e.load&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).filter((function(e){return!t.cards[e].deleted})).forEach((function(e){var n;Object.keys(null===(n=t.cards[e])||void 0===n?void 0:n._users).forEach((function(n){var i,c;if(!((null===y||void 0===y||null===(i=y.users)||void 0===i?void 0:i.length)>0)||y.users.includes(null===(c=t.cards[e])||void 0===c?void 0:c._users[n]._id)){var l,s,u,d,p;if(!r[n])r=Object(o.a)(Object(o.a)({},r),{},Object(a.a)({},n,Object(o.a)(Object(o.a)({},r[n]),{},(p={},Object(a.a)(p,t.cards[e].status,0),Object(a.a)(p,"allTask",0),Object(a.a)(p,"user",null===(s=t.cards[e])||void 0===s?void 0:s._users[n].name.match(/\b(\w)/g).join("")),Object(a.a)(p,"id",n),Object(a.a)(p,"image",null===(u=t.cards[e])||void 0===u?void 0:u._users[n].image),Object(a.a)(p,"name",null===(d=t.cards[e])||void 0===d?void 0:d._users[n].name),p))));if(null===(l=t.cards[e])||void 0===l?void 0:l._users[n].isResponsible){var f,h,g,b,v,x=m()(1e3*t.cards[e].created_at).format("YYYYMMDD"),_=y.startDate?m()(1e3*y.startDate).format("YYYYMMDD"):m()().subtract(1,"month").format("YYYYMMDD"),O=y.endDate?m()(1e3*y.endDate).format("YYYYMMDD"):m()().format("YYYYMMDD");if(x>=_&&x<=O)"step"!==t.cards[e].type&&(r=Object(o.a)(Object(o.a)({},r),{},Object(a.a)({},n,Object(o.a)(Object(o.a)({},r[n]),{},(v={},Object(a.a)(v,t.cards[e].status,(null===(f=r[n])||void 0===f?void 0:f[t.cards[e].status])?(null===(h=r[n])||void 0===h?void 0:h[t.cards[e].status])+1:1),Object(a.a)(v,"allTask",(null===(g=r[n])||void 0===g?void 0:g.allTask)?(null===(b=r[n])||void 0===b?void 0:b.allTask)+1:1),v)))))}}}))})),O!==r&&w(r))}),[e.planCards,e.load,y]);return l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(r){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){v(Object(o.a)(Object(o.a)({},y),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},y),t),{},{id:e.id}))},filterConfig:{filterSelect:Object.keys(O).length>0&&Object.values(O).length},tittle:Object(g.u)("$__"+e.tittle),icon:e.icon,styles:e.styles,indicators:y&&y,datafilter:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){v(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},y),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},!e.load&&r&&l.a.createElement("div",{style:{position:"absolute",right:"2%",top:"2%",padding:"5px",display:"flex",zIndex:"9",justifyContent:"center",alignContent:"center"}},l.a.createElement("div",{style:{marginTop:"2px",marginRight:"4px"}},y.startDate?m()(1e3*y.startDate).format("DD/MM/YYYY")+" ~ ":m()().subtract(1,"month").format("DD/MM/YYYY")+" ~ ",y.endDate?m()(1e3*y.endDate).format("DD/MM/YYYY")+" - ":m()().format("DD/MM/YYYY")+" - ",y.showQuantity<Object.keys(O).length?y.showQuantity+"/":Object.keys(O).length+"/",Object.keys(O).length>0&&l.a.createElement("span",null,Object.keys(O).length)),l.a.createElement(b.a,null,"person")),0!==y.index&&l.a.createElement(b.a,{onClick:function(){return v(Object(o.a)(Object(o.a)({},y),{},{index:y.index-1,finalIndex:y.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),Object.keys(O).length!==y.index+y.number&&Object.keys(O).length>y.showQuantity&&l.a.createElement(b.a,{onClick:function(){return v(Object(o.a)(Object(o.a)({},y),{},{index:y.index+1,finalIndex:y.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},Object.keys(O).length>0&&!e.load&&r?l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:Object.values(O).sort((function(e,t){return e.allTask>t.allTask?-1:e.allTask<t.allTask?1:0})).slice(y.index,y.finalIndex),keys:["inProgress","completed","notStarted","paused","awaitAction"],colors:["#011E41","#5A7F71","#929497","#EBA900","pink"],tooltip:function(e){return l.a.createElement("div",{style:{fontSize:"12px",width:"200px",marginBottom:"10px",zIndex:"99999"}},l.a.createElement("div",{style:{display:"flex",marginLeft:"5px",marginTop:"10px",textOverflow:"ellipsis",overflow:"hidden"}},l.a.createElement("div",{style:{display:"flex",width:"40px",height:"32px",backgroundImage:'url("'.concat(e.data.image,'")'),backgroundColro:"lightgray",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",borderRadius:"50%",alignSelf:"center"}}),l.a.createElement("p",{style:{margin:"0px",marginLeft:"12px",fontSize:"20px",alignSelf:"center",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.data.name)),l.a.createElement("div",{style:{borderBottom:"1px solid #d1d1cf",marginTop:"10px"}}),l.a.createElement("div",{style:{width:"100%",fontSize:"18px",padding:"10px",marginBottom:"5px",marginTop:"4px"}},Object.entries(e.data).map((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.entries(e.data),r=Object(i.a)(t,2),n=r[0],a=r[1];if(["inProgress","completed","notStarted","paused","awaitAction"].includes(n)){var o="";switch(n){case"inProgress":o="#011E41";break;case"completed":o="#5A7F71";break;case"notStarted":o="#929497";break;case"paused":o="#EBA900";break;case"awaitAction":o="pink";break;default:o="white"}return l.a.createElement("div",{style:{display:"flex",marginBottom:"8px"},key:n},l.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:o,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px"}}," "),l.a.createElement("div",{style:{marginLeft:"14x"}}," ",Object(g.u)("$__"+n)," : ",l.a.createElement("span",{style:{fontWeight:"bolder"}},a)))}return null}))))},indexBy:"id",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32,format:function(e){return function(e){var t="";return Object.values(O).forEach((function(r){r.id===e&&(t=null===r||void 0===r?void 0:r.name.match(/\b(\w)/g).join(""))})),t}(e)}},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "):l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}}," ",l.a.createElement("div",{className:"loader"}))))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(n.a)(t.status.map((function(e,t){return{key:t,color:e.color,label:e.label}}))).reverse()})))})))}},459:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(7),o=r(2),i=r(5),c=r(0),l=r.n(c),s=r(700),u=r(148),d=r(83),p=(r(164),r(106)),f=r(3),h=r(9),m=r.n(h),g=r(1);t.default=function(e){var t=f.a.getState().db,r=Object(c.useState)({}),h=Object(i.a)(r,2),b=h[0],y=h[1],v=Object(c.useRef)(0),x=window.location.hash.split("/");x[0]=x[0].replace("#","");var _=[{x:"",y:0},{x:" ",y:0}];return Object(c.useEffect)((function(){var r={},i={};!function(){for(var e=m()().startOf("week"),t=1;t<7;t++){var n=m()(e).add(t,"days").format("YYYYMMDD");r=Object(o.a)(Object(o.a)({},r),{},{id:"now",data:Object(o.a)(Object(o.a)({},r.data),{},Object(a.a)({},n,{x:Object(g.u)("$__"+m()(n).format("dddd")),y:0}))}),i=Object(o.a)(Object(o.a)({},i),{},{id:"past",data:Object(o.a)(Object(o.a)({},i.data),{},Object(a.a)({},n,{x:Object(g.u)("$__"+m()(n).format("dddd")),y:0}))})}}(),e.planCards&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).forEach((function(e){var n,c,l,s,u,d,p,f=m()(1e3*(null===(n=t.cards[e].completed_at)||void 0===n?void 0:n.low)).format("YYYYMMDD"),h=m()().startOf("week").add(1,"day").format("YYYYMMDD"),b=m()().endOf("week").format("YYYYMMDD"),y=m()().subtract(1,"weeks").startOf("week").add(1,"day").format("YYYYMMDD"),v=m()().subtract(1,"weeks").endOf("week").format("YYYYMMDD");f>=h&&f<=b&&(r=Object(o.a)(Object(o.a)({},r),{},{id:"now",data:Object(o.a)(Object(o.a)({},r.data),{},Object(a.a)({},f,{x:Object(g.u)("$__"+m()(f).format("dddd")),y:(null===(c=r)||void 0===c||null===(l=c.data)||void 0===l||null===(s=l[f])||void 0===s?void 0:s.y)?(null===(u=r)||void 0===u||null===(d=u.data)||void 0===d||null===(p=d[f])||void 0===p?void 0:p.y)+1:1}))}));if(f>=y&&f<=v){var x,_,O,w,j,E,k=m()(f).add(1,"week").format("YYYYMMDD");i=Object(o.a)(Object(o.a)({},i),{},{id:"past",data:Object(o.a)(Object(o.a)({},i.data),{},Object(a.a)({},k,{x:Object(g.u)("$__"+m()(f).format("dddd")),y:(null===(x=i)||void 0===x||null===(_=x.data)||void 0===_||null===(O=_[k])||void 0===O?void 0:O.y)?(null===(w=i)||void 0===w||null===(j=w.data)||void 0===j||null===(E=j[k])||void 0===E?void 0:E.y)+1:1}))})}})),r.data&&(r=Object(o.a)(Object(o.a)({},r),{},{data:[_[0]].concat(Object(n.a)(Object.values(r.data)),[_[1]])}),Object.keys(r).length>0&&(r=[r]),r.forEach((function(e){e.data.forEach((function(e){e.y>v.current&&(v.current=e.y)}))}))),i.data&&(i=Object(o.a)(Object(o.a)({},i),{},{data:[_[0]].concat(Object(n.a)(Object.values(i.data)),[_[1]])}),Object.keys(i).length>0&&(r=[].concat(Object(n.a)(r),[i])),r.forEach((function(e){e.data.forEach((function(e){e.y>v.current&&(v.current=e.y)}))}))),y(r))}),[e.planCards]),l.a.createElement("div",{style:{height:"100%",width:"100%"}},l.a.createElement(p.a,null,(function(t){return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column",overflow:"hidden"}},l.a.createElement(d.a,{styles:e.styles,tittle:Object(g.u)("$__"+e.tittle),icon:e.icon,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto"}},l.a.createElement("div",{className:"component",style:{position:"absolute",width:"100%",height:"100%",marginBottom:"25px",backgroundColor:"#f5f5f5"}},b.length>0&&!e.load&&t?l.a.createElement(s.a,{data:b,responsive:!0,margin:{top:20,right:-15,bottom:50,left:30},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:v.current+v.current/2,stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:15,tickRotation:0},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},enableGridX:!0,enableGridY:!0,lineWidth:.5,pointSize:1,pointColor:{theme:"background"},pointBorderWidth:0,enableArea:!0,areaBaselineValue:0,pointBorderColor:{from:"serieColor"},pointLabelYOffset:0,useMesh:!0,curve:"catmullRom",colors:["rgba(36, 170, 219, 0.8)","rgba(82, 82, 82, 0.4)"],theme:{fontSize:"14px",color:"white",background:"#f5f5f5",grid:{line:{stroke:"#e8e6e6",strokeWidth:1}},axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}):l.a.createElement("div",{style:{wdith:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}}," ",l.a.createElement("div",{className:"loader"}))),l.a.createElement("div",{style:{width:"98%",backgroundColor:"#f5f5f5",height:"18px",position:"absolute",bottom:"30px",left:"40px"}}))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(u.a,{legend:[{id:Object(g.u)("$__lastWeek"),color:"#525252",number:"",key:1},{id:Object(g.u)("$__thisWeek"),color:"#24acdc",number:"",key:2}]})))})))}},460:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(67),l=r(69),s=r(58),u=r(249),d=r(10),p=r(106),f=r(1),h=r(24);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=i.a.useState({type:"comment",disabledSend:!1}),o=Object(a.a)(r,2),m=o[0],g=o[1],b=Object(h.j)(t[0]);return i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(p.a,null,(function(r){return i.a.createElement("div",{style:{height:"100%",overflow:"hidden"}},i.a.createElement(c.a,{style:{marginTop:"0",height:"100%"}},e.edit?i.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},i.a.createElement(d.a,{size:24,style:{alignSelf:"center",marginLeft:"17px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",marginTop:"1px"}},"blur_on"),i.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",fontSize:"16px"}},Object(f.u)("$__timeline",1)),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(d.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),i.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},i.a.createElement(d.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):i.a.createElement(s.a,{title:Object(f.u)("$__timeline",1),icon:"blur_on",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"10px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:b.comment,color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",onClick:function(){g({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.log,onClick:function(){g({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.timer,onClick:function(){g({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:b.kpi,onClick:function(){g({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),r&&i.a.createElement(l.a,null,i.a.createElement(u.a,Object(n.a)({nodeId:t[0],db:"cards",loadTimeline:!0},m)))))})))}},461:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(7),o=r(2),i=r(8),c=r(5),l=r(0),s=r.n(l),u=r(9),d=r.n(u),p=r(117),f=r(14),h=r(13),m=r(15),g=r(3),b=r(155),y=r(20),v=r(688),x=r(34),_=r(58),O=r(10),w=r(27),j=r(67),E=r(69),k=r(189),S=r(167),L=r(106),C=r(1888),I=r(1879),T=r(1878),F=r(142),D=r(723),N=r(1880),A=r(1203),P=r(147),$=r(1),M=r(78),z=r(24);function Y(){Y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(f.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(h.b)(m,e)}))((function(e){var t=g.a.getState(),r=t.db,u=t.timeline,f=s.a.useState(d()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),h=Object(c.a)(f,2),m=h[0],B=h[1],R=s.a.useState(d()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),G=Object(c.a)(R,2),H=G[0],W=G[1],U=s.a.useState(!1),q=Object(c.a)(U,2),V=q[0],J=q[1],X=s.a.useState({}),K=Object(c.a)(X,2),Z=K[0],Q=K[1],ee=s.a.useState({}),te=Object(c.a)(ee,2),re=te[0],ne=te[1],ae=s.a.useState(!0),oe=Object(c.a)(ae,2),ie=oe[0],ce=oe[1],le=Object(l.useState)({}),se=Object(c.a)(le,2),ue=se[0],de=se[1],pe=Object(l.useRef)(0),fe=Object(l.useRef)({}),he=window.location.hash.split("/");he[0]=he[0].replace("#","");var me=he[0];s.a.useEffect((function(){return be(),function(){}}),[]),s.a.useEffect((function(){ge()}),[e.planCards]);var ge=function(){var e=Object(i.a)(Y().mark((function e(){var t;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.s)(me);case 2:t=e.sent,ne(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(){var t=Object(i.a)(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(M.f)(Object(o.a)(Object(o.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[me],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&ce(!1),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),ce(!1);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();Object(l.useEffect)((function(){var e={},t={},r=0;Object.keys(re).filter((function(e){return u[e]&&Object.keys(u[e]).filter((function(t){return"timer"===u[e][t].type})).length>0})).forEach((function(n){Object.keys(u[n]).filter((function(e){return"timer"===u[n][e].type&&!u[n][e].deleted})).forEach((function(e){u[n][e]._toUser&&Object.keys(u[n][e]._toUser).length>0?Object.keys(u[n][e]._toUser).forEach((function(r){t=Object(o.a)(Object(o.a)({},t),{},Object(a.a)({},r,Object(o.a)({},u[n][e]._toUser[r]?u[n][e]._toUser[r]:{})))})):t=Object(o.a)(Object(o.a)({},t),{},Object(a.a)({},u[n][e].user._id,Object(o.a)({},u[n][e].user)))})),Object.keys(u[n]).filter((function(e){return u[n]&&u[n][e]&&"timer"===u[n][e].type&&!u[n][e].deleted&&(0===Object.keys(Z).length||Object.keys(Z).length>0&&Object.keys(Z).filter((function(t){return u[n]&&u[n][e]&&u[n][e].type&&"timer"===u[n][e].type&&Z[t]&&u[n][e].user&&(u[n]&&u[n][e]&&u[n][e].user&&(!u[n][e]._toUser||u[n][e]._toUser&&!u[n][e]._toUser[t])&&u[n][e].user._id===t||u[n]&&u[n][e]&&u[n][e]._toUser&&u[n][e]._toUser[t]&&u[n][e]._toUser[t]!==u[n][e].user._id)})).length>0)})).forEach((function(i){Object.keys(t).forEach((function(c){if(c&&u[n]&&u[n][i]&&"timer"===u[n][i].type&&!u[n][i].deleted&&(parseInt(u[n][i].ini)>=d()("".concat(m," 00:00:01")).unix("X")||0===parseInt(u[n][i].ini))&&parseInt(u[n][i].fin)<=d()("".concat(H," 23:59:59")).unix("X")&&(u[n][i].user&&u[n][i].user._id===c&&u[n][i]._toUser&&0===Object.keys(u[n][i]._toUser).length||u[n][i]._toUser&&Object.keys(u[n][i]._toUser).length>0&&u[n][i]._toUser[c])){r+=parseInt(u[n][i].fin)-parseInt(u[n][i].ini);var l=parseInt(u[n][i].fin)-parseInt(u[n][i].ini),s=l=e&&e[c]&&e[c].totalTimer?parseInt(e[c].totalTimer)+(parseInt(u[n][i].fin)-parseInt(u[n][i].ini)):parseInt(u[n][i].fin)-parseInt(u[n][i].ini),p="",f="";if(l<60)p="".concat(s," ").concat(Object($.u)("$__seconds",1)),p="".concat(s,"s");else if(l>3600){var h=Math.trunc(s/3600);s-=3600*h;var g=Math.trunc(s/60)>0?Math.trunc(s/60):0,b=(s-=60*g)>0?s:0;p="".concat(h," ").concat(Object($.u)("$__hour",1)).concat(h>1?"s":""," ").concat(g," ").concat(Object($.u)("$__minutes",1)," ").concat(b>0?"".concat(b," ").concat(Object($.u)("$__seconds",1)):""),f="".concat(h,"H ").concat(g,"M ").concat(b," S")}else{var y=Math.trunc(s/60)>0?Math.trunc(s/60):0,v=(s-=60*y)>0?s:0;p="".concat(y," ").concat(Object($.u)("$__minutes",1)," ").concat(v>0?"".concat(v," ").concat(Object($.u)("$__seconds",1)):""),f="".concat(y,"M ").concat(v," S")}e=Object(o.a)(Object(o.a)({},e),{},Object(a.a)({},c,Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},e[c]?e[c]:{}),t[c]?t[c]:{}),e&&e[c]&&e[c].totalTimer?{totalTimer:parseInt(e[c].totalTimer)+(parseInt(u[n][i].fin)-parseInt(u[n][i].ini))}:{totalTimer:parseInt(u[n][i].fin)-parseInt(u[n][i].ini)}),{},{timerText:p,timerTextMini:f,_times:Object(o.a)(Object(o.a)({},e[c]&&e[c]._times?e[c]._times:{}),{},Object(a.a)({},i,Object(o.a)(Object(o.a)({},u[n][i]),{},{cardId:n})))})))}pe.current=r,1}))}))})),fe.current=t,de(e)}),[re,ie,Z]);var ye=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object($.u)("$__seconds",1)),r="".concat(e,"s");else if(e>3600){var a=Math.trunc(e/3600);e-=3600*a;var o=Math.trunc(e/60)>0?Math.trunc(e/60):0,i=(e-=60*o)>0?e:0;r="".concat(a," ").concat(Object($.u)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object($.u)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object($.u)("$__seconds",1)):""),n="".concat(a,"H ").concat(o,"M ").concat(i," S")}else{var c=Math.trunc(e/60)>0?Math.trunc(e/60):0,l=(e-=60*c)>0?e:0;r="".concat(c," ").concat(Object($.u)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object($.u)("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r},ve=function(e){return s.a.createElement("div",{style:{width:"100%",marginBottom:"10px",display:"flex",alignItems:"center"}},e.data&&e.data.name&&s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{style:{width:"33px"}},s.a.createElement(P.a,{title:e.data.name},s.a.createElement(F.a,{alt:e.data.name,src:e.data.image||null,style:{width:"33px",height:"33px"}},e.data.name.substr(0,1)))),s.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object($.d)("menu"),width:"33%",minWidth:"150px"}},e.data.name)),s.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object($.d)("menu")}},e.data.timerText))};return s.a.createElement("div",{style:{height:"100%",width:"100%"}},s.a.createElement(L.a,null,(function(t){return s.a.createElement(j.a,{style:{width:"100%",height:"100%",marginTop:"0px",overflow:"scroll"}},e.edit&&t?s.a.createElement("div",{style:{width:"100%",height:"52px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},s.a.createElement(O.a,{size:24,style:{alignSelf:"center",marginLeft:"20px",color:e.styles.color?e.styles.color:"grey",marginTop:"3px"}},"update"),s.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"2px",color:e.styles.color?e.styles.color:"grey",fontSize:"16px"}},Object($.u)("$__timeSheet",1)),s.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},s.a.createElement(O.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),s.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},s.a.createElement(O.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):s.a.createElement(_.a,{title:Object($.u)("$__timeSheet",1),icon:"update",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},customButtons:[!V&&{title:"$__timeSheetExport",icon:"file_download",color:Object($.d)("colorText"),onClick:function(){J(!V)}}]}),ie?s.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},s.a.createElement(S.a,null)):s.a.createElement(s.a.Fragment,null),V&&t&&s.a.createElement("div",{style:{padding:"15px",border:"1px solid black"}},s.a.createElement("fieldset",{style:{position:"relative",width:"100%",marginLeft:"7px",display:"flex",justifyContent:"space-between",marginBottom:"14px",marginTop:"7px"}},s.a.createElement("legend",null,Object($.u)("$__timeCourse",1)),s.a.createElement(w.a,{label:Object($.u)("$__initialDate",1),variant:Object($.d)("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:H||null},InputProps:{autoComplete:"new-password",onChange:function(e){B(e.target.value)}},value:m}),s.a.createElement(w.a,{label:Object($.u)("$__endDate",1),variant:Object($.d)("fieldVariant"),name:"endDate",type:"date",min:m||null,InputLabelProps:{shrink:!0},inputProps:{min:m||null},InputProps:{autoComplete:"new-password",onChange:function(e){W(e.target.value)}},value:H})),r.users&&Object.keys(r.users).length>0&&t&&s.a.createElement(C.a,{style:{width:"100%"}},s.a.createElement(T.a,{style:{minWidth:"100%"},expandIcon:s.a.createElement(O.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement("div",{style:{color:Object($.d)("color"),fontSize:"12px"}},Object($.u)("$__users"),s.a.createElement(D.a,{max:6},Object.keys(Z).length>0&&Object.keys(Z).map((function(e,t){return s.a.createElement(P.a,{title:r.users[e].name,key:t},s.a.createElement(F.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),s.a.createElement(I.a,{style:{minWidth:"100%"}},s.a.createElement(A.a,null,Object.keys(fe.current).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&s.a.createElement(s.a.Fragment,{key:e},s.a.createElement(N.a,{key:e,style:{minWidth:"100%"},control:s.a.createElement(s.a.Fragment,null,s.a.createElement(F.a,{alt:r.users[e].name.substr(0,1),src:r.users[e].image||null},r.users[e].name.substr(0,1)),s.a.createElement(b.a,{checked:!(!Z||!Z[e]),onChange:function(){!function(e){Z[e]&&Object.keys(Z).filter((function(e){return Z[e]})).length<=1?Q({}):Q(Object(o.a)(Object(o.a)({},Z),{},Object(a.a)({},e,!Z[e])))}(e)},color:"default"})),label:r.users[e].name||r.users[e].name}))}))))),s.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"7px"}},s.a.createElement(v.a,{data:ue}),s.a.createElement(y.a,{title:Object($.u)("$__closeFilter"),text:Object($.u)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){J(!V)},size:"25px"}))),s.a.createElement(k.a,{style:{height:"333px",position:"relative",backgroundColor:"#f5f5f5"}},t&&s.a.createElement(p.a,{data:Object(n.a)(Object.keys(ue).sort((function(e,t){return parseInt(ue[e].totalTimer)>parseInt(ue[t].totalTimer)?-1:parseInt(ue[e].totalTimer)<parseInt(ue[t].totalTimer)?1:0})).map((function(e,t){return{id:ue[e].name,label:ue[e].name,value:ue[e].totalTimer,color:"#929497",textMini:ue[e].timerText}}))),valueFormat:function(e){return ye(e,!0),ye(e)},enableArcLabels:!1,colors:{scheme:"purpleRed_green"},activeOuterRadiusOffset:8,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},borderWidth:1,cornerRadius:3,enableArcLinkLabels:!1,innerRadius:.5,leavesOnly:!0,theme:{background:"transparent"},margin:{top:10,right:0,bottom:10,left:0},padAngle:1.3,sortByValue:!0}),s.a.createElement("div",{style:{width:"100px",wordWrap:"break-word",position:"absolute",top:"50%",left:"calc(50% - 50px)",fontWeight:"bold",color:Object($.d)("menu"),textAlign:"center"}},ye(pe.current,!0))),t&&s.a.createElement(E.a,null,s.a.createElement(x.a,null,Object.keys(ue).sort((function(e,t){return parseInt(ue[e].totalTimer)>parseInt(ue[t].totalTimer)?-1:parseInt(ue[e].totalTimer)<parseInt(ue[t].totalTimer)?1:0})).map((function(e,t){return s.a.createElement(ve,{data:ue[e],key:e})})),s.a.createElement(ve,{data:{name:Object($.u)("$__total"),timerText:ye(pe.current)}}))),s.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[me]&&"plan"===r.cards[me].type?Object($.u)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object($.u)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})))}))},463:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(33),i=r(10),c=r(1),l=r(2),s=r(6),u={containerNoShadow:Object(l.a)(Object(l.a)({},s.k),{},{position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",display:"flow-root"}),container:Object(l.a)(Object(l.a)({},s.k),{},{position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",padding:"3px",display:"flow-root",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(c.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(c.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"relative",float:"left",width:"100%",height:"auto",display:"block"},indicators:{position:"relative",float:"left",height:"auto",zIndex:"0 !important"},indicatorsIcon:{position:"relative",float:"left",margin:"0px 0px","& MuiBadge-badge":{position:"relative",float:"left"}},image:{position:"relative",float:"left",width:"100%",marginTop:"7px",maxWidth:"100%",display:"none"},imagePreview:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",paddingTop:"48%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%"},imagePreviewList:{backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",float:"left",width:"100%",paddingTop:"48%","@media screen and (max-width: 800px)":{width:"100%"}},PreLoader:{top:"calc(50% - 25px)",left:"calc(50% - 25px)",position:"absolute"},description:{position:"relative",float:"left",padding:"5px",minHeight:"75px",width:"100%",overflow:"hidden",textOverflow:"ellipses"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(c.d)("medium"),fontSize:"10px",display:"flex"},lateDates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:"red",fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{minHeight:"20px",minWidth:"40px",zIndex:"0 !important"},users:{position:"absolute",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};t.a=Object(o.a)(u)((function(e){var t=e.classes;return a.a.createElement("div",null,a.a.createElement("div",{className:t.infos},a.a.createElement("div",{className:t.imagePreview,style:{background:e.backgroundColor?e.backgroundColor:Object(c.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(i.a,{icon:"lock",size:"39px",color:e.avatarIconColor?e.avatarIconColor:Object(c.d)("AvatarIconColor")})))))}))},47:function(e,t,r){"use strict";var n=r(283),a=Object(n.a)();t.a=a},481:function(e,t,r){"use strict";r.r(t);var n=r(8),a=r(5),o=r(0),i=r.n(o),c=r(34),l=r(193),s=r(14),u=r(13),d=r(15),p=r(3),f=r(22);r(7),r(2),r(39),r(479);function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var m=function e(t){var r=p.a.getState().db.cards,a=[t];return Object.keys(r).filter((function(e){return r[e]._parent===t})).map(function(){var t=Object(n.a)(h().mark((function t(r,n){var o;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(o=e(r))&&(a=Object(f.a)(new Set([].concat(Object(f.a)(a),Object(f.a)(o)))));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),a},g=r(1);function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var y=["January","February","March","April","May","June","July","August","September","October","November","December"];t.default=Object(s.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(u.b)(d,e)}))((function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=e.timeline,s=p.a.getState().db,u=Object(o.useState)([]),d=Object(a.a)(u,2),f=d[0],h=d[1],v=Object.keys(e.planCards),x=function(e,t){if(!t)return"";var a=0;if(v.filter((function(t){return!s.cards[t].deleted&&"completed"===s.cards[t].status&&s.cards[t]._tags&&s.cards[t]._tags.filter((function(t){return t.value===e})).length>0})).forEach(function(){var e=Object(n.a)(b().mark((function e(n){var o;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(o=m(n)).length>0&&o.filter((function(e){return!s.cards[e].deleted&&"completed"===s.cards[e].status&&r[e]})).forEach((function(e){var n=0;Object.keys(r[e]).filter((function(n){return n&&r[e][n]&&!r[e][n].deleted&&"timer"===r[e][n].type&&(!t||t&&parseInt(r[e][n].ini)>=parseInt(t.start)&&parseInt(r[e][n].fin)<=parseInt(t.end))})).forEach((function(t){var a=r[e][t].fin-r[e][t].ini;r[e][t]._users&&r[e][t]._users.filter((function(e){return e._id})).length>0&&(a*=r[e][t]._users.filter((function(e){return e._id})).length),n+=a})),a+=n}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),a){var o=Object(g.t)(a);return"/ ~".concat(o.hours?"".concat(o.hours,"H "):"").concat(o.minutes?"".concat(o.minutes,"m"):"")}return""},_=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e).filter((function(e){return e.indexOf("$__")>-1}))})))).sort((function(e,t){return y.indexOf(e)>y.indexOf(t)})),O={border:"1px solid #dddddd",padding:"5px 10px",color:"black"};return Object(o.useEffect)((function(){(function(e,t){return new Promise(function(){var r=Object(n.a)(b().mark((function r(a){var o,c;return b().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.data.map(function(){var e=Object(n.a)(b().mark((function e(r,a){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=i.a,e.t1={key:a},e.t2=console.log(r),e.t3=i.a.createElement("td",{style:O},r.label),e.next=6,Promise.all(t.map(function(){var e=Object(n.a)(b().mark((function e(t,n){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:return e.t0=i.a,e.t1={style:O,key:n},e.t2=r[t]||0,e.next=7,x(r.tag,r["Period__".concat(t.replace("$__",""))]||null);case 7:return e.t3=e.sent,e.abrupt("return",e.t0.createElement.call(e.t0,"td",e.t1,e.t2," ",e.t3));case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()));case 6:return e.t4=e.sent,e.abrupt("return",e.t0.createElement.call(e.t0,"tr",e.t1,e.t2,e.t3,e.t4));case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),r.next=3,Promise.all(o);case 3:c=r.sent,a(c);case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())})(e,_).then((function(e){h(e)}))}),[e.data]),console.log(e.data),i.a.createElement("div",{style:{width:"100%",height:"100%"}},i.a.createElement("div",null,i.a.createElement(c.a,null,i.a.createElement(l.a,{className:"grid",style:{padding:"0px"},xs:12},_.length>0&&i.a.createElement("table",{style:{borderCollapse:"collapse",fontSize:"0.8em",fontFamily:"sans-serif",width:"100%",maxHeight:"44px",boxShadow:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px"}},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",{tyle:O}),_.map((function(e){return i.a.createElement("th",{style:O,key:e},e)})))),i.a.createElement("tbody",null,f))))))}))},496:function(e,t,r){},50:function(e,t,r){"use strict";var n,a=r(86),o=r(7),i=r(2),c=r(8),l=r(5),s=r(0),u=r.n(s),d=r(9),p=r.n(d),f=r(71),h=r(73),m=r.n(h),g=r(15),b=r(47),y=r(3),v=r(13),x=r(14),_=r(95),O=r(188),w=r(20),j=r(64),E=r(10),k=r(45),S=r(331),L=r(332),C=r(142),I=r(147),T=r(463),F=r(706),D=r(662),N=r(157),A=r(333),P=r(57),$=r(24),M=r(172),z=r(1);function Y(){Y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var B=Object(N.a)(A.a),R=f.b.div(n||(n=Object(a.a)(["\n border-radius:5px;\n min-width:200px;\n background-color:#fff;\n margin-bottom:7px;\n\n ","\n ","\n ","\n ","\n ","\n ","\n width:calc(100%) !important;\n\n ","\n ","\n "])),(function(e){return e.separator?"marging-top:30px;":""}),(function(e){return e.selectable&&e.selected?"\n opacity:1;":e.selectable?"\n opacity:0.5;":""}),(function(e){return e.locked?"cursor:no-drop !important;":"cursor:pointer;"}),(function(e){return e.selected?"border-bottom:solid 5px ".concat(Object(z.d)("color")," !important;"):""}),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88;\n max-width:320px;\n border:solid 10px red;":""}),(function(e){return e.inLine?"position:relative;\n float:left;\n margin:3.5px;\n width:calc(20% - 7px);\n // maxWidth:320px;\n ":"\n width:calc(100%) !important;\n margin:7px 0px 12px 0px;\n "}),(function(e){return e.priority?"border-left:5px solid ".concat(e.priority," !important;"):""}),(function(e){return e.isCombining?"border:solid 3px ".concat(Object(z.d)("menu")," !important;"):""}));t.a=Object(x.b)((function(e){return{cardsExpanded:e.db.cardsExpanded,showPrivate:e.controls.lockPrivate,cards:e.db.cards,unlockedPrivates:e.controls.unlockedPrivates,controls:e.controls,searchs:e.searchs}}),(function(e){return Object(v.b)(g,e)}))((function e(t){var r,n,a,d,f,h,g,v,x,N=B(),A=y.a.getState(),G=A.db,H=A.session,W=t.cardId&&G.cards[t.cardId]?G.cards[t.cardId]:(null===(r=t.data)||void 0===r?void 0:r._id)&&G.cards[null===(n=t.data)||void 0===n?void 0:n._id]?G.cards[t.data._id]:{},U=u.a.useState(!1),q=Object(l.a)(U,2),V=q[0],J=q[1],X=u.a.useState(t.cardsExpanded),K=Object(l.a)(X,2),Z=K[0],Q=K[1],ee=u.a.useState(!1),te=Object(l.a)(ee,2),re=te[0],ne=te[1],ae=u.a.useState(!1),oe=Object(l.a)(ae,2),ie=oe[0],ce=oe[1],le=u.a.useState(!1),se=Object(l.a)(le,2),ue=se[0],de=se[1],pe=u.a.useState(t.cardColorPicker?Object($.r)(W):{}),fe=Object(l.a)(pe,2),he=fe[0],me=fe[1],ge=u.a.useState(!1),be=Object(l.a)(ge,2),ye=be[0],ve=be[1],xe=u.a.useState({}),_e=Object(l.a)(xe,2),Oe=_e[0],we=_e[1],je=u.a.useRef(!0);u.a.useEffect((function(){return je.current=!0,function(){je.current=!1}}),[]);var Ee=m()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),ke=u.a.createRef(),Se=u.a.useRef(0);Object(s.useEffect)((function(){if(ke.current&&je.current&&t.onResize){var e=ke.current.clientHeight;t.separator&&(e+=55),Se.current!==e&&(Se.current=e,t.onResize(e,V))}}),[V,t.manualExpanded,ye]),Object(s.useEffect)((function(){Ee&&t.searchs&&t.searchs[Ee]&&JSON.stringify(t.searchs[Ee])!==JSON.stringify(Oe)&&je.current&&we(t.searchs[Ee])}),[t.searchs]),Object(s.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&je.current&&ve(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&ye&&je.current&&ve(!1)}),[null===t||void 0===t||null===(a=t.snapshot)||void 0===a?void 0:a.combineTargetFor]),u.a.useEffect((function(){"0"===String(t.unlockedPrivates)&&ue&&je.current&&de(!1)}),[t.unlockedPrivates]),u.a.useEffect((function(){je.current&&Q(t.cardsExpanded)}),[t.cardsExpanded]),u.a.useEffect((function(){t.onExpand&&je.current&&t.onExpand(Z)}),[Z]);var Le=window.location.hash.split("/");if(Le[0]=Le[0].replace("#",""),u.a.useEffect((function(){je.current&&t.cardColorPicker&&Le&&"overview"===Le[1]&&me(Object($.r)(W))}),[t.cards]),W==={}||!W)return u.a.createElement(u.a.Fragment,null);var Ce=Object(z.j)(),Ie=Object($.t)(W._id);if(!W||!W||!W._id)return null;var Te=!!(Object.keys(G.cards).filter((function(e){return G.cards[e]&&!0===G.cards[e]._selected&&G.cards[e].type&&G.cards[e].type.indexOf("guideline")>-1})).length>0&&Le&&Le[1]&&"matrix"===Le[1]&&"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module),Fe=function(){var e=Object(c.a)(Y().mark((function e(){var r,n,a,c,l,s;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=W.type.indexOf("guideline")>-1?"guideline":"objective"===W.type?"objective":"goal"===W.type?"goal":"action",(a=Object(i.a)({},(null===(r=y.a.getState().searchs[Ee])||void 0===r?void 0:r.selectedCards)||{}))&&a[n]&&a[n]===W._id?("guideline"===n&&(delete a.guideline,delete a.objective,delete a.goal,delete a.action),"objective"===n&&(delete a.objective,delete a.goal,delete a.action),"goal"===n&&(delete a.goal,delete a.action),"action"===n&&(delete a.action,delete a[n])):a=Object(i.a)(Object(i.a)({},a),{},Object(o.a)({},W.type.indexOf("guideline")>-1?"guideline":"objective"===W.type?"objective":"goal"===W.type?"goal":"action",W._id)),t.reduxFunction("ASYNC","SET_SEARCH",Object(i.a)(Object(i.a)({},y.a.getState().searchs),{},Object(o.a)({},Ee,Object(i.a)(Object(i.a)({},y.a.getState().searchs[Ee]||{}),{},{selectedCards:a})))),Te){e.next=7;break}return De(),e.abrupt("return");case 7:c={},Object.keys(G.cards).filter((function(e){return G.cards[e]&&!G.cards[e].deleted&&(G.cards[e]._planId===Le[0]||G.cards[e]._parent===Le[0])})).forEach((function(e){c=Object(i.a)(Object(i.a)({},c),{},Object(o.a)({},e,G.cards[e]))})),l=Object(i.a)({},G.cards),s=!W._selected,"swot"!==G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object.keys(c).filter((function(e){return c[e]._id!==W._id&&c[e].type&&c[e].type===W.type})).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),W.type.indexOf("guideline")>-1&&Object.keys(c).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),W.type.indexOf("objective")>-1&&Object.keys(c).filter((function(e){return"goal"===c[e].type})).forEach((function(e){c[e]._selected&&(c[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)(Object(i.a)({},l),c),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)(Object(i.a)({},G.cards[W._id]),c[W._id]),{},{_selected:s})))})),"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object($.G)(t),s&&"matrix"===G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object($.H)(t,W._id);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),De=function(){var e=Object(c.a)(Y().mark((function e(){var r,n,a;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(G.cards).filter((function(e){return G.cards[e]&&!G.cards[e].deleted&&(G.cards[e]._planId===Le[0]||G.cards[e]._parent===Le[0])})).forEach((function(e){r=Object(i.a)(Object(i.a)({},r),{},Object(o.a)({},e,G.cards[e]))})),n=Object(i.a)({},G.cards),a=!W._selected,"swot"!==G.dataType.filter((function(e){return e.name===W.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==W._id&&r[e].type&&r[e].type===W.type})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),W.type.indexOf("guideline")>-1?Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):W.type.indexOf("objective")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):W.type.indexOf("goal")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("goal")||-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).forEach((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)(Object(i.a)({},n),r),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)(Object(i.a)({},G.cards[W._id]),r[W._id]),{},{_selected:a})))}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ne=function(){var e=Object(c.a)(Y().mark((function e(){var r,n=arguments;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.length>0&&void 0!==n[0]?n[0]:"cardEdit",t.reduxFunction("ASYNC","SET_MODULE",Object(i.a)(Object(i.a)({},y.a.getState().sideModule),{},{db:t.db,id:W._id,module:"cardEdit",activeModule:r,data:W}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=Object(c.a)(Y().mark((function e(){var r,n,a=arguments;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],W._hasStep&&!r&&Object(M.a)(Object(i.a)(Object(i.a)({},t),{},{nodeId:W._id})),W._hasStep&&!r){e.next=7;break}return e.next=5,P.a.post("/Card_Count",{id:W._id});case 5:n=e.sent,parseInt(n.data)>0?Object(z.c)({message:Object(z.u)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(z.u)("$__concludeAll"),text:Object(z.u)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){Object($.O)(Object(i.a)(Object(i.a)({},t),{},{data:{_id:W._id}}),{status:"completed"===W.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object($.e)(t,W._id,"completed"===W.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(z.u)("$__cancel"),text:Object(z.u)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(Object($.O)(Object(i.a)(Object(i.a)({},t),{},{data:{_id:W._id}}),{status:"completed"===W.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object($.e)(t,W._id,"completed"===W.status?"inProgress":"completed"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=Object(c.a)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(Ie)>2||Ce.owner||Ce.plan&&(Ce.planAdmin||Ce.planModerate)?b.a.push("sp#".concat(t,"/dashboard")):Ne("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$e=function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(z.c)({message:Object(z.u)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.o)(t,{_id:W._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(z.c)({message:Object(z.u)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.E)(t,{_id:W._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ze=!t.noExpanded&&(V||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||W._expanded||t.cardsExpanded)),Ye=!!(Ce&&(Ce.owner||Ce.plan&&(Ce.planAdmin||Ce.planModerate))||Ie>2),Be={button:!1,date:null};if(Be=W&&W._users&&Object.keys(W._users).filter((function(e){return e===H._id})).length>0&&G.dataType.filter((function(e){return e.name===W.type})).length>0&&G.dataType.filter((function(e){return e.name===W.type}))[0].modules.indexOf("myDay")>-1?W._users[Object.keys(W._users).filter((function(e){return e===H._id}))[0]].myDay?{button:!0,date:W._users[Object.keys(W._users).filter((function(e){return e===H._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},W&&W.private&&(!W._users||W._users&&!W._users[H._id]))return u.a.createElement(u.a.Fragment,null);if(re)return u.a.createElement(D.a,{cardId:W._id,toTemplate:!W.isTemplate,onComplete:function(){je.current&&ne(!1)}});var Re={title:(null===W||void 0===W?void 0:W.name)||Object(z.u)("$__new",1),icon:(null===W||void 0===W?void 0:W.icon)||W.type&&G&&G.dataType&&G.dataType.filter((function(e){return e.name===W.type}))[0]&&G.dataType.filter((function(e){return e.name===W.type}))[0].icon||"$__topic",iconTitle:"$__".concat(W.type)};if(W._planId&&(null===(d=G.cards[W._planId])||void 0===d?void 0:d.customColumns)&&(W.type.indexOf("guideline")>-1||W.type.indexOf("objective")||W.type.indexOf("goal"))){var Ge=JSON.parse(G.cards[W._planId].customColumns),He=W.type.indexOf("guideline")>-1?"guideline":W.type;Ge["".concat(He,"s")]&&(Re=Object(i.a)(Object(i.a)(Object(i.a)({},Re),Ge["".concat(He,"s")].name?{iconTitle:Ge["".concat(He,"s")].name}:{}),Ge["".concat(He,"s")].icon?{icon:Ge["".concat(He,"s")].icon}:{}))}return u.a.createElement(R,{ref:ke,separator:t.separator||!1,plan:!(!ze||"plan"!==W.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:W.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===W.type||!t.inLine),className:t.noShadow?N.containerNoShadow:N.container,selectable:t.showSelected,selected:!!(Oe&&Oe.selectedCards&&Object.keys(Oe.selectedCards).filter((function(e){return Oe.selectedCards[e]===W._id})).length>0),priority:W.priority&&G.priority.filter((function(e){return String(e.value)===String(W.priority)})).length>0?G.priority.filter((function(e){return String(e.value)===String(W.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){je.current&&ce(!0)},onMouseLeave:function(){je.current&&setTimeout((function(){je.current&&ce(!1)}),100)},onClick:function(e){console.log(W),W._requireApproval&&G.cards[W._id]._parent&&G.cards[G.cards[W._id]._parent]&&(!G.cards[G.cards[W._id]._parent]._users[H._id]||G.cards[G.cards[W._id]._parent]._users[H._id]&&!G.cards[G.cards[W._id]._parent]._users[H._id].approvalResponsible)&&W&&W._users&&1===Object.keys(W._users).length&&!W._users[H._id]||t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&Te||t.selectable)?Fe():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==W.type?t.locked||Ne():Pe(W._id):t.onClick(),t.onOpen&&t.onOpen())},onContextMenu:function(e){}},("completed"===W.status||t.cardColorPicker&&he.color)&&u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.a.createElement("div",{style:{position:"absolute",backgroundColor:t.cardColorPicker&&he.color?he.color:"rgba(0,0,0,1)",opacity:he.color?.2:.1,top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}})),u.a.createElement(u.a.Fragment,null,t.snapshot&&t.snapshot.combineTargetFor&&u.a.createElement("div",{style:{backgroundColor:Object(z.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(z.u)("$__dropHereToLink")),u.a.createElement(j.a,{private:!(!W.private&&!W.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().controls),{},{unlockedPrivates:y.a.getState().controls.unlockedPrivates+r})),je.current&&de(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:Re.title,tooltipText:"".concat(W._parent&&G.cards[W._parent]?"".concat(G.cards[W._parent].name," / "):"").concat(Re.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:Re.icon,iconTitle:Re.iconTitle,color:"#6d6d6d",editable:!(W.name||t.onlyOption&&!t.editable),_id:W._id,locked:!("link"!==W.type&&!t.locked),colorPicker:Ye&&t.cardColorPicker&&he&&!he.parent?function(e){(!he.color&&e||he.color&&he.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{color:e})))}))}:null,onEdit:"completed"!==W.status&&(Ie&&parseInt(Ie)>1||Ce&&Ce.plan&&(Ce.owner||Ce.planAdmin||Ce.planEdit||Ce.planModerate))?function(e){t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{name:e})))}))}:null,moreButton:ie,options:W.deleted?[{name:Object(z.u)("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){Me()},show:"hover",color:Object(z.d)("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[Object.keys(G.cards).filter((function(e){return G.cards[e]&&"step"===G.cards[e].type&&G.cards[e]._parent===W._id})).length>0&&{name:"$__openTaskList",icon:"schema",show:"fixed",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().control),{},{board:W._id}))}},W.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(W.url,"_blank")}},!W.archived&&"completed"!==W.status&&Be&&Be.button&&{name:p()(new Date(1e3*Be.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:p()(new Date(1e3*Be.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:p()(new Date(1e3*Be.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(Be&&Be.date&&(!Be||!Be.date||p()(new Date(1e3*Be.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")));Object($.J)(t,{_id:W._id,userId:H._id,option:e}),t.myDayClick&&t.myDayClick()}},t.suggestion&&{name:"$__removeFromMyDaySuggestions",icon:"playlist_remove",show:"hover",onClick:function(){Object($.J)(t,{_id:W._id,userId:H._id,option:!1,noLog:!0}),t.myDayClick&&t.myDayClick()}},!W.archived&&!t.onlyOption&&(Ie&&parseInt(Ie)>1||Ce.owner||Ce.planAdmin||Ce.planEdit||Ce.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),Ne()},show:"hover"},!W.archived&&!W.isTemplate&&W._users&&"completed"!==W.status&&W._users[H._id]&&(!W._kpiTimer||0===Object.keys(W._kpiTimer).length||W._kpiTimer&&Object.keys(W._kpiTimer).length>0&&0===Object.keys(W._kpiTimer).filter((function(e){return H&&H._id&&e&&W._kpiTimer[e]&&W._kpiTimer[e].userId&&W._kpiTimer[e].userId===H._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){Object(z.c)({message:Object(z.u)("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object($.w)(t,W._id),!(Be&&Be.date&&(!Be||!Be.date||p()(new Date(1e3*Be.date)).format("YYYY/MM/DD")===p()().format("YYYY/MM/DD")))&&Object($.J)(t,{_id:W._id,userId:H._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},W._users&&"completed"!==W.status&&W._users[H._id]&&W._hasStep&&{name:"$__completeStep",icon:"playlist_add_check",color:"#6ab6c2",show:"hover",onClick:function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ae();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},W._users&&"completed"!==W.status&&W._users[H._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ae(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!W.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&{name:W._selected?"$__removeSelection":"$__selectThis",icon:W._selected?"visibility_off":"visibility",hide:!0,onClick:function(){Fe()}},{name:"$__duplicate",icon:"content_copy",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(i.a)(Object(i.a)({},y.a.getState().control),{},{toCopyMove:W._id}))}},!W.isTemplate&&"plan"===W.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){je.current&&ne(!0)}},W&&!W.isTemplate&&"plan"===W.type&&!W.archived&&(W._users&&W._users[H._id]&&W._users[H._id].access&&5===parseInt(W._users[H._id].access)||Ce&&Ce.planAdmin)&&{name:Object(z.u)("$__shelve"),icon:"archive",onClick:function(){Object($.M)(t,{_id:W._id,archived:!0})}},(Ie&&5===parseInt(Ie)||Ce.owner||Ce.planAdmin||Ce.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||W.archived||0===G.dataType.filter((function(e){return e.name===W.type})).length||G.dataType.filter((function(e){return e.name===W.type})).length>0&&"swot"===G.dataType.filter((function(e){return e.name===W.type}))[0].module?$e():Ne("delete"),t.onAction&&t.onAction()},show:"hover"},W&&!W.isTemplate&&"plan"===W.type&&W.archived&&(W._users&&W._users[H._id]&&W._users[H._id].access&&parseInt(5===W._users[H._id])||Ce&&Ce.planAdmin)&&{name:Object(z.u)("$__unarchive"),icon:"archive",onClick:function(){Object($.M)(t,{_id:W._id,archived:null})}},!W.archived&&!W.isTemplate&&{name:W._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:W._isFavorite?"favorite":"favorite_border",color:Object(z.d)("medium"),onClick:function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(z.g)(t,W._id,!!W._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(i.a)(Object(i.a)({},G),{},{cards:Object(i.a)(Object(i.a)({},G.cards),{},Object(o.a)({},W._id,Object(i.a)(Object(i.a)({},G.cards[W._id]),{},{_isFavorite:!W._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!W.isTemplate&&!W.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==W.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==W.status?"lightgray":"green",onClick:function(){var e=Object(c.a)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ae();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:!t.noExpanded&&ze,noExpanding:t.expanded||G.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!ze),t.expanded||G.cardsExpanded||je.current&&J((function(e){return!e}))},onClick:function(e){}}),W&&(W._cardCode||W.value)?u.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},W&&W._cardCode&&(!ze||ze&&!W.image)?u.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",W._cardCode):u.a.createElement(u.a.Fragment,null),W&&W.value?u.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",W.value):u.a.createElement(u.a.Fragment,null)):u.a.createElement(u.a.Fragment,null),("insight"===W.type||"link"===W.type)&&W._createdBy&&G.users[W._createdBy._id]||W._createdBy&&W._createdBy.channel&&W._createdBy._id&&G.users&&G.users[W._createdBy._id]?u.a.createElement("div",{style:{width:"calc(100% - 0px)",alignItems:"center",padding:"7px",display:"inline-flex",borderBottom:"solid 1px rgba(0,0,0,0.03)"}},u.a.createElement("div",{style:{position:"relative",float:"left"}},u.a.createElement(I.a,{title:W._createdBy.name||G.users[W._createdBy._id].name},u.a.createElement(C.a,{alt:W._createdBy.name||G.users[W._createdBy._id].name,src:(null===(f=G.users[W._createdBy._id])||void 0===f?void 0:f.image)||null,size:"12px",style:{width:16,height:16}},(null===(h=W._createdBy)||void 0===h||null===(g=h.name)||void 0===g?void 0:g.substr(0,1))||G.users[W._createdBy._id].name.substr(0,1)))),u.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px"}},u.a.createElement("div",{style:{color:Object(z.d)("menu"),fontWeight:"bold"}},u.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(z.u)("$__createdBy","*")),": ",(null===(v=W._createdBy)||void 0===v||null===(x=v.name)||void 0===x?void 0:x.split(" ")[0])||G.users[W._createdBy._id].name.split(" ")[0]),u.a.createElement("div",null,p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("H:mm")):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*W.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(p()(1e3*W.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))):u.a.createElement(u.a.Fragment,null),W._kpiTimer&&Object.keys(W._kpiTimer).length>0&&0!==Object.keys(W._kpiTimer).filter((function(e){return W._kpiTimer[e].userId===H._id})).length&&u.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},u.a.createElement(L.a,{data:W})),!t.noExpanded&&ze&&(!W.private||W.private&&(ue||y.a.getState().controls.lockPrivate))?u.a.createElement(u.a.Fragment,null,u.a.createElement(F.a,Object.assign({},t,{private:!!W.private,expanded:!0,Resume:!0})),u.a.createElement("div",null,t.searchText&&W.description&&u.a.createElement("div",{className:N.description},Object(z.b)(W.description,t.searchText)))):ze?u.a.createElement(u.a.Fragment,null,u.a.createElement(T.a,null)):u.a.createElement(u.a.Fragment,null),W.isTemplate?u.a.createElement(u.a.Fragment,null):u.a.createElement("div",null,"completed"!==W.status&&(W.startDate&&p()(W.startDate).isValid()||W.endDate&&p()(W.endDate).isValid())?u.a.createElement("div",null,u.a.createElement("div",{className:W.endDate&&p()(new Date(1e3*W.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<p()().format("YYYY-MM-DD")&&"completed"!==W.status?N.lateDates:N.dates},W.startDate&&p()(W.startDate).isValid()&&u.a.createElement("div",{className:N.dateInfo},u.a.createElement(_.a,{overlap:"rectangular",className:N.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*W.startDate)instanceof Date&&!isNaN(new Date(1e3*W.startDate))?p()(new Date(1e3*W.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):p()(W.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),W.endDate&&p()(W.endDate).isValid()?u.a.createElement("div",{className:N.dateInfo},u.a.createElement(_.a,{overlap:"rectangular",className:N.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*W.endDate)instanceof Date&&!isNaN(new Date(1e3*W.endDate))?p()(new Date(1e3*W.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):p()(W.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):u.a.createElement(u.a.Fragment,null))):u.a.createElement(u.a.Fragment,null)),W._tags&&W._tags.filter((function(e){return e.value})).length>0?u.a.createElement("div",{style:t.showTags||ze?{marginBottom:33}:{}},u.a.createElement(O.a,{options:W._tags,expanded:!!(t.showTags||ze&&"plan"!==W.type&&"link"!==W.type&&"insight"!==W.type)})):u.a.createElement(u.a.Fragment,null),W._recurrenceId&&u.a.createElement("div",{style:{position:"absolute",width:"100%",bottom:"3px",left:"3px",display:"flex",fontSize:"11px",color:"lightgrey",alignItems:"center"}},u.a.createElement(_.a,{overlap:"rectangular",className:N.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(z.u)("$__recurrence")).concat(W.recurrenceCreatedDate?": ".concat(p()(W.recurrenceCreatedDate).format("DD/MM/YYYY")):""):u.a.createElement("div",{style:{maxWidth:"280px"}},Object(z.u)("$__recurrentActivityFrom"),":",u.a.createElement(e,{db:"cards",cardId:W._recurrenceId,Avatar:!0,ignoreList:!0,onlyOption:!0}))}),W.recurrenceCreatedDate?p()(W.recurrenceCreatedDate).format("DD/MM/YYYY"):""),ze||W._users&&Object.keys(W._users).filter((function(e){return null!==String(e)})).length>0&&(!W._users[H._id]||W._users[H._id]&&Object.keys(W._users).length>1)?u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{style:{width:"100%",marginTop:ze?37:7}},u.a.createElement("div",{className:N.usersContent},u.a.createElement("div",{className:N.users},u.a.createElement(S.a,{_id:W._id,data:W,permission:Ye,transparent:!0,myDay:!0,limit:3})))),u.a.createElement("div",{style:{clear:"both"}})):u.a.createElement(u.a.Fragment,null)),W.isTemplate&&u.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(z.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),je.current&&ne(!0)}},u.a.createElement(k.a,{text:Object(z.u)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),W._requireApproval&&(W._parent&&(!G.cards[W._parent]||G.cards[W._parent]&&G.cards[W._parent]._users&&(!G.cards[W._parent]._users[H._id]||G.cards[W._parent]._users[H._id]&&!G.cards[W._parent]._users[H._id].approvalResponsible))||G.cards[W._id]._users&&1===Object.keys(G.cards[W._id]._users).length&&G.cards[W._id]._users[H._id])?u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.a.createElement("div",{style:{position:"absolute",backgroundColor:"rgba(0,0,0,0.6)",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"white"}},u.a.createElement(E.a,{icon:"lock",color:"white"}),u.a.createElement("span",null,Object(z.u)("$__awaitApproval")))):!ie&&"completed"===W.status&&u.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",left:0,right:0,top:"20px"}},u.a.createElement("div",{style:{position:"absolute",right:0,bottom:-12,color:"#FFF",fontSize:10,padding:3,backgroundColor:"rgba(0,0,0,0.66)"}},Object(z.u)("$__completeDate"),":",Object(z.k)(W.completed_at||W.updated_at))),"plan"!==W.type&&W.deleted?u.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",cursor:"pointer"}},u.a.createElement("div",{style:{position:"absolute",backgroundColor:"#71389da6",top:0,left:0,right:0,bottom:0,paddingRight:7,display:"flex",alignItems:"center",cursor:"pointer",justifyContent:"right"}},u.a.createElement(w.a,{title:Object(z.u)("$__restoreThis",1),text:Object(z.u)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){Me()},size:"17px",textSize:"17px",transparent:!0}))):u.a.createElement(u.a.Fragment,null),u.a.createElement(u.a.Fragment,null),u.a.createElement("div",{style:{clear:"both"}}))}))},516:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(9),l=r.n(c),s=r(1),u=r(83),d=r(117),p=r(148),f=(r(164),r(106)),h=r(3);t.default=function(e){var t=e.tittle,r=e.preview,c=e.icon,m=Object(o.useState)([]),g=Object(a.a)(m,2),b=g[0],y=g[1],v=l()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),x=window.location.hash.split("/");x[0]=x[0].replace("#","");var _=h.a.getState().db;return Object(o.useEffect)((function(){y([].concat(Object(n.a)(_.status.map((function(t,r){return{id:Object(s.u)(t.label,1),label:Object(s.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return _.cards[e]._planId===x[0]&&!_.cards[e].deleted&&_.cards[e].status&&_.cards[e].status===t.value&&("iniciative"===_.cards[e].type||"task"===_.cards[e].type||"meeting"===_.cards[e].type||"iniciative"===_.cards[e].type||"myTask"===_.cards[e].type)&&(!_.cards[e].checklist||_.cards[e].checklist&&_.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(s.u)("$__late",1),label:Object(s.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return _.cards[e]._planId===x[0]&&!_.cards[e].deleted&&"completed"!==_.cards[e].status&&("iniciative"===_.cards[e].type||"task"===_.cards[e].type||"meeting"===_.cards[e].type||"iniciative"===_.cards[e].type||"myTask"===_.cards[e].type)&&(!_.cards[e].checklist||_.cards[e].checklist&&_.cards[e].showCard)&&_.cards[e].endDate&&l()(new Date(1e3*_.cards[e].endDate)).tz("America/Sao_Paulo").format()<=l()(new Date(v)).tz("America/Sao_Paulo").format()})).length,color:"red"}]))}),[e.planCards]),i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(f.a,null,(function(a){return i.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},i.a.createElement(u.a,{styles:e.styles,tittle:Object(s.u)("$__".concat(t)),icon:c,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),i.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),i.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},i.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},b.length>0&&!e.load&&a?i.a.createElement(d.a,{data:b,colors:[].concat(Object(n.a)(_.status.map((function(e){return e.color}))),["red"]),margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):i.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},i.a.createElement("div",{style:{alignSelf:"center"}}," ",i.a.createElement("div",{className:"loader"}))))),!r&&i.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},i.a.createElement(p.a,{legend:Object(n.a)(_.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))})))}},517:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(0),o=r.n(a),i=r(725),c=r(132),l=r(228),s=r(83),u=r(67),d=r(69),p=r(10),f=r(50),h=r(9),m=r.n(h),g=r(1),b=r(3);t.default=function(e){var t=m()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),r=window.location.hash.split("/");r[0]=r[0].replace("#","");var h=b.a.getState().db,y=Object(a.useState)(!1),v=Object(n.a)(y,2),x=v[0],_=v[1],O=Object(a.useState)(1),w=Object(n.a)(O,2),j=w[0],E=w[1],k=Object(a.useState)(""),S=Object(n.a)(k,2),L=S[0],C=S[1],I=Object(a.useRef)(),T=Object(a.useState)(0),F=Object(n.a)(T,2),D=F[0],N=F[1];return Object(a.useEffect)((function(){if(I.current){var e=new ResizeObserver((function(){var e=I.current.clientHeight/42;N(e/2-1)}));return e.observe(I.current),function(){return e.disconnect()}}}),[]),o.a.createElement("div",{onMouseEnter:function(){return _(!0)},onMouseLeave:function(){return _(!1)},style:{height:"100%"}},o.a.createElement(u.a,{style:{marginTop:"0px",height:"100%",overflow:"hidden",borderRadius:"0px"}},o.a.createElement("div",null,e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(p.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(g.u)("$__todayTasks",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(p.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(p.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(s.a,{hover:x,tittle:Object(g.u)("$__todayTasks",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),x&&!e.edit&&o.a.createElement(c.a,{text:"Buscar",icon:"search",popper:o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(l.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&C(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),o.a.createElement(d.a,{style:{height:"100%",display:"flex",flexDirection:"column"}},o.a.createElement("div",{ref:I,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,n){return!!(h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0)})).filter((function(e,t){return t>=(j-1)*D&&t<j*D})).map((function(e,t){return o.a.createElement(f.a,{db:"cards",key:e,data:h.cards[e]})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/D)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},o.a.createElement(i.a,{page:j,count:Math.ceil(Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===r[0]&&!h.cards[e].deleted&&h.cards[e].name.toLowerCase().includes(L.toLowerCase()?L:"")&&h.cards[e]._users&&Object.keys(h.cards[e]._users).filter((function(r){return h.cards[e]._users[r].myDay&&m()(new Date(1e3*h.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/D),onChange:function(e,t){E(t)}})))))}},518:function(e,t,r){"use strict";r.r(t);var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(83),l=r(106),s=(r(164),r(3)),u=r(1),d=r(10),p=r(701);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=Object(o.useState)({index:0,showQuantity:8,number:8,finalIndex:8}),f=Object(a.a)(r,2),h=f[0],m=f[1],g=Object.keys(e.planCards).filter((function(e){return s.a.getState().db.cards[e]._parent===t[0]&&"step"===s.a.getState().db.cards[e].type})).map((function(e,t){return s.a.getState().db.cards[e]})),b=g.sort((function(e,t){return e.step-t.step})).map((function(e,r){return{id:e._id,value:Object.keys(s.a.getState().db.cards).filter((function(n){return!s.a.getState().db.cards[n].deleted&&(s.a.getState().db.cards[n]._parent===e._id||0===r&&s.a.getState().db.cards[n]._parent===t[0]&&"step"!==s.a.getState().db.cards[n].type)})).length,label:e.name,name:e.name}}));return i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(l.a,null,(function(t){return i.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"hidden"}},i.a.createElement(c.a,{filterConfig:{filterName:"etapas",filterItems:[],filterSelect:b.length},styles:e.styles,handleSetSelected:function(e){return m(Object(n.a)(Object(n.a)({},h),e))},tittle:Object(u.u)("$__"+e.tittle),icon:e.icon,datafilter:!0,handleSetoption:function(e){return m(Object(n.a)(Object(n.a)({},h),e))},edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),i.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),i.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},0!==h.index&&i.a.createElement(d.a,{onClick:function(){return m(Object(n.a)(Object(n.a)({},h),{},{index:h.index-1,finalIndex:h.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),g.length!==h.index+h.number&&g.length>h.showQuantity&&i.a.createElement(d.a,{onClick:function(){return m(Object(n.a)(Object(n.a)({},h),{},{index:h.index+1,finalIndex:h.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),i.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},i.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(u.d)("menu"),fontWeight:"bold",fontSize:16}},g.sort((function(e,t){return e.step-t.step})).map((function(e){return i.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/h.showQuantity,"%"),textAlign:"center",wordWrap:" break-word ",maxHeight:"60px",overflow:"scroll",minHeight:"50px",alignSelf:"center"}},e.name)})).slice(h.index,h.finalIndex)),i.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(u.d)("menu"),fontWeight:"bold",fontSize:16}},g.sort((function(e,t){return e.step-t.step})).map((function(e){var t=0,r=e,n=Object.keys(s.a.getState().db.cards).filter((function(t){return e&&e._id&&s.a.getState().db.cards[t]._parent===e._id&&!s.a.getState().db.cards[t].deleted&&s.a.getState().db.cards[t].value})).map((function(e){return s.a.getState().db.cards[e].value}))||[];return r.showSumValues&&n.length>0&&n.forEach((function(e){t+=parseFloat(e)})),i.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/h.showQuantity,"%"),textAlign:"center",fontSize:12,alignSelf:"center"}},t?"R$ ".concat(t):"")})).slice(h.index,h.finalIndex)),b.length>0&&i.a.createElement(p.a,{data:b.slice(h.index,h.finalIndex),direction:"horizontal",margin:{top:0,right:0,bottom:45,left:0},shapeBlending:.46,spacing:3,valueFormat:" > .0s",colors:{scheme:"reds"},isInteractive:!1,borderWidth:20,labelColor:{from:"color",modifiers:[["darker",3]]},beforeSeparatorLength:10,beforeSeparatorOffset:20,afterSeparatorLength:10,afterSeparatorOffset:20,currentPartSizeExtension:10,currentBorderWidth:7,motionConfig:"wobbly"}))))})))}},519:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(9),l=r.n(c),s=r(1),u=r(117),d=r(148),p=r(83),f=(r(164),r(106)),h=r(3);t.default=function(e){var t=Object(o.useState)([]),r=Object(a.a)(t,2),c=r[0],m=r[1],g=e.tittle,b=e.icon,y=l()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),v=window.location.hash.split("/");v[0]=v[0].replace("#","");var x=h.a.getState().db;return Object(o.useEffect)((function(){m([].concat(Object(n.a)(x.status.map((function(t){return{id:Object(s.u)(t.label,1),label:Object(s.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return x.cards[e]._planId===v[0]&&"goal"===x.cards[e].type&&!x.cards[e].checklist&&!x.cards[e].deleted&&x.cards[e].status&&x.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(s.u)("$__late",1),label:Object(s.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return x.cards[e]._planId===v[0]&&!x.cards[e].checklist&&!x.cards[e].deleted&&"completed"!==x.cards[e].status&&"goal"===x.cards[e].type&&x.cards[e].endDate&&l()(new Date(1e3*x.cards[e].endDate)).tz("America/Sao_Paulo").format()<=l()(new Date(y)).tz("America/Sao_Paulo").format()})).length,color:"#FFFFFF"}]))}),[e.planCards]),i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(f.a,null,(function(t){return i.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},i.a.createElement(p.a,{styles:e.styles,tittle:Object(s.u)("$__".concat(g)),icon:b,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),i.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),i.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},i.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&t?i.a.createElement(u.a,{data:c,colors:[].concat(Object(n.a)(x.status.map((function(e){return e.color}))),["red"]),margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#FFFFFF",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):i.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},i.a.createElement("div",{style:{alignSelf:"center"}}," ",i.a.createElement("div",{className:"loader"}))))),i.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},i.a.createElement(d.a,{legend:Object(n.a)(x.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))})))}},520:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(0),o=r.n(a),i=r(67),c=r(69),l=r(10),s=r(132),u=r(228),d=r(50),p=r(725),f=r(83),h=r(3),m=r(1);t.default=function(e){var t=o.a.useState(1),r=Object(n.a)(t,2),g=r[0],b=r[1],y=window.location.hash.split("/");y[0]=y[0].replace("#","");var v=h.a.getState().db,x=Object(a.useState)(!1),_=Object(n.a)(x,2),O=_[0],w=_[1],j=Object(a.useRef)(),E=Object(a.useState)(""),k=Object(n.a)(E,2),S=k[0],L=k[1],C=Object(a.useState)(0),I=Object(n.a)(C,2),T=I[0],F=I[1];return Object(a.useEffect)((function(){if(j.current){var e=new ResizeObserver((function(){var e=j.current.clientHeight/42;F(e/2-1)}));return e.observe(j.current),function(){return e.disconnect()}}}),[]),o.a.createElement("div",{onMouseEnter:function(){return w(!0)},onMouseLeave:function(){return w(!1)},style:{height:"100%",overflow:"hidden"}},o.a.createElement(i.a,{style:{height:"100%",margin:"0px"}},o.a.createElement("div",null,e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(l.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(m.u)("$__lastCompletedCards",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(l.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(f.a,{hover:O,tittle:Object(m.u)("$__lastCompletedCards",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),O&&!e.edit&&o.a.createElement(s.a,{text:"Buscar",icon:"search",popper:o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(u.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&L(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),o.a.createElement(c.a,null,o.a.createElement("div",{ref:j,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,t){return v.cards[e]._planId===y[0]&&!v.cards[e].deleted&&(!v.cards[e].checklist||v.cards[e].checklist&&v.cards[e].showCard)&&"completed"===v.cards[e].status&&v.cards[e].name.toLowerCase().includes(S.toLowerCase()?S:"")})).sort((function(e,t){var r=v.cards[e].completed_at&&v.cards[e].completed_at.low?parseInt(v.cards[e].completed_at.low):"string"===typeof v.cards[e].completed_at?v.cards[e].completed_at:0,n=v.cards[t].completed_at&&v.cards[t].completed_at.low?parseInt(v.cards[t].completed_at.low):"string"===typeof v.cards[t].completed_at?v.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).filter((function(e,t){return t>=(g-1)*T&&t<g*T})).map((function(e,t){return o.a.createElement(d.a,{db:"cards",key:e,data:v.cards[e],inLine:!0})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return v.cards[e]._planId===y[0]&&"completed"===v.cards[e].status})).length/T)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},o.a.createElement(p.a,{page:g,count:Math.ceil(Object.keys(v.cards).filter((function(e){return v.cards[e]._planId===y[0]&&"completed"===v.cards[e].status&&v.cards[e].name.toLowerCase().includes(S.toLowerCase()?S:"")})).length/T),onChange:function(e,t){b(t)}})))))}},521:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(0),o=r.n(a),i=r(1),c=r(9),l=r.n(c),s=r(83),u=r(50),d=r(725),p=r(67),f=r(69),h=r(10),m=r(132),g=r(228),b=r(3);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=b.a.getState().db,c=l()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),y=Object(a.useState)(1),v=Object(n.a)(y,2),x=v[0],_=v[1],O=Object(a.useState)(""),w=Object(n.a)(O,2),j=w[0],E=w[1],k=Object(a.useState)(!1),S=Object(n.a)(k,2),L=S[0],C=S[1],I=Object(a.useRef)(),T=Object(a.useState)(0),F=Object(n.a)(T,2),D=F[0],N=F[1],A=e.planCards&&Object.keys(e.planCards).filter((function(e){return!r.cards[e].deleted&&"completed"!==r.cards[e].status&&r.cards[e].name.toLowerCase().includes(j.toLowerCase()?j:"")&&r.cards[e].endDate&&l()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=l()(new Date(c)).tz("America/Sao_Paulo").format()})).map((function(e){return e}));return Object(a.useEffect)((function(){if(I.current){var e=new ResizeObserver((function(){var e=I.current.clientHeight/42;N(e/2-1)}));return e.observe(I.current),function(){return e.disconnect()}}}),[]),o.a.createElement("div",{onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},style:{height:"100%"}},o.a.createElement(p.a,{style:{marginTop:"0px",height:"100%"}},o.a.createElement("div",null,e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(h.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(i.u)("$__lateActivities",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(h.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(h.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(s.a,{hover:L,tittle:Object(i.u)("$__lateActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),L&&!e.edit&&o.a.createElement(m.a,{text:"Buscar",icon:"search",popper:o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(g.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&E(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),e.planCards&&o.a.createElement(f.a,{style:{height:"100%",display:"flex",flexDirection:"column"}},o.a.createElement("div",{ref:I,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},A.sort((function(e,t){var n=r.cards[e].endDate,a=r.cards[t].endDate;return n>a?-1:n<a?1:0})).filter((function(e,t){return t>=(x-1)*D&&t<x*D})).map((function(e,t){return o.a.createElement(u.a,{db:"cards",key:e,data:r.cards[e],inLine:!0})}))),Math.ceil(A.length/D)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},o.a.createElement(d.a,{page:x,count:Math.ceil(A.length/D),onChange:function(e,t){_(t)}})))))}},522:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(9),c=r.n(i),l=r(1),s=r(83),u=r(148),d=r(117),p=r(119),f=r.n(p),h=(r(164),r(106)),m=r(3);t.default=function(e){var t=e.tittle,r=c()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a=window.location.hash.split("/");a[0]=a[0].replace("#","");var i=m.a.getState().db;return o.a.createElement("div",{style:{height:"100%",width:"100%"}},o.a.createElement(h.a,null,(function(p){return o.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},o.a.createElement(s.a,{styles:e.styles,tittle:Object(l.u)("$__".concat(t)),icon:f.a,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),o.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),o.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},o.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&p?o.a.createElement(d.a,{data:[].concat(Object(n.a)(i.status.map((function(t,r){return{id:Object(l.u)(t.label,1),label:Object(l.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].type.indexOf("guideline")>-1&&i.cards[e].status&&i.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(l.u)("$__late",1),label:Object(l.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].type.indexOf("guideline")>-1&&i.cards[e].endDate&&c()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=c()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(n.a)(i.status.map((function(e){return e.color}))),["red"]),margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",2]]}}):o.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{alignSelf:"center"}}," ",o.a.createElement("div",{className:"loader"}))))),o.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},o.a.createElement(u.a,{legend:Object(n.a)(i.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))})))}},523:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r(0),o=r.n(a),i=r(132),c=r(228),l=r(83),s=r(10),u=r(67),d=r(69),p=r(50),f=r(725),h=r(9),m=r.n(h),g=r(1),b=r(3);t.default=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=b.a.getState().db,h=m()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),y=o.a.useState(1),v=Object(n.a)(y,2),x=v[0],_=v[1],O=Object(a.useState)(!1),w=Object(n.a)(O,2),j=w[0],E=w[1],k=Object(a.useRef)(),S=Object(a.useState)(""),L=Object(n.a)(S,2),C=L[0],I=L[1],T=Object(a.useState)(0),F=Object(n.a)(T,2),D=F[0],N=F[1];return Object(a.useEffect)((function(){if(k.current){var e=new ResizeObserver((function(){var e=k.current.clientHeight/42;N(e/2-1)}));return e.observe(k.current),function(){return e.disconnect()}}}),[]),o.a.createElement("div",{style:{height:"100%"},onMouseEnter:function(){return E(!0)},onMouseLeave:function(){return E(!1)}},o.a.createElement(u.a,{style:{marginTop:"0px",height:"100%"}},o.a.createElement("div",null,e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(s.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(g.u)("$__nextActivities",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(s.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(s.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(l.a,{hover:j,tittle:Object(g.u)("$__nextActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),j&&!e.edit&&o.a.createElement(i.a,{text:"Buscar",icon:"search",popper:o.a.createElement("div",{style:{padding:"15px"}},o.a.createElement(c.a,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&I(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),o.a.createElement(d.a,null,o.a.createElement("div",{ref:k,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,n){return r.cards[e]._planId===t[0]&&!r.cards[e].deleted&&r.cards[e].name.toLowerCase().includes(C.toLowerCase()?C:"")&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&m()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=m()(new Date(h)).tz("America/Sao_Paulo").format()})).sort((function(e,t){var n=r.cards[e].completed_at&&r.cards[e].completed_at.low?parseInt(r.cards[e].completed_at.low):"string"===typeof r.cards[e].completed_at?r.cards[e].completed_at:0,a=r.cards[t].completed_at&&r.cards[t].completed_at.low?parseInt(r.cards[t].completed_at.low):"string"===typeof r.cards[t].completed_at?r.cards[t].completed_at:0;return n>a?-1:n<a?1:0})).filter((function(e,t){return t>=(x-1)*D&&t<x*D})).map((function(e,t){return o.a.createElement(p.a,{db:"cards",key:e,data:r.cards[e],inLine:!0})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return r.cards[e]._planId===t[0]&&"completed"!==r.cards[e].status&&r.cards[e].name.toLowerCase().includes(C.toLowerCase()?C:"")&&r.cards[e].startDate&&m()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=m()(new Date(h)).tz("America/Sao_Paulo").format()})).length/D)>1&&o.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},o.a.createElement(f.a,{page:x,count:Math.ceil(Object.keys(r.cards).filter((function(e){return r.cards[e]._planId===t[0]&&"completed"!==r.cards[e].status&&r.cards[e].name.toLowerCase().includes(C.toLowerCase()?C:"")&&r.cards[e].startDate&&m()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=m()(new Date(h)).tz("America/Sao_Paulo").format()})).length/D),onChange:function(e,t){_(t)}})))))}},524:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(83),l=r(148),s=r(117),u=(r(164),r(106)),d=r(3),p=r(9),f=r.n(p),h=r(1);t.default=function(e){var t=e.tittle,r=e.preview,p=e.icon,m=f()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),g=window.location.hash.split("/");g[0]=g[0].replace("#","");var b=d.a.getState().db,y=Object(o.useState)([]),v=Object(a.a)(y,2),x=v[0],_=v[1];return Object(o.useEffect)((function(){_([].concat(Object(n.a)(b.status.map((function(e){return{id:Object(h.u)(e.label,1),label:Object(h.u)(e.label,1),value:Object.keys(b.cards).filter((function(t){return b.cards[t]._planId===g[0]&&!b.cards[t].checklist&&!b.cards[t].deleted&&"objective"===b.cards[t].type&&b.cards[t].status&&b.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(h.u)("$__late",1),label:Object(h.u)("$__late",1),value:Object.keys(b.cards).filter((function(e){return b.cards[e]._planId===g[0]&&!b.cards[e].checklist&&!b.cards[e].deleted&&"completed"!==b.cards[e].status&&"objective"===b.cards[e].type&&b.cards[e].endDate&&f()(new Date(1e3*b.cards[e].endDate)).tz("America/Sao_Paulo").format()<=f()(new Date(m)).tz("America/Sao_Paulo").format()})).length,color:"red"}]))}),[e.planCards]),console.log(x),i.a.createElement("div",{style:{height:"100%",width:"100%"}},i.a.createElement(u.a,null,(function(a){return i.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",overflow:"hidden",alignSelf:"center",backgroundColor:"white",borderRadius:"5px",display:"flex",flexFlow:"column"}},i.a.createElement(c.a,{styles:e.styles,tittle:Object(h.u)("$__".concat(t)),icon:p,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),i.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),i.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},i.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},!e.load&&a?i.a.createElement(s.a,{data:x,colors:[].concat(Object(n.a)(b.status.map((function(e){return e.color}))),["red"]),margin:{top:20,right:20,bottom:20,left:20},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"},arcLinkLabelsStraightLength:0,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1,arcLinkLabelsSkipAngle:10,arcLinkLabelsTextColor:"#333333",arcLinkLabelsThickness:0,arcLinkLabelsColor:{from:"color"},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]}}):i.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},i.a.createElement("div",{style:{alignSelf:"center"}}," ",i.a.createElement("div",{className:"loader"}))))),!r&&i.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},i.a.createElement(l.a,{legend:Object(n.a)(b.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))})))}},529:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},532:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(479),s=r(27),u=r(20),d=r(33),p=r(14),f=r(13),h=r(15),m=r(1),g=r(24),b=r(39),y=r(439);r(771);function v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=y.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(772);t.a=Object(p.b)((function(e){return{}}),(function(e){return Object(f.b)(h,e)}))(Object(d.a)(y.a)((function(e){var t=e.classes,r=c.a.useState(""),i=Object(o.a)(r,2),d=i[0],p=i[1],f=c.a.useState(0),h=Object(o.a)(f,2),y=h[0],x=h[1],_=e.timer||{},O=e.data||{},w=function(){var e=Object(a.a)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=String(y),(n="backspace"===t.key.toLowerCase()?n.substr(0,n.length-1):"".concat(n||"").concat(isNaN(t.key)&&(","!==t.key&&"."!==t.key||-1!==n.indexOf(",")||-1!==n.indexOf("."))?"":t.key))&&n.indexOf(",")>-1&&(n=n.substr(0,n.indexOf(",")+3)),x(n);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!O)return null;var j=function(){var t=Object(a.a)(v().mark((function t(){var r,a;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||d?(r=isNaN(y)?y.replace(",","."):y,a=Object(n.a)(Object(n.a)({_id:Object(l.a)(),cardId:O._id,idRel:O._id,value:e.PositiveValue?r:"-".concat(r),type:"kpi"},e.manualEntry?{manualEntry:!0}:{}),{},{kpi_type:O.kpi_type?O.kpi_type:null,message:d||""}),e.timer&&(a=Object(n.a)(Object(n.a)({},a),{},{value:_.diff,ini:_.created_at,fin:_.updated_at,type:"timer",kpi_type:"timer",to:_.to})),b.a.post("timeline/add",Object(n.a)({},a)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&Object(g.v)(e,O._id,_._id),x(0),p("")):Object(m.c)({message:Object(m.u)("$__fillDescription",1),variant:"warning",persist:!1,horizontal:"center"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return e.data?c.a.createElement("div",{className:t.dataSave},c.a.createElement("fieldset",null,c.a.createElement("legend",{style:{color:Object(m.d)("color")}},Object(m.u)("$__new",1)),!e.timer&&c.a.createElement(s.a,{placeholder:Object(m.u)("$__value",1),value:Object(m.h)(y||0,"time"===O.kpi_type?"number":O.kpi_type,O.kpi_currency?O.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){w(e,"ini")}}}),c.a.createElement(s.a,{multiline:!0,placeholder:Object(m.u)("$__description",1),onChange:function(e){return p(e.target.value)},value:d,InputProps:{autoComplete:"new-password"}}),c.a.createElement("div",{style:{display:"flex",textAlign:"right"}},c.a.createElement(u.a,{title:Object(m.u)("$__save",1),color:"green",icon:"save",onClick:function(){return j()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&c.a.createElement(u.a,{title:Object(m.u)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):c.a.createElement("div",null,"NO DATA RECEIVED")})))},533:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(3);r(210).config();var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"comment",r=n.a.getState(),a=r.session,o=r.timeline;return o&&o[e]?Object.keys(o[e]).filter((function(r){return o[e]&&o[e][r]&&o[e][r].type&&o[e][r].type===t&&!o[e][r].deleted&&o[e][r].user&&o[e][r].user._id&&o[e][r].user._id!==a._id&&(!o[e][r].readedBy||o[e][r].readedBy&&!o[e][r].readedBy[a._id])})).length:0}},542:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(364),s=r.n(l),u=r(1138),d=r.n(u),p=r(73),f=r.n(p),h=r(74),m=r(532),g=r(10),b=r(147),y=r(345),v=r(546),x=r(545),_=r(346),O=r(544),w=r(157),j=r(1),E=Object(w.a)((function(e){return{iconButtonStyleTransaparent:{margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));var k=function(e){var t=E(),r=c.a.useState(!1),n=Object(o.a)(r,2),a=n[0],i=n[1],l=c.a.useRef(null),s=function(e){l.current&&l.current.contains(e.target)||i(!1)};return c.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},c.a.createElement(b.a,{title:Object(j.u)("$__options",1)},c.a.createElement(y.a,{ref:l,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),e.onClick&&e.onClick(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},c.a.createElement(g.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Object(j.d)("menu"),icon:e.icon?e.icon:"design_services",title:e.title?e.title:"NO_ALIAS"}))),c.a.createElement(O.a,{open:a,anchorEl:l.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return c.a.createElement(x.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),c.a.createElement(_.a,null,c.a.createElement(v.a,{onClickAway:s},c.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},c.a.cloneElement(e.children,{callBack:function(e){i(!1)}})))))})))},S=r(33),L=r(14),C=r(13),I=r(15),T=r(3),F=r(439),D=r(660),N=r(78);r(771);function A(){A=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(772);var P=Object(i.memo)((function(e){var t=e.classes,r=e.data,i=T.a.getState(),l=i.db,u=i.timeline,p=l.cards,g=c.a.useState(!1),b=Object(o.a)(g,2),y=b[0],v=b[1],x=c.a.useState(!1),_=Object(o.a)(x,2),O=_[0],w=_[1],E=c.a.useState([]),S=Object(o.a)(E,2),L=S[0],C=S[1],I=parseFloat(r.kpi_ini),F=parseFloat(r.kpi_fin);c.a.useEffect((function(){y||(v(!0),M(e.data._id),P())}),[]),c.a.useEffect((function(){M(e.data._id)}),[p]);var P=function(){var t=Object(a.a)(A().mark((function t(){var a,o;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a={ids:[r._id],db:"cards",reqChildrens:!0,type:"kpi",limit:!0},o=f()("".concat(JSON.stringify(a))).toString(),!u||u[r._id]&&(!u[r._id]||0!==Object.keys(u[r._id]).filter((function(e){return"kpi"===u[r._id][e].type})).length)||T.a.getState().timelineLoader&&(!T.a.getState().timelineLoader||T.a.getState().timelineLoader[o])){t.next=10;break}return w(!0),t.next=6,Object(N.f)(Object(n.a)(Object(n.a)({},e),{},{fnIdentification:"Timeline/Index/init()"}),a);case 6:t.sent&&w(!1),t.next=11;break;case 10:w(!1);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=[e.data._id],M=function(){var e=Object(a.a)(A().mark((function e(t,r){var n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(p).filter((function(e){return p[e].kpi_useParent&&p[e]._parent===t}))).length>0?n.map(function(){var e=Object(a.a)(A().mark((function e(t){return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M(t,!0),$.push(t),C(Array.from(new Set($)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||C($),e.abrupt("return",n);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!r)return null;var z=Object(n.a)({},D.model),Y=[],B=[],R={};L.forEach((function(e){R=Object(n.a)(Object(n.a)({},R),u[e]||{})})),R=Object.keys(R).filter((function(e){return"kpi"===R[e].type&&R[e].kpi_type===r.kpi_type})).map((function(e){return R[e]}));var G="time"!==r.kpi_type?parseFloat(I):0,H=parseFloat(I)-parseFloat(F),W=0;H<0&&(H*=-1),R&&Object.keys(R).length>0&&Object.keys(R).sort((function(e,t){return R[e].created_at<R[t].created_at?-1:1})).forEach((function(e,t){G=parseFloat(G)+parseFloat(R[e].value),W+=parseFloat(R[e].value),Y.push({meta:R[e].value,total:G,value:parseFloat(I)>parseFloat(F)?100-Math.floor(100*G/H):Math.floor(100*G/H)}),B.push(t+1),t+1===Object.keys(R).length&&(z=Object(n.a)(Object(n.a)({},z),{},{data:{labels:B,series:[[].concat(Y)]},options:Object(n.a)(Object(n.a)({},z.options),{},{low:0,high:100,plugins:[s.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Object(j.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Object(j.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var U=I<F?F-I:I-F,q=U;R&&Object.keys(R).length>0&&Object.keys(R).forEach((function(e){U=parseFloat(U)+parseFloat(R[e].value)}));var V=q-(U-q),J=q-(q-U),X=Math.ceil(I<F?F-I:I-F);if((X=100*Math.ceil(U)/X-100)<0&&(X*=-1),!e.data)return c.a.createElement("div",null,"NO DATA RECEIVED");if(O)return c.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},c.a.createElement(h.a,null));return c.a.createElement("div",{className:t.root},c.a.createElement(c.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&R.length>0?c.a.createElement("div",{style:{backgroundColor:Object(j.d)("color")}},c.a.createElement(d.a,{className:"ct-chart-white-colors",data:z.data,type:"Line",options:z.options,listener:z.animation})):c.a.createElement(c.a.Fragment,null),"task"!==r.kpi_type&&c.a.createElement("fieldset",{style:{position:"relative"}},c.a.createElement("legend",{style:{color:Object(j.d)("color")}},Object(j.u)("$__progress",1)),c.a.createElement("div",{className:t.progress},c.a.createElement(h.a,{variant:"determinate",size:100,value:X,showText:!0,onClick:function(){}})),c.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Object(j.d)("color")}},function(){var e=I&&parseInt(I)?parseInt(I):0,t=F&&parseInt(F)?parseInt(F):0;return c.a.createElement(c.a.Fragment,null,Object(j.u)("".concat(e>t?"$__balance":"$__targetValue"),1),": ",Object(j.h)(e<t?V:J||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"time"===r.kpi_type?c.a.createElement("span",{style:{marginLeft:5,fontSize:10,textTransform:"lowercase"}},Object(j.u)("$__minutes")):"")}()),c.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:W>0?Object(j.d)("green"):"red"}},Object(j.u)("$__accomplished",1),": ",W&&parseInt(W)>0?Object(j.h)(W,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null):0),c.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},(X>=0&&X<100&&F>I||X>0&&X<=100&&F<I)&&c.a.createElement(k,{icon:"add_circle",title:Object(j.u)("$__increase"),iconColor:Object(j.d)("blue"),onClick:function(){},transparent:!0},c.a.createElement(m.a,{data:r,PositiveValue:!0,callBack:function(){}})),(X>=0&&X<100&&F<I||X>0&&X<=100&&F>I)&&c.a.createElement(k,{icon:"remove_circle",iconColor:"orange",title:Object(j.u)("$__decrease"),onClick:function(){},transparent:!0},c.a.createElement(m.a,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&c.a.createElement("div",{className:t.time},"TASK")))}));t.a=Object(L.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(C.b)(I,e)}))(Object(S.a)(F.a)(P))},57:function(e,t,r){"use strict";var n=r(8),a=r(387),o=r.n(a);function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};u(x,c,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,c)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,l,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),u(w,s,"Generator"),u(w,c,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}o.a.defaults.headers.post["Content-Type"]="application/json; charset=UTF-8";var c=o.a.create({baseURL:"https://apimachen.azurewebsites.net/api"});o.a.defaults.withCredentials=!0,c.interceptors.request.use(function(){var e=Object(n.a)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.headers["Content-Type"]="".concat(t.headers["Content-Type"]?"".concat(t.headers["Content-Type"]):"application/json","; charset=UTF-8;"),r=localStorage.getItem("TOKEN")||"","null"!==String(r)&&""!==String(r)&&"undefined"!==String(r)&&(t.headers.Authorization="Bearer ".concat(r),t.headers.Accept="application/json;charset=UTF-8;application/x-www-form-urlencoded"),e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),c.interceptors.response.use(function(){var e=Object(n.a)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){var t=Promise.reject(e.response);return console.log(e.response),e&&e.response&&e.response.status&&401===e.response.status&&"/login"!==window.location.pathname&&"/register"!==window.location.pathname&&"/activate"!==window.location.pathname&&console.log(e),t})),t.a=c},58:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(14),s=r(13),u=r(15),d=r(3),p=r(27),f=r(345),h=r(1184),m=r(285),g=r(1131),b=r.n(g),y=r(1),v=r(63);function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(v=O);var w=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var _=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var O=Object(l.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(s.b)(u,e)}))((function(e){var t=d.a.getState().session,r=c.a.useState(null),i=Object(o.a)(r,2),l=i[0],s=i[1],u=Boolean(l);c.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_SESSION",Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:"$__last7Days",dashboard:Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:"$__last7Days"})}))}}),[]);var p=function(){var t=Object(a.a)(x().mark((function t(r){var a;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:r,dashboard:Object(n.a)(Object(n.a)({},d.a.getState().session),{},{period:r})})),a=(a=String(r).replace("$__last","")).replace("Days",""),t.next=7,Object(v.d)(e,a);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return c.a.createElement("div",null,c.a.createElement(f.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){s(e.currentTarget)},style:Object(n.a)({},e.style?e.style:{})},c.a.createElement(b.a,null)),c.a.createElement(h.a,{id:"long-menu",anchorEl:l,keepMounted:!0,open:u,onClose:p,PaperProps:{style:{maxHeight:216,width:"20ch"}}},_.map((function(e){return c.a.createElement(m.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return p(e)}},Object(y.u)(e,1))}))))})),w=r(20),j=r(429),E=r(157),k=r(95),S=r(147),L=r(6),C={header:Object(n.a)(Object(n.a)({},L.k),{},{display:"flex",width:"100%",justifyContent:"space-between"}),content:{position:"relative",width:"100%",height:"100%",display:"flex"},info:{display:"flex",width:"100%",alignItems:"center"},headerIcon:{display:"contents",alignItems:"center"},headerTitle:{width:"calc(100% - 33px)",overflowX:"hidden",overflowY:"hidden",fontWeight:"bold",paddingTop:"3px"},actionButtons:{right:0,display:"flex"},cancelButton:{right:"4px",position:"absolute",cursor:"pointer"},saveButton:{right:"33px",position:"absolute",cursor:"pointer"},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1},parent:{width:"100%",padding:"0 5px","& .title":{color:Object(y.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(y.d)("color"),fontWeight:"500",alignItems:"center"}}};function I(){I=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var T=Object(E.a)(C);t.a=Object(l.b)((function(e){return{users:e.db.users,groups:e.db.groups}}),(function(e){return Object(s.b)(u,e)}))((function(e){var t=e.title,r=e.icon,l=e.editable,s=e._id,u=e.onEdit,f=e.customButtons,h=d.a.getState(),m=h.functions,g=h.session,b=m.socket,v=T(),x=Object(i.useState)(t?t.trim():""),_=Object(o.a)(x,2),E=_[0],L=_[1],C=Object(i.useState)(r||null),F=Object(o.a)(C,2),D=F[0],N=F[1],A=Object(i.useState)(!1),P=Object(o.a)(A,2),$=P[0],M=P[1],z=Object(i.useState)(!1),Y=Object(o.a)(z,2),B=Y[0],R=Y[1],G=Object(i.useState)(!1),H=Object(o.a)(G,2),W=H[0],U=H[1],q=f&&f.filter((function(e){return!1!==e})),V=Object(i.useRef)(!0);Object(i.useEffect)((function(){return!t&&l&&M(!0),function(){V.current=!1}}),[t,l]);var J=function(){var e=Object(a.a)(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{s&&b.emit("data",{module:"node",method:"put",action:"update",noLog:!0},{_id:s,name:E}),u&&u(Object(n.a)({name:E},D?{icon:D}:{}),s||null)}catch(t){console.log(t)}M(!1);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c.a.createElement("div",{className:v.header,style:Object(n.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return U(!0)},onMouseLeave:function(){V.current&&!B&&U(!1)}},c.a.createElement("div",{className:v.content},c.a.createElement("div",{className:v.info},e.searchText?c.a.createElement("div",{style:{marginLeft:"7px"}},Object(y.b)(e.title?e.title:"",e.searchText)):c.a.createElement("div",{className:v.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:Object(y.d)("colorText"),paddingRight:"7px",marginLeft:e.icon?"7px":"none",width:"100%"},onDoubleClick:function(){e.onEdit&&e.editable&&V.current&&(L(e.title?e.title.trim():""),M(!0))}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center"}},e.icon||e.permitIcon||e.iconOnEditable&&$?c.a.createElement(j.a,{icon:e.icon||"perm_media",color:e.color?e.color:Object(y.d)("colorText"),onChange:e.onChangeIcon||e.editable&&e.permitIcon?function(t){e.onChangeIcon&&e.onChangeIcon(t),e.onEdit&&e.onEdit(Object(n.a)({name:E},t?{icon:t}:{})),N(t)}:null,size:"calc(".concat(e.fontSize," + 4px)")||!1,style:{marginRight:7}}):c.a.createElement(c.a.Fragment,null),$?c.a.createElement(c.a.Fragment,null,c.a.createElement(p.a,{label:e.placeholder?e.placeholder:Object(y.u)("$__nameOfCard",1),variant:Object(y.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){L(e.target.value)},onKeyDown:function(t){13===t.keyCode&&E&&J(),27===t.keyCode&&(M(!1),L(e.title?e.title.trim():""))}},value:E,placeholder:e.placeholder?e.placeholder:Object(y.u)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),($||e.onSave)&&c.a.createElement(w.a,{title:Object(y.u)("$__save",1),color:"green",icon:"save",onClick:function(){$?e.noCancel?E&&J():J():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),($||e.onCancel)&&c.a.createElement(w.a,{title:Object(y.u)("$__close",1),color:Object(y.d)("colorText"),icon:"cancel",onClick:function(){$&&(e.onCancel?E&&M(!1):M(!1)),e.onCancel&&e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):c.a.createElement(S.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},c.a.createElement("div",{style:Object(n.a)({},e.expanded?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?Object(y.u)(e.title,1):e.title?Object(y.r)(e.title):"")))))),e.periodFilter&&g&&g.period&&c.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},Object(y.u)(g.period),c.a.createElement(O,{style:{color:Object(y.d)("menu"),height:"20px",width:"20px"}})),c.a.createElement("div",{className:v.actionButtons,style:Object(n.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&c.a.createElement(w.a,{title:Object(y.u)("$__save",1),color:"green",icon:"save",onClick:function(){$?e.noCancel?E&&J():J():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&c.a.createElement(w.a,{title:Object(y.u)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){$?e.noCancel?E&&M(!1):M(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!$&&e.timelineMessage&&W&&c.a.createElement("div",{className:v.button,style:{opacity:W?"1":"0"}},c.a.createElement(k.a,{overlap:"rectangular",onClick:function(){return R(!0)},icon:"add_comment",size:"20px",tooltipprops:B?{open:B,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{}})),!$&&q&&q.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(W||"hover"!==e.show)&&c.a.createElement("div",Object.assign({key:t,className:v.button},e.provided),c.a.createElement(w.a,{title:e.title?Object(y.u)(e.title,1):Object(y.u)(e.name,1),color:Object(y.d)(e.color||"colorText"),icon:e.icon,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){B||U(!1)},onClose:e.onClose?function(){e.onClose&&e.onClose(),U(!1)}:null,size:e.actionsSize||"16px",transparent:!0,badgeContent:e.count?e.count:null}))})),e.children)))}))},6:function(e,t,r){"use strict";r.d(t,"q",(function(){return a})),r.d(t,"l",(function(){return o})),r.d(t,"D",(function(){return i})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return c})),r.d(t,"c",(function(){return C})),r.d(t,"k",(function(){return s})),r.d(t,"w",(function(){return u})),r.d(t,"H",(function(){return d})),r.d(t,"i",(function(){return p})),r.d(t,"B",(function(){return f})),r.d(t,"s",(function(){return h})),r.d(t,"z",(function(){return m})),r.d(t,"p",(function(){return g})),r.d(t,"b",(function(){return b})),r.d(t,"I",(function(){return y})),r.d(t,"F",(function(){return v})),r.d(t,"n",(function(){return x})),r.d(t,"o",(function(){return _})),r.d(t,"t",(function(){return O})),r.d(t,"u",(function(){return w})),r.d(t,"J",(function(){return j})),r.d(t,"E",(function(){return E})),r.d(t,"a",(function(){return k})),r.d(t,"m",(function(){return S})),r.d(t,"x",(function(){return L})),r.d(t,"G",(function(){return P})),r.d(t,"A",(function(){return $})),r.d(t,"h",(function(){return M})),r.d(t,"r",(function(){return z})),r.d(t,"v",(function(){return Y})),r.d(t,"y",(function(){return B})),r.d(t,"g",(function(){return R})),r.d(t,"j",(function(){return G})),r.d(t,"C",(function(){return H})),r.d(t,"d",(function(){return W}));var n=r(2),a=function(e){e=(e+="").replace("#","");if(!/[0-9A-Fa-f]/g.test(e)||3!==e.length&&6!==e.length)throw new Error("input is not a valid hex color.");if(3===e.length){var t=e[0],r=e[1],n=e[2];e=t+t+r+r+n+n}var a=(e=e.toUpperCase(e))[0]+e[1],o=e[2]+e[3],i=e[4]+e[5];return parseInt(a,16)+", "+parseInt(o,16)+", "+parseInt(i,16)},o=260,i={transition:"all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)"},c={marginRight:"auto",marginLeft:"auto","&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"}},l={paddingRight:"15px",paddingLeft:"15px",marginRight:"auto",marginLeft:"auto","@media (min-width: 768px)":{width:"750px"},"@media (min-width: 992px)":{width:"970px"},"@media (min-width: 1200px)":{width:"1170px"},"&:before,&:after":{display:"table",content:'" "'},"&:after":{clear:"both"},"&::-webkit-scrollbar":{width:"4px",height:"4px"},"&::-webkit-scrollbar-button":{width:"0px",height:"0px"},"&::-webkit-scrollbar-thumb":{background:"#e1e1e1",border:"0px none #ffffff",borderRadius:"27px"},"&::-webkit-scrollbar-thumb:hover":{background:"#ffffff"},"&::-webkit-scrollbar-thumb:active":{background:"#000000"},"&::-webkit-scrollbar-track":{background:"#666666",border:"0px none #ffffff",borderRadius:"20px"},"&::-webkit-scrollbar-track:hover":{background:"#666666"},"&::-webkit-scrollbar-track:active":{background:"#333333"},"&::-webkit-scrollbar-corner":{background:"transparent"}},s={fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"300",lineHeight:"1.5em"},u=["#9c27b0","#ab47bc","#8e24aa","#af2cc5","#7b1fa2"],d=["#ff9800","#ffa726","#fb8c00","#ffa21a","#f57c00","#faf2cc","#fcf8e3"],p=["#f44336","#ef5350","#e53935","#f55a4e","#d32f2f","#ebcccc","#f2dede"],f=["#4caf50","#66bb6a","#43a047","#5cb860","#388e3c","#d0e9c6","#dff0d8"],h=["#00acc1","#26c6da","#00acc1","#00d3ee","#0097a7","#c4e3f3","#d9edf7"],m=["#e91e63","#ec407a","#d81b60","#eb3573","#c2185b"],g=["#999","#777","#3C4858","#AAAAAA","#D2D2D2","#DDD","#555555","#333","#eee","#ccc","#e4e4e4","#E5E5E5","#f9f9f9","#f5f5f5","#495057","#e7e7e7","#212121","#c8c8c8","#505050"],b="#000",y="#FFF",v="#55acee",x="#3b5998",_="#dd4b39",O="#0976b4",w="#cc2127",j="#e52d27",E="#35465c",k="#1769ff",S="#ea4c89",L="#ff4500",C={boxShadow:"0 10px 30px -12px rgba("+a(b)+", 0.42), 0 4px 25px 0px rgba("+a(b)+", 0.12), 0 8px 10px -5px rgba("+a(b)+", 0.2)"},I={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(u[0])+",.4)"},T={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(h[0])+",.4)"},F={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(f[0])+",.4)"},D={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(d[0])+",.4)"},N={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(p[0])+",.4)"},A={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(m[0])+",.4)"},P=Object(n.a)({background:"linear-gradient(60deg, "+d[1]+", "+d[2]+")"},D),$=Object(n.a)({background:"linear-gradient(60deg, "+f[1]+", "+f[2]+")"},F),M=Object(n.a)({background:"linear-gradient(60deg, "+p[1]+", "+p[2]+")"},N),z=Object(n.a)({background:"linear-gradient(60deg, "+h[1]+", "+h[2]+")"},T),Y=Object(n.a)({background:"linear-gradient(60deg, "+u[1]+", "+u[2]+")"},I),B=Object(n.a)({background:"linear-gradient(60deg, "+m[1]+", "+m[2]+")"},A),R={},G=(a(b),a(b),Object(n.a)({margin:"0 20px 10px",paddingTop:"10px",borderTop:"1px solid "+g[8],height:"auto"},s),{border:"0",borderRadius:"3px",boxShadow:"0 10px 20px -12px rgba("+a(b)+", 0.42), 0 3px 20px 0px rgba("+a(b)+", 0.12), 0 8px 10px -5px rgba("+a(b)+", 0.2)",padding:"10px 0",transition:"all 150ms ease 0s"}),H=(a(g[6]),a(b),a(b),a(b),{color:g[2],textDecoration:"none",fontWeight:"300",marginTop:"30px",marginBottom:"25px",minHeight:"32px",fontFamily:"'Roboto', 'Helvetica', 'Arial', sans-serif","& small":{color:g[1],fontSize:"65%",fontWeight:"400",lineHeight:"1"}}),W=Object(n.a)(Object(n.a)({},H),{},{marginTop:"0",marginBottom:"3px",minHeight:"auto","& a":Object(n.a)(Object(n.a)({},H),{},{marginTop:".625rem",marginBottom:"0.75rem",minHeight:"auto"})})},60:function(e,t,r){"use strict";var n=r(1856),a=r(33),o=r(1),i=Object(a.a)({switchBase:{color:Object(o.d)("medium"),"&$checked":{color:Object(o.d)("color")},"&$checked + $track":{backgroundColor:Object(o.d)("color")}},checked:{},track:{}})(n.a);t.a=i},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return g}));var n=r(7),a=r(2),o=r(8),i=r(73),c=r.n(i),l=r(9),s=r.n(l),u=r(3),d=r(57);function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var f=function(){var e=Object(o.a)(p().mark((function e(t,r){var i,l,s,f,m,g,b,y,v,x,_,O,w,j,E,k,S,L,C,I,T,F,D,N,A,P,$,M,z,Y,B,R,G,H,W,U,q,V,J;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.idRel,l=r.adminView,s=void 0!==l&&l,f=r.callback,m=void 0===f?null:f,g=r.cardLoad,b=void 0===g?"my":g,y=r.completed,v=void 0!==y&&y,x=r.status,_=r.deleted,O=void 0!==_&&_,w=r.archived,j=void 0!==w&&w,E=r.templates,k=void 0!==E&&E,S=r.allStatus,L=void 0!==S&&S,C=r.search,I=void 0===C?"":C,T=r.completedDays,F=void 0===T?7:T,D=r.limit,N=void 0===D?0:D,A=r.skip,P=void 0===A?0:A,$=r.startDate,M=void 0===$?null:$,z=r.endDate,Y=void 0===z?null:z,B=r.searchParams,R=void 0===B?null:B,G=!!r.ignoreLoader,("search"===b||t.ignoreLoader)&&(G=!0),H=u.a.getState(),W=H.sessionLoads,U=Object(a.a)({},W.cards.load),q=c()("".concat(JSON.stringify(r))).toString(),!(Object.keys(U).length>0&&U[q])){e.next=8;break}return e.abrupt("return",!0);case 8:return G||t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards),{},{load:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards.load),{},Object(n.a)({},q,G?"completed":"loading"))})})),V=(V=String(u.a.getState().session.dashboard.period).replace("$__last","")).replace("Days",""),e.next=13,new Promise(function(){var e=Object(o.a)(p().mark((function e(r){var o,c,l;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.a.post("/Card_List/",Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({idRel:i,adminView:s,load:b,completed:v,archived:j,templates:k,status:x,allStatus:L,limit:N,skip:P,startDate:M,endDate:Y},v?{completedDays:F||V}:{}),I?{search:I}:{}),O?{deleted:!0}:{}),{},{searchParams:R}));case 3:if(!(o=e.sent)||!o.data){e.next=10;break}return c=o.data,e.next=8,h(t,c,b);case 8:(l=e.sent)&&(t.reduxFunction("ASYNC","SET_SESSION_LOADS",Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards),{},{load:Object(a.a)(Object(a.a)({},u.a.getState().sessionLoads.cards.load),{},Object(n.a)({},q,"completed"))})})),m&&m(),r({total:c.length,cards:l}));case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("loadCards::ERR::"),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}());case 13:if(!(J=e.sent)){e.next=17;break}return t.reduxFunction("ASYNC","preLoader",Object(a.a)(Object(a.a)({},u.a.getState().preLoader),{},{cards:!1})),e.abrupt("return",J);case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),h=function(){var e=Object(o.a)(p().mark((function e(t){var r,o,i,l,s,d=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:[],d.length>2?d[2]:void 0,o=u.a.getState(),i=o.session,l=function(e){return!!(e&&e.data&&e.data._id&&(!e.data.private||!1===e.data.private||e.data.private&&e.users.filter((function(e){return e._id===i._id})).length>0))},e.next=6,new Promise((function(e,t){var o={};r&&r.filter((function(e){return l(e)})).length>0?r.filter((function(e){return l(e)})).forEach((function(t,s){var d,p,f=t.data._id,h={},m={},g=[];t.users.length>0&&t.users.filter((function(e){return e._id})).forEach((function(e){var r=null;t&&t.myDayUsers&&t.myDayUsers.filter((function(e){return e._id})).length>0&&(r=t.myDayUsers.filter((function(t){return t._id===e._id})).length>0?t.myDayUsers.filter((function(t){return t._id===e._id}))[0].date:null),h=Object(a.a)(Object(a.a)({},h),{},Object(n.a)({},e._id,Object(a.a)(Object(a.a)({},r?{myDay:r}:{}),e)))})),"step"===t.data.type&&(null===(d=t.showGroups)||void 0===d?void 0:d.filter((function(e){return e.value})).length)>0&&(g=t.showGroups.filter((function(e){return e.value}))),(null===(p=t.groups)||void 0===p?void 0:p.filter((function(e){return e._id})).length)>0&&t.groups.filter((function(e){return e._id})).forEach((function(e){m=Object(a.a)(Object(a.a)({},m),{},Object(n.a)({},e._id,Object(a.a)({},e)))})),t&&t.data&&t.data.planId&&delete t.data.planId,o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},f,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},u.a.getState().db.cards[f]||{}),u.a.getState().db.cards[f]&&u.a.getState().db.cards[f]._selected?{_selected:!0}:{}),t.data),{},{_cardCode:t.cardCode,_requireApproval:t.requireApproval||t.data.requireApproval||!1,_isFavorite:"false"===String(t.favorite)},t.account?{_account:c()(t.account).toString()}:{}),t&&t.createdBy&&t.createdBy.filter((function(e){return e._id})).length>0?{_createdBy:t.createdBy.filter((function(e){return e._id}))[0]}:{}),t.myDay?{_myDay:t.myDay}:{}),t.parent?{_parent:t.parent}:{}),t.plan?{_planId:t.plan}:{}),t.users?{_users:h}:{}),t.groups?{_groups:m}:{}),t.tags?{_tags:t.tags}:{}),t.aspects?{_aspects:t.aspects}:{}),t.inFlow?{_hasStep:t.inFlow}:{}),t.data&&t.data.status?{status:t.data.status}:{status:"notStarted"}),g&&g.length>0?{showGroups:g}:{}),{},{_notifications:t.notifications},t.parentCompleted&&t.parentCompleted.card?{_parentCompleted:t.parentCompleted,status:"completed",completed_at:{low:t.parentCompleted.date?t.parentCompleted.date:t.updated_at&&t.updated_at.low?t.updated_at.low:null}}:{}),t.timer?{_kpiTimer:Object(n.a)({},t.timer._id,Object(a.a)(Object(a.a)({},t.timer),{},{userId:i._id}))}:{}),t.parentPrivate?{private:!0}:{}))),s+1===r.filter((function(e){return l(e)})).length&&e(o)})):e({})}));case 6:if(!(s=e.sent)){e.next=10;break}return t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},u.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},u.a.getState().db.cards),s)}),(function(){})),e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(o.a)(p().mark((function e(t,r){var n,a,o,i,c,l,s,u=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>2&&void 0!==u[2]&&u[2],a=u.length>3&&void 0!==u[3]?u[3]:null,o=u.length>4&&void 0!==u[4]?u[4]:"my",i=u.length>5&&void 0!==u[5]&&u[5],c=u.length>6?u[6]:void 0,l=u.length>7&&void 0!==u[7]&&u[7],e.next=8,f(t,{idRel:r,adminView:n,callback:a,cardLoad:o,completed:i,status:c,ignoreLoader:l});case 8:if(!(s=e.sent)){e.next=11;break}return e.abrupt("return",s);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=Object(o.a)(p().mark((function e(t){var r,n,a=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:7,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.next=5,new Promise(function(){var e=Object(o.a)(p().mark((function e(a,o){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/calendar"!==window.location.pathname){e.next=4;break}return e.next=3,f(t,{cardLoad:"calendar",iniDate:s()().startOf("month").unix("x"),endDate:s()().endOf("month").unix("x")});case 3:a(!0);case 4:if("/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=10;break}return e.next=7,f(t,{cardLoad:"plans",archived:!0});case 7:return e.next=9,f(t,{cardLoad:"plans",archived:!0,completed:!0,completedDays:r});case 9:a(!0);case 10:if("/forms"===window.location.pathname&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=15;break}return e.next=14,f(t,{cardLoad:"plans",completed:!0,completedDays:r});case 14:a(!0);case 15:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=19;break}return e.next=18,f(t,{cardLoad:"templates",templates:!0});case 18:a(!0);case 19:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=23;break}return e.next=22,f(t,{cardLoad:"plans",adminView:!0});case 22:a(!0);case 23:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=27;break}return e.next=26,f(t,{cardLoad:"plans",deleted:!0});case 26:a(!0);case 27:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=35;break}return e.next=30,f(t,{cardLoad:"dashboard"});case 30:return e.next=32,f(t,{cardLoad:"showIn"});case 32:return e.next=34,f(t,{cardLoad:"channel"});case 34:a(!0);case 35:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=39;break}return e.next=38,f(t,{adminView:!0,cardLoad:"myDay"});case 38:a(!0);case 39:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=43;break}return e.next=42,f(t,{adminView:!0,cardLoad:"myDay"});case 42:a(!0);case 43:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=49;break}return e.next=46,f(t,{idRel:n[0],cardLoad:"plan"});case 46:return e.next=48,f(t,{idRel:n[0],cardLoad:"plan",completed:!0});case 48:a(!0);case 49:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=53;break}return e.next=53,f(t,{cardLoad:"plans",archived:!0});case 53:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=56;break}return e.next=56,f(t,{cardLoad:"templates"});case 56:if("/sp"===window.location.pathname&&36!==n[0].length&&"trash"===n[1]&&f(t,{cardLoad:"deletedPlans",deleted:!0,adminView:!!(u.a.getState().session._access&&u.a.getState().session._access.plan&&u.a.getState().session._access.planAdmin)}),"/library"!==window.location.pathname){e.next=61;break}return e.next=60,f(t,{cardLoad:"plans"});case 60:a(!0);case 61:if("/calendar"!==window.location.pathname){e.next=65;break}return e.next=64,f(t,{cardLoad:"calendar",startDate:null,endDate:null});case 64:a(!0);case 65:if("/p"!==window.location.pathname&&"/acc"!==window.location.pathname||a(!0),"/c"!==window.location.pathname){e.next=71;break}if("tab"!==n[0]||"users"===n[1]){e.next=70;break}return e.next=70,f(t,{cardLoad:"plans"});case 70:a(!0);case 71:if("/t"!==window.location.pathname){e.next=88;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=76;break}return e.next=75,f(t,{cardLoad:"myResponsible"});case 75:a(!0);case 76:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=80;break}return e.next=79,f(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 79:a(!0);case 80:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=88;break}return e.next=83,f(t,{cardLoad:"in"});case 83:return e.next=85,f(t,{cardLoad:"in",completed:!0,completedDays:r});case 85:return e.next=87,f(t,{cardLoad:"myResponsible"});case 87:a(!0);case 88:if("/tags"!==window.location.pathname){e.next=93;break}if(36!==n[0].length&&!u.a.getState().searchs.tagsView){e.next=92;break}return e.next=92,f(t,{cardLoad:"tags",idRel:n[0],searchParams:u.a.getState().searchs.tagsView});case 92:a(!0);case 93:"/calendar"===window.location.pathname&&a(!0),"/masterAdmin"!==window.location.pathname&&"/plataformAdministrator"!==window.location.pathname||a(!0),"/subscriptionUpgrade"===window.location.pathname&&a(!0),36!==n[0].length||!u.a.getState().db.cards||u.a.getState().db.cards[n[0]]&&!u.a.getState().db.cards[n[0]]||u.a.getState().db.cards&&u.a.getState().db.cards[n[0]]&&n[0]&&!u.a.getState().db.cards[n[0]]._loadedFeeds&&"bright-and-connected"===n[1]&&a(!0),a(!0);case 98:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 5:if(!e.sent){e.next=8;break}return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},634:function(e,t,r){"use strict";var n=r(2),a=r(846),o=r.n(a),i=r(847),c=r.n(i),l=r(848),s=r.n(l),u=r(849),d=r.n(u),p=r(1120),f=r.n(p),h=r(1121),m=r.n(h),g=r(1122),b=r.n(g),y=r(1123),v=r.n(y),x=r(119),_=r.n(x),O=r(1124),w=r.n(O),j=r(150),E=r.n(j),k=r(643),S={version:k.version,swot:[{value:"strength",label:"$__strength",icon:"arrow_upward"},{value:"weakness",label:"$__weakness",icon:"arrow_downward"},{value:"opportunity",label:"$__opportunity",icon:"trending_up"},{value:"threat",label:"$__threat",icon:"trending_down"}],languages:[{value:"pt-BR",label:"$__pt-BR"},{value:"en-US",label:"$__en-US"},{value:"es-ES",label:"$__es-ES"}],planType:[{label:"$__strategic",value:null,swot:!0,overview:!0,description:"$__strategicPlanDescription"},{label:"$__flowOrProcess",value:"operational",overview:!1,swot:!1,kanban:!0,description:"$__flowOrProcesPlanDescription"},{label:"$__tacticAndOrOperational",value:"flow",swot:!1,kanban:!1,overview:!0,description:"$__operationalPlanDescription"},{label:"$__crm",value:"crm",swot:!1,kanban:!0,overview:!1,description:"$__crmPlanDescription"}],status:[{value:"notStarted",label:"$__notStarted",icon:"query_builder",color:"#929497"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline",color:"#011E41"},{value:"awaitAction",label:"$__await",icon:"hourglass_top",color:"pink"},{value:"paused",label:"$__paused",icon:"pause_presentation",color:"#EBA900"},{value:"completed",label:"$__completed",icon:"verified",color:"#5A7F71",props:{periodFilter:!0}}],currency:[{value:"BRL",label:"$__currencyBRL",symbol:"R$"},{value:"USD",label:"$__currencyUSD",symbol:"$"},{value:"EUR",label:"$__currencyEUR",symbol:"\u20ac"}],expiresIn:[{value:"12h",label:"$__12hours"},{value:null,label:"$__6hours"},{value:"3h",label:"$__3hours"},{value:"1h",label:"$__1hour"}],passwordExpire:[{value:"30",label:"$__30days"},{value:"60",label:"$__60days"},{value:"90",label:"$__90days"}],plans:[{value:"p0",label:"$__saasPlanName0",settings:{space:5368709120,admins:1,price:0,onBoarding:!1,brightAndConnected:{feed:!1,feedDays:!1,radarLimit:25,insight:!1},plan:{activeLimit:2,planClient:!1,clientAdmin:!1,machenPlan:!1,templates:!1,guidelineLimit:2,feedLimit:4,radarLimit:25,insightLimit:25},task:{activeLimit:25,filter:!1,kpi:!1,timeSheet:!1,recurrence:!1},files:{uploadLimit:26214400},chat:{groupUsersLimit:7},support:{email:!0,priority:0,chat:!1},mobile:{},addOn:{learneng:!1,denkenDiscount:0}}},{value:"p1",label:"$__saasPlanName1",settings:{space:26843545600,admins:1,price:149,onBoarding:0,whiteLabel:!1,brightAndConnected:{feed:!0,feedDays:15,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:1,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:104857600},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:5}}},{value:"p2",label:"$__saasPlanName2",settings:{space:53687091200,admins:9,price:890,onBoarding:4990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:2,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}}},{value:"p3",label:"$__saasPlanName3",settings:{space:107374182400,admins:19,price:1790,onBoarding:6990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}}},{value:"p4",label:"$__saasPlanName4",settings:{space:214748364800,admins:49,price:3990,onBoarding:10990,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}}},{value:"p5",label:"$__saasPlanName5",settings:{space:0,admins:0,price:0,onBoarding:0,brightAndConnected:{feed:!0,feedDays:0,radarLimit:0,insight:!0},plan:{planLimit:0,planClient:!0,clientAdmin:3,machenPlan:!0,templates:!0,guidelineLimit:0,feedLimit:0,radarLimit:0,insightLimit:0},task:{activeLimit:0,filter:!0,kpi:!0,timeSheet:!0,recurrence:!0},files:{uploadLimit:314572800},chat:{groupLimit:0},support:{email:!0,priority:0,chat:!0},mobile:{},addOn:{learneng:!0,denkenDiscount:0,whiteLabel:!1}}}],type:[{value:"plan",label:"$__plan",icon:"view_comfy",color:null,calendar:!1},{value:"strength",label:"$__strength",icon:"arrow_upward",color:null,calendar:!1},{value:"weakness",label:"$__weakness",icon:"arrow_downward",color:null,calendar:!1},{value:"opportunity",label:"$__opportunity",icon:"trending_up",color:null,calendar:!1},{value:"threat",label:"$__threat",icon:"trending_down",color:null,calendar:!1},{value:"guideline",label:"$__guideline",icon:_.a,color:null,calendar:!0},{value:"guidelineD",label:"$__guidelineD",icon:o.a,color:null,calendar:!0},{value:"guidelineR",label:"$__guidelineR",icon:s.a,color:null,calendar:!0},{value:"guidelineC",label:"$__guidelineC",icon:c.a,color:null,calendar:!0},{value:"guidelineE",label:"$__guidelineE",icon:d.a,color:null,calendar:!0},{value:"objective",label:"$__objective",icon:"gps_fixed",color:null,calendar:!0},{value:"goal",label:"$__goal",icon:"flag",color:null,calendar:!0},{value:"iniciative",label:"$__iniciative",icon:"play_arrow",color:null,calendar:!0},{value:"task",label:"$__task",icon:"fact_check",color:null,calendar:!0},{value:"meeting",label:"$__meeting",icon:"meeting_room",color:null,calendar:!0},{value:"myTask",label:"$__myTask",icon:"person_pin",color:null,calendar:!0},{value:"link",label:"$__radar",icon:"public",color:null,calendar:!0},{value:"insight",label:"$__insight",icon:E.a,color:null,calendar:!0}],dateStatus:[{value:"notStarted",label:"$__notStarted",icon:"query_builder"},{value:"inProgress",label:"$__inProgress",icon:"play_circle_outline"}],priority:[{value:null,label:"$__none",color:"#c6c6c6"},{value:"normal",label:"$__normal",color:"#c6c6c6"},{value:"low",label:"$__low",color:"#faba00"},{value:"medium",label:"$__medium",color:"#ff7c32"},{value:"high",label:"$__high",color:"#ff0000"}],automation:[{value:"doNotChange",label:"$__doNotChange"},{value:"replace",label:"$__replaceWith"},{value:"add",label:"$__add"},{value:"remove",label:"$__remove"},{value:"removeAll",label:"$__removeAll"}],fileExtensions:[{ext:["jpg","jpeg","jpe","jfif","gif","png","webp","svg","eps"],icon:!1,title:"image",viewer:"img"},{ext:["txt"],icon:"description",title:"Text",viewer:"text"},{ext:["doc","docx","dot","doc","dotx"],icon:f.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:m.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:b.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:w.a,title:"PDF",viewer:"pdf"},{ext:["aac","wav","ts","smf","ogg","mp3","3gp","caf","m4a"],icon:"audiotrack",title:"audioFile",viewer:"audio"},{ext:["avi","mov","mp4","3gpp"],icon:"movie",title:"movieFile",viewer:"movie"}],access:[{name:"$__admin",permissions:{create:!0,read:!0,run:!0,update:!0,delete:!0,moderate:!0,levels:0}},{name:"$__manager",permissions:{create:!0,read:!0,run:!0,update:!0,delete:!0,moderate:!0,levels:0}},{name:"$__user",permissions:{create:!0,read:!0,run:!0,update:!1,delete:!1,moderate:!1,levels:0}},{name:"$__guest",permissions:{create:!1,read:!0,run:!0,update:!1,delete:!1,moderate:!1,levels:1}}],tag:[],userGroup:[],dataType:[{name:"user",icon:"contact_page",module:"user",reqId:!1,view:{c:{pages:["users"],access:["userAdmin","userModerate","master"]}},hash:null,db:"users",iniModule:"userEdit",modules:["resumeUser","userEdit","access","twoFactor","cards","mobile","settings","delete"],requireFields:["name","email"],hideFields:["independentAccount"],disabledFields:[],data:{type:"user"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"user",icon:"contact_page",module:"user",reqId:!1,view:{c:{pages:["units"],access:["userAdmin","userModerate","master"]}},hash:!0,db:"users",iniModule:"userEdit",modules:["resumeUser","userEdit","access","twoFactor","cards","mobile","settings","delete"],requireFields:["name","email"],hideFields:["independentAccount"],disabledFields:[],data:{type:"user"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"client",title:"unity",icon:"business",module:"user",reqId:!1,view:{c:{pages:["units"],access:["userAdmin","userModerate"],noId:!0}},hash:null,db:"cards",iniModule:"userEdit",modules:["userEdit","delete","settings"],requireFields:["name"],disabledFields:["email"],hideFields:[],data:{type:"client"}},{name:"step",icon:"123",module:"step",reqId:!0,db:"cards",iniModule:"columnEdit",modules:["columnEdit","users","flow","forms","delete","log","settings"],requireFields:["name"],disabledFields:[],fieldsTitle:{name:"$__columnName",placeholder:"$__columnPlaceholder"},sharedIn:{attach:[],copy:[],shared:[]}},{name:"chatGroup",icon:"group_work",module:"chat",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["cardEdit","users","files","delete","log"],hideFields:["image","progress","status","tags","deadline","priority","recurrence","plan"],requireFields:["name"],disabledFields:[],fieldsTitle:{name:"$__groupName",placeholder:"$__groupNamePlaceholder"},sharedIn:{attach:[],copy:[],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"feed",icon:"rss_feed",module:"feeds",reqId:!1,view:{"bright-and-connected":{pages:["feeds"]},sp:{pages:["bright-and-connected"]}},db:"feeds",iniModule:"feedEdit",modules:["resumeFeed","feedEdit"],disabledFields:[],data:{status:"notStarted"},sharedIn:{attach:[],copy:["plan","client"],shared:[]}},{name:"link",icon:"public",module:"insights",reqId:!0,view:{"bright-and-connected":{pages:["radar"]},sp:{pages:["radar"]}},hash:null,db:"cards",iniModule:"link",modules:["resumeLink","cardEdit","checklist","steps","timeline","sendTo","log","users","files","timeLog","settings","delete","myDay"],hideFields:["image","status","client","recurrence"],disabledFields:["url"],data:{status:"notStarted"},sharedIn:{attach:["plan","client"],copy:["plan","client"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"insight",icon:E.a,module:"insights",reqId:!0,view:{"bright-and-connected":{pages:["insight-boards"]},sp:{pages:["insight-boards"]}},hash:null,db:"cards",iniModule:"cardEdit",modules:["resumeLink","cardEdit","checklist","timeline","sendTo","log","users","files","timeLog","settings","delete","myDay"],hideFields:["image","status","client","recurrence"],data:{status:"notStarted"},sharedIn:{attach:["plan","client"],copy:["plan","client"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"plan",icon:"view_comfy",module:"plan",reqId:!1,view:{sp:{pages:["StrategyAndPlans","home"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","steps","timeline","users","sendTo","log","files","timeLog","delete","settings"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:[],copy:["client"],shared:[]},fieldsTitle:{name:"$__planName",placeholder:"$__setPlanName"}},{name:"plan",icon:"tips_and_updates",module:"plan",reqId:!1,view:{sp:{pages:["templates"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","steps","templateOptions","steps","timeline","files","delete"],hideFields:["image","recurrence"],requireFields:["name"],disabledFields:[],data:{status:"notStarted"},fieldsTitle:{name:"$__planName",placeholder:"$__setPlanName"}},{name:"objective",icon:"gps_fixed",module:"planning",myTasks:!0,reqId:!0,view:{sp:{pages:["objectives"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"],copy:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"],shared:["plan","guideline","guidelineD","guidelineR","guidelineE","guidelineC"]}},{name:"goal",icon:"flag",module:"planning",myTasks:!0,reqId:!0,view:{sp:{pages:["goals"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},loadChildrens:!0,sharedIn:{attach:["plan","objective"],copy:["plan","objective"],shared:["plan","objective"]}},{name:"iniciative",icon:"play_arrow",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"myTask",alias:"task",icon:"person_pin",module:"myTasks",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","sendTo","myDay","client","log","files","timeLog","settings","delete"],hideFields:["image"],disabledFields:[],sendTo:!0,myTasks:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"],copy:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"task",icon:"fact_check",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","budget","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"meeting",icon:"meeting_room",module:"agile",myTasks:!0,reqId:!0,view:{sp:{pages:["agile","actions","dashboard"]},t:{pages:["myDay","ourDay","allTasks","unlinkedCards","myTasks"]}},db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","steps","recurrence","timeline","kpi","users","myDay","budget","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","client"],requireFields:["name","startDate"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan","goal","iniciative","task","meeting","myTask"],copy:["plan","goal","iniciative","task","meeting","myTask"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"strength",icon:"arrow_upward",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"weakness",icon:"arrow_downward",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"opportunity",icon:"trending_up",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"threat",icon:"trending_down",module:"swot",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","timeline","log","files","timeLog","delete"],hideFields:["image","imageUpload","deadline","progress","priority","status","client","private"],disabledFields:[],sendTo:!0,data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guideline",icon:_.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["client"],disabledFields:[],sendTo:!0,view:{sp:{pages:["guidelines","matrix"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineD",icon:o.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineR",icon:s.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineE",icon:d.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"guidelineC",icon:c.a,module:"matrix",reqId:!0,db:"cards",iniModule:"cardEdit",modules:["resume","cardEdit","checklist","catenation","steps","recurrence","timeline","kpi","users","myDay","sendTo","log","files","timeLog","settings","delete"],hideFields:["image","imageUpload","client","recurrence"],disabledFields:[],sendTo:!0,myTasks:!0,view:{sp:{pages:["matrix","guidelines"]}},data:{status:"notStarted"},sharedIn:{attach:["plan"],copy:["plan"],shared:["plan","objective","goal","iniciative","task","meeting","chatGroup","strength","weakness","opportunity","threat","guideline","guidelineD","guidelineR","guidelineE","guidelineC","myTask","user"]}},{name:"swot",icon:v.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:_.a,db:"cards",hash:["matrix"]}],cards:{},users:{},feeds:{},notifications:{},loaded:!1,viewList:!1,myTasksMenuExpanded:!1,adminView:!1,adminViewLoader:!1,orderByTitle:!0,orderByTitlePosition:"ASC",groupByColor:!1};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;return"SET_DB"===t.action&&t.value?Object(n.a)(Object(n.a)({},e),t.value):e}},64:function(e,t,r){"use strict";var n=r(22),a=r(2),o=r(8),i=r(5),c=r(0),l=r.n(c),s=r(3),u=r(324),d=r(20),p=r(10),f=r(145),h=r(659),m=r(27),g=r(345),b=r(157),y=r(95),v=r(147),x=r(1);function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(T([])));O&&O!==r&&n.call(O,i)&&(v=O);var w=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var O=Object(b.a)((function(e){return{header:{display:"flex",width:"100%",justifyContent:"space-between"},content:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center"},contentWithExpand:{position:"relative",width:"calc(100% - 7px)",height:"100%",display:"flex",paddingLeft:"5px",paddingTop:"5px",alignItems:"center",justifyContent:"center"},info:{display:"flex",width:"100%",alignItems:"center"},headerIcon:{display:"contents",alignItems:"center"},headerTitle:{width:"100%",overflowX:"hidden",overflowY:"hidden",fontWeight:"bold"},actionButtons:{position:"absolute",height:"24px",right:"3px",display:"flex"},cancelButton:{right:"4px",position:"absolute",cursor:"pointer"},saveButton:{right:"33px",position:"absolute",cursor:"pointer"},button:{padding:"3px auto",cursor:"pointer",alignItems:"center",display:"flex",opacity:1},parent:{width:"100%",padding:"0 5px","& .title":{color:Object(x.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(x.d)("colorText"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));t.a=function(e){var t=e.noExpanding,r=e.onExpanding,c=e.isExpanded,b=e.options,w=e.title,j=e.editable,E=e.unlockedPrivates,k=e.style,S=e.backClick,L=e.private,C=e.onEdit,I=e._id,T=e.fontSize,F=e.iconTitle,D=e.privateTitle,N=e.color,A=e.optionsProps,P=e.setPrivate,$=e.colorPicker,M=e.moreButton,z=e.showOrder,Y=e.value,B=e.viewAllName,R=e.expanded,G=e.tooltipText,H=e.actionsSize,W=e.onSave,U=e.onCancel,q=e.multiline,V=e.icon,J=e.searchText,X=e.searchTextStyle,K=e.dark,Z=e.noAutoFocus,Q=e.fieldName,ee=e.inputStyle,te=e.textStyle,re=s.a.getState(),ne=re.functions,ae=re.db,oe=ne.socket,ie=O(),ce=l.a.useState((null===w||void 0===w?void 0:w.trim())||null),le=Object(i.a)(ce,2),se=le[0],ue=le[1],de=l.a.useState(!1),pe=Object(i.a)(de,2),fe=pe[0],he=pe[1],me=l.a.useState(!1),ge=Object(i.a)(me,2),be=ge[0],ye=ge[1];l.a.useEffect((function(){"0"===String(E)&&be&&ye(!1)}),[E]),l.a.useEffect((function(){!w&&j&&he(!0)}),[w]);var ve=function(){var e=Object(o.a)(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{I&&oe.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(a.a)({_id:I},t)),C&&C(se,I)}catch(r){console.log(r)}he(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xe=b&&b.length>0;return l.a.createElement("div",{className:ie.header,style:Object(a.a)(Object(a.a)({minHeight:k&&k.minHeight?k.minHeight:"30px"},k),S?{cursor:"pointer"}:{})},l.a.createElement("div",{className:!r||fe?ie.content:ie.contentWithExpand},l.a.createElement("div",{className:ie.info},!L||s.a.getState().controls.lockPrivate||be?l.a.createElement(l.a.Fragment,null,V&&l.a.createElement("div",{className:ie.headerIcon,style:Object(a.a)({color:N||Object(x.d)("colorText")},S?{cursor:"pointer"}:{})},l.a.createElement(y.a,{overlap:"rectangular",size:"calc(".concat(T," + 4px)")||!1,icon:V,color:"parent",title:F?F.substring(0,1).toUpperCase().concat(F.substring(1)):""})),J?l.a.createElement("div",{style:Object(a.a)({marginLeft:"7px"},X||{})},Object(x.b)(w||"",J,!!K)):l.a.createElement("div",{className:ie.headerTitle,style:Object(a.a)(Object(a.a)({fontSize:T||"14px",color:N||Object(x.d)("colorText"),marginLeft:V?"7px":"none"},te||{}),S?{cursor:"pointer"}:{}),onClick:S?function(e){S(),e.stopPropagation()}:null},fe?l.a.createElement("div",{style:Object(a.a)({position:"relative",float:"left",width:"100%",paddingTop:"10px",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between"},ee||{}),onClick:function(e){e.stopPropagation()}},l.a.createElement(m.a,{style:{width:"calc(100% - 60px)"},label:Q||Object(x.u)("$__nameOfCard",1),variant:Object(x.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){ue(e.target.value)},onKeyDown:function(e){13===e.keyCode&&se&&ve({name:se}),27===e.keyCode&&(he(!1),ue(Y||(w?null===w||void 0===w?void 0:w.trim():"")))}},value:se,placeholder:Object(x.u)("$__titleOfCard_placeholder",1),autoFocus:!Z,multiline:!!q}),l.a.createElement(y.a,{color:Object(x.d)("medium"),onClick:function(){return fe?he(!1):U()},icon:"cancel",title:Object(x.u)("$__close","*"),size:H||"25px"}),l.a.createElement(y.a,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){fe?ve({name:se}):W()},title:Object(x.u)("$__save"," * "),size:H||"25px"})):l.a.createElement(v.a,{title:G||(w||"")},l.a.createElement("div",{style:Object(a.a)({},R?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:B&&!0===B?"":"nowrap"}),onDoubleClick:function(){C&&j&&(ue(Y||(w?null===w||void 0===w?void 0:w.trim():"")),he(!0))}},"".concat(z?"".concat(z,". "):"").concat(w&&w.indexOf("$__")>-1?Object(x.u)(w,1):w?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(w):""))))):l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:ie.headerIcon,style:{color:"lightgray"}},l.a.createElement(y.a,{overlap:"rectangular",size:"calc(".concat(T," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:F?F.substring(0,1).toUpperCase().concat(F.substring(1)):""})),l.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},D||Object(x.u)("$__privateActivity"))))),!fe&&l.a.createElement("div",{style:{position:"absolute",right:7,padding:"3px 0px",display:"flex",alignItems:"center",borderRadius:7,backgroundColor:"rgba(250,250,250,0.7)"},onClick:function(e){e.preventDefault(),e.stopPropagation()}},!M&&l.a.createElement(h.a,{nodeId:I}),M&&l.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!L||s.a.getState().controls.lockPrivate||be?l.a.createElement(l.a.Fragment,null,$&&l.a.createElement("div",{style:{zIndex:1e3}},l.a.createElement(u.a,{color:I&&ae.cards[I]&&ae.cards[I].color?ae.cards[I].color:null,_id:I,onChange:function(e){$(e)},style:{zIndex:5e3}})),xe&&b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)})).length>0&&l.a.createElement(v.a,{title:Object(x.u)(b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].name)},l.a.createElement(g.a,{onClick:function(e){b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].onClick()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:Object(x.d)("menu"),icon:b.filter((function(e){return e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name)}))[0].icon,usePropagation:!0}))),b&&b.filter((function(e){return e&&e.show&&"fixed"===e.show})).length>0?b.filter((function(e){return e&&e.show&&"fixed"===e.show})).map((function(e,t){return l.a.createElement(v.a,{key:"opt".concat(t),title:Object(x.u)(e.name)},l.a.createElement(g.a,{onClick:function(){return e.onClick()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:e.color||Object(x.d)("menu"),icon:e.icon,usePropagation:!0})))})):l.a.createElement(l.a.Fragment,null),!t&&r&&l.a.createElement(v.a,{title:Object(x.u)(c?"$__collapse":"$__expand")},l.a.createElement(g.a,{onClick:function(e){r()},className:ie.iconButtonStyle},l.a.createElement(p.a,{size:"22px",color:Object(x.d)("menu"),icon:c?"expand_less":"expand_more",usePropagation:!0}))),xe&&l.a.createElement(f.a,Object.assign({noButton:!0,options:[].concat(Object(n.a)(b),Object(n.a)(L&&be?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){ye((function(e){return!e})),P&&P(!be)},show:"hover"}]:[]))},A||{}))):l.a.createElement(l.a.Fragment,null,l.a.createElement(d.a,{title:Object(x.u)("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){ye((function(e){return!e})),P&&P(!be)},size:"21px",style:{padding:"0px !important"}})))))}},643:function(e){e.exports=JSON.parse('{"name":"machen","version":"3.1.238","private":true,"dependencies":{"@date-io/date-fns":"1.3.13","@emotion/react":"^11.9.0","@emotion/styled":"^11.8.1","@fortawesome/react-fontawesome":"^0.1.14","@material-ui/core":"^4.11.0","@material-ui/icons":"^4.5.1","@material-ui/lab":"^4.0.0-alpha.56","@material-ui/pickers":"^3.2.10","@mui/material":"^5.8.1","@nivo/bar":"^0.70.1","@nivo/bullet":"^0.79.1","@nivo/bump":"^0.83.0","@nivo/circle-packing":"^0.70.1","@nivo/core":"^0.70.1","@nivo/funnel":"^0.80.0","@nivo/line":"^0.83.0","@nivo/pie":"^0.70.1","@nivo/sankey":"^0.70.1","autonumeric":"^4.6.2","axios":"^0.21.1","base-64":"^1.0.0","bcryptjs":"^2.4.3","browser-image-compression":"^1.0.14","chartist":"^0.10.1","chartist-plugin-tooltip":"0.0.11","chartist-plugin-tooltips":"0.0.17","chartist-plugin-tooltips-updated":"^0.1.3","compress":"^0.99.0","cpf-cnpj-validator":"^1.0.3","crypto-js":"^4.0.0","d3-shape":"^3.2.0","date-fns":"^2.16.1","dotenv":"^6.2.0","draft-js":"^0.11.7","draftjs-to-html":"^0.9.1","emoji-picker-react":"^3.4.7","fg-loadcss":"^3.1.0","file-saver":"^1.3.3","history":"4.9.0","html-to-draftjs":"^1.5.0","i":"^0.3.7","import":"0.0.6","install":"^0.13.0","jquery":"^3.5.1","jwt-decode":"^3.1.2","material-table":"^1.69.0","memoize-one":"^6.0.0","moment":"2.29.2","moment-timezone":"^0.5.31","nouislider":"14.0.2","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","rc-color-picker":"^1.2.6","react":"^17.0.0","react-aspect-ratio":"^1.1.2","react-audio-player":"^0.17.0","react-beautiful-dnd":"^13.1.1","react-big-calendar":"^1.5.0","react-bootstrap-sweetalert":"4.4.1","react-chartist":"^0.13.3","react-color":"^2.19.3","react-contextmenu":"^2.14.0","react-cookie":"^4.1.1","react-copy-to-clipboard":"^5.1.0","react-credit-cards":"^0.8.3","react-cropper":"^1.3.0","react-custom-scroll":"^4.2.1","react-data-export":"^0.6.0","react-datepicker":"^4.14.1","react-datetime":"2.16.3","react-doc-viewer":"^0.1.5","react-dom":"^16.9.0","react-draft-wysiwyg":"^1.15.0","react-easy-swipe":"0.0.18","react-export-excel":"^0.5.3","react-fetch-preloader":"0.0.3","react-file-drop":"^3.0.7","react-file-viewer":"^1.2.1","react-google-login":"^5.2.2","react-grid-layout":"^1.3.4","react-image-file-resizer":"^0.4.7","react-jvectormap":"0.0.12","react-keyed-file-browser":"^1.10.0","react-linear-gradient-picker":"^3.0.1","react-loading-skeleton":"^3.0.1","react-mentions":"^4.1.1","react-nestable":"^2.0.0","react-number-format":"^4.4.1","react-popper":"^2.2.4","react-render-html":"^0.6.0","react-responsive-carousel":"^3.2.23","react-router-dom":"5.0.1","react-router-redux":"^4.0.8","react-scripts":"^3.4.4","react-select":"^3.1.0","react-sound":"^1.2.0","react-swipeable-views":"0.13.3","react-table":"6.10.0","react-tagsinput":"3.19.0","react-textarea-autosize":"^8.4.0","react-toastify":"9.0.0","react-virtualized":"^9.22.3","react-virtualized-auto-sizer":"^1.0.15","react-virtuoso":"^3.1.5","react-webcam":"^7.1.1","react-window":"^1.8.9","react-window-infinite-loader":"^1.0.8","reactjs-pdf-reader":"^1.0.12","reactour":"^1.19.0","redux-saga":"^1.1.3","sass":"^1.65.1","simple-peer":"^9.11.1","socket.io-client":"^4.4.1","styled-components":"^5.2.0","utf-8-validate":"^6.0.3","utf8":"^3.0.0","uuid":"^8.3.2","xlsx":"^0.18.5"},"scripts":{"start":"react-scripts start","build":"react-scripts build --passWithNoTests","test":"react-scripts test --env=jsdom","eject":"react-scripts eject","deploy":"npm run build --passWithNoTests ","lint:check":"eslint . --ext=js,jsx; exit 0","lint:fix":"eslint . --ext=js,jsx --fix; exit 0","install:clean":"rm -rf node_modules/ && rm -rf package-lock.json && npm install --no-package-lock && npm start"},"optionalDependencies":{"@types/googlemaps":"3.37.3","@types/markerclustererplus":"2.1.33","ajv":"6.10.2","typescript":"3.5.3"},"devDependencies":{"envify":"^4.1.0","eslint-plugin-react-hooks":"^4.6.0","gulp":"^4.0.2","gulp-append-prepend":"1.0.8","prettier":"1.18.2","terser":"^5.14.1","terser-brunch":"^4.1.0","uglifyify":"^5.0.2"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":[]}}')},646:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAABN2lDQ1BBZG9iZSBSR0IgKDE5OTgpAAAokZWPv0rDUBSHvxtFxaFWCOLgcCdRUGzVwYxJW4ogWKtDkq1JQ5ViEm6uf/oQjm4dXNx9AidHwUHxCXwDxamDQ4QMBYvf9J3fORzOAaNi152GUYbzWKt205Gu58vZF2aYAoBOmKV2q3UAECdxxBjf7wiA10277jTG+38yH6ZKAyNguxtlIYgK0L/SqQYxBMygn2oQD4CpTto1EE9AqZf7G1AKcv8ASsr1fBBfgNlzPR+MOcAMcl8BTB1da4Bakg7UWe9Uy6plWdLuJkEkjweZjs4zuR+HiUoT1dFRF8jvA2AxH2w3HblWtay99X/+PRHX82Vun0cIQCw9F1lBeKEuf1UYO5PrYsdwGQ7vYXpUZLs3cLcBC7dFtlqF8hY8Dn8AwMZP/fNTP8gAAAAJcEhZcwAACxMAAAsTAQCanBgAAATuaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA2LjAtYzAwMiAxMTYuMTY0NzY2LCAyMDIxLzAyLzE5LTIzOjEwOjA3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIxLTA4LTE2VDEwOjAwOjU2LTAzOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMS0wOC0xNlQxMDowMjoyNC0wMzowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMS0wOC0xNlQxMDowMjoyNC0wMzowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NGNkYzhjZTMtOTEyYS1lODQwLWJjYjQtOWVkMTMxMGFiYjU4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjRjZGM4Y2UzLTkxMmEtZTg0MC1iY2I0LTllZDEzMTBhYmI1OCIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjRjZGM4Y2UzLTkxMmEtZTg0MC1iY2I0LTllZDEzMTBhYmI1OCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NGNkYzhjZTMtOTEyYS1lODQwLWJjYjQtOWVkMTMxMGFiYjU4IiBzdEV2dDp3aGVuPSIyMDIxLTA4LTE2VDEwOjAwOjU2LTAzOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+rzal5gAAFXlJREFUeJztnXlsZMd95z9V9a6+SDY5Q3JIzn1oNIpjO97YcrwxAluyN16ttcF617tAEGSxyALZwEBOLBIgCRDAuf5IYCAIknWAIItgs96VkhiyFcmSV5JzOFnJSizbkuYezXA4nINXs493VVX+eM1ucsjh2d1DyfwC/IPdXfWq6vvqd796wlrLZnHrrWmAI8CfA+8FaoDZdAe7FEKIotb6TlSP/72U8qWtrMkKWLG6bwkHHzy06S6cLV4yAL5ARgZAYYvtdyeEQCD3R434Rc93P+a4znPG3J/7TG7x9/8JeH83BnLfISxYS1gLv6K1/piUW12azmCrVz3WlVHsEgghAEFUi5/VWv/Q/SBlq1e8P7dNDyEkWGsIa+ELWutP9JqUrV7tba/AN4QFIQVYCGvhl1OdfLyXpLzj7/jtYomUqBo/k6bJJ3tFyh4h60BIAQKievxFrfWHe0HKHiEbIFP0ENWjl7TWj3ablD1CNgEhBNb0xiTeI2STWKbon9Wp7ppO2SNkC2iRUg+/qLV+rBuk7BGyRSzbKU91w0/ZI2QbWO6naK076qfsEbJNLCPlGa31I50iZY+QHWAZKc9prT8u1c6Xc4+QHULIzE8Ja+EzOt25SbxHSAew5DyG9cazWuuP7ISUPUI6BCGasa96+FWt9Q9LKWEbicc9QjoIIQXWWsJ642mt9ceEWp3S3QhbTeG+o6FTjdEWscPb1BpLvVJ/1st7j7ie89WttN0jBMBahBDkB3JYY1s6YUddGosQ8nnXcx8DvrzZdnuEAEtVJoVSsdMdY6z9EO9EQpRSHelHa33v79K0I9e4C1ti+W1DSJIkHennPhQubMnW2vWESCkxxnDpyjRRGOM429spaaoJAo/jx8Zafe5G7HpCltRrmqYkSYK121vINNUoR67oczeio4RYa1FK4XkuG5VjCiGI4wSt9bpWzVIvjlQopXAchzTVJEmyoTVkrcV1XRxHYW3Wx/I+12vnOArX7dw8NouOEqKUIo4S5mYrG8pqYyzFYg7Xc7YkPtJUE+R89g0NoDdop6SkWm8QNqJN9w/gKEUYxszObGYehkIhh++7G45nU9fecQ/L4LkO83NVzl68hue59xQN1lqSVHPm1BEKhYAwijd9jThJGB4uc+L4OGG4frtc4HPh4nUqlSqus/mpep7D7TsLnL90jcD31v1tFCc8cOIQxVIOvcF4NoPOiiwsUgo8z8Nzs66tWbblRbNgwIIQaevuW2+rCyFWfC+EwGhDHMUk8fqWlxICY8yq9nf3ucZVm6LXw3XdbB7WtmWdaI/Z2qblts2C+bvRFaUuaCtOi2VJDAvaExGAlAKpBFLee3Gy78SqSn/LJnTBXb+xIutPyeUjXPuaUmT116152LYDefc8lq7VCXTNyrLWYozl4PgwhYKPEJLKYp3JqVsoKXEcxeSN29y8NYtZR3EKkS2GTjVKSdJ1HLv1oJREp5qLl6Zafd4LUgriOMX1nPY8xoYpFnNYDLVaxLWpW8gOKPG70UVCMlIKhRzlchGEQGuDMRYls21erzXQ2mzKOnFdt5UM2g6EFBhjWViobmLsmbXoupnBYaylUMwxUM6cbiFqWGOxOxjPvdADP8S2RJi4S0ysKXYsuG5m4q4yOXciF2y22zzPbX0khEBrTZykK26KtS9jWfGLLjkzXSNEiOyuXFxsYIxFIKhUay19oY2hr1jAdRXG2OyudBS+57JQqdEII1SXwxxpqsnlfEaGh4iiuLlbs90bxQmNRpT9LwSVxTqmaaDU6iFSCLogsbpJSKY8J6dutfwMqTLdYU3meY8d2MfgUB9hGBH4LtYKpqdn0WllRV9JkqKUQu2kiEBkvo9ONa7bnnaqNfmcz5HDI1gLURyTy/ncmJptmb3KEVyfut2eR1MHdgPdFVk2U6YrFnKZxaW1IUlSPNelVo+4dPkGs3MVfM/FcTMnUxtDeaBEkmriaPsBRmMsvusiA5+FhSpKSXzPJYlT3jz/FjfvzHHsyBi5IPtMLzeX15pHl9BRQoTIFGcYxRhr13cMkzTzcnM+t24tcO7CVcIoppAP0FpTrTXoKxU4eGCYUl+Ocxcm0UY3Fa7MHLYNdErgeygpsdZmoY3A58TxcaqLDSZv3KZSqZELPPK5gNnZCvV6yKnjE4yMDKK13pTDGkUJxhg6pd87SkiSpOTzASePTawbcrBkDuPAQJHpm3O8cfYKFsgXAqIwRkjJ4YOjjI6UyecCavWQVGsEAs91qVTrXLh4Ha03CJ0oSaVax2vGpJZyISMjZUqlHNM357gxfYdUmyxiEMa8fvYKCNi/rx/b3BnrQRtDIZ8jTjqTS+koIWmq8XyH8dK+DYNyhVzA1PQM337jMq6r8F2Xej0in/c5cXSC/r48UZxQqzUw1iKb+81xFI16xMJCdVPBRa8ZXEySFEnmuddqDaSSHDk8wkB/kQuXJqnXQ/K5gDhO+NZ3LvG9Z05w6sQ41Xq4rkG1FFxM010YXBTNUEUjvHcwz1pLPhcwfXuWN869hes6eK5DrR5SLpc4eXwc13WoNUIgCxBiLanWpGnbKdxsbGpJPKapbjmVQojs/1TT15fnzINHuHDxOguVKvlcADG8fvYyiCOUSnnqjXDDxe4EGdDjfIi1Ft/3CKOY8xcmAVpkDJb7OH3qIEDT3GzGippt/WaQz9lmKjfVutXH8r1bb4QEvseDpw9z9tw1ZucqFPIBjSjm3IVrfM+Zo/i+RxTFHVv09dBTQpRSCODS5Rs0wphCIaBRDykPlHjg1EGMtcTxyjzHkql59Mhox8axPNwvhCCMYjzP5YFTB3nz7FXmF6rk8z71WsjFyzd44NRBlFI9yTL2LMFsrSUXeExPzzIzu0AhnynwXD7g1IkJBKwiYzmUlB35WwtLekAAp05OkM/5RGFMPh8wM7vA9PQsge9tqBc7gZ4R4nkui9U6U9MzWTJHayxw/OgYrusQbiAStDEd+bsXlnaK6zgcPTyKbV7T91ymb85Qb0Qrwi7dQs8IcR2HG9OzNMII13GI4oSD48P09xVohFFP5PNGEELQCCMGB/sYG91HoxHheg6NMGb65sy29ddW0BNCPNdhfr7K7GyFXM4njhP6igVGRwaJ4q7UQu0IUZxw4MAg/aUCcZQQ+B63b8+zuFhvJd66hZ4Q4jiKmdkKcZKgpCRJNSPDZVzXIe1OcdqOkCQpge8xMjJE0szDxEnK7Nxi12JYS+g6IUopqrUGC5UqvucRxwn9/UUGyqUN9cb9Qia6YsrlIgP9ReI4wfccZmYXqNYaHauiXAtdJ8RzFbVaRL0RoZxsd+wr9xE0FftuhdaawHMZLPdlu8RRhFFMrRbhuW9jQqyFarWBEGC0xfddisX8qqTQboMQgjhJKRXz+L6L0ZnJu1itr5v+3Sm6SohSkkYjZqFZhpMkCeX+EoViQNKhYFw3kaQphWLAQH+JJElwHYdKpUa9EXYtFN9lQrKCszhOkEpiLeTzQVeKA7oFKQT5XIBplvvEcUIUpl3TI10lRApBmqZZVYnNMoaeu7VKxfsNYwy+56DUUh2WJU11126qruuQOEmx1mKtwXVUx0ouewVtDH7gNnMqWQVK3KFHI9ZCVwmx1hI1qwuNsbie26zl7X5MqFMwxjRTBC66Oe4oSroW1+oaIUKAaW5vIQSmWVG+lFJ9u8DaLLCZ6cDs+cNU66ySpgtiq4s7JDv0a6m0hmaO/W2kz9fEUnLLbPM5lY3QNUKWihEcR9FoxNTDCNd11i6A29XI5iGloNGIsuCo62SBxi7Mo6uRMm0MY6NDLQJGhsvbrs29X7A2m8f4gf1Z5aWAsdEhtDEdK7Bejq4SkiQpvu9y8sQ4INCpJtnlHvpaSJKUINechwCdmq7No6uELCnAJTN3SSm+3bCkN7To/jx6klN/e+mMe+MdlcLdw+awR8guwx4huwx7hOwybEmpF0alUb7o3BOO3wWwW3RXtkTI1Wesnyzu/ICv7xZYC8pHPfSpzbfZEiGvflYXZ79pkd7bPybVdVgwBnIjwusaIX5Z2GAYhEvHHlB5p8JasAZyQ6J7IktIrFQg1N4O2QjCNl9ruMVM75422GXYI2SX4b4cYCYVJA1oTGviyGDInspVCJy8IDcscQMBUpBUDNUbGtFMPxTHFE5eYNeoIpKuIJzV1G9pEOAWJKUxhTaZCLl7DGkI9ZuauNG2TZUQ+GVJfl92r/Y6DNdzQpQnmL+UIgQc/tcB+9/tURxVxDVD5ZJm5s2E2mSKTiBpGMonHQ5/PEdUMWDhzmsxOgR518itgHjekN+vOPxoDmNANyy3X4szv0m2fyeVYO5cgvIFBz8aMHTGpXRIoWPL/HnN9D9EXH81orRPkR9WmKR3rPSUEOkKZs8l9B9x+DdP7Gff9679vMXLv13hb39pHicQ+P2SR/9osPXdcz8xy3f+uEr/sZVDl8DsVMrDvzbEu/5LdibJ5acbPPXvGhTHmifJicwYuf1GzKEPBXz0DwfZ99DaY3j9f9b4x99bpDapcYu9s2B6qkPCGU1p3OFHnh5eQUZtWlO53JZBV58PcYuC/Iji6vMh1/+m/RDpwEmHRNtVI49rlvIRlyMfz7U+m/q7iCQ0iKaloxTMnU059XieT//NSIsMa2DubMLiZDubeebHCjzwH/PUb+qeRiZ6ukOqNzUf+Vw/Ayeyyy5cTHnx5+a4/Y2YNIHxD3l4fZKb34gpHlAYC4264frXQsb/pQ/A2Ad9cgWJTWgtNEA0ZzjwQZ/SRPZhGloufykkP5T9LwRUJzUj3+/x2Bf2tdqdf7LOK79VYe5iiuMLJn7I59E/GuKtZxu88psVSgdVT0/N7BkhJrUE/ZKR728fmff0j97hzb9vMH7AQ3lw5a9CjLb0HXWwBrAQBILpV9onKox90Gfoe1zmzqfkhprbREJYN4z+i3bft16JmT2bUBxviisLcdXy/v/eh/KzFb74lw2e+NQtfCHpO6SwCbz+ZzVuvhITVwxCgrqHAdEt9O6hzwT8kiS/P1ugylTKzMWEg2MeblHgBILihKLvsAOmbd0UDjhcez7k5ssZKcKBvqMO8UK7DMfElnxJcuzxtri6+kJIEpqWY9aYyQg79lj7N3/9i/PkHcngaQflCZyCYP9pl2jBID1BUJY9JQN6SIj0BOGcoTqVyem+MYfh0x5TUzFW33sk0oP6ouH637X1yIEP+Cv0SLRgGTjtMvr+TKzZFC78RZ1cWbXM3WjWMPZhv7U7Lj3VYO5sku3GZYtuNPj9EicQmPtQINMzQoSCpGa59kLY+uyxJ/bxnh8pMnMpYf5citWZf7ACBlwluP1PbbF17BMBfWMOad0iRKY/yiecVtvpVyLmzqYE5ZXT6z/altDX/zYitauNg/uNng6ndETx8q8vcPEvGgDkhxWf/PP9fPq5EQ59NGDuUsLCWxrprtSihTHFlWcazF/IbuWBUy6DJx2ihcypNNZy9F+1RdHkixFx3azUkAL8vvZ067c0jhRgMnM8DS23zyfcOZ8w0/y7eT6memP1eLqJnlpZbiDwBiRPffo2P/gbZd73cyUADj0ScOiRgMmvRTz3X2eYfT1h8IzbcsicvODO2ZRrL4QMnMh8jPIpl6svhfhFSfm4y6FHAyDTPeefrBP0y7Z3bgEBKrdsYXXbSgtnNP0nXR7+5X50YjMRaiE3KLnxDzFn/08tI7MHvPSUEKMhGJJIV/CVn5/h4l/W+cCv9nP4kWwxJz7s86PfOMCTj97izmsxhQlFtgXAQXD7m22xdejRgNc+v0g4bzhwxqdwIFvdmy/HzL6RkB9ZJvuaC7nc47aSln8RzRlKE4p3/cTqN0vkhhWvfX4RryR7EuHu/bsbUvAKgtHTHtOvxPzvR6d54pFb3PlW9tiCWxB89PfLSF9gwvYC5kcVV54JM0cNOPSRgMEHPSp1zfiH/NbvJl8KiWpm9a1mIK60+wv6JDq1WJHdJJUrKS//ZoUXf3qON/9Xrd0stT11DO+LSrMW0NB3SDF80uPSVxv86ftuMPtGRsr+93gc/VhAdbpt5vh9gtmLCVe/mhkFwZCkNKGwWA59pE3IuSfr+H1yVTDRYLOgYxNDD7loMofRLyuq1zUv/uIcX/rcDN/50xr3C/fVxljyNUbOeNQSw9d/rX34ZfmMSxq1V3UpIry0kwAGH3BxkZRPZyGQW/8YM/d60nYYl8HLS6b/f9t0PvqJHP2jinjBoFOLEwj2nXSZUB59Y90/QuNe6Ckh0hXUbmjmL6Yk9eax3c3HpTUWv9QW0rrRPkUOsvB5blDx1lca6DhrO/x9Lsc+HJAfzhZw8msRjUWDWMMqKowqJl+IuPH3GSnFCcXRT+S4OZ0gaWdArQW98zP1t42eKXUrMmvm+ON5nJzgyrMN5s6npBg0MHHM5/2/1AdAUre89VxIsG/l/RIMSGbOptx6NebAwz7jPxisiPqe/791guJqcQVZHUAaWV77gyoHHs5E3CN/MEhtSvPtZ+oUkSBh2iScXvYsjnTEOzOWZSOLTuB9P1ti+Ps8alOaq8+HzF9JKYwoTv2HfMuR+84fV5l+JWLwlLsiQZQ5l4apr2eEDBx3WoTc+WbCnW/Hq0hswUD/EYdv/kmV0Q94vPsnS0hX8G+fHubI7y1y7f+FODnBD5xxeeg/t62txcmUTNl0a2VWoneEaHByoh2jGlM8+GOFVb/71uer/PUvzNM3sfbQgpLkwpN13vczpeZrI7LPr30tJFqw5IfXWTkF5YMOL3xmjsYdw8O/3I8Q8N7PlHjvZ0qrxvuN36nw8m9XKIypnhV19IwQJy+Ia5YvPn6bh368wNgP+HglifLBJBDOGV7/kyqvP1FnYNzBKa0dZc3tV8yeTTj7Z3VGP+ATLRiUC+e+UMfvy15rcc/CG5OZ3GJC8dKvzHH5qQbv/qkS/cccvD6BNZlPMn8h5bU/rHL11ZChcRen0LuIb+92iAWvTxJXDF//7AJKCty8yHLlOguNO75g3yk3e53EPRZAuOAPSJ7/bzNY0zQKEkswoChOOBumW40GxxeMnPaZOZfw5R+/g5+TOH72HlsdQhQZCgOKA6f97Fz6HkZ8t0SIjjLDZ7u716YWNy8YOuliTZapW6pfyo82xc9Gb2ppkhCUZRambw5GuWLTue/MD7IUhhWF/dlZ9NkLAyRCQql5bIbV9z6de0M0Xwlh0611sbVCOQeZVMEfInMMdgAhadUIb2fS0umQUBeZsaC28WbndbsVoBNIo61Nb0t+yLt+Sv6T8qB+Y6stv8sgIV6EcAaOf0pMb6XplnbIkcfl/6hdx3n1s/pzNsEIyRb5/+6ATXAxBA/9pPzd9/yC+tWttP1naNHfLnAaa+QAAAAASUVORK5CYII="},659:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(20),i=r(15),c=r(13),l=r(14),s=r(157),u=r(1),d=r(24),p=Object(s.a)((function(e){return{iconButtonStyle:{margin:0,marginTop:"-8px",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));t.a=Object(l.b)((function(e,t){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(c.b)(i,e)}))((function(e){var t=p(),r=Object(d.j)(e.nodeId);return r.total<1?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{top:0,zIndex:0}},a.a.createElement(o.a,{className:t.iconButtonStyle,badgeContent:r.total,color:Object(u.d)("menu"),icon:0===r.total?"notifications_none":"notifications_active",size:"17px",transparent:!0}))}))},660:function(e,t,r){var n=r(364),a={data:{},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:100,chartPadding:{top:0,right:0,bottom:0,left:0}}},o={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895],[150,133,440,199,799,100,499,657,50,352,117,400],[900,700,800,600,100,200,700,400,410,333,355,499]]},options:{axisX:{showGrid:!1},low:0,high:1e3,chartPadding:{top:0,right:5,bottom:0,left:0}},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},i={data:{labels:["12am","3pm","6pm","9pm","12pm","3am","6am","9am"],series:[[230,750,450,300,280,240,200,190]]},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:1e3,chartPadding:{top:0,right:0,bottom:0,left:0}},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},c={data:{labels:["M","T","W","T","F","S","S"],series:[[12,17,7,17,23,18,38]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisX:{showGrid:!1},low:0,high:50,chartPadding:{top:0,right:0,bottom:0,left:0},showPoint:!1},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},l={data:{labels:["'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[10,16,8,13,20,15,20,34,30]]},options:{lineSmooth:n.Interpolation.cardinal({tension:0}),low:0,high:50,chartPadding:{top:0,right:0,bottom:0,left:0},classNames:{point:"ct-point ct-white",line:"ct-line ct-white"}},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},s={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895]]},options:{seriesBarDistance:10,axisX:{showGrid:!1}},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},u={data:{labels:["'06","'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[287,480,290,554,690,690,500,752,650,900,944]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisY:{showGrid:!0,offset:40},axisX:{showGrid:!1},low:0,high:1e3,showPoint:!0,height:"300px"},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},d={data:{labels:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],series:[[542,443,320,780,553,453,326,434,568,610,756,895],[412,243,280,580,453,353,300,364,368,410,636,695]]},options:{seriesBarDistance:10,axisX:{showGrid:!1},height:"300px"},responsiveOptions:[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]],animation:{draw:function(e){"bar"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}},p={data:{labels:["'06","'07","'08","'09","'10","'11","'12","'13","'14","'15"],series:[[287,385,490,554,586,698,695,752,788,846,944],[67,152,143,287,335,435,437,539,542,544,647],[23,113,67,190,239,307,308,439,410,410,509]]},options:{lineSmooth:n.Interpolation.cardinal({tension:10}),axisY:{showGrid:!0,offset:40},axisX:{showGrid:!1},low:0,high:1e3,showPoint:!0,height:"300px"},animation:{draw:function(e){"line"===e.type||"area"===e.type?e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:n.Svg.Easing.easeOutQuint}}):"point"===e.type&&e.element.animate({opacity:{begin:80*(e.index+1),dur:500,from:0,to:1,easing:"ease"}})}}};e.exports={model:a,emailsSubscriptionChart:o,completedTasksChart:i,roundedLineChart:c,straightLinesChart:l,simpleBarChart:s,colouredLineChart:u,multipleBarsChart:d,colouredLinesChart:p,pieChart:{data:{labels:["62%","32%","6%"],series:[62,32,6]},options:{height:"230px"}}}},661:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(1),i={container:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",border:"0.5px solid ".concat(Object(o.d)("light")),borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",padding:"3px",minWidth:"150px",display:"flow-root"}),cardContainer:Object(n.a)(Object(n.a)({},a.k),{},{position:"relative",minWidth:"150px",display:"flow-root"}),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(o.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(o.d)("color"),fontWeight:"500",alignItems:"center"}},infos:{position:"absolute",float:"left",width:"100%",height:"auto",display:"block"},description:{position:"relative",float:"left",padding:"5px",width:"100%",overflow:"hidden"},dates:{position:"relative",float:"left",width:"100%",marginTop:"7px",padding:"0 5px",marginRight:"15px",color:Object(o.d)("medium"),fontSize:"10px",display:"flex"},dateInfo:{marginRight:"15px",display:"flex",alignItems:"center"},usersContent:{position:"relative",minHeight:"20px",minWidth:"40px",float:"right"},users:{position:"absolute",bottom:"7px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}};t.a=i},662:function(e,t,r){"use strict";var n=r(8),a=r(2),o=r(5),i=r(0),c=r.n(i),l=r(15),s=r(47),u=r(3),d=r(13),p=r(14),f=r(45),h=r(27),m=r(250),g=r(10),b=r(64),y=r(74),v=r(724),x=r(346),_=r(33),O=r(333),w=r(1),j=r(24),E=r(63);function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=Object(p.b)((function(){return{}}),(function(e){return Object(d.b)(l,e)}))(Object(_.a)(O.a)((function(e){var t=u.a.getState().db,r=c.a.useState({}),i=Object(o.a)(r,2),l=i[0],d=i[1];c.a.useEffect((function(){d(Object(a.a)(Object(a.a)(Object(a.a)({},e.toTemplate&&t.cards[e.cardId].name?{name:"".concat(Object(w.u)("$__template")," - ").concat(t.cards[e.cardId].name)}:{}),e.toTemplate&&t.cards[e.cardId].description?{description:t.cards[e.cardId].description}:{}),e.toTemplate&&t.cards[e.cardId].image?{image:t.cards[e.cardId].image}:{}))}),[]);var p=c.a.useState({}),_=Object(o.a)(p,2),O=_[0],S=_[1],L=c.a.useState(0),C=Object(o.a)(L,2),I=C[0],T=C[1],F=u.a.getState().db.cards[e.cardId]&&u.a.getState().db.cards[e.cardId].type?t.dataType.filter((function(t){return t.name===u.a.getState().db.cards[e.cardId].type}))[0]:{},D=function(){var r=Object(n.a)(k().mark((function r(){var n,o;return k().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!l||l.name){r.next=4;break}S(Object(a.a)(Object(a.a)({},O),{},{name:!0})),r.next=15;break;case 4:return T(1),r.prev=5,n=Object(a.a)(Object(a.a)(Object(a.a)({},t.cards[e.cardId]),l),{},{templateId:t.cards[e.cardId]._id,created_at:null,isTemplate:!!e.toTemplate||null,order:null,updated_at:null,_id:null,_planId:null}),r.next=9,Object(j.F)(e,!0,n);case 9:(o=r.sent)&&o._id&&(T(2),setTimeout((function(){N(o._id)}),1500)),r.next=15;break;case 13:r.prev=13,r.t0=r.catch(5);case 15:case"end":return r.stop()}}),r,null,[[5,13]])})));return function(){return r.apply(this,arguments)}}(),N=function(){var t=Object(n.a)(k().mark((function t(r){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(j.i)(e,e.cardId,r);case 3:t.sent&&(T(3),setTimeout((function(){A(r)}),1500)),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),A=function(){var t=Object(n.a)(k().mark((function t(r){var n,a;return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(E.b)(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,Object(E.b)(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(T(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?s.a.push("sp#tab/templates"):s.a.push("sp#".concat(r,"/dashboard"))}),500));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return I>0?c.a.createElement(x.a,{style:{padding:"7px"}},c.a.createElement(b.a,{title:"".concat(l.name?l.name:t.cards[e.cardId].name," "),icon:F&&F.icon?F.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(w.d)("medium"),fontSize:"16px"}),1===I&&c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__installingTemplate")),c.a.createElement(y.a,null)),2===I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__templateInstalled")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__copyingData")),c.a.createElement(y.a,null))),3===I&&c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__templateInstalled")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__copiedData")),c.a.createElement(g.a,{icon:"done_all",color:"green"})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(w.u)("$__preparingToRedirect")),c.a.createElement(y.a,null))),4===I&&c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},c.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},c.a.createElement(g.a,{icon:"done_all",color:"green",size:"50px"}))),c.a.createElement("div",{style:{clear:"both"}})):c.a.createElement(x.a,{style:{padding:"7px"}},c.a.createElement(b.a,{title:"".concat(Object(w.u)("$__template",1),": ").concat(t.cards[e.cardId].name),icon:F&&F.icon?F.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(w.d)("medium"),fontSize:"16px"}),c.a.createElement("div",null,c.a.createElement(m.a,{img:e.toTemplate&&t.cards[e.cardId].image?t.cards[e.cardId].image:null,onChange:function(e,t){d(Object(a.a)(Object(a.a)({},l),{},{image:e,file:t}))},placeholder:""}),c.a.createElement(h.a,{error:O&&O.name,helperText:Object(w.u)("$__youMustDefineAName"),label:"".concat(Object(w.u)("$__customName",1)),variant:Object(w.d)("fieldVariant"),name:"name",defaultValue:e.toTemplate&&t.cards[e.cardId].name?"".concat(Object(w.u)("$__template")," - ").concat(t.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(v.a,{position:"start"},c.a.createElement(g.a,{icon:"view_headline"})),onChange:function(e){d(Object(a.a)(Object(a.a)({},l),{},{name:e.target.value})),O&&O.name&&S(Object(a.a)(Object(a.a)({},O),{},{name:!1}))}},placeholder:Object(w.u)(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),c.a.createElement(h.a,{label:"".concat(Object(w.u)("$__customDescription",1)),variant:Object(w.d)("fieldVariant"),name:"description",defaultValue:e.toTemplate&&t.cards[e.cardId].description?t.cards[e.cardId].description:null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:c.a.createElement(v.a,{position:"start"},c.a.createElement(g.a,{icon:"toc"})),onChange:function(e){d(Object(a.a)(Object(a.a)({},l),{},{description:e.target.value}))}},placeholder:Object(w.u)(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),c.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){D(),e.stopPropagation()}},c.a.createElement(f.a,{text:Object(w.u)("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),c.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},c.a.createElement(f.a,{text:Object(w.u)("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})))},663:function(e,t,r){"use strict";var n=r(6),a=r(1);t.a=function(e){return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0",width:"-webkit-fill-available","&:before":{left:"15px"}},timelineSimpleWithHeader:{position:"relative",overflowX:"auto",marginTop:"60px",padding:"0 0 0",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"15px",paddingBottom:"33px",position:"relative",paddingLeft:"15px",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:{color:n.I,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",left:"50%",marginLeft:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadge:{left:"7px"},timelineBadgeInverted:{color:n.I,width:"30px",height:"30px",lineHeight:"25px",fontSize:"12px",textAlign:"center",position:"absolute",bottom:"23px",right:"50%",marginRight:"-7px",zIndex:"1",borderTopRightRadius:"50%",borderTopLeftRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},timelineSimpleBadgeInverted:{right:"7px"},custom:{backgroundColor:Object(a.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.b)+", 0.4)"},info:{backgroundColor:n.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.s[0])+", 0.4)"},success:{backgroundColor:n.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.B[0])+", 0.4)"},danger:{backgroundColor:n.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.i[0])+", 0.4)"},warning:{backgroundColor:n.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.H[0])+", 0.4)"},primary:{backgroundColor:n.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(n.q)(n.b)+", 0.14), 0 7px 10px -5px rgba("+Object(n.q)(n.w[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:{maxWidth:"calc(100% - 70px)",float:"right",padding:"7px",marginBottom:"5px",marginRight:"40px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(n.q)(n.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(n.q)(n.b)+", 0.87)",background:Object(a.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(n.q)(n.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(n.q)(n.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:"0px",display:"flex",alignItems:"center"},timelineDate:{display:"flex",alignItems:"center",padding:"5px",backgroundColor:"#CCCCCC"},timelineBody:{overflowWrap:"anywhere",fontSize:"12px",lineHeight:"21px",position:"relative",width:"100%",float:"left"},timelineLog:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(a.d)("medium"),padding:"0 7px"},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:"0px",height:"auto",width:"calc(100% - 0px)",zIndex:10,padding:"7px"},files:{display:"inline-table",position:"relative"},textEditorIcon:{cursor:"pointer",color:Object(a.d)("color")},progressBar:{backgroundColor:"".concat(Object(a.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(a.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(a.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"30px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"relative",float:"left",marginBottom:"33px","& img":{maxWidth:"20%",minWidth:"177px",height:"auto",marginTop:"30px",marginRight:"7px"},"& .data":{"& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}}},664:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(1),i={labelTop:Object(n.a)(Object(n.a)({},a.k),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(o.d)("color")},"& label.MuiFormLabel-filled":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(o.d)("fieldVariant")?"0px":"filled"===Object(o.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(o.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),noLabel:Object(n.a)(Object(n.a)({},a.k),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{textAlign:"right",fontSize:"12px",color:Object(o.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(o.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),labelTopLight:Object(n.a)(Object(n.a)({},a.k),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px",color:"#FFFFFF"},"& label":{marginTop:"-10px",fontSize:"12px",color:Object(o.d)("color")},"& label.MuiFormLabel-filled":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(o.d)("color"),marginTop:"standard"===Object(o.d)("fieldVariant")||"filled"===Object(o.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(o.d)("fieldVariant")?"0px":"filled"===Object(o.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}}),noLabelLight:Object(n.a)(Object(n.a)({},a.k),{},{padding:"0px",width:"100%",marginTop:"7px",marginBottom:"7px","& .invalid":{borderBottom:"solid 2px red !important"},"& .MuiOutlinedInput-input":{padding:"11px 11px",fontSize:"12px"},"& label":{textAlign:"right",fontSize:"12px",color:Object(o.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(o.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(o.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(o.d)("fieldRadius"),"& fieldset":{borderColor:Object(o.d)("line")},"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")},"&.Mui-focused":{borderBottomColor:Object(o.d)("line"),"&::before":{borderBottomColor:Object(o.d)("line")},"&::after":{borderBottomColor:Object(o.d)("line")}}}})};t.a=i},67:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(7),a=r(59),o=r(0),i=r.n(o),c=r(94),l=r.n(c),s=r(157),u=r(6),d={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Object(u.q)(u.b)+", 0.87)",background:u.I,width:"100%",boxShadow:"0 1px 4px 0 rgba("+Object(u.q)(u.b)+", 0.14)",position:"relative",display:"flex",flexDirection:"column",minWidth:"0",wordWrap:"break-word",fontSize:".875rem"},cardPlain:{background:"transparent",boxShadow:"none"},cardProfile:{marginTop:"30px",textAlign:"center"},cardBlog:{marginTop:"60px"},cardRaised:{boxShadow:"0 16px 38px -12px rgba("+Object(u.q)(u.b)+", 0.56), 0 4px 25px 0px rgba("+Object(u.q)(u.b)+", 0.12), 0 8px 10px -5px rgba("+Object(u.q)(u.b)+", 0.2)"},cardBackground:{backgroundPosition:"center center",backgroundSize:"cover",textAlign:"center","&:after":{position:"absolute",zIndex:"1",width:"100%",height:"100%",display:"block",left:"0",top:"0",content:'""',backgroundColor:"rgba("+Object(u.q)(u.b)+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Object(u.q)(u.I)+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Object(u.q)(u.b)+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:u.p[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Object(u.q)(u.p[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:u.p[2]},"& h1":{marginTop:"30px"},"& h1 small":{display:"inline-flex",height:0,fontSize:"18px"},"& h1 small:first-child":{position:"relative",top:"-16px",fontSize:"26px"},"& ul li svg, & ul li .fab,& ul li .fas,& ul li .far,& ul li .fal,& ul li .material-icons":{position:"relative",top:"7px"}},cardPricingColor:{"& ul li":{color:u.I,borderColor:"rgba("+Object(u.q)(u.I)+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:u.I,fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+u.w[1]+","+u.w[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},info:{background:"linear-gradient(60deg,"+u.s[1]+","+u.s[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},success:{background:"linear-gradient(60deg,"+u.B[1]+","+u.B[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},warning:{background:"linear-gradient(60deg,"+u.H[1]+","+u.H[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},danger:{background:"linear-gradient(60deg,"+u.i[1]+","+u.i[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},rose:{background:"linear-gradient(60deg,"+u.z[1]+","+u.z[4]+")","& h1 small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"},color:u.I},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Object(u.q)(u.b)+")",transition:"all 300ms linear"}},p=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],f=Object(s.a)(d);function h(e){var t,r=f(),o=e.className,c=e.children,s=e.plain,u=e.profile,d=e.blog,h=e.raised,m=e.background,g=e.pricing,b=e.color,y=e.product,v=e.testimonial,x=e.chart,_=e.login,O=Object(a.a)(e,p),w=l()((t={},Object(n.a)(t,r.card,!0),Object(n.a)(t,r.cardPlain,s),Object(n.a)(t,r.cardProfile,u||v),Object(n.a)(t,r.cardBlog,d),Object(n.a)(t,r.cardRaised,h),Object(n.a)(t,r.cardBackground,m),Object(n.a)(t,r.cardPricingColor,g&&void 0!==b||g&&void 0!==m),Object(n.a)(t,r[b],b),Object(n.a)(t,r.cardPricing,g),Object(n.a)(t,r.cardProduct,y),Object(n.a)(t,r.cardChart,x),Object(n.a)(t,r.cardLogin,_),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:w},O),c)}},688:function(e,t,r){"use strict";var n=r(7),a=r(2),o=r(0),i=r.n(o),c=r(234),l=r.n(c),s=r(9),u=r.n(s),d=r(3),p=r(20),f=r(1);t.a=function(e){var t=l.a.ExcelFile,r=l.a.ExcelFile.ExcelSheet,o=l.a.ExcelFile.ExcelColumn,c=e.data,s=[],h=[],m=0,g=0,b=0,y=0;if(c&&Object.keys(c).length>0){Object.keys(c).forEach((function(e){var t=[];c[e]._times&&Object.keys(c[e]._times>0)&&Object.keys(c[e]._times).forEach((function(r){var n=d.a.getState().db.cards[c[e]._times[r].cardId],a=parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini);m+=a;var o=a,i="",l=0,p=0,h=0;a<60?i="".concat(o," ").concat(Object(f.u)("$__seconds",1)):a>3600?(o-=3600*(l=Math.trunc(o/3600)),h=(o-=60*(p=Math.trunc(o/60)>0?Math.trunc(o/60):0))>0?o:0,i="".concat(l," ").concat(Object(f.u)("$__hour",1)).concat(l>1?"s":""," ").concat(p," ").concat(Object(f.u)("$__minutes",1)," ").concat(h," ").concat(Object(f.u)("$__seconds",1))):(h=(o-=60*(p=Math.trunc(o/60)>0?Math.trunc(o/60):0))>0?o:0,i="".concat(p," ").concat(Object(f.u)("$__minutes",1)," ").concat(h," ").concat(Object(f.u)("$__seconds",1))),s.push({name:c[e].name,type:Object(f.u)("$__".concat(n.type),1),card:n.name,description:c[e]._times[r].message,iniData:u()(1e3*c[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:u()(1e3*c[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:i,hours:l,minutes:p,seconds:h,calc:(parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini))/3600}),t.push({name:c[e].name,type:Object(f.u)("$__".concat(n.type),1),card:n.name,description:c[e]._times[r].message,iniData:u()(1e3*c[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:u()(1e3*c[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:i,hours:l,minutes:p,seconds:h,calc:(parseInt(c[e]._times[r].fin)-parseInt(c[e]._times[r].ini))/3600})})),console.log(c[e]),t.push({name:"",email:"",type:"",card:"",description:"",iniData:"",finalData:"",total:c[e].timerText,hours:"",minutes:"",seconds:"",calc:parseInt(c[e].totalTimer)/3600}),h=Object(a.a)(Object(a.a)({},h),{},Object(n.a)({},e,t))}));var v=m,x="";m<60?(y=v,x="".concat(v," ").concat(Object(f.u)("$__seconds",1))):m>3600?(v-=3600*(g=Math.trunc(v/3600)),y=(v-=60*(b=Math.trunc(v/60)>0?Math.trunc(v/60):0))>0?v:0,x="".concat(g," ").concat(Object(f.u)("$__hour",1)).concat(g>1?"s":""," ").concat(b," ").concat(Object(f.u)("$__minutes",1)," ").concat(y," ").concat(Object(f.u)("$__seconds",1))):(y=(v-=60*(b=Math.trunc(v/60)>0?Math.trunc(v/60):0))>0?v:0,x="".concat(b," ").concat(Object(f.u)("$__minutes",1)," ").concat(y," ").concat(Object(f.u)("$__seconds",1))),s.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:x,hours:"",minutes:"",seconds:"",calc:""})}return i.a.createElement(t,{filename:"".concat(u()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_timeSheet"),element:i.a.createElement(p.a,{title:Object(f.u)("$__export"),text:Object(f.u)("$__export"),icon:"file_download",size:"25px"})},i.a.createElement(r,{data:s,name:"timeSheet"},i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__name",1)),value:"name"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__type",1)),value:"type"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__card",1)),value:"card"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__description",1)),value:"description"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__initialTimer",1)),value:"iniData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__finalTimer",1)),value:"finalData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__totalTime",1)),value:"total"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__hours",1)),value:"hours"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__minutes",1)),value:"minutes"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__seconds",1)),value:"seconds"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__valueForCalculation",1)),value:"calc"})),h&&Object.keys(h).length>0&&Object.keys(h).map((function(e,t){var n=h[e][0].name;return i.a.createElement(r,{data:h[e],name:n,key:e},i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__name",1)),value:"name"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__type",1)),value:"type"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__card",1)),value:"card"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__description",1)),value:"description"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__initialTimer",1)),value:"iniData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__finalTimer",1)),value:"finalData"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__totalTime",1)),value:"total"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__hours",1)),value:"hours"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__minutes",1)),value:"minutes"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__seconds",1)),value:"seconds"}),i.a.createElement(o,{style:{alignment:{wrapText:!0}},label:"".concat(Object(f.u)("$__valueForCalculation",1)),value:"calc"}))})))}},69:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var n=r(7),a=r(59),o=r(0),i=r.n(o),c=r(94),l=r.n(c),s=r(157),u=r(6),d={cardBody:{padding:"0.9375rem 20px",flex:"1 1 auto",WebkitBoxFlex:"1",position:"relative"},cardBodyBackground:{position:"relative",zIndex:"2",minHeight:"280px",paddingTop:"40px",paddingBottom:"40px",maxWidth:"440px",margin:"0 auto"},cardBodyPlain:{paddingLeft:"5px",paddingRight:"5px"},cardBodyFormHorizontal:{paddingLeft:"15px",paddingRight:"15px","& form":{margin:"0"}},cardPricing:{padding:"15px!important",margin:"0px!important"},cardSignup:{padding:"0px 30px 0px 30px"},cardBodyColor:{borderRadius:"6px","& h1,& h2,& h3":{"& small":{color:"rgba("+Object(u.q)(u.I)+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},p=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],f=Object(s.a)(d);function h(e){var t,r=f(),o=e.className,c=e.children,s=e.background,u=e.plain,d=e.formHorizontal,h=e.pricing,m=e.signup,g=e.color,b=e.profile,y=e.calendar,v=Object(a.a)(e,p),x=l()((t={},Object(n.a)(t,r.cardBody,!0),Object(n.a)(t,r.cardBodyBackground,s),Object(n.a)(t,r.cardBodyPlain,u),Object(n.a)(t,r.cardBodyFormHorizontal,d),Object(n.a)(t,r.cardPricing,h),Object(n.a)(t,r.cardSignup,m),Object(n.a)(t,r.cardBodyColor,g),Object(n.a)(t,r.cardBodyProfile,b),Object(n.a)(t,r.cardBodyCalendar,y),Object(n.a)(t,o,void 0!==o),t));return i.a.createElement("div",Object.assign({className:x},v),c)}},696:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(2),o=r(8),i=r(5),c=r(0),l=r.n(c),s=r(14),u=r(13),d=r(15),p=r(3),f=r(1188),h=r(67),m=r(69),g=r(58),b=r(10),y=r(1),v=r(24);function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(v=O);var w=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(s.b)(null,(function(e){return Object(u.b)(d,e)}))((function(e){var t=l.a.useState({editor:!1,text:"",height:"auto"}),r=Object(i.a)(t,2),c=r[0],s=r[1],u=l.a.useState(!1),d=Object(i.a)(u,2),_=d[0],O=d[1],w=window.location.hash.split("/");w[0]=w[0].replace("#","");var j=p.a.getState().db,E=function(){var t=Object(o.a)(x().mark((function t(r){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c.text&&!r){t.next=6;break}return t.next=3,Object(v.F)(e,!1,Object(a.a)(Object(a.a)({},j.cards[w[0]]),{},{note:r?null:c.text}));case 3:t.sent&&Object(y.c)({message:Object(y.u)("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),s({editor:!1,text:r?"":c.text,height:"auto"});case 6:O(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return l.a.createElement("div",{style:{width:"100%",height:"100%"}},l.a.createElement(h.a,{style:{marginTop:"0",height:"100%"}},e.edit?l.a.createElement("div",{style:{width:"100%",height:"58px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},l.a.createElement(b.a,{size:24,style:{alignSelf:"center",marginLeft:"19.5px",color:e.styles.color?e.styles.color:"grey",marginTop:"2px"}},"note"),l.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"grey",fontSize:"16px"}},Object(y.u)("$__notes",1)),l.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},l.a.createElement(b.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),l.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},l.a.createElement(b.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):l.a.createElement(g.a,{title:Object(y.u)("$__notes",1),icon:"note",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},customButtons:[].concat(Object(n.a)(c.text&&!c.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){E(!0)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},{title:"$__edit",icon:"edit",onClick:function(){s(Object(a.a)(Object(a.a)({},c),{},{editor:!0}))},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}]:[]),[_&&{title:"$__saveNote",icon:"save",onClick:function(){E()},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},c.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){s(Object(a.a)(Object(a.a)({},c),{},{text:j.cards[w[0]].note,editor:!1})),O(!1)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}])}),l.a.createElement(m.a,{style:{display:"flex",justifyContent:"center",height:"100%"}},c.text||c.editor?c.editor?l.a.createElement(f.a,{style:{borderRadius:"7px",border:"0px",padding:"7px",fontFamily:'"Soleto", "Roboto", "Helvetica", "Arial", sans-serif',fontSize:"16px",minWidth:"calc(100% - 0px)",maxWidth:"calc(100% - 0px)"},placeholder:Object(y.u)("$__planNotePlaceholder"),onChange:function(e){O(!0),s(Object(a.a)(Object(a.a)({},c),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==j.cards[w[0]].note||(O(!1),s(Object(a.a)(Object(a.a)({},c),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},c.text):l.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){s(Object(a.a)(Object(a.a)({},c),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:Object(y.p)(c.text)}}):l.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer",height:"100%"},onClick:function(){s(Object(a.a)(Object(a.a)({},c),{},{editor:!0}))}},l.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},l.a.createElement(b.a,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),l.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},Object(y.u)("$__addNote"))))))}))},697:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},703:function(e,t,r){"use strict";var n=r(22),a=r(7),o=r(2),i=r(8),c=r(5),l=r(0),s=r.n(l),u=r(1132),d=r(879),p=r(479),f=r(1133),h=r.n(f),m=r(9),g=r.n(m),b=r(14),y=r(13),v=r(15),x=r(3),_=r(10),O=r(147),w=r(345),j=r(157),E=r(1),k=Object(j.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function S(e){var t=k();return s.a.createElement(O.a,{title:e.title?e.title:""},s.a.createElement(w.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle,style:e.style||{}},s.a.createElement(_.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Object(E.d)("menu"),icon:e.icon?e.icon:"circle"})))}var L=r(20),C=r(137),I=r(142),T=r(1857),F=r(1941),D={control:{backgroundColor:"#fff",fontSize:14,fontFamily:"Roboto",fontWeight:"normal",lineHeight:"17px"},"&multiLine":{control:{fontFamily:"Roboto"},highlighter:{padding:9,border:"1px solid transparent",boxSizing:"border-box",overflow:"hidden",maxHeight:150},input:{padding:9,border:"1px solid silver",overflow:"auto",maxHeight:150,borderColor:"transparent"}},"&singleLine":{display:"inline-block",width:180,lineHeight:"17px",highlighter:{lineHeight:"17px",padding:1,border:"2px inset transparent"},input:{lineHeight:"17px",padding:1,border:"2px inset"}},suggestions:{position:"absolute",list:{backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.05)",fontSize:14,zIndex:200,maxHeight:"151px !important",overflow:"auto !important"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Object(E.d)("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},N=r(6),A=function(e){var t,r;return{root:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},rootRelative:{position:"relative",top:"0px",left:"0px",right:"0px",bottom:"0px"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:"0px",left:"0px",right:"0px",height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:"0px",marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:"0px",padding:"0 0 20px",width:"-webkit-fill-available","&:before":{left:"15px"}},item:{marginBottom:"5px",position:"relative",width:"calc(100% - 15px)","&:before,&:after":{content:'" "',display:"table"},"&:after":{clear:"both"}},timelineBadge:(t={},Object(a.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(a.a)(t,"color",N.I),Object(a.a)(t,"width","30px"),Object(a.a)(t,"height","30px"),Object(a.a)(t,"lineHeight","25px"),Object(a.a)(t,"fontSize","12px"),Object(a.a)(t,"textAlign","center"),Object(a.a)(t,"position","absolute"),Object(a.a)(t,"bottom","23px"),Object(a.a)(t,"left","50%"),Object(a.a)(t,"marginLeft","-24px"),Object(a.a)(t,"zIndex","1"),Object(a.a)(t,"borderTopRightRadius","50%"),Object(a.a)(t,"borderTopLeftRadius","50%"),Object(a.a)(t,"borderBottomRightRadius","50%"),Object(a.a)(t,"borderBottomLeftRadius","50%"),Object(a.a)(t,"display","flex"),Object(a.a)(t,"alignItems","center"),Object(a.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(E.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.b)+", 0.4)"},info:{backgroundColor:N.s[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.s[0])+", 0.4)"},success:{backgroundColor:N.B[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.B[0])+", 0.4)"},danger:{backgroundColor:N.i[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.i[0])+", 0.4)"},warning:{backgroundColor:N.H[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.H[0])+", 0.4)"},primary:{backgroundColor:N.w[0],boxShadow:"0 4px 20px 0px rgba("+Object(N.q)(N.b)+", 0.14), 0 7px 10px -5px rgba("+Object(N.q)(N.w[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(a.a)(r,e.breakpoints.down("sm"),{float:"right !important",width:"calc(100% - 60px) !important","&:before":{borderLeftWidth:"0 !important",borderRightWidth:"15px !important",left:"-20px !important",right:"auto !important"},"&:after":{borderLeftWidth:"0 !important",borderRightWidth:"14px !important",left:"-19px !important",right:"auto !important"}}),Object(a.a)(r,"width","45%"),Object(a.a)(r,"float","left"),Object(a.a)(r,"padding","7px"),Object(a.a)(r,"marginBottom","5px"),Object(a.a)(r,"position","relative"),Object(a.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(N.q)(N.b)+", 0.14)"),Object(a.a)(r,"borderRadius","6px"),Object(a.a)(r,"color","rgba("+Object(N.q)(N.b)+", 0.87)"),Object(a.a)(r,"background",N.I),Object(a.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+N.p[10],borderRight:"0 solid "+N.p[10],borderBottom:"15px solid transparent",content:'" "'}),Object(a.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+N.I,borderRight:"0 solid "+N.I,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(a.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:N.I,"&:before":{borderLeftWidth:"0",borderRightWidth:"15px",left:"-15px",right:"auto"},"&:after":{borderLeftWidth:"0",borderRightWidth:"14px",left:"-14px",right:"auto"}}),timelineHeading:{marginBottom:"0px"},timelineBody:{fontSize:"12px",lineHeight:"21px"},timelineFooter:{zIndex:"1",position:"relative",float:"left",width:"100%",display:"inline-flex",justifyContent:"space-between"},footerUser:{display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",color:Object(E.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:11},editor:{position:"absolute",bottom:"0px",height:"auto",width:"calc(100% - 0px)",zIndex:10},editorRelative:{position:"relative",bottom:"0px",minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"absolute",width:"100%",bottom:0},textEditor:{zIndex:100},textEditorIcon:{cursor:"pointer",color:Object(E.d)("color")},progressBar:{backgroundColor:"".concat(Object(E.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(E.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(E.d)("color")," !important")}},actionButton:{alignItems:"center",cursor:"pointer",float:"left",height:"20px",position:"relative",textAlign:"center",width:"30px"},sendingMessage:{width:"100%"},valuePositive:{positive:"relative",float:"left",color:"blue"},valueNegative:{positive:"relative",float:"left",color:"red"},lastValue:{positive:"relative",float:"right",color:"grey"},timeInfo:{display:"flex",alignItems:"center",color:"grey",width:"100%",position:"relative",float:"left",marginBottom:"7px","& .text":{marginLeft:"7px"}},urlPreview:{position:"absolute",width:"100%",top:"-90px",maxHeight:"120px",background:"linear-gradient(60deg, rgba(250,250,250,1), rgba(250,250,250,0.9))",padding:"7px",display:"flex",overflow:"auto",alignItems:"center","& img":{maxWidth:"20%",height:"auto",position:"relative",float:"left",marginTop:"0px",marginRight:"7px"},"& .data":{position:"relative",float:"left",width:"75%","& .title":{fontSize:"16px",fontWeight:"bold"},"& .siteName":{fontSize:"14px",fontWeight:"bold",color:"#909090"},"& .contentSnippet":{fontSize:"12px",color:"#909090"}}},mentionInput:Object(o.a)(Object(o.a)({},N.k),{},{"& textarea":Object(o.a)(Object(o.a)({},N.k),{},{padding:"7px",borderRadius:"7px",fontSize:"16px",width:"calc(100% - 14px)",minHeight:"38px",border:"solid 1px rgba(0,0,0,0.1)"}),"& .sugestions":{top:"none !important",bottom:"40px",border:"solid 10px red"},"& textarea::placeholder":{color:"rgba(0,0,0,0.2)"}}),mentionWrapper:{width:"100%",background:"transparent",fontSize:"0.9rem",color:" #a9b5c4","&&.mentionWrapper__control":{borderRadius:"25px",border:"1px solid #3a546f",minHeight:"45px","&& .mentionWrapper__highlighter":{padding:"0.7rem 1rem"},"&& .mentionWrapper__input":{padding:"0.7rem 1rem",border:0,resize:"none",outline:"none",fontSize:"0.9rem",color:"#7288a3",borderColor:" #3a546f",overflow:"hidden","&& :: placeholder":{color:"#7288a3"}}}}}},P=r(77),$=r(229),M=r(78),z=r(57),Y=r(39),B=r(144),R=r.n(B),G=r(34),H=r(21),W=r(38);function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}var q=Object(j.a)(A);t.a=Object(b.b)((function(e,t){return{draft:e.chats&&e.chats.drafts?e.chats.drafts[t.nodeId]:{}}}),(function(e){return Object(y.b)(v,e)}))((function(e){var t=x.a.getState(),r=t.db,l=t.session,f=s.a.useState(""),m=Object(c.a)(f,2),b=m[0],y=m[1],v=s.a.useState(!1),O=Object(c.a)(v,2),w=O[0],j=O[1],k=s.a.useState(!1),N=Object(c.a)(k,2),A=N[0],B=N[1],V=s.a.useState([]),J=Object(c.a)(V,2),X=J[0],K=J[1],Z=s.a.useState([]),Q=Object(c.a)(Z,2),ee=Q[0],te=Q[1],re=s.a.useState({}),ne=Object(c.a)(re,2),ae=ne[0],oe=ne[1],ie=s.a.useState(null),ce=Object(c.a)(ie,2),le=ce[0],se=ce[1],ue=s.a.useState(null),de=Object(c.a)(ue,2),pe=de[0],fe=de[1],he=s.a.useState(!1),me=Object(c.a)(he,2),ge=me[0],be=me[1],ye=s.a.useState([]),ve=Object(c.a)(ye,2),xe=ve[0],_e=ve[1],Oe=s.a.useState(!1),we=Object(c.a)(Oe,2),je=we[0],Ee=we[1],ke=s.a.useState(58),Se=Object(c.a)(ke,2),Le=Se[0],Ce=Se[1],Ie=q(),Te=s.a.createRef(),Fe=s.a.createRef(),De=s.a.useRef(!0);s.a.useEffect((function(){return De.current=!0,function(){De.current=!1}}),[]);var Ne=Object(E.j)(),Ae=0;l._id&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(l._id)>-1}))]&&(Ae=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(l._id)>-1}))]);var Pe=window.location.hash.split("/");Pe[0]=Pe[0].replace("#",""),s.a.useEffect((function(){var t;return De.current&&(e.draft&&e.draft.message?y(e.draft.message):y("")),(null===e||void 0===e||null===(t=e.draft)||void 0===t?void 0:t.files)?K(e.draft.files):K([]),function(){y("")}}),[e.nodeId]);var $e=s.a.createRef();s.a.useEffect((function(){var t,r=document.getElementById("sendingInput_".concat(e.nodeId));(null===(t=e.draft)||void 0===t?void 0:t.reply)&&r&&r.focus()}),[e.draft]);var Me=function(){var e,t=[];if(e=b){var r=e.split("@[");r.length>0&&r.forEach((function(e){if(e){var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},ze=function(){var t=Object(i.a)(U().mark((function t(){var n,c,s,u,d,f,h,m;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],c={_id:Object(p.a)(),idRel:e.nodeId,replyData:e.draft&&e.draft.reply&&x.a.getState().timeline[e.nodeId][e.draft.reply]?x.a.getState().timeline[e.nodeId][e.draft.reply]:{},reply:e.draft&&e.draft.reply?e.draft.reply:null,message:b,type:"comment",mentions:Me(),notifyUsers:n,filesCount:X.length>0?X.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null,db:e.db?e.db:"cards"},pe&&(c=Object(o.a)(Object(o.a)({},c),{},{urlPreview:JSON.stringify(pe)}),fe(null)),y(""),Ee(!1),X.length>0&&j(!0),s=Me(),r.cards[e.nodeId]&&"chatGroup"!==r.cards[e.nodeId].type&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).length>0&&Object.keys(r.cards[e.nodeId]._users).filter((function(e){return e!==l._id&&-1===s.indexOf(e)})).forEach((function(e){n.push(e)})),e.onSending&&e.onSending(Object(o.a)(Object(o.a)({},c),{},{user:{_id:l._id,name:r.users[l._id].name,image:r.users[l._id].image||null}})),(u=Object(o.a)(Object(o.a)({},c),{},{created_at:"".concat(g()().unix("x")),user:{_id:l._id,name:r.users[l._id].name,image:r.users[l._id].image||null}})).mentions&&delete u.mentions,u.notifyUsers&&delete u.notifyUsers,u.db&&delete u.db,Object(M.h)({reduxFunction:e.reduxFunction},Object(o.a)(Object(o.a)({},c),{},{comment:u})),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,{message:null,reply:null,files:null}))})),t.next=17,Y.a.post("timeline/add",c);case 17:return(d=t.sent)&&d.data&&(f=d.data)._id&&(h=Object(o.a)(Object(o.a)({},f.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null}),m=2,Ae<2&&(m=Ae),s.map(function(){var t=Object(i.a)(U().mark((function t(n){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.cards[e.nodeId]&&(!r.cards[e.nodeId]._users||r.cards[e.nodeId]._users&&!r.cards[e.nodeId]._users[n])&&Object(P.b)(e,n,m,e.nodeId,!0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),X.length>0?Re({comment:h,dataMessage:c}):(e.onSending&&e.onSending(),te([]),K([]),_e([]),fe(null),be(!1),j(!1),e.onSending&&e.onSending())),t.abrupt("return",!1);case 20:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ye=function(){var e=Object(i.a)(U().mark((function e(t,r){var n;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),oe(Object(o.a)(Object(o.a)({},ae),{},Object(a.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Be=function(){var e=Object(i.a)(U().mark((function e(t,r){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:se({options:t,fi:r}),oe({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Re=function(){var t=Object(i.a)(U().mark((function t(r){var n,a,o,c,l,s=arguments;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:0,a=s.length>2&&void 0!==s[2]?s[2]:[],o=r.comment,c=r.dataMessage,(l=Array.from(X)).map(function(){var t=Object(i.a)(U().mark((function t(i,s){var u,d;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,Object($.a)(o._id,i,!0,{onUploadProgress:function(e){return Ye(e,s)},onUploadError:function(e){Be(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),te(d),l.length>n+1?Re(r,n+1,d):l.length===n+1&&(c.files=d,setTimeout((function(){Y.a.post("timeline/add",c)}),1e3),te([]),K([]),fe(null),be(!1),j(!1),e.onSending&&e.onSending()));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ge=function(){var t=Object(i.a)(U().mark((function t(r){var i,c;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=!1,K([].concat(Object(n.a)(X),Object(n.a)(Object.keys(r).filter((function(e){return!(r[e].size>100663296)||(c=!0,!1)})).map((function(e){return r[e]}))))),c&&Object(E.c)({message:Object(E.u)("$__filesSentCannotExceed100mbEach",1),variant:"warning",persist:!1,horizontal:"center"}),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},(null===(i=x.a.getState().chats.drafts)||void 0===i?void 0:i[e.nodeId])||{}),{},{files:[].concat(Object(n.a)(X),Object(n.a)(Object.keys(r).filter((function(e){return!(r[e].size>100663296)})).map((function(e){return r[e]}))))})))})),B(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),He=function(){var e=Object(i.a)(U().mark((function e(t){var r,n,a,o,i,c;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=28;break}return r="",n=[],t.indexOf(" ")>-1?n=t.split(" "):t.indexOf("\n")>-1?n=t.split("\n"):n.push(t),a=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),e.next=8,n.forEach((function(e){var t=e.replace(":","");(t.indexOf("http://")>-1||t.indexOf("https://")>-1)&&a.test(t)&&(r=e)}));case 8:if(!(!pe&&r&&-1===xe.indexOf(r)||r&&pe&&-1===xe.indexOf(r)&&pe.link!==r)){e.next=28;break}if(be(!0),-1!==t.indexOf("youtube.com/watch?")){e.next=27;break}return e.prev=11,e.next=14,z.a.post("/URL_DATA",{url:r});case 14:(o=e.sent)&&o.data&&(i=o.data)&&i.title&&i.img&&i.contentSnippet?fe(i):(be(!1),fe(null)),e.next=27;break;case 18:e.prev=18,e.t0=e.catch(11),be(!1),fe(null),(c=xe).push(r),_e(c),Object(E.c)({message:Object(E.u)("$__couldNotLoadDataFromURL",1),variant:"warning",persist:!1,horizontal:"center"}),console.log(e.t0);case 27:t.indexOf("youtube.com/watch?")>-1&&be(!1);case 28:t.indexOf("youtube.com/watch?")>-1&&be(!1);case 29:case"end":return e.stop()}}),e,null,[[11,18]])})));return function(t){return e.apply(this,arguments)}}(),We=[];return r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).forEach((function(t){if(t&&null!==t&&void 0!==t&&t!==l._id&&r.cards[e.nodeId]._users[t].name&&(!r.users[t]||r.users[t]&&!r.users[t].deleted)){var n=r.cards[e.nodeId]._users[t]._id,a=r.cards[e.nodeId]._users[t].name?r.cards[e.nodeId]._users[t].name:r.cards[e.nodeId]._users[t].name.split(" ").length>0?r.cards[e.nodeId]._users[t].name.split(" ")[0]:r.cards[e.nodeId]._users[t].name;n&&0===Object.keys(We).filter((function(e){return We[e].id===n})).length&&We.push({id:n,display:a})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(Ne&&(Ne.owner||Ne.planAdmin||Ne.planModerate)||Ae&&Ae.access&&parseInt(Ae.access)>3)&&Object.keys(r.users).filter((function(t){return!(r.users[t].deleted||"user"!==r.users[t].type||!(r.cards[e.nodeId]&&r.cards[e.nodeId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[e.nodeId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&r.cards[e.nodeId]._planId&&r.cards[r.cards[e.nodeId]._planId]&&r.cards[r.cards[e.nodeId]._planId].client&&(!r.users[t]._parent||r.users[t]._parent===r.cards[r.cards[e.nodeId]._planId].client)||r.cards[e.nodeId]&&!r.cards[e.nodeId].client&&!r.users[t]._parent))})).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.push({id:t,display:e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[t]&&r.cards[e.nodeId]._users[t].name?r.cards[e.nodeId]._users[t].name:r.users[t].displayName?r.users[t].displayName:r.users[t].name})})),r.cards[e.nodeId]&&r.cards[e.nodeId]._parent&&r.cards[r.cards[e.nodeId]._parent]&&r.cards[r.cards[e.nodeId]._parent]._users&&Object.keys(r.cards[r.cards[e.nodeId]._parent]._users).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.push({id:t,display:r.cards[r.cards[e.nodeId]._parent]._users[t].name,image:r.cards[r.cards[e.nodeId]._parent]._users[t].image||null})})),r.cards[e.nodeId]&&r.cards[e.nodeId]._planId&&r.cards[r.cards[e.nodeId]._planId]&&r.cards[r.cards[e.nodeId]._planId]._users&&Object.keys(r.cards[r.cards[e.nodeId]._planId]._users).forEach((function(t){t&&null!==t&&void 0!==t&&t!==l._id&&0===Object.keys(We).filter((function(e){return We[e].id===t})).length&&We.push({id:t,display:r.cards[r.cards[e.nodeId]._planId]._users[t].name,image:r.cards[r.cards[e.nodeId]._planId]._users[t].image||null})})),s.a.createElement(u.FileDrop,{ref:Te,className:e.relative?Ie.rootRelative:Ie.root,onDragOver:function(){!e.disabledSend&&B(!0)},onDrop:Ge,accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .zip, .rar"},s.a.createElement(s.a.Fragment,null,e.nodeId&&!e.disabledSend?s.a.createElement("div",{className:e.relative?Ie.editorRelative:Ie.editor,style:Object(o.a)(Object(o.a)({},e.editorStyle?e.editorStyle:{}),{},{backgroundColor:"#F0F0F0"})},s.a.createElement("div",{className:Ie.textEditor},ge&&!pe&&s.a.createElement("div",{className:Ie.urlPreview,style:{width:"100%",height:"150px"}},s.a.createElement("div",{style:{display:"flex"}},s.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},s.a.createElement(F.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),s.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},s.a.createElement(F.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),s.a.createElement(F.a,{variant:"text",height:10}),s.a.createElement(F.a,{variant:"text",height:10}),s.a.createElement(F.a,{variant:"text",height:10}),s.a.createElement(F.a,{variant:"text",height:10}),s.a.createElement(F.a,{variant:"text",height:10}),s.a.createElement(F.a,{variant:"text",height:10})))),e.draft&&e.draft.reply||X&&X.length>0?s.a.createElement("div",{style:{position:"absolute",right:0,left:0,height:"auto",padding:7,bottom:Le+4,backgroundColor:"#f0f0f0",display:"flex",justifyContent:"space-between"}},e.draft&&e.draft.reply?s.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},s.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},s.a.createElement("div",{style:{color:Object(E.d)("menu"),display:"flex",alignItems:"center"}},s.a.createElement(_.a,{icon:"reply",color:Object(E.d)("menu"),size:"22px"}),s.a.createElement("span",{style:{marginLeft:10}},Object(E.u)("$__reply")))),s.a.createElement("div",{style:{display:"flex",margin:"auto",padding:15,alignItems:"center",width:"77%",backgroundColor:"rgba(250,250,250,0.33)",borderRadius:5,borderLeft:"5px solid ".concat(Object(E.d)("menu"))}},s.a.createElement(W.a,null,s.a.createElement(C.a,{storie:x.a.getState().timeline[e.nodeId][e.draft.reply],hideCards:!0,db:e.db,nodeId:e.nodeId,showUserName:!0,noReactions:!0}),s.a.createElement("div",{style:{position:"absolute",top:0,right:0}},s.a.createElement(L.a,{title:Object(E.u)("$__cancelReply"),color:"red",icon:"cancel",size:"17px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts[e.nodeId]||{}),{},{reply:null})))}))},transparent:!0}))))):s.a.createElement(s.a.Fragment,null),X&&X.length>0?s.a.createElement("div",{style:{position:"relative",maxHeight:"100%",width:"100%"}},s.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,display:"flex",justifyContent:"flex-end"}},s.a.createElement(L.a,{title:Object(E.u)("$__clearFiles",1),text:Object(E.u)("$__clearFiles"),color:"gray",icon:"clear_all",onClick:function(){Object(E.c)({message:Object(E.u)("$__confirmClearFiles",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t;K([]),e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},(null===(t=x.a.getState().chats.drafts)||void 0===t?void 0:t[e.nodeId])||{}),{},{files:null})))}))}})},size:"25px"})),s.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,overflow:"auto",display:"flex"}},X.map((function(e,t){var n=e.name.split("."),a="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(a=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),s.a.createElement("div",{key:t,title:e.name,style:{position:"relative",padding:7,width:"100px",justifyContent:"center"}},s.a.createElement("div",{style:{position:"relative",width:"50px",height:"50px",margin:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},"string"===typeof a&&-1===a.indexOf("blob:")&&-1===a.indexOf("svg")?s.a.createElement(_.a,{icon:a,size:"50px"}):s.a.createElement("img",{alt:"MACHEN_IMAGE",src:a,style:{width:"100%",height:"100%"}})),s.a.createElement("div",{style:{position:"relative",margin:"auto",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"calc(100% - 30px)",overflow:"hidden"}},e.name),s.a.createElement("div",{style:{position:"absolute",top:0,right:3,display:"flex"}},ee&&ee.length>0&&ee[t]?s.a.createElement(_.a,{icon:"cloud_done",color:"green"}):w?s.a.createElement(s.a.Fragment,null):s.a.createElement(_.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(X);t.splice(e,1),K(t)}(t)}})),le&&le.fi===t?s.a.createElement(L.a,{title:Object(E.u)("$__uploadFiles",1),text:Object(E.u)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Re({comment:le.options.comment},le.fi,ee),se(null)},size:"25px"}):ae&&String(ae[t])&&ae[t]<100?s.a.createElement("div",{style:{display:"flex",alignItems:"center"}},s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{style:{minWidth:177}},s.a.createElement(T.a,{variant:"buffer",className:Ie.progressBar,value:ae[t]<90?ae[t]:90,valueBuffer:ae[t]})),s.a.createElement("div",{style:{color:Object(E.d)("color"),fontSize:10,marginLeft:15}},ae[t]<90?ae[t]:90,"%"))):s.a.createElement(s.a.Fragment,null))})))):s.a.createElement(s.a.Fragment,null)):s.a.createElement(s.a.Fragment,null),pe&&s.a.createElement(G.a,{style:{marginBottom:15,backgroundColor:"#f0f0f0",padding:7}},s.a.createElement("div",{style:{position:"absolute",right:"20px"}},s.a.createElement(L.a,{title:Object(E.u)("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){fe(null),be(!1)}})),pe.img&&s.a.createElement(H.a,{xs:12,sm:6,md:4,lg:3,xl:2},s.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(pe.img?pe.img:R.a),alt:pe.title||pe.link})),s.a.createElement(H.a,{xs:12,sm:6,md:8,lg:9,xl:10},s.a.createElement("div",{style:{fontSize:"14px",color:Object(E.d)("menu"),fontWeight:"bold"}},pe.title),pe.site&&s.a.createElement("div",{style:{fontSize:"12px"}},pe.site),pe.contentSnippet&&s.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},pe.contentSnippet),s.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:pe.link,target:"_blank",rel:"noopener noreferrer"},Object(E.u)("$__openLink","*")))),le?s.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},s.a.createElement(L.a,{title:Object(E.u)("$__fileSendErrorClickToReSend",1),text:Object(E.u)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Re({comment:le.options.comment},le.fi,ee),se(null)},size:"25px"})):w?s.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Object(E.u)("$__sending",1),s.a.createElement(T.a,{className:Ie.progressBar})):s.a.createElement("div",{ref:Fe,style:{position:"relative",height:"auto",borderRadius:"7px",display:"flex",alignItems:"center",padding:"3px 0px 4px 0px"}},s.a.createElement(d.b,{id:"sendingInput_".concat(e.nodeId),value:b.trim().length>0?b:"",inputRef:$e,onChange:function(e){He(e.target.value),Fe.current&&Fe.current.clientHeight&&Ce(Fe.current.clientHeight)},onBlur:function(t){t.target.value&&e.reduxFunction("ASYNC","SET_CHATS",Object(o.a)(Object(o.a)({},x.a.getState().chats),{},{drafts:Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts),{},Object(a.a)({},e.nodeId,Object(o.a)(Object(o.a)({},x.a.getState().chats.drafts[e.nodeId]||{}),{},{message:t.target.value})))}))},onPaste:function(e){Ge(e.clipboardData.files)},placeholder:Object(E.u)("$__writeMessage"),style:Object(o.a)(Object(o.a)({},D),{},{position:"relative",width:"calc(100% - 130px)",margin:"7px",maxHeight:"150px",paddingRight:"7px",background:"none",border:"none",overflow:"auto !important"}),onKeyDown:function(e){13===e.keyCode&&(e.shiftKey?e.stopPropagation():b.length>0&&b.trim()&&b.trim().length>0?ze():y(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},s.a.createElement(d.a,{trigger:"@",data:We,renderSuggestion:function(t,n,a){var o=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return s.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},s.a.createElement(I.a,{style:{position:"relative",width:"25px",height:"25px",marginRight:"7px"},src:t.image?t.image:r.cards&&e.nodeId&&r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&r.cards[e.nodeId]._users[t.id]&&r.cards[e.nodeId]._users[t.id].image?r.cards[e.nodeId]._users[t.id].image:r.users[t.id]&&r.users[t.id].image?r.users[t.id].image:null}),s.a.createElement("div",null,s.a.createElement("div",null,a),o&&o._parent&&x.a.getState().db.users[o._parent]&&x.a.getState().db.users[o._parent].name?s.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},x.a.getState().db.users[o._parent].name):s.a.createElement(s.a.Fragment,null)),o&&o._parent&&x.a.getState().db.users[o._parent]&&x.a.getState().db.users[o._parent].image?s.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(x.a.getState().db.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):s.a.createElement(s.a.Fragment,null))},style:{backgroundColor:Object(E.d)("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold",maxHeight:250,overflow:"auto"}})),s.a.createElement("div",{style:{cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},s.a.createElement(S,{title:Object(E.u)("$__emojis",1),icon:je?"highlight_off":"sentiment_very_satisfied",color:Object(E.d)("medium"),onClick:function(){Ee(!je)}}),!w&&s.a.createElement("div",{className:Ie.actionButton},s.a.createElement("input",{className:"input-text-timeline",style:{position:"absolute",marginRight:"3em",height:"24px",fontSize:"0",left:"0px",width:"24px",cursor:"pointer",border:"none",opacity:"0"},onChange:function(e){return Ge(e.target.files)},multiple:!0,type:"file",accept:".png, .jpg, .jpeg, .bpm, .svg, .gif, .pdf, .mp4, .3gp, .ts, .mkv, .avi, .mov, .mts, m2ts, .mxf, .aac, aiff, .caf, .ogg, .mp3, .wav, .doc, .docx, .xls, .xlsx, .ppt, .pptx"}),s.a.createElement(_.a,{icon:"attachment",color:Object(E.d)("medium"),size:"22px"})),!w&&(b.trim().length>0||X.length>0)&&s.a.createElement(S,{title:Object(E.u)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(E.d)("menu"),onClick:function(){return ze()}}),e.closeOption&&s.a.createElement(_.a,{title:Object(E.u)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(E.d)("color"),onClick:function(){return e.onClose()}}),je&&s.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},s.a.createElement(h.a,{onEmojiClick:function(e,t){y("".concat(b," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):s.a.createElement("div",{className:e.relative?Ie.editorRelative:Ie.editor,style:{backgroundColor:"#f0f0f0"}},Object(E.u)("$__avaiableForViewingOnly")),s.a.createElement("div",{className:A?Ie.onDropFile:Ie.dropFile,onDragLeave:function(){!e.disabledSend&&B(!1)}},Object(E.u)("$__dropTheFileToAttach","*"))))}))},706:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(5),i=r(0),c=r.n(i),l=r(9),s=r.n(l),u=r(15),d=r(3),p=r(13),f=r(14),h=r(95),m=r(340),g=r(441),b=r(10),y=r(542),v=r(74),x=r(157),_=r(1973),O=r(6),w=r(1),j={root:Object(n.a)({},O.k),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Object(w.d)("color"),display:"flex",alignItems:"center"}},E=Object(x.a)(j);var k=Object(f.b)(null,(function(e){return Object(p.b)(u,e)}))((function(e){var t=d.a.getState().db,r=E(),n=c.a.useState([]),a=Object(o.a)(n,2),i=a[0],l=a[1];c.a.useEffect((function(){var r=[];e.data&&e.data.length>0&&e.data.forEach((function(e){r.push(t.cards[e])})),l(r)}),[e.data]);var s="guidelineD"===e.type||"guidelineR"===e.type?i.filter((function(e){return e&&"strength"===e.type})):i.filter((function(e){return e&&"weakness"===e.type})),u="guidelineD"===e.type||"guidelineE"===e.type?i.filter((function(e){return e&&"threat"===e.type})):i.filter((function(e){return e&&"opportunity"===e.type})),p="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",f="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",h="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",m="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return c.a.createElement("div",{className:r.root},c.a.createElement("div",{className:r.aspectsTitle},c.a.createElement(b.a,{icon:"guidelineD"===e.type||"guidelineR"===e.type?t.dataType.filter((function(e){return"strength"===e.name}))[0].icon:t.dataType.filter((function(e){return"weakness"===e.name}))[0].icon,color:Object(w.d)("color"),title:Object(w.u)(p,1)}),c.a.createElement("span",{style:{marginLeft:"5px"}},Object(w.u)("$__internalAspects",1)," - ",Object(w.u)("$__".concat(h),1))),s&&s.length>0&&s.sort((function(e,t){return e.name-t.name})).map((function(e,t){return c.a.createElement(_.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),c.a.createElement("div",{className:r.aspectsTitle},c.a.createElement(b.a,{icon:"guidelineD"===e.type||"guidelineE"===e.type?t.dataType.filter((function(e){return"threat"===e.name}))[0].icon:t.dataType.filter((function(e){return"opportunity"===e.name}))[0].icon,color:Object(w.d)("color"),title:Object(w.u)(f,1)}),c.a.createElement("span",{style:{marginLeft:"5px"}},Object(w.u)("$__externalAspects",1)," - ",Object(w.u)("$__".concat(m),1))),u&&u.length>0&&u.sort((function(e,t){return e.name-t.name})).map((function(e,t){return c.a.createElement(_.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),S=r(147),L=r(33),C=r(333),I=r(144),T=r.n(I),F=r(850),D=r.n(F),N=r(150),A=r.n(N),P=r(167),$=r(63),M=r(78);function z(){z=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new C(n||[]);return a(i,"_invoke",{value:E(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(I([])));_&&_!==r&&n.call(_,i)&&(v=_);var O=y.prototype=g.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function E(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},w(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.a=Object(f.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(p.b)(u,e)}))(Object(L.a)(C.a)((function(e){var t=e.classes,r=d.a.getState(),i=r.db,l=r.session,u=c.a.useState(null),p=Object(o.a)(u,2),f=p[0],x=p[1],_=c.a.useState(!0),O=Object(o.a)(_,2),j=O[0],E=O[1],L=c.a.useState(!1),C=Object(o.a)(L,2),I=C[0],F=C[1],N=c.a.useRef(!0);c.a.useEffect((function(){return function(){N.current=!1}}),[]);var Y=d.a.getState().db.cards[e.cardId||e.data._id]||{},B=window.location.hash.split("/");B[0]=B[0].replace("#",""),c.a.useEffect((function(){N.current&&(Y._parent&&(!B[0]||B[0]&&36!==B[0].length)?R():F(!1))}),[]);var R=function(){var t=Object(a.a)(z().mark((function t(){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!Y._loadTimeline||Y._loadTimeline&&!Y._loadTimeline.kpi)&&Y.kpi_type&&"task"!==Y.kpiType&&"timer"!==Y.kpiType&&"time"!==Y.kpiType&&Object(M.f)(Object(n.a)(Object(n.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[Y._id],db:"cards",type:"kpi"}),r=function(){var t=Object(a.a)(z().mark((function t(a){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.cards[a]){t.next=8;break}return N.current&&F(!0),t.next=4,Object($.b)(Object(n.a)(Object(n.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&N.current&&F(!1),t.next=9;break;case 8:i.cards[a]&&i.cards[a]._parent?r(i.cards[a]._parent)&&N.current&&F(!1):F(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(a.a)(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(Y._parent);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),e.onExpand&&e.onExpand();case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(I)return c.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},c.a.createElement("span",{style:{color:Object(w.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(w.u)("$__loadingData")),c.a.createElement(v.a,null));if(!Y&&!Y._id)return null;var G=!1,H=c.a.createElement(c.a.Fragment,null);if(Y&&Y.url&&(Y.url.indexOf(".youtube.com/watch?")>-1||Y.url.indexOf("youtu.be")>-1)){var W=Y.url.indexOf(".youtube.com/watch?")>-1?Y.url.split("?")[1].split("v=")[1].split("&")[0]:Y.url.split(".be/")[1];W&&(H=c.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(W),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),G=!0)}if(Y&&Y.url&&Y.url.indexOf("https://vimeo.com")>-1){var U=Y.url.replace("https://","").split("/")[1];U&&(H=c.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://player.vimeo.com/video/".concat(U),title:"Vimeo video player",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0}),G=!0)}return c.a.createElement("div",null,c.a.createElement("div",null,c.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},c.a.createElement("div",{style:{position:"relative",display:"flex"}},G||Y.image&&(Y.image||e.Avatar||Y.image||e.Avatar)&&!l.cards.hide.image?c.a.createElement("div",{className:t.imagePreview,style:f?{backgroundImage:'url("'.concat(f||T.a,'")')}:{background:Object(w.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},G?H:Y.image&&!f?c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===Y.type||"link"===Y.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===Y.type||"link"===Y.type?c.a.createElement(b.a,{icon:A.a,size:"39px",color:"rgba(250,250,250,0.77)"}):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:D.a,style:{width:"25%"}}),c.a.createElement("div",{style:{clear:"both"}})),!j&&c.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},c.a.createElement(P.a,null),c.a.createElement("div",{style:{clear:"both"}}))):c.a.createElement(c.a.Fragment,null),!G&&(!f||e.Avatar||Y.image!==f)&&c.a.createElement(c.a.Fragment,null,c.a.createElement("img",{alt:"MACHEN_IMAGE",className:t.image,src:"".concat(Y.image?Y.image:T.a),onError:function(e){Y.image?x(null):E(!0)},onLoad:function(t){x("".concat(e.Avatar&&!Y.image?T.a:Y.image))},width:"100%"})),c.a.createElement("div",{style:{clear:"both"}})):e.Avatar&&!l.cards.hide.image&&c.a.createElement("div",{className:i.viewList?t.imagePreviewList:t.imagePreview,style:{background:Object(w.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},c.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},"insight"===Y.type||"link"===Y.type?c.a.createElement(b.a,{icon:A.a,size:"39px",color:"rgba(250,250,250,0.77)"}):c.a.createElement("img",{alt:"MACHEN_IMAGE",src:D.a,style:{width:"25%"}}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),Y.image?c.a.createElement("div",{style:{position:"absolute",bottom:0,right:0,padding:"2px 7px",backgroundColor:"rgba(0,0,0,0.7)",color:"#FFFFFF",borderRadius:"10px 0px 0px 0px",fontSize:10}},"# ",Y._cardCode):c.a.createElement(c.a.Fragment,null),Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&"step"===d.a.getState().db.cards[e].type&&d.a.getState().db.cards[e]._parent===Y._id})).length>0&&c.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,padding:"2px 7px",backgroundColor:"rgba(0,0,0,0.7)",color:"#FFFFFF",borderRadius:"0px 10px 0px 0px",fontSize:10,display:"flex",alignItems:"center"},onClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(n.a)(Object(n.a)({},d.a.getState().control),{},{board:Y._id})),t.preventDefault(),t.stopPropagation()}},c.a.createElement(b.a,{size:"10px",color:"#FFFFFF",icon:"open_in_new"}),Object(w.u)("$__openTaskList"))),"swot"!==i.dataType.filter((function(e){return e.name===Y.type}))[0].module&&(Y._parent&&Y._parent!==Y._id||Y._planId&&Y._planId!==Y._id)&&c.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},i.cards[Y._parent]?c.a.createElement(g.a,{id:Y._parent&&d.a.getState().db.cards[Y._parent]?Y._parent:Y._planId&&d.a.getState().db.cards[Y._planId]?Y._planId:null,loading:I,showLegend:!e.Resume}):c.a.createElement(c.a.Fragment,null),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:!i.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},Y.type.indexOf("guideline")>-1&&(Y._aspects&&Y._aspects.length>0||Y._aspects&&Y._aspects.length>0)?c.a.createElement(k,{data:Y._aspects,type:Y.type}):c.a.createElement(c.a.Fragment,null),e.searchText||!Y.description&&"plan"!==Y.type?c.a.createElement(c.a.Fragment,null):c.a.createElement(S.a,{title:Y.description||""},e.Resume?c.a.createElement("div",{className:t.description,style:Object(n.a)({display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",height:90},Y.description?{}:{color:"lightgray"})},Y.description?"".concat(Y.description):"plan"===Y.type?Object(w.u)("$__planDescriptionCardPlaceholder"):c.a.createElement(c.a.Fragment,null)):c.a.createElement("div",{className:t.description,style:{wordBreak:"break-word",height:90,display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis"},dangerouslySetInnerHTML:{__html:Y.description?Object(w.p)(Y.description):""}})),Y.kpi_type&&!l.cards.hide.kpi&&c.a.createElement(y.a,{data:Y,chartShow:!l.cards.hide.kpiChart}),("link"===Y.type||"insight"===Y.type)&&c.a.createElement("div",{className:t.dates},c.a.createElement("div",{className:t.dateInfo},c.a.createElement(h.a,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),s()(1e3*Y.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"))),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))),"plan"!==Y.type&&Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&d.a.getState().db.cards[e].checklist&&d.a.getState().db.cards[e]._parent===Y._id})).length>0&&0===Object.keys(d.a.getState().db.cards).filter((function(e){return d.a.getState().db.cards[e]&&"step"===d.a.getState().db.cards[e].type&&d.a.getState().db.cards[e]._parent===Y._id})).length&&c.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},c.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},Object(w.u)("$__list",1)),c.a.createElement(m.a,{nodeId:Y._id,db:"cards",noDelete:!0,showProgress:!0}),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}})),c.a.createElement("div",{style:{clear:"both"}}))})))},717:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},74:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(1857),c=r(157),l=r(1);t.a=function(e){var t={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Object(l.d)("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(l.d)("color")}},bar:{borderRadius:7}},r=Object(c.a)(t)(),a=Object(n.a)({},e);return a.showText&&delete a.showText,a.customColor&&delete a.customColor,o.a.createElement("div",{className:r.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},o.a.createElement(i.a,a),e.showText&&o.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))}},77:function(e,t,r){"use strict";r.d(t,"m",(function(){return p})),r.d(t,"n",(function(){return f})),r.d(t,"q",(function(){return F})),r.d(t,"a",(function(){return N})),r.d(t,"d",(function(){return A})),r.d(t,"j",(function(){return C})),r.d(t,"k",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return y})),r.d(t,"g",(function(){return x})),r.d(t,"f",(function(){return O})),r.d(t,"h",(function(){return k})),r.d(t,"i",(function(){return D})),r.d(t,"l",(function(){return T})),r.d(t,"o",(function(){return h})),r.d(t,"p",(function(){return m})),r.d(t,"r",(function(){return j}));var n=r(7),a=r(2),o=r(8),i=r(3),c=r(39),l=r(57),s=r(229),u=r(24);function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",m="completed",g={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=p(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=f;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var s=p(t,r,n);if("normal"===s.type){if(a=n.done?m:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var p=function(){var e=Object(o.a)(d().mark((function e(t,r){var c,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.a.post("/M_User_List_V3",{id:r});case 3:if(!(c=e.sent)||!c.data){e.next=9;break}return s={},c.data.map(function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},i.a.getState().db.users&&i.a.getState().db.users[t.data._id]?i.a.getState().db.users[t.data._id]:{}),t.data),t.access?{_access:JSON.parse(t.access)}:{}),t._safety?{_safety:t._safety}:{}),t._token?{_token:{_id:t._token}}:{}),t.groups&&t.groups.filter((function(e){return e.value})).length>0?{groups:t.groups}:{}),t.tags&&t.tags.filter((function(e){return e.value})).length>0?{tags:t.tags}:{}),t._parent&&t._parent!==i.a.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),s)})),e.abrupt("return",!0);case 9:e.next=16;break;case 11:e.prev=11,e.t0=e.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(e.t0),console.groupEnd();case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,r){return e.apply(this,arguments)}}(),f=function(){var e=Object(o.a)(d().mark((function e(t,r){var c,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.a.post("/UsersList",{id:r});case 3:if(!(c=e.sent)||!c.data){e.next=9;break}return s={},c.data.map(function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},i.a.getState().db.users&&i.a.getState().db.users[t.data._id]?i.a.getState().db.users[t.data._id]:{}),t.data),t.access?{_access:JSON.parse(t.access)}:{}),t._safety?{_safety:t._safety}:{}),t._token?{_token:{_id:t._token}}:{}),t.groups&&t.groups.filter((function(e){return e.value})).length>0?{groups:t.groups}:{}),t.tags&&t.tags.filter((function(e){return e.value})).length>0?{tags:t.tags}:{}),t._parent&&t._parent!==i.a.getState().session.account?{_parent:t._parent}:{})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),s)})),e.abrupt("return",!0);case 9:e.next=16;break;case 11:e.prev=11,e.t0=e.catch(0),console.group("Layout-ReqUsers::ERR::"),console.log(e.t0),console.groupEnd();case 16:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t,r){return e.apply(this,arguments)}}(),h=function(){var e=Object(o.a)(d().mark((function e(t){var r,n,c,l,u,p,f,h;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket),n=i.a.getState(),c=n.sideModule,l=c.data,u=i.a.getState().db[c.db][c.id]||{},(p=window.location.hash.split("/"))[0]=p[0].replace("#",""),"user"===l.type&&p&&p.length>2&&p[2]&&36===p[2].length&&(l.type="user",l._parent=p[2]),Object.keys(l).forEach((function(e){(l[e]&&l[e].low||l[e]&&l[e].low&&"0"===String(l[e].low))&&(l[e]=l[e].low)})),f=l.file||null,delete l.file,"new"!==l._id&&l._id){e.next=21;break}return e.prev=11,r.emit("data",{module:"user",method:"post",action:"add"},Object(a.a)(Object(a.a)({},l),{},{oldData:u}),function(){var e=Object(o.a)(d().mark((function e(n){var o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l._id=n.id,l._token={_id:n.tokenId},!f){e.next=8;break}return e.next=5,Object(s.a)(l._id,f);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=l.image;case 9:o=e.t0,l.image=o,g(t,l),r.emit("data",{module:"user",method:"put",action:"update"},Object(a.a)(Object(a.a)({},l),{},{image:o,oldData:u})),t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},i.a.getState().sideModule),{},{id:n.id,data:Object(a.a)(Object(a.a)({},i.a.getState().sideModule.data),{},{_id:n.id})}));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 16:e.prev=16,e.t0=e.catch(11),console.log(e.t0);case 19:e.next=31;break;case 21:if(!f){e.next=27;break}return e.next=24,Object(s.a)(l._id,f);case 24:e.t1=e.sent,e.next=28;break;case 27:e.t1=l.image;case 28:return h=e.t1,(f&&h||!f)&&(g(t,l),t.reduxFunction("ASYNC","SET_MODULE",Object(a.a)(Object(a.a)({},i.a.getState().sideModule),{},{id:l._id,data:Object(a.a)(Object(a.a)({},i.a.getState().sideModule.data),{},{_id:l._id})})),r.emit("data",{module:"user",method:"put",action:"update"},Object(a.a)(Object(a.a)({},l),{},{image:h,oldData:u}))),e.abrupt("return",!0);case 31:case"end":return e.stop()}}),e,null,[[11,16]])})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(o.a)(d().mark((function e(t){var r,c,l,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket),c=i.a.getState(),l=c.sideModule,s=l.data,r.emit("data",{module:"user",method:"post",action:"access"},{_id:s._id,email:s.email,name:s.name,access:s._access,safety:s._safety},function(){var e=Object(o.a)(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(n.a)({_id:s._id},s._id,Object(a.a)({},s)));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(e,t){e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),{},Object(n.a)({},t._id,Object(a.a)(Object(a.a)({},i.a.getState().db.users[t._id]||{}),t||{})))}))},b=function(e,t){e.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{users:Object(a.a)(Object(a.a)({},i.a.getState().db.users),{},Object(n.a)({},t._id,Object(a.a)({},t[t._id]?t[t._id]:{})))}))};function y(e){return v.apply(this,arguments)}function v(){return(v=Object(o.a)(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.a.getState().db.users,1!==Object.keys(r).filter((function(e){return r[e].email===t})).length){e.next=5;break}return e.abrupt("return",!0);case 5:return e.prev=5,e.next=8,l.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(5),console.log(e.t0),e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e,null,[[5,11]])})))).apply(this,arguments)}function x(e){return _.apply(this,arguments)}function _(){return(_=Object(o.a)(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.a.getState().db.users,1!==Object.keys(r).filter((function(e){return r[e].email===t})).length){e.next=3;break}return e.abrupt("return",{exists:!0});case 3:return e.prev=3,e.next=6,l.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 6:return e.abrupt("return",{exists:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.log(e.t0),e.abrupt("return",{exists:!0});case 13:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function O(e){return w.apply(this,arguments)}function w(){return(w=Object(o.a)(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.a.get("/M_User_Verify_MailExist/?email=".concat(t));case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!1);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function j(e,t){return E.apply(this,arguments)}function E(){return(E=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.a.post("user/email-token-validate",{token:t,email:r});case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!0);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function k(e,t){return S.apply(this,arguments)}function S(){return(S=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.a.post("user/email-token-generate",{name:t,email:r});case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",!0);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(0),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}var L=function(e,t,r,n,a){var c,l=i.a.getState().db.users[t]?i.a.getState().db.users[t]:a;c=(e&&e.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket);var s=i.a.getState().db;return Object(u.c)(e,{cardId:n,userId:t,access:r,userData:{_id:t,name:l.name,image:l.image?l.image:null}}),c.emit("data",{module:"cards",method:"post",action:"access"},{cardType:s.cards[n].type,cardId:n,parentUser:s.cards[n]._parent,userId:t,access:r,userData:{_id:t,name:l.name,image:l.image?l.image:null}},function(){var e=Object(o.a)(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),!0},C=function(){var e=Object(o.a)(d().mark((function e(t,r,o){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.post("/card/groupAccess",{groupId:r,cardId:o}),t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},i.a.getState().db.cards),{},Object(n.a)({},o,Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]),{},{_groups:Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]._groups||{}),{},Object(n.a)({},r,{_id:r}))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),I=function(){var e=Object(o.a)(d().mark((function e(t,r,o){var l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.post("/card/groupAccessRemove",{groupId:r,cardId:o}),delete(l=i.a.getState().db.cards[o]._groups)[r],t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},i.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},i.a.getState().db.cards),{},Object(n.a)({},o,Object(a.a)(Object(a.a)({},i.a.getState().db.cards[o]),{},{_groups:l})))}));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),T=function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(a.a)({},r)),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),F=function(){var e=Object(o.a)(d().mark((function e(t,r){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&i.a.getState().functions&&i.a.getState().functions.socket,i.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userParam"},Object(a.a)({},r),function(){var e=Object(o.a)(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=i.a.getState(),o=r.db,c={};if(Object.keys(o.users).filter((function(e){return!o.users[e]._parent&&o.users[e]._access&&o.users[e]._access.admin})).forEach((function(e){c=Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},e,o.users[e]))})),(!e||e&&!e.isArray)&&c){var l={};return Object.keys(c).forEach((function(e){(!t||t&&t.indexOf(c[e].type)>-1)&&(l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},e,c[e])))})),l}if(e&&e.isArray&&c){var s=[];return Object.keys(c).forEach((function(e){(!t||t&&t.indexOf(c[e].type)>-1)&&0===s.filter((function(t){return t._id===e})).length&&s.push(c[e])})),s}return{}},N=function(e){var t=i.a.getState(),r=t.db,n=t.session,a=r.cards[e];return!!(a._users[n._id]||a._groups&&Object.keys(a._groups).length>0&&Object.keys(a._groups).filter((function(e){var t,a;return(null===r||void 0===r||null===(t=r.users[n._id])||void 0===t||null===(a=t.groups)||void 0===a?void 0:a.filter((function(t){return t.value===e})).length)>0})).length>0)},A=function(e){try{return c.a.delete("/user/unique/".concat(e)),!0}catch(t){return console.log(t),!1}}},771:function(e,t,r){},78:function(e,t,r){"use strict";r.d(t,"h",(function(){return v})),r.d(t,"g",(function(){return w})),r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return _})),r.d(t,"d",(function(){return j})),r.d(t,"c",(function(){return O})),r.d(t,"e",(function(){return y})),r.d(t,"f",(function(){return x}));var n=r(7),a=r(2),o=r(8),i=r(9),c=r.n(i),l=r(479),s=r(73),u=r.n(s),d=r(3),p=r(57),f=r(39),h=r(63),m=r(1);function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var x={};s(x,i,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(T([])));O&&O!==r&&n.call(O,i)&&(x=O);var w=v.prototype=b.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}r(210).config();var b=function(){var e=Object(o.a)(g().mark((function e(t,r){var o,i,l,s,u,p;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o={},i=d.a.getState(),l=i.db,s=i.session,(d.a.getState().timeline[r.id]||d.a.getState().timeline[r.readedBy])&&(o=d.a.getState().timeline,u=r.id,p={},"cards"!==r.db?(u=o[r.readedBy]?r.readedBy:r.id,p={_id:r.readedBy,name:l.users[r.readedBy].name,image:l.users[r.readedBy].image}):l.cards[r.id]&&l.cards[r.id]._users&&l.cards[r.id]._users[r.readedBy]&&(p=l.cards[r.id]._users[r.readedBy]),o&&o[u]&&Object.keys(o[u]).filter((function(e){return!!(r&&r.type&&("all"!==r.type&&o[u][e].type===r.type||"all"===r.type)&&o[u][e].user._id!==r.readedBy&&(!o[u][e].readedBy||s&&s._id&&o[u][e].readedBy&&!o[u][e].readedBy[s._id]))})).forEach((function(e,t){o[u]&&o[u][e]&&(o[u][e]=Object(a.a)(Object(a.a)({},o[u][e]||{}),{},{readedBy:Object(a.a)(Object(a.a)({},o[u]&&o[u][e]&&o[u][e].readedBy?o[u][e].readedBy:{}),{},Object(n.a)({},r.readedBy,Object(a.a)(Object(a.a)(Object(a.a)({},o[u]&&o[u][e]&&o[u][e].readedBy&&o[u][e].readedBy[r.readedBy]?o[u][e].readedBy[r.readedBy]:{}),p),{},{readedDate:{low:c()().unix("x")}})))}))}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)({},o)),d.a.getState().db.cards[r.id]&&r.type&&d.a.getState().db.cards[r.id]._notifications&&(d.a.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&t.reduxFunction("ASYNC","SET_DB",Object(a.a)(Object(a.a)({},d.a.getState().db),{},{cards:Object(a.a)(Object(a.a)({},d.a.getState().db.cards),{},Object(n.a)({},r.id,Object(a.a)(Object(a.a)({},d.a.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(a.a)(Object(a.a)({},d.a.getState().db.cards[r.id]&&d.a.getState().db.cards[r.id]._notifications?d.a.getState().db.cards[r.id]._notifications:{}),{},Object(n.a)({},r.type,0))})))}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=Object(o.a)(g().mark((function e(t,r){var o,i,l,s,u,p,f,h;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=d.a.getState(),i=o.db,l=o.timeline,s=o.session,u={},p=r.nodeId!==s._id?r.nodeId:r.user,i.users[r.user]?u=i.users[r.user]:r.user&&i[r.db]&&l[p]&&l[p]._users&&l[p]._users[r.user]&&(u=l[p]._users[r.user]),p&&r.message&&l&&l[s._id]&&l[s._id][r.message]&&(p=s._id),i[r.db]&&l[p]&&l[p][r.message]&&(f=Object(a.a)(Object(a.a)({},l[p][r.message]&&l[p][r.message]._reactions?l[p][r.message]._reactions:{}),{},Object(n.a)({},r.react,Object(a.a)(Object(a.a)({},l[p][r.message]&&l[p][r.message]._reactions&&l[p][r.message]._reactions[r.react]?l[p][r.message]._reactions[r.react]:{}),{},Object(n.a)({},r.user,Object(a.a)(Object(a.a)({},u),{},{reactDate:{low:c()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(f).forEach((function(e){e!==r.react&&Object.keys(f[e]).forEach((function(t){f[e][t]&&t===r.user&&delete f[e][t]}))})),h=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},p,Object(a.a)(Object(a.a)({},l[p]),{},Object(n.a)({},r.message,Object(a.a)(Object(a.a)({},l[p][r.message]),{},{_reactions:f}))))),t.reduxFunction("ASYNC","SET_TIMELINE",h));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),v=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c,l,s;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(o.a)(g().mark((function e(n,a){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||d.a.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,Object(h.b)(t,{idRel:r.idRel,cardLoad:"fullCatenation",ignoreLoader:!0});case 3:e.sent&&n(!0),e.next=8;break;case 7:n(!0);case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 2:if(!e.sent){e.next=11;break}return i=r,c=d.a.getState(),l=c.session,(s=i._parent?i._parent:i.cardId?i.cardId:i.node)===l._id&&(s=i.comment.user._id),i.to&&(i.to.forEach((function(e){var t=d.a.getState().db.users[e];i._toUser=Object(a.a)(Object(a.a)({},i._toUser?i._toUser:{}),{},Object(n.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete i.to),s&&i.comment&&t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),{},Object(n.a)({},s,Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]),{},Object(n.a)({},i.comment._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]?d.a.getState().timeline[s][i.comment._id]:{}),i.comment),i._toUser?{_toUser:i._toUser}:{}),{},{type:d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s][i.comment._id].type?d.a.getState().timeline[s][i.comment._id].type:i&&i.comment&&i.comment.type?i.comment.type:d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id].type?d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id].type:"comment",readedBy:Object(a.a)(Object(a.a)({},d.a.getState().timeline[s]&&d.a.getState().timeline[s][i.comment._id]&&d.a.getState().timeline[s][i.comment._id].readedBy?d.a.getState().timeline[s][i.comment._id].readedBy:{}),i.comment&&i.comment.readedBy?i.comment.readedBy:{}),idRel:null})))))),e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),x=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c,l,s,f,h,m,b,y,v,x,_,O,w,j,E,k,S,L,C,I,T,F,D;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(null===(i=d.a.getState().chat)||void 0===i?void 0:i.lastMessageDate)||0,l=d.a.getState().timelineLoader,!r.type||"kpi"!==r.type){e.next=7;break}if(s=u()("".concat(JSON.stringify(r))).toString(),!l[s]){e.next=6;break}return e.abrupt("return",{result:!0,total:0});case 6:t.reduxFunction("ASYNC","SET_TIMELINE_LOADER",Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},s,!0)));case 7:if(f=r.ids,h=r.db,m=r.type,b=r.limit,y=void 0===b?0:b,v=r.skip,x=void 0===v?0:v,_=r.toId,O=void 0===_?null:_,w=r.ini,j=void 0!==w&&w,E=r.reqChildrens,k=void 0!==E&&E,S=r.newUpdates,L=void 0!==S&&S,C=d.a.getState(),I=C.session,T=[],F=[],"string"===typeof f?F.push(f):F=f,F&&F.length>0&&F.forEach((function(e){-1===T.indexOf(e)&&T.push(e)})),!(T.length>0)){e.next=22;break}return e.next=16,new Promise(function(){var e=Object(o.a)(g().mark((function e(o,i){var l,s,u;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(T.length>0)){e.next=13;break}return e.prev=1,e.next=4,p.a.post("/M_Timeline_Get_V3",{nodesIds:T,db:h,type:m||"comment",skip:parseInt(x),limit:y,toId:O,ini:j,newUpdates:L,reqChildrens:k,lastDate:L?r.lastDate?r.lastDate:c:null});case 4:(l=e.sent)&&l.data&&l.data.length>0?(s=Object(a.a)({},d.a.getState().timeline),u=null,l.data.forEach((function(e){var t=e.nodeId!==I._id?e.nodeId:e.params.user._id,o=s&&s[t]&&s[t][e.data._id]&&s[t][e.data._id].readedBy?s[t][e.data._id].readedBy:{},i={};e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.forEach((function(e){o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},e._id,e))})),e&&e.params&&e.params.reactions&&e.params.reactions.filter((function(e){return e._id})).length>0&&e.params.reactions.forEach((function(e){i=Object(a.a)(Object(a.a)({},i),{},Object(n.a)({},e.type,Object(a.a)(Object(a.a)({},i[e.type]),{},Object(n.a)({},e._id,e))))}));var l={};e&&e.params&&e.params.users&&e.params.users.filter((function(e){return e.name})).length>0&&e.params.users.filter((function(e){return e.name})).forEach((function(e){l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},e._id,e))})),I&&I._id&&o&&!o[I._id]&&s[t]&&Object.keys(s[t]).forEach((function(r){s[t][r]&&s[t][r].readedBy&&s[t][r].readedBy[I._id]&&parseInt(s[t][r].created_at)>parseInt(e.data.created_at)&&(o=Object(a.a)(Object(a.a)({},o),{},Object(n.a)({},I._id,Object(a.a)({},s[t][r].readedBy[I._id]))))})),(r.ini||r.newUpdates)&&parseInt(e.data.created_at)>parseInt(c)&&(c=parseInt(e.data.created_at),u=t),s=Object(a.a)(Object(a.a)({},s),{},Object(n.a)({},t,Object(a.a)(Object(a.a)({},s&&s[t]?s[t]:{}),{},Object(n.a)({},e.data._id,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},e.data),e.params),"timer"===e.data.type&&"0"===String(e.data.ini)?{manualEntry:!0,ini:parseInt(e.data.created_at),fin:parseInt(e.data.created_at)+parseInt(e.data.fin)}:{}),{},{readedBy:o,_reactions:i},l!=={}?{_toUser:l}:{})))))})),t.noReg||t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),s)),o({result:!0,total:l.data.length,timelines:s,chatOpenId:u,lastMessageDate:c})):o({result:!0,total:l.data.length}),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(1),console.group("loadTimeline::ERR::"),console.log(e.t0),console.groupEnd();case 13:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,r){return e.apply(this,arguments)}}());case 16:if((D=e.sent)&&(D.chatOpenId||D.lastMessageDate)&&t.reduxFunction("IMMEDIATE","SET_CHAT",Object(a.a)(Object(a.a)(Object(a.a)({},d.a.getState().chat),(r.ini||r.newUpdates)&&D.lastMessageDate?{lastMessageDate:D.lastMessageDate}:{}),r.ini&&D.chatOpenId?{nodeId:D.chatOpenId}:{})),!D){e.next=20;break}return e.abrupt("return",D);case 20:e.next=23;break;case 22:return e.abrupt("return",{result:!0,total:0});case 23:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),_=function(){var e=d.a.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0;return Object.keys(n).forEach((function(e){Object.keys(n[e]).forEach((function(i){n[e]&&n[e][i]&&n[e][i].type&&"comment"===n[e][i].type&&!n[e][i].deleted&&n[e][i].user&&n[e][i].user._id&&n[e][i].user._id!==r._id&&(!n[e][i].readedBy||n[e][i].readedBy&&!n[e][i].readedBy[r._id])&&(e&&t.cards[e]&&"chatGroup"===t.cards[e].type&&(a+=1),e&&t.users[e]&&"user"===t.users[e].type&&(o+=1),1)}))})),{total:a+o+0+0,groups:a,externalGroups:0,users:o,externalUsers:0}},O=function(){var e=Object(o.a)(g().mark((function e(t,r){var i,c;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(t&&t.store&&d.a.getState().functions&&d.a.getState().functions.socket,d.a.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(o.a)(g().mark((function e(o,c){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.emit("data",{module:"chat",method:"put",action:"cancel"},r,(function(e){var i=r.idRel,c=d.a.getState().session;d.a.getState().timeline[c._id]&&d.a.getState().timeline[c._id][r.id]&&(i=c._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(a.a)(Object(a.a)({},d.a.getState().timeline),{},Object(n.a)({},i,Object(a.a)(Object(a.a)({},d.a.getState().timeline[i]),{},Object(n.a)({},r.id,Object(a.a)(Object(a.a)({},d.a.getState().timeline&&d.a.getState().timeline[i]&&d.a.getState().timeline[i][r.id]),{},{deleted:!0},r.deletedReason?{deletedReason:r.deletedReason}:{})))))),o(!0)}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(c=e.sent)){e.next=6;break}return e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w=function(e,t){var r,n,a=d.a.getState(),o=a.db,i=a.session;if(t&&t._parent&&o.cards[t._parent]?r=t._parent:t&&t.idRel&&o.cards[t.idRel]&&(r=t.idRel),n=e,e){var c=e.split("@[");c.length>0&&c.map((function(e){if(e){var t="@[".concat(e.split(")")[0],")"),a=e.split("](")[1];if(a)if((a=a.split(")")[0])&&36===a.length&&o.cards[r]&&o.cards[r]._users&&o.cards[r]._users[a]){var c=o.cards[r]._users&&o.cards[r]._users[a]&&o.cards[r]._users[a].name||o.cards[r]._users&&o.cards[r]._users[a]&&o.cards[r]._users[a].name?o.cards[r]._users[a].name:e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(c=Object(m.u)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(c,"</b></span>"))}else if(a&&36===a.length&&o.users[a]){var l=o.users[a]&&o.users[a].name?o.users[a].name:e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(l=Object(m.u)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(l,"</b></span>"))}else{var s=e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&d.a.getState().db.users[a]&&d.a.getState().db.users[a].deleted&&(s=Object(m.u)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(m.d)("menu"),'"><b>').concat(s,"</b></span>"))}}return!0}))}return n},j=function(e,t){var r=Object(a.a)(Object(a.a)({},t),{},{forwardedId:t._id,_id:Object(l.a)(),created_at:"".concat(c()().tz("America/Sao_Paulo").unix("x"))});r._reactions&&delete r._reactions,r.readedBy&&delete r.readedBy,r._reactions&&delete r._reactions,r._toUser&&delete r._toUser,t._forwardToId.forEach((function(t){v(e,{comment:Object(a.a)(Object(a.a)({},r),{},{idRel:t}),node:t}),f.a.post("timeline/add",Object(a.a)(Object(a.a)({},r),{},{idRel:t}))}))}},83:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(10),i=r(132),c=r(2),l=r(5),s=r(14),u=r(13),d=r(15),p=r(20),f=r(7),h=r(9),m=r.n(h),g=r(267),b=r(3),y=r(271),v=r(155),x=r(153),_=r(60),O=r(27),w=r(292),j=r(1888),E=r(1879),k=r(1878),S=r(1880),L=r(1203),C=r(724),I=r(147),T=r(157),F=r(453),D=(r(496),r(1)),N=Object(T.a)(F.a);var A=JSON.stringify({status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),P=function(e){var t,r=e.field,n=N(),i=b.a.getState().db,s=a.a.useState(Object(c.a)({},JSON.parse(A))),u=Object(l.a)(s,2),d=u[0],p=u[1],h=a.a.useState(null),T=Object(l.a)(h,2),F=T[0],P=T[1],$=e.indicators?e.indicators:JSON.parse(A);a.a.useEffect((function(){e.indicators&&p(e.indicators)}),[e.indicators]),a.a.useEffect((function(){var t;if(e.onChange&&JSON.stringify(e.indicators)!==JSON.stringify(d)){var r={};Object.keys(d).forEach((function(e){$[e]||(r=Object(c.a)(Object(c.a)({},$),{},Object(f.a)({},e,d[e]))),$[e]&&JSON.stringify($[e])!==JSON.stringify(d[e])&&(r=Object(c.a)(Object(c.a)(Object(c.a)({},$),r),{},Object(f.a)({},e,d[e])))})),JSON.stringify(r)!==JSON.stringify({})&&e.onChange(r)}null===e||void 0===e||null===(t=e.preffers)||void 0===t||t.searchButton}),[d]);var M=function(t,r){var n,a,o=d[t]||{};"all"===r?Object.keys(o).forEach((function(e){o[e]=!0})):(o.all&&Object.keys(o).forEach((function(e){o[e]=!1})),o.all=!1),(null===e||void 0===e||null===(n=e.preffers)||void 0===n||null===(a=n.unique)||void 0===a?void 0:a.status)&&Object.keys(o).forEach((function(e){o[e]=!1})),p(Object(c.a)(Object(c.a)({},d),{},Object(f.a)({},t,Object(c.a)(Object(c.a)({},o),{},Object(f.a)({},r,"all"===r||!o[r])))))},z=function(t){var r;return a.a.createElement(j.a,{style:{width:"100%"},expanded:F===t,onChange:function(){P(F===t?null:t)}},a.a.createElement(k.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(o.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(D.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(D.u)("$__".concat(t))),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(d[t]).filter((function(e,r){return d[t][e]&&"all"!==e})).map((function(e,t){return a.a.createElement(I.a,{title:Object(D.u)(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.priority.filter((function(t){return String(t.value)===String(e)}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(E.a,{style:{minWidth:"100%"}},a.a.createElement(L.a,{style:{width:"100%"}},(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.unique[t])?a.a.createElement(a.a.Fragment,null):a.a.createElement(S.a,{style:{minWidth:"100%"},control:a.a.createElement(v.a,{checked:!(!d[t]||!d[t].all),onChange:function(){M("priority","all")},color:"default"}),label:Object(D.u)("$__allPriorities")}),i.priority.map((function(e,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(S.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:a.a.createElement(v.a,{indeterminate:!(!d[t]||!d[t].all),checked:!(!d[t]||!d[t][e.value]),onChange:function(){M(t,e.value)},color:"default"}),label:Object(D.u)(e.label)}))})))))};return"admin"===r?a.a.createElement(_.a,{checked:!!d.admin,onChange:function(e){p(Object(c.a)(Object(c.a)({},d),{},{admin:!d.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"tagsByText"===r?a.a.createElement("div",{className:n.textField,style:{width:"100%"}},a.a.createElement(O.a,{className:n.noLabelLight,label:Object(D.u)("$__searchTags","*"),value:d.tagsByText||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(C.a,{position:"start"},a.a.createElement(o.a,{color:Object(D.d)("color")},"search")),onChange:function(e){p(Object(c.a)(Object(c.a)({},d),{},{tagsByText:e.target.value}))}}})):"text"===r?a.a.createElement("div",{className:n.textField,style:{width:"100%"}},a.a.createElement(O.a,{className:n.noLabelLight,label:Object(D.u)("$__search","*"),autoFocus:!0,value:d.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(C.a,{position:"start"},a.a.createElement(o.a,{color:Object(D.d)("color")},"search")),onChange:function(e){p(Object(c.a)(Object(c.a)({},d),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"date"===r?a.a.createElement(a.a.Fragment,null,a.a.createElement(g.a,{type:"datetime",onChangeStartDate:function(t){var r,n={startDate:m()(t).unix("x")};(!(null===(r=b.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||b.a.getState().searchs[e.nodeId].endDate<m()(t).unix("x"))&&(n=Object(c.a)(Object(c.a)({},n),{},{endDate:m()("".concat(m()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),p(Object(c.a)(Object(c.a)({},d),n))},onChangeEndDate:function(e){p(Object(c.a)(Object(c.a)({},d),{},{endDate:m()(e).unix("x")}))},range:!0,horizontal:!0,startDate:(null===d||void 0===d?void 0:d.startDate)?new Date(1e3*d.startDate):null,endDate:(null===d||void 0===d?void 0:d.endDate)?new Date(1e3*d.endDate):null,onClear:function(){p(Object(c.a)(Object(c.a)({},d),{},{startDate:null,endDate:null}))}})):"tags"===r?a.a.createElement(y.a,{dbNode:"tag",options:b.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:(null===d||void 0===d?void 0:d.tags)||[],placeholder:Object(D.u)("$__tags"),onChange:function(e){p(Object(c.a)(Object(c.a)({},d),{},{tags:e}))}}):"status"===r?a.a.createElement(j.a,{style:{width:"100%",padding:0},expanded:"status"===F,onChange:function(){P("status"===F?null:"status")}},a.a.createElement(k.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(o.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(D.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(D.u)("$__status")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===d||void 0===d?void 0:d.status)&&Object.keys(d.status).filter((function(e,t){return(d.status[e]||d.status.all)&&"all"!==e})).map((function(e,t){return a.a.createElement(I.a,{title:Object(D.u)(i.status.filter((function(t){return t.value===e}))[0].label,1),key:t},a.a.createElement("div",{style:{position:"relative",float:"left",width:"11px",height:"11px",borderRadius:"50%",backgroundColor:i.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))),a.a.createElement(E.a,{style:{minWidth:"100%"}},a.a.createElement(L.a,{style:{width:"100%"}},a.a.createElement(S.a,{style:{minWidth:"100%"},control:a.a.createElement(v.a,{checked:!(!d.status||!d.status.all),onChange:function(){M("status","all")},color:"default"}),label:Object(D.u)("$__allStatus")}),i.status.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(S.a,{style:{minWidth:"100%"},control:a.a.createElement(v.a,{indeterminate:!(!d.status||!d.status.all),checked:!(!d.status||!d.status[e.value]),onChange:function(){M("status",e.value)},color:"default"}),label:Object(D.u)(e.label)}))}))))):"priority"===r?z("priority"):"complexity"===r?z("complexity"):"risk"===r?z("risk"):"impact"===r?z("impact"):"users"===r?a.a.createElement("div",{style:{marginTop:5}},a.a.createElement(x.a,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:null,noLimit:!0,multiple:!0,onSelect:function(e){p(Object(c.a)(Object(c.a)({},d),{},{users:e}))},selected:(null===d||void 0===d?void 0:d.users)||[],transparent:!0})):"responsible"===r?a.a.createElement("div",{style:{marginTop:5}},a.a.createElement(x.a,Object.assign({text:Object(D.u)("$__FilterByResponsible"),includeMe:!0,avatarSize:"23px",permission:!0,data:b.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!1,onSelect:function(e){p(Object(c.a)(Object(c.a)({},d),{},{responsible:e}))},selected:(null===d||void 0===d?void 0:d.responsible)||[],transparent:!0},(null===e||void 0===e||null===(t=e.fieldsProps)||void 0===t?void 0:t.responsible)||{}))):"userGroups"===r?a.a.createElement(w.a,{data:{values:d.userGroups||[]},options:b.a.getState().db.userGroup?b.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",colorPickerCallBack:function(e){},noAdd:!0}):a.a.createElement(a.a.Fragment,null)};var $=JSON.stringify({status:{all:!0,notStarted:!0,awaitAction:!0,paused:!0,inProgress:!0,completed:!0},priority:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},risk:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},complexity:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0},impact:{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}}),M=Object(s.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(u.b)(d,e)}))((function(e){var t,r,n=a.a.useState(!1),o=Object(l.a)(n,2),i=o[0],s=o[1],u=a.a.useState(Object(c.a)({},e.indicators)),d=Object(l.a)(u,2),f=d[0],h=d[1],m=a.a.useRef(!0);return a.a.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]),a.a.useEffect((function(){e.onChange&&e.onChange(Object(c.a)({},f||{}))}),[f]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"0px",marginBottom:"15px"}},null===(t=e.fields)||void 0===t?void 0:t.map((function(t,r){return a.a.createElement("div",{key:"".concat(t,"_").concat(r),style:{position:"relative"}},a.a.createElement(P,{field:t,indicators:f,onChange:e.onChange?function(e){m.current&&h(e)}:null}))})),JSON.stringify(f)!==$?a.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){s(!i)}}):a.a.createElement(a.a.Fragment,null),(null===e||void 0===e||null===(r=e.preffers)||void 0===r?void 0:r.searchButton)?a.a.createElement(p.a,{color:Object(D.d)("menu"),icon:"search",onClick:function(){e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(D.u)("$__search")),text:"".concat(Object(D.u)("$__search"))}):a.a.createElement(a.a.Fragment,null)))}));t.a=function(e){var t,r,c,l,s,u,d,p,f,h,m,g,b,y,v,x,_,O,w,j,E=e.tittle,k=e.icon,S=e.datafilter,L=e.handleSetoption,C=e.handleSetSelected,I=Object(n.useRef)();return a.a.createElement("div",{ref:I,style:{height:"47px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",background:e.styles.backgroundColor?e.styles.backgroundColor:"white",display:"flex",fontWeight:"bolder",position:"relative",overflow:"visible"}},a.a.createElement("div",{style:{width:"40px",height:"40px",alignSelf:"center",display:"flex"}},a.a.createElement(o.a,{size:28,icon:k&&k,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey",maxWidth:"30px"}})),a.a.createElement("p",{style:{margin:"0px",marginLeft:"10px",alignSelf:"center",padding:"0px",fontSize:"14px",fontWeight:"bolder"}},E&&E),e.edit&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(o.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},a.a.createElement(o.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with")),S&&a.a.createElement(i.a,{text:"Filtro",icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement("div",{style:{marginLeft:"11px",marginBottom:"12px"}},(null===e||void 0===e||null===(t=e.filterConfig)||void 0===t?void 0:t.filterSelect)&&a.a.createElement("select",{placeholder:"Quantidade de usuarios por exibi\xe7\xe3o",onChange:function(e){return C({finalIndex:parseInt(e.target.value),showQuantity:parseInt(e.target.value),index:0,number:parseInt(e.target.value)})},style:{padding:"10px 10px 10px 3px",alignSelf:"center",border:"1px solid #dde2e6",color:"#bebebe",fontSize:"14px"}},a.a.createElement("option",{disabled:!0,selected:!0},"Quantidade de ",(null===e||void 0===e||null===(r=e.filterConfig)||void 0===r?void 0:r.filterName)?null===e||void 0===e||null===(c=e.filterConfig)||void 0===c?void 0:c.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(l=e.filterConfig)||void 0===l?void 0:l.filterSelect)>5&&a.a.createElement("option",null," 5 ",(null===e||void 0===e||null===(s=e.filterConfig)||void 0===s?void 0:s.filterName)?null===e||void 0===e||null===(u=e.filterConfig)||void 0===u?void 0:u.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(d=e.filterConfig)||void 0===d?void 0:d.filterSelect)>10&&a.a.createElement("option",null," 10 ",(null===e||void 0===e||null===(p=e.filterConfig)||void 0===p?void 0:p.filterName)?null===e||void 0===e||null===(f=e.filterConfig)||void 0===f?void 0:f.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(h=e.filterConfig)||void 0===h?void 0:h.filterSelect)>15&&a.a.createElement("option",null," 15 ",(null===e||void 0===e||null===(m=e.filterConfig)||void 0===m?void 0:m.filterName)?null===e||void 0===e||null===(g=e.filterConfig)||void 0===g?void 0:g.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(b=e.filterConfig)||void 0===b?void 0:b.filterSelect)>10&&a.a.createElement("option",null," 20 ",(null===e||void 0===e||null===(y=e.filterConfig)||void 0===y?void 0:y.filterName)?null===e||void 0===e||null===(v=e.filterConfig)||void 0===v?void 0:v.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(x=e.filterConfig)||void 0===x?void 0:x.filterSelect)>10&&a.a.createElement("option",null," 25 ",(null===e||void 0===e||null===(_=e.filterConfig)||void 0===_?void 0:_.filterName)?null===e||void 0===e||null===(O=e.filterConfig)||void 0===O?void 0:O.filterName:"usuarios"," por exibi\xe7\xe3o"))),a.a.createElement(M,{fields:(null===e||void 0===e||null===(w=e.filterConfig)||void 0===w?void 0:w.filterItems)?null===e||void 0===e||null===(j=e.filterConfig)||void 0===j?void 0:j.filterItems:["date","users"],showFilters:!0,style:{position:"absolute",zIndex:"999"},nodeId:"barChart",indicators:null===e||void 0===e?void 0:e.indicators,onChange:function(e){L(e)}})),style:{alignSelf:"center",position:"absolute",right:"107px"},textColor:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",btColor:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}),a.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},e.table&&a.a.createElement(o.a,{onClick:function(){return e.handleModal()},style:{height:"25px",cursor:"pointer",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"232px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"table_rows"))))}},833:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(191),l=(r(164),r(3));t.default=function(e){var t=Object(o.useState)(),r=Object(a.a)(t,2),s=r[0],u=r[1],d=e.tittle,p=e.preview,f=e.icon,h=window.location.hash.split("/");h[0]=h[0].replace("#","");var m=l.a.getState().db;return Object(o.useEffect)((function(){var e=Object(n.a)(m.status.map((function(e,t){return{value:Object.keys(m.cards).filter((function(t){return m.cards[t]._planId===h[0]&&!m.cards[t].deleted&&m.cards[t].status&&m.cards[t].status===e.value&&("iniciative"===m.cards[t].type||"task"===m.cards[t].type||"meeting"===m.cards[t].type||"iniciative"===m.cards[t].type||"myTask"===m.cards[t].type)&&(!m.cards[t].checklist||m.cards[t].checklist&&m.cards[t].showCard)})).length}}))),t=0;e.forEach((function(e){t=e.value+t})),u(t)}),[e.planCards]),i.a.createElement("div",{style:{height:"100%"}},i.a.createElement(c.default,{load:e.load,data:s&&s.toString(),tittle:d,preview:p,icon:f,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},834:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(9),c=r.n(i),l=r(1),s=r(64),u=r(67),d=r(69),p=r(117),f=r(10),h=(r(164),r(106)),m=r(14),g=r(13),b=r(15),y=r(3);t.default=Object(m.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(g.b)(b,e)}))((function(e){var t,r=c()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a=window.location.hash.split("/");a[0]=a[0].replace("#","");var i=y.a.getState().db,m={};return(null===(t=i.cards[a[0]])||void 0===t?void 0:t.customColumns)&&(m=JSON.parse(i.cards[a[0]].customColumns)),o.a.createElement("div",{style:{height:"100%",width:"100%"}},o.a.createElement(h.a,null,(function(t){var h,g,b,y;return o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(u.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(f.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"play_arrow"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},Object(l.u)("$__actions",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(f.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(f.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(s.a,{title:(null===(h=m)||void 0===h||null===(g=h.actions)||void 0===g?void 0:g.name)?m.actions.name:Object(l.u)("$__actions",1),icon:(null===(b=m)||void 0===b||null===(y=b.actions)||void 0===y?void 0:y.icon)?m.actions.icon:"play_arrow",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),o.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto"}},e.load&&o.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{alignSelf:"center"}}," ",o.a.createElement("div",{className:"loader"}))),!e.load&&t&&o.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundColor:"#f5f5f5"}},o.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},o.a.createElement(p.a,{data:[].concat(Object(n.a)(i.status.map((function(t,r){return{id:Object(l.u)(t.label,1),label:Object(l.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].status&&i.cards[e].status===t.value&&("iniciative"===i.cards[e].type||"task"===i.cards[e].type||"meeting"===i.cards[e].type||"iniciative"===i.cards[e].type||"myTask"===i.cards[e].type)&&(!i.cards[e].checklist||i.cards[e].checklist&&i.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(l.u)("$__late",1),label:Object(l.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&"completed"!==i.cards[e].status&&("iniciative"===i.cards[e].type||"task"===i.cards[e].type||"meeting"===i.cards[e].type||"iniciative"===i.cards[e].type||"myTask"===i.cards[e].type)&&(!i.cards[e].checklist||i.cards[e].checklist&&i.cards[e].showCard)&&i.cards[e].endDate&&c()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=c()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(n.a)(i.status.map((function(e){return e.color}))),["red"]),margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})))),!e.load&&t&&o.a.createElement(d.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},o.a.createElement("h3",null,o.a.createElement("small",null,Object(l.u)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&("iniciative"===i.cards[e].type||"task"===i.cards[e].type||"meeting"===i.cards[e].type||"iniciative"===i.cards[e].type||"myTask"===i.cards[e].type)&&(!i.cards[e].checklist||i.cards[e].checklist&&i.cards[e].showCard)})).length)),i.status.map((function(t,r){return o.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(f.a,{color:t.color},t.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(l.u)(t.label,1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&("iniciative"===i.cards[e].type||"task"===i.cards[e].type||"meeting"===i.cards[e].type||"iniciative"===i.cards[e].type||"myTask"===i.cards[e].type)&&(!i.cards[e].checklist||i.cards[e].checklist&&i.cards[e].showCard)&&i.cards[e].status&&i.cards[e].status===t.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(f.a,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(l.u)("$__late",1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&"completed"!==i.cards[e].status&&("iniciative"===i.cards[e].type||"task"===i.cards[e].type||"meeting"===i.cards[e].type||"iniciative"===i.cards[e].type||"myTask"===i.cards[e].type)&&(!i.cards[e].checklist||i.cards[e].checklist&&i.cards[e].showCard)&&i.cards[e].endDate&&c()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=c()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}))},835:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(5),o=r(0),i=r.n(o),c=r(191),l=r(3);t.default=function(e){var t=e.tittle,r=e.preview,s=e.icon,u=Object(o.useState)([]),d=Object(a.a)(u,2),p=d[0],f=d[1];return Object(o.useEffect)((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#","");var t=l.a.getState().db,r=Object(n.a)(t.status.map((function(r,n){return{value:Object.keys(t.cards).filter((function(n){return t.cards[n]._planId===e[0]&&!t.cards[n].checklist&&!t.cards[n].deleted&&"goal"===t.cards[n].type&&t.cards[n].status&&t.cards[n].status===r.value})).length}}))),a=0;r.forEach((function(e){a=e.value+a})),f(a)}),[e.planCards]),i.a.createElement("div",{style:{height:"100%"}},i.a.createElement(c.default,{load:e.load,data:p&&p.toString(),tittle:t,preview:r,icon:s,edit:e.edit,styles:e.styles,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},836:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(64),c=r(67),l=r(69),s=r(117),u=r(10),d=r(106),p=r(9),f=r.n(p),h=r(1),m=r(3);t.default=function(e){var t,r=f()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a=window.location.hash.split("/");a[0]=a[0].replace("#","");var p=m.a.getState().db,g={};return(null===(t=p.cards[a[0]])||void 0===t?void 0:t.customColumns)&&(g=JSON.parse(p.cards[a[0]].customColumns)),o.a.createElement("div",{style:{height:"100%",width:"100%"}},o.a.createElement(d.a,null,(function(t){var d,m,b,y;return o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(c.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement(u.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"flag"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(h.u)("$__goals",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(u.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(u.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(i.a,{title:(null===(d=g)||void 0===d||null===(m=d.goals)||void 0===m?void 0:m.name)?g.goals.name:Object(h.u)("$__goals",1),icon:(null===(b=g)||void 0===b||null===(y=b.goals)||void 0===y?void 0:y.icon)?g.goals.icon:"flag",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),o.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&o.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{alignSelf:"center"}}," ",o.a.createElement("div",{className:"loader"}))),o.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&o.a.createElement(s.a,{data:[].concat(Object(n.a)(p.status.map((function(t,r){return{id:Object(h.u)(t.label,1),label:Object(h.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return p.cards[e]._planId===a[0]&&"goal"===p.cards[e].type&&!p.cards[e].checklist&&!p.cards[e].deleted&&p.cards[e].status&&p.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(h.u)("$__late",1),label:Object(h.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return p.cards[e]._planId===a[0]&&!p.cards[e].checklist&&!p.cards[e].deleted&&"completed"!==p.cards[e].status&&"goal"===p.cards[e].type&&p.cards[e].endDate&&f()(new Date(1e3*p.cards[e].endDate)).tz("America/Sao_Paulo").format()<=f()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(n.a)(p.status.map((function(e){return e.color}))),["red"]),margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&t&&o.a.createElement(l.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},o.a.createElement("h3",null,o.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(h.u)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return p.cards[e]._planId===a[0]&&!p.cards[e].checklist&&!p.cards[e].deleted&&"goal"===p.cards[e].type})).length)),p.status.map((function(t,r){return o.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(u.a,{color:t.color},t.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(h.u)(t.label,1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return p.cards[e]._planId===a[0]&&"goal"===p.cards[e].type&&!p.cards[e].checklist&&!p.cards[e].deleted&&p.cards[e].status&&p.cards[e].status===t.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",fontSize:"14px",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(u.a,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(h.u)("$__late",1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return p.cards[e]._planId===a[0]&&!p.cards[e].checklist&&!p.cards[e].deleted&&"completed"!==p.cards[e].status&&"goal"===p.cards[e].type&&p.cards[e].endDate&&f()(new Date(1e3*p.cards[e].endDate)).tz("America/Sao_Paulo").format()<=f()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},837:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(191),c=r(119),l=r.n(c),s=r(3);t.default=function(e){var t=e.tittle,r=e.preview,a=window.location.hash.split("/");a[0]=a[0].replace("#","");var c=s.a.getState().db,u=Object(n.a)(c.status.map((function(e,t){return{value:Object.keys(c.cards).filter((function(t){return c.cards[t]._planId===a[0]&&!c.cards[t].checklist&&!c.cards[t].deleted&&"guideline"===c.cards[t].type&&c.cards[t].status&&c.cards[t].status===e.value})).length}}))),d=0;return u.forEach((function(e){d=e.value+d})),o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(i.default,{data:d,tittle:t,load:e.load,preview:r,icon:l.a,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))}},838:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(9),c=r.n(i),l=r(1),s=r(67),u=r(69),d=r(10),p=r(189),f=r(119),h=r.n(f),m=r(64),g=r(117),b=(r(164),r(106)),y=r(3);t.default=function(e){var t,r=c()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a=window.location.hash.split("/");a[0]=a[0].replace("#","");var i=y.a.getState().db,f={};return(null===(t=i.cards[a[0]])||void 0===t?void 0:t.customColumns)&&(f=JSON.parse(i.cards[a[0]].customColumns)),o.a.createElement("div",{style:{height:"100%",width:"100%"}},o.a.createElement(b.a,null,(function(t){var b,y,v,x;return o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(s.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},o.a.createElement("div",{style:{width:"40px",height:"40px",alignSelf:"center",display:"flex"}},o.a.createElement(d.a,{size:28,icon:h.a,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey",maxWidth:"30px"}})),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(l.u)("$__guidelines",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(d.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(d.a,{className:"drag-handle",style:{height:"25px",cursor:"move",position:"absolute",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(m.a,{title:(null===(b=f)||void 0===b||null===(y=b.guidelines)||void 0===y?void 0:y.name)?f.guidelines.name:Object(l.u)("$__guidelines",1),icon:(null===(v=f)||void 0===v||null===(x=v.guidelines)||void 0===x?void 0:x.icon)?f.guidelines.icon:h.a,color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),o.a.createElement(p.a,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&o.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{alignSelf:"center"}}," ",o.a.createElement("div",{className:"loader"}))),o.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&o.a.createElement(g.a,{data:[].concat(Object(n.a)(i.status.map((function(e,t){return{id:Object(l.u)(e.label,1),label:Object(l.u)(e.label,1),value:Object.keys(i.cards).filter((function(t){return i.cards[t]._planId===a[0]&&!i.cards[t].deleted&&i.cards[t].type.indexOf("guideline")>-1&&i.cards[t].status&&i.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(l.u)("$__late",1),label:Object(l.u)("$__late",1),value:Object.keys(i.cards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].type.indexOf("guideline")>-1&&i.cards[e].endDate&&c()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=c()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(n.a)(i.status.map((function(e){return e.color}))),["red"]),margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&t&&o.a.createElement(u.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},o.a.createElement("h3",null,o.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(l.u)("$__total",1),": ",Object.keys(i.cards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].type.indexOf("guideline")>-1})).length)),i.status.map((function(e,t){return o.a.createElement("div",{key:"".concat(t,"_").concat(e.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(d.a,{color:e.color},e.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(l.u)(e.label,1))),o.a.createElement("div",null,Object.keys(i.cards).filter((function(t){return i.cards[t]._planId===a[0]&&!i.cards[t].deleted&&i.cards[t].type.indexOf("guideline")>-1&&i.cards[t].status&&i.cards[t].status===e.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(d.a,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(l.u)("$__late",1))),o.a.createElement("div",null,Object.keys(i.cards).filter((function(e){return i.cards[e]._planId===a[0]&&!i.cards[e].deleted&&i.cards[e].type.indexOf("guideline")>-1&&i.cards[e].endDate&&c()(new Date(1e3*i.cards[e].endDate)).tz("America/Sao_Paulo").format()<=c()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},839:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(191),c=r(3);t.default=function(e){var t=e.tittle,r=e.preview,a=e.icon,l=window.location.hash.split("/");l[0]=l[0].replace("#","");var s=c.a.getState().db,u=Object(n.a)(s.status.map((function(e,t){return{value:Object.keys(s.cards).filter((function(t){return s.cards[t]._planId===l[0]&&!s.cards[t].checklist&&!s.cards[t].deleted&&"objective"===s.cards[t].type&&s.cards[t].status&&s.cards[t].status===e.value})).length}}))),d=0;return u.forEach((function(e){d=e.value+d})),o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(i.default,{load:e.load,data:d&&d.toString(),tittle:t,preview:r,icon:a,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)},styles:e.styles}))}},840:function(e,t,r){"use strict";r.r(t);var n=r(22),a=r(0),o=r.n(a),i=r(67),c=r(69),l=r(189),s=r(64),u=r(10),d=r(117),p=(r(164),r(106)),f=r(3),h=r(9),m=r.n(h),g=r(1);t.default=function(e){var t,r=m()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a=window.location.hash.split("/");a[0]=a[0].replace("#","");var h=f.a.getState().db,b={};return(null===(t=h.cards[a[0]])||void 0===t?void 0:t.customColumns)&&(b=JSON.parse(h.cards[a[0]].customColumns)),o.a.createElement("div",{style:{height:"100%",width:"100%"}},o.a.createElement(p.a,null,(function(t){var p,f,y,v;return o.a.createElement("div",{style:{height:"100%"}},o.a.createElement(i.a,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?o.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white",borderBottom:"1px solid #D3D3D3"}},o.a.createElement(u.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"gps_fixed"),o.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(g.u)("$__objectives",1)),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(u.a,{onClick:function(){return e.handleRemoveObject(e.id)},style:{height:"25px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",cursor:"pointer",position:"absolute",right:"20px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"close")),o.a.createElement("div",{onMouseEnter:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0.12)"},onMouseLeave:function(e){e.target.style.backgroundColor="rgba(0, 0, 0, 0)"}},o.a.createElement(u.a,{className:"drag-handle",style:{height:"25px",cursor:"move",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",position:"absolute",right:"62px",top:"8px",border:"1px solid #D3D3D3",padding:"14px"}},"open_with"))):o.a.createElement(s.a,{title:(null===(p=b)||void 0===p||null===(f=p.objectives)||void 0===f?void 0:f.name)?b.objectives.name:Object(g.u)("$__objectives",1),icon:(null===(y=b)||void 0===y||null===(v=y.objectives)||void 0===v?void 0:v.icon)?b.objectives.icon:"gps_fixed",color:e.styles.color?e.styles.color:"grey",style:{background:e.styles.backgroundColor?e.styles.backgroundColor:"white",padding:"12.4px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"}}),o.a.createElement(l.a,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&o.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},o.a.createElement("div",{style:{alignSelf:"center"}}," ",o.a.createElement("div",{className:"loader"}))),o.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&t&&o.a.createElement(d.a,{data:[].concat(Object(n.a)(h.status.map((function(t,r){return{id:Object(g.u)(t.label,1),label:Object(g.u)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===a[0]&&!h.cards[e].checklist&&!h.cards[e].deleted&&"objective"===h.cards[e].type&&h.cards[e].status&&h.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(g.u)("$__late",1),label:Object(g.u)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===a[0]&&!h.cards[e].checklist&&!h.cards[e].deleted&&"completed"!==h.cards[e].status&&"objective"===h.cards[e].type&&h.cards[e].endDate&&m()(new Date(1e3*h.cards[e].endDate)).tz("America/Sao_Paulo").format()<=m()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(n.a)(h.status.map((function(e){return e.color}))),["red"]),margin:{top:17,right:17,bottom:17,left:17},arcLabelsTextColor:{from:"color",modifiers:[["brighter",3]]},innerRadius:.5,padAngle:3,cornerRadius:3,theme:{fontSize:"14px",fontWeight:"bold",legend:!1,background:"transparent"},activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1}))),!e.load&&o.a.createElement(c.a,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},o.a.createElement("h3",null,o.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(g.u)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===a[0]&&!h.cards[e].deleted&&!h.cards[e].checklist&&"objective"===h.cards[e].type})).length)),h.status.map((function(t,r){return o.a.createElement("div",{key:"".concat(r,"_").concat(t.value),style:{color:"black",display:"flex",fontSize:"14px",justifyContent:"space-between",height:"30px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(u.a,{color:t.color},t.icon),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(g.u)(t.label,1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===a[0]&&"objective"===h.cards[e].type&&h.cards[e].status&&!h.cards[e].checklist&&h.cards[e].status===t.value})).length))})),o.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},o.a.createElement("div",{style:{display:"flex"}},o.a.createElement(u.a,{color:"red"},"assignment_late"),o.a.createElement("span",{style:{marginLeft:"15px"}},Object(g.u)("$__late",1))),o.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===a[0]&&!h.cards[e].checklist&&!h.cards[e].deleted&&"completed"!==h.cards[e].status&&"objective"===h.cards[e].type&&h.cards[e].endDate&&m()(new Date(1e3*h.cards[e].endDate)).tz("America/Sao_Paulo").format()<=m()(new Date(r)).tz("America/Sao_Paulo").format()})).length)))))})))}},841:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r(22),o=r(2),i=r(8),c=r(5),l=r(0),s=r.n(l),u=r(9),d=r.n(u),p=r(14),f=r(13),h=r(15),m=r(3),g=r(148),b=r(262),y=r(83),v=(r(164),r(481)),x=r(1),_=r(78);function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function g(){}function b(){}function y(){}var v={};s(v,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(v=_);var w=y.prototype=g.prototype=Object.create(v);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=p;return function(o,i){if(a===f)throw new Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=h,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},j(E.prototype),s(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(w),s(w,l,"Generator"),s(w,i,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=T,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;C(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}t.default=Object(p.b)(null,(function(e){return Object(f.b)(h,e)}))((function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=s.a.useState(!0),u=Object(c.a)(r,2),p=(u[0],u[1]);s.a.useEffect((function(){f()}),[]);var f=function(){var r=Object(i.a)(O().mark((function r(){return O().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(_.f)(Object(o.a)(Object(o.a)({},e),{},{fnIdentification:"Components/Dashboard/Widgers/TaskDoneBar/init()"}),{ids:[t[0]],db:"cards",type:"timer",reqChildrens:!0});case 3:r.sent&&p(!1),r.next=11;break;case 7:r.prev=7,r.t0=r.catch(0),console.log(r.t0),p(!1);case 11:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(){return r.apply(this,arguments)}}(),h=m.a.getState().db,w=Object(l.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month"}),j=Object(c.a)(w,2),E=j[0],k=j[1],S=Object(l.useState)({total:{value:0,label:"Concluidas",color:"#5A7F71",id:"Concluidas"}}),L=Object(c.a)(S,2),C=L[0],I=L[1],T=Object(l.useState)({}),F=Object(c.a)(T,2),D=F[0],N=F[1],A=Object(l.useRef)([{label:"Concluidas",color:"#5A7F71"}]),P=Object(l.useRef)([]),$=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};Object(l.useEffect)((function(){Object.keys(e.filter).length>0&&k(e.filter)}),[e.filter]),Object(l.useEffect)((function(){E.tags&&(P.current=[],E.tags.forEach((function(e){P.current=[].concat(Object(a.a)(P.current),[e.label])})))}),[E]),Object(l.useEffect)((function(){var t,r,a={},i={},c=[],l=E.startDate?d()(1e3*E.startDate):d()().startOf("year"),s=E.endDate?d()(1e3*E.endDate):d()().endOf("year"),u=(t=l.format("MMMM"),r=s.format("MMMM"),t===r);e.planCards&&(Object.keys(e.planCards).filter((function(e){return!h.cards[e].deleted})).forEach((function(e){var t,r,p,f=!((null===E||void 0===E||null===(t=E.users)||void 0===t?void 0:t.length)>0);E.users&&Object.keys(null===(r=h.cards[e])||void 0===r?void 0:r._users).length>0&&Object.values(null===(p=h.cards[e])||void 0===p?void 0:p._users).forEach((function(e){E.users.forEach((function(t){e._id===t&&(f=!0)}))}));if(f){var m,g={date:d()(1e3*(null===(m=h.cards[e].completed_at)||void 0===m?void 0:m.low)),tags:h.cards[e]._tags};if(g.date.isBetween(l,s,null,"[]")){var b,y,v=g.date.format("MMMM");if((null===E||void 0===E||null===(b=E.tags)||void 0===b?void 0:b.length)>0||E.tagsByText)g.tags.filter((function(e){return E.tags&&E.tags.length>0&&e.label&&P.current.includes(e.label)||E.tagsByText&&e.label&&e.label.toLowerCase().indexOf(E.tagsByText.toLowerCase())>-1})).forEach((function(e,t){!function(e,t,r){var l,s,p,f,h,m=t.label,g=d()(e.date).clone(),b=e.date.clone().format("MMMM"),y=g.clone().startOf("month"),v=g.clone().endOf("month"),_=g.clone().startOf("week"),O=g.clone().endOf("week"),w=g.clone().diff(y,"days"),j=Math.floor(w/7)+1;a=Object(o.a)(Object(o.a)({},a),{},Object(n.a)({},m,Object(o.a)(Object(o.a)({},a[m]||{}),{},{id:m,tagCode:m.replace(" ","").replace("#1","").replace("#2","").replace("#3","").replace("#4","").substr(0,5),color:(null===t||void 0===t?void 0:t.color)||$(m),label:m,value:((null===(l=a[m])||void 0===l?void 0:l.value)||0)+1})));var E=u?Object(x.u)("$__week ")+j:Object(x.u)("$__".concat(b));i=Object(o.a)(Object(o.a)({},i),{},Object(n.a)({},m,Object(o.a)(Object(o.a)({},i[m]||{}),{},(h={value:((null===(s=i[m])||void 0===s?void 0:s.value)||0)+1,tag:t.value,index:r+1,label:m,total:((null===(p=i[m])||void 0===p?void 0:p[E])||0)+1},Object(n.a)(h,E,((null===(f=i[m])||void 0===f?void 0:f[u?Object(x.u)("$__week ")+j:Object(x.u)("$__".concat(b))])||0)+1),Object(n.a)(h,E.replace("$__","Period__"),u?{start:_.startOf("day").unix("X"),end:O.endOf("day").unix("X")}:{start:y.startOf("day").unix("X"),end:v.endOf("day").unix("X")}),h)))),c=Object(o.a)(Object(o.a)({},c),{},Object(n.a)({},m,{label:m,color:(null===t||void 0===t?void 0:t.color)||$(m)}))}(g,e)})),A.current=Object.values(c);else a=Object(o.a)(Object(o.a)({},a),{},{total:Object(o.a)(Object(o.a)({},a.total||{}),{},{value:a&&a.total&&a.total.value?a.total.value+1:1,label:"Concluidas",color:"#5A7F71",id:"Concluidas"})}),i=Object(o.a)(Object(o.a)({},i),{},Object(n.a)({},Object(x.u)("$__monthKey"),Object(o.a)(Object(o.a)({},i.total||{}),{},{value:((null===(y=i[v])||void 0===y?void 0:y.value)||0)+1,label:"Concluidas"}))),A.current=[{label:"Concluidas",color:"#5A7F71"}]}}})),C!==a&&(I(Object.values(a)),N(i)))}),[e.planCards,e.load,E]);return s.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},s.a.createElement(y.a,{handleSetSelected:function(t){k(Object(o.a)(Object(o.a)({},E),t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},E),t),{},{id:e.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText"]},tittle:Object(x.u)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,indicators:E||null,handleModal:function(){e.handleDatagridTable()},table:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){k(Object(o.a)({},t)),e.handleSetFilter(Object(o.a)(Object(o.a)(Object(o.a)({},E),t),{},{id:e.id}))}}),s.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),s.a.createElement("div",{style:{}}),s.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},s.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},e.load?s.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},s.a.createElement("div",{style:{alignSelf:"center"}}," ",s.a.createElement("div",{className:"loader"}))):s.a.createElement("div",{className:"component",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},s.a.createElement("div",{style:{width:"100%",flex:1,position:"relative"}},s.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},s.a.createElement(b.a,{data:C,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:40},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,padding:1===C.length?.35:.1,barAriaLabel:function(e){return e.id+": TAG: "+e.label},indexBy:"tagCode",tooltip:function(e){return s.a.createElement(s.a.Fragment,null,Object(x.u)("$__tag"),":",e.data.label)},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}}}))),e.filter.table&&s.a.createElement("div",{style:{maxHeight:"50%",overflow:"scroll"}},s.a.createElement(v.default,{data:Object.values(D),planCards:e.planCards}))))),s.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},s.a.createElement(g.a,{legend:Object(a.a)(A.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))}))},842:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r(2),o=r(22),i=r(5),c=r(0),l=r.n(c),s=r(148),u=r(117),d=r(83),p=r(3),f=r(9),h=r.n(f),m=r(1),g=r(481);r(164);t.default=function(e){var t=p.a.getState().db,r=Object(c.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month"}),f=Object(i.a)(r,2),b=f[0],y=f[1],v=Object(c.useState)({total:{value:0,label:"Concluidas",color:"#5A7F71",id:"Concluidas"}}),x=Object(i.a)(v,2),_=x[0],O=x[1],w=Object(c.useState)({}),j=Object(i.a)(w,2),E=j[0],k=j[1],S=Object(c.useRef)([{label:"Concluidas",color:"#5A7F71"}]),L=Object(c.useRef)([]),C=window.location.hash.split("/");C[0]=C[0].replace("#","");var I=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};l.a.useEffect((function(){Object.keys(e.filter).length>0&&y(e.filter)}),[e.filter]),l.a.useEffect((function(){console.log(b),b.tags&&(L.current=[],b.tags.forEach((function(e){L.current=[].concat(Object(o.a)(L.current),[e.label])})))}),[b]),l.a.useEffect((function(){var r,o,i={},c={},l=[],s=b.startDate?h()(1e3*b.startDate):h()().startOf("year"),u=b.endDate?h()(1e3*b.endDate):h()().endOf("year"),d=(r=s.format("MMMM"),o=u.format("MMMM"),console.log(r,o),r===o);console.log(d);e.planCards&&(Object.keys(e.planCards).filter((function(e){return!t.cards[e].deleted})).forEach((function(e){var r,o,p,f=!((null===b||void 0===b||null===(r=b.users)||void 0===r?void 0:r.length)>0);b.users&&Object.keys(null===(o=t.cards[e])||void 0===o?void 0:o._users).length>0&&Object.values(null===(p=t.cards[e])||void 0===p?void 0:p._users).forEach((function(e){b.users.forEach((function(t){e._id===t&&(f=!0)}))}));if(f){var g,y={date:h()(1e3*(null===(g=t.cards[e].completed_at)||void 0===g?void 0:g.low)),tags:t.cards[e]._tags};if(y.date.isBetween(s,u,null,"[]")){var v,x,_=y.date.format("MMMM");if((null===b||void 0===b||null===(v=b.tags)||void 0===v?void 0:v.length)>0||b.tagsByText)y.tags.filter((function(e){return b.tags&&b.tags.length>0&&e.label&&L.current.includes(e.label)||b.tagsByText&&e.label&&e.label.toLowerCase().indexOf(b.tagsByText.toLowerCase())>-1})).forEach((function(e){!function(e,t){var r,o,s,u=t.label,p=e.date.format("MMMM"),f=h()(e.date).startOf("month"),g=h()(e.date).diff(f,"days"),b=Math.floor(g/7)+1;console.log(b),i=Object(a.a)(Object(a.a)({},i),{},Object(n.a)({},u,Object(a.a)(Object(a.a)({},i[u]||{}),{},{id:u,color:(null===t||void 0===t?void 0:t.color)||I(u),label:u,value:((null===(r=i[u])||void 0===r?void 0:r.value)||0)+1}))),c=Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},u,Object(a.a)(Object(a.a)({},c[u]||{}),{},Object(n.a)({value:((null===(o=c[u])||void 0===o?void 0:o.value)||0)+1,label:u},d?Object(m.u)("$__Semana ")+b:Object(m.u)("$__".concat(p)),((null===(s=c[u])||void 0===s?void 0:s[d?Object(m.u)("$__Semana ")+b:Object(m.u)("$__".concat(p))])||0)+1)))),l=Object(a.a)(Object(a.a)({},l),{},Object(n.a)({},u,{label:u,color:(null===t||void 0===t?void 0:t.color)||I(u)}))}(y,e)})),S.current=Object.values(l);else i=Object(a.a)(Object(a.a)({},i),{},{total:Object(a.a)(Object(a.a)({},i.total||{}),{},{value:i&&i.total&&i.total.value?i.total.value+1:1,label:"Concluidas",color:"#5A7F71",id:"Concluidas"})}),c=Object(a.a)(Object(a.a)({},c),{},Object(n.a)({},_,Object(a.a)(Object(a.a)({},c.total||{}),{},{value:((null===(x=c[_])||void 0===x?void 0:x.value)||0)+1,label:"Concluidas"}))),S.current=[{label:"Concluidas",color:"#5A7F71"}]}}})),_!==i&&(O(Object.values(i)),k(c)))}),[e.planCards,e.load,b]);return l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){y(Object(a.a)(Object(a.a)({},b),t)),e.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},b),t),{},{id:e.id}))},filterConfig:{filterItems:["date","users","tags","tagsByText"]},tittle:Object(m.u)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,indicators:b||null,handleModal:function(){e.handleDatagridTable()},table:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){y(Object(a.a)({},t)),e.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},b),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},e.load?l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}}," ",l.a.createElement("div",{className:"loader"}))):l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"}},l.a.createElement("div",{style:{width:"100%",flex:1,position:"relative"}},l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},l.a.createElement(u.a,{data:_,colors:{datum:"data.color"},margin:{top:35,right:40,bottom:35,left:40},innerRadius:0,padAngle:1.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,padding:1===_.length?.35:.1,axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,format:function(e){return e%1===0?e:""}},theme:{fontSize:"16px",fontWeight:"bold",legend:!1,background:"transparent"}}))),e.filter.table&&l.a.createElement("div",{style:{maxHeight:"50%",overflow:"scroll"}},l.a.createElement(g.default,{data:Object.values(E)}))))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(o.a)(S.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))}},843:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r(2),o=r(22),i=r(5),c=r(0),l=r.n(c),s=r(148),u=r(262),d=r(83),p=(r(164),r(3)),f=r(9),h=r.n(f),m=r(1);t.default=function(e){var t=p.a.getState().db,r=Object(c.useState)({index:0,showQuantity:12,number:12,finalIndex:12,dataStructure:"month"}),f=Object(i.a)(r,2),g=f[0],b=f[1],y=Object(c.useState)({total:{total:0,month:h()().startOf("month").format("MMMM")}}),v=Object(i.a)(y,2),x=v[0],_=v[1],O=Object(c.useRef)(["total"]),w=Object(c.useRef)([]),j=Object(c.useRef)([{label:"Concluidas",color:"#5A7F71"}]),E=Object(c.useRef)([]),k=window.location.hash.split("/");k[0]=k[0].replace("#","");var S=function(e){for(var t=0,r=0;r<e.length;r++)t+=e.charCodeAt(r);return"#"+(t%16777215+16777216).toString(16).slice(1,7)};return Object(c.useEffect)((function(){Object.keys(e.filter).length>0&&b(e.filter)}),[e.filter]),Object(c.useEffect)((function(){console.log(g),g.tags&&(E.current=[],0===g.tags.length&&(O.current=[],w.current=[],j.current=[]),O.current=Object(o.a)(O.current.filter((function(e){return"total"!==e}))),g.tags.forEach((function(e){E.current=[].concat(Object(o.a)(E.current),[e.label])})))}),[g]),Object(c.useEffect)((function(){var r={},i=[],c=[],l=[];if(e.planCards){for(var s=0;s<12;s++){var u=h()().startOf("year").add(s,"month").format("MMMM");r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},u,{}))}console.log(r),Object.keys(e.planCards).forEach((function(e){var s,u,d,p=!((null===g||void 0===g||null===(s=g.users)||void 0===s?void 0:s.length)>0);g.users&&Object.keys(null===(u=t.cards[e])||void 0===u?void 0:u._users).length>0&&Object.values(null===(d=t.cards[e])||void 0===d?void 0:d._users).forEach((function(e){g.users.forEach((function(t){e._id===t&&(p=!0)}))}));if(p){var f,b={date:h()(1e3*(null===(f=t.cards[e].completed_at)||void 0===f?void 0:f.low)),tags:t.cards[e]._tags};if(b.date.isBetween(h()().startOf("year"),h()().endOf("year"))){var y,v=b.date.format("MMMM");r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},v,Object(a.a)(Object(a.a)({},r[v]||{}),{},{total:r&&r[v]&&r[v].total?r[v].total+1:1,month:Object(m.u)("$__".concat(v))}))),(null===g||void 0===g||null===(y=g.tags)||void 0===y?void 0:y.length)>0||g.tagsByText?(b.tags.filter((function(e){return g.tags&&g.tags.length>0&&e.label&&E.current.includes(e.label)||g.tagsByText&&e.label&&e.label.toLowerCase().indexOf(g.tagsByText.toLowerCase())>-1})).forEach((function(e){!function(e,t){var s,u,d=e.date.format("MMMM"),p=t.label;r=Object(a.a)(Object(a.a)({},r),{},Object(n.a)({},d,Object(a.a)(Object(a.a)({},r[d]||{}),{},Object(n.a)({total:((null===(s=r[d])||void 0===s?void 0:s.total)||0)+1,month:e.date.format("MMMM")},p,((null===(u=r[d])||void 0===u?void 0:u[p])||0)+1)))),O.current.includes(p)||(i=i.filter((function(e){return"#5A7F71"!==e})),i=[].concat(Object(o.a)(i),[(null===t||void 0===t?void 0:t.color)||S(p)]),c=[].concat(Object(o.a)(c),[p]),l=l.filter((function(e){return"Concluidas"!==e.label})),l=[].concat(Object(o.a)(l),[{label:p,color:(null===t||void 0===t?void 0:t.color)||S(p)}]))}(b,e)})),O.current=c,w.current=i,j.current=l):(j.current=[{label:"Concluidas",color:"#5A7F71"}],O.current=["total"],w.current=["#5A7F71"])}}}));var d=Object.values(r).filter((function(e){return 0!==Object.keys(e).length}));_(d)}}),[e.planCards,e.load,g]),console.log(x),l.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},l.a.createElement(d.a,{handleSetSelected:function(t){b(Object(a.a)(Object(a.a)({},g),t)),e.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},g),t),{},{id:e.id}))},tittle:Object(m.u)("$__"+e.tittle),icon:e.icon,styles:e.styles,filterConfig:{filterItems:["users","tags","tagsByText"]},datafilter:!0,indicators:g||null,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){b(Object(a.a)({},t)),e.handleSetFilter(Object(a.a)(Object(a.a)(Object(a.a)({},g),t),{},{id:e.id}))}}),l.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),l.a.createElement("div",{style:{}}),l.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},l.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},e.load?l.a.createElement("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},l.a.createElement("div",{style:{alignSelf:"center"}}," ",l.a.createElement("div",{className:"loader"}))):l.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},l.a.createElement(u.a,{data:x,keys:O.current,colors:w.current,indexBy:"month",margin:{top:40,right:20,bottom:30,left:40},padding:.3,valueScale:{type:"linear"},indexScale:{type:"band",round:!1},enableLabel:!1,yScale:{max:100},minValue:0,theme:{fontSize:"14px",color:"white",background:"#f5f5f5",axis:{ticks:{text:{fill:"rgba(0, 0, 0, 0.50)",fontSize:14}}}},fill:[{match:{id:"fries"},id:"dots"},{match:{id:"sandwich"},id:"lines"}],borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:32},axisLeft:e.preview?null:{tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-40},role:"application"})," "))),l.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},l.a.createElement(s.a,{legend:Object(o.a)(j.current.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))}},846:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M.2,11.6H0V17H.2c0,.1,0,.1.1.1H1L18,.4H16.4L1.1,15.7V12.2L12.9.4H11.3L.2,11.6Z"}),a.default.createElement("path",{d:"M.2,11.6H0V17H.2c0,.1,0,.1.1.1H1L18,.4H16.4L1.1,15.7V12.2L12.9.4H11.3L.2,11.6Z"}),a.default.createElement("path",{d:"M0,1V7.1H0c.1,0,.1,0,.1.1H.4a.1.1,0,0,0,.1.1H1L7.1,1.4h0l1-1H.6A.6.6,0,0,0,0,1Z"})),"GuidelineC");t.default=o},847:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M17.8,6.4H18V1H17L0,17.6H1.6L16.9,2.3V5.8L5.1,17.6H6.7L17.8,6.4Z"}),a.default.createElement("path",{d:"M17.8,6.4H18V1H17L0,17.6H1.6L16.9,2.3V5.8L5.1,17.6H6.7L17.8,6.4Z"}),a.default.createElement("path",{d:"M18,17V10.9H17l-6.1,6.1h0l-1,1h7.5A.6.6,0,0,0,18,17Z"})),"GuidelineD");t.default=o},848:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M6.4.2H.6l17,17V16.4L2.3,1.1H5.8L17.6,12.9V11.3L6.4.2Z"}),a.default.createElement("path",{d:"M6.4.2H.6l17,17V16.4L2.3,1.1H5.8L17.6,12.9V11.3L6.4.2Z"}),a.default.createElement("path",{d:"M17,0H10.5l6.1,6.1h0l1,1V.6A.6.6,0,0,0,17,0Z"})),"GuidelineE");t.default=o},849:function(e,t,r){var n=r(84);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(181)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M11.6,17.8h5.8c.1,0,.1,0,.1-.1h-.1L.4,0V1.6L15.7,16.9H12.2L.4,5.1V6.7L11.6,17.8Z"}),a.default.createElement("path",{d:"M11.6,17.8h5.8c.1,0,.1,0,.1-.1h-.1L.4,0V1.6L15.7,16.9H12.2L.4,5.1V6.7L11.6,17.8Z"}),a.default.createElement("path",{d:"M1,18H7.3c0-.1,0-.1.1-.1h.1a.1.1,0,0,0,.1-.1h0a.1.1,0,0,0,.1-.1H7.6a.1.1,0,0,1-.1-.1h0L1.4,10.9h0l-1-1v7.5A.6.6,0,0,0,1,18Z"})),"GuidelineR");t.default=o},850:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(2),a=r(5),o=r(0),i=r.n(o),c=r(884),l=r(147),s=r(157),u=r(33),d=r(392),p=r(1),f=Object(s.a)((function(){return{customColor:{display:"flex",alignItems:"center","& .MuiBadge-badge":{backgroundColor:Object(p.d)("color"),color:Object(p.d)("light"),display:"flex",alignItems:"center",zIndex:"1500 !important"}},root:{"& .MuiBadge-badge":{display:"flex",alignItems:"center",zIndex:20}}}})),h=Object(u.a)((function(e){return{tooltip:{backgroundColor:"#f5f5f9",color:"rgba(0, 0, 0, 0.87)",fontSize:e.typography.pxToRem(12),border:"1px solid #dadde9",borderRadius:"7px",boxShadow:"0 0 3px 3px rgba(0,0,0,0.03)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"1000 !important"}}}))(l.a);function m(e){var t=f(),r=i.a.useState(e.badgeVisible||!1),o=Object(a.a)(r,2),l=o[0],s=o[1],u=e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0;return i.a.createElement("div",{className:t.root},i.a.createElement(h,{title:e.title&&"string"===typeof e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{color:Object(p.d)("darkText"),display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",height:"auto"}},Object(p.u)(e.title,1))):e.title?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:t.customColor},i.a.createElement("div",{style:{position:"relative"}},e.title,e.onClose&&i.a.createElement(c.a,{style:{position:"absolute",left:"5px",top:"0px",zIndex:10,cursor:"pointer"},onClick:function(){return e.onClose()},title:"close"},"close")))):"",className:null,open:u,disableFocusListener:!(!e.tooltipprops||!e.tooltipprops.disableFocusListener)&&e.tooltipprops.disableFocusListener,disableHoverListener:!(!e.tooltipprops||!e.tooltipprops.disableHoverListener)&&e.tooltipprops.disableHoverListener,disableTouchListener:!(!e.tooltipprops||!e.tooltipprops.disableTouchListene)&&e.tooltipprops.disableTouchListene,onClose:function(){e.tooltipprops&&e.tooltipprops.onClose&&e.tooltipprops.onClose()},interactive:!("string"===typeof e.title||!e.tooltipprops||!e.tooltipprops.interactive)&&e.tooltipprops.interactive},i.a.createElement(d.a,{overlap:"rectangular",badgeContent:e.count,style:{opacity:1,fontSize:"5px"},max:e.max||9,anchorOrigin:{vertical:"top",horizontal:"right"},invisible:e.count&&!l},"string"===typeof e.icon?i.a.createElement(c.a,{onMouseEnter:function(){return!e.badgeVisible&&s(!0)},onMouseLeave:function(){return!e.badgeVisible&&s(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(n.a)({width:e.size?e.size:"fit-content",height:e.size?e.size:"fit-content",fontSize:e.size||"22px",color:e.color||Object(p.d)("medium"),opacity:!e.disabled||l?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)},e.icon):i.a.createElement(e.icon,{onMouseEnter:function(){return!e.badgeVisible&&s(!0)},onMouseLeave:function(){return!e.badgeVisible&&s(!1)},onClick:e.onClick?function(t){e.onClick(),t.stopPropagation()}:null,className:e.className,style:Object(n.a)({width:e.size||"22px",height:e.size||"22px",fontSize:e.size||"22px",color:e.color||Object(p.d)("medium"),opacity:!e.disabled||l?"1":"0.5",cursor:e.onClick?"pointer":""},e.style)}))))}}},[[1232,1,2]]]);
//# sourceMappingURL=main.cf886e28.chunk.js.map