MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/public_html/a1b2c3d4/static/js/main.9edb2da5.chunk.js
/*!

=========================================================
* Material Dashboard PRO React - v1.8.0
=========================================================

* Product Page: https://www.creative-tim.com/product/material-dashboard-pro-react
* Copyright 2019 Creative Tim (http://www.creative-tim.com)

* Coded by Creative Tim

=========================================================

* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

*/
/*! For license information please see main.9edb2da5.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[0],{1:function(e,t,r){"use strict";r.d(t,"l",(function(){return P})),r.d(t,"a",(function(){return M})),r.d(t,"b",(function(){return C})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return S})),r.d(t,"g",(function(){return F})),r.d(t,"h",(function(){return E})),r.d(t,"i",(function(){return $})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return A})),r.d(t,"m",(function(){return x})),r.d(t,"n",(function(){return k})),r.d(t,"o",(function(){return I})),r.d(t,"p",(function(){return v})),r.d(t,"q",(function(){return L})),r.d(t,"r",(function(){return N})),r.d(t,"s",(function(){return y})),r.d(t,"t",(function(){return O}));var n=r(8),a=r(7),o=r(2),i=r(0),c=r.n(i),l=r(154),s=r(63),u=r.n(s),d=r(9),p=r.n(d),f=r(3),h=r(20),m=r(34);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(207).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(" ").map((function(e,t){if(e&&e.indexOf("$__")>-1){var n=e.replace("$__","").trim().toLowerCase();if(b&&!r[n]){console.log("add",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}function _(e,t){if(f.a)return x(f.a.getState().session.custom[e],t)||e}function O(e){return!!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function w(){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 j=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},E=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)},k=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}))))},S=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)}}(),L=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}0==a&&(r+=e.substr(n,1))}return r},C=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)}})}))," ")},I=function(e){var t=v(e).split("\n"),r="";return t.map((function(e){e.split(" ").map((function(e){var t=e.split("\n");if(t.length>0)t.map((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},T=function(){var e=f.a.getState().session,t={};return e&&e._access&&(t=e._access),t},F=function(){var e=Object(n.a)(g().mark((function e(t,r){var n,a,o=arguments;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>2&&void 0!==o[2]&&o[2],a=f.a.getState(),a.db,n){e.next=14;break}return e.prev=3,e.next=6,m.a.put("/node/favorite",{_id:r});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.log(e.t0);case 12:e.next=23;break;case 14:return e.prev=14,e.next=17,m.a.delete("/node/favorite/".concat(r));case 17:e.sent,e.next=23;break;case 20:e.prev=20,e.t1=e.catch(14),console.log(e.t1);case 23:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})));return function(t,r){return e.apply(this,arguments)}}(),D=function(e){for(var t=e;1===t.length;)t="0"+t;return t},N=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),"#"+D(r)+D(n)+D(a))},A=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 P(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 $(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 M(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]}},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(804),c=r(104),l=r(1);function s(e){return o.a.createElement(c.a,{title:e.title?Object(l.s)(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(31),a=r(652),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},1052:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},1053:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},1054:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},1055:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},1056:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},1057:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},106:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},1072:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},1073:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},1086:function(e,t,r){"use strict";(function(e){var n,a=r(2),o=r(72),i=r(0),c=r.n(i),l=r(9),s=r.n(l),u=r(60),d=r(15),p=r(3),f=r(13),h=r(14),m=r(85),g=r(161),b=r(592),y=r(104),v=r(10),x=r(295),_=r(31),O=r(594),w=r(1),j=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=t.data&&t.data._id?p.a.getState().db.cards[t.data._id]:{},u=Object.keys(p.a.getState().db.cards).filter((function(e){return p.a.getState().db.cards[e]&&l&&l._parent&&p.a.getState().db.cards[l._parent]&&p.a.getState().db.cards[e]._parent===p.a.getState().db.cards[l._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:l.isDragDisable||t.isDragDisable||!1,inLine:t.inLine||null,className:o.container,selectable:t.showSelected||!1,selected:l._selected||!1,priority:l.priority?i.priority.filter((function(e){return String(e.value)===String(l.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:l._id,module:"cardEdit",activeModule:p.a.getState().db.dataType.filter((function(e){return e.name===l.type}))[0].iniModule||e,data:l}))}}),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"}},l.name?l.name:Object(w.s)("$__new",1),c.a.createElement("div",{style:{fontSize:10,color:"gray"}},Object(w.s)("$__createdAt"),":",Object(w.k)(l.created_at)),c.a.createElement(b.a,{nodeId:l._id})),c.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},c.a.createElement("div",null,Object(w.s)("$__step","*")," ",u.findIndex((function(e){return e._id===l._parent}))+1," ",Object(w.s)("$__of")," ",u.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}},u.map((function(e,t){return c.a.createElement(y.a,{arrow:!0,key:e._id,title:c.a.createElement("div",null,e.name," (",u.findIndex((function(e){return e._id===l._parent}))>t?Object(w.s)("$__completed"):u.findIndex((function(e){return e._id===l._parent}))===t?Object(w.s)("$__".concat(l.status)):Object(w.s)("$__waitingForPreviousStep"),")")},c.a.createElement("div",{key:e._id,style:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({height:7},u.findIndex((function(e){return e._id===l._parent}))>t?{backgroundColor:"#02b915"}:{}),u.findIndex((function(e){return e._id===l._parent}))===t?{backgroundColor:"#00a2e9"}:{}),u.findIndex((function(e){return e._id===l._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.s)("$__".concat(l.status),"*"))},c.a.createElement("div",null,c.a.createElement(v.a,{color:l.status&&p.a.getState().db.status.filter((function(e){return e.value===l.status}))[0].color||null},p.a.getState().db.status.filter((function(e){return e.value===l.status}))[0].icon))))),c.a.createElement("div",{style:{width:"100%",padding:"7px",clear:"both"}},(l.startDate||l.endDate||l.startDate||l.endDate)&&c.a.createElement("div",{className:o.dates},l.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*l.startDate)instanceof Date&&!isNaN(new Date(1e3*l.startDate))?s()(new Date(1e3*l.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(l.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),l.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*l.endDate)instanceof Date&&!isNaN(new Date(1e3*l.endDate))?s()(new Date(1e3*l.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):s()(l.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))),l&&l._users&&Object.keys(l._users).length>1&&c.a.createElement("div",{className:o.usersContent},c.a.createElement("div",{className:o.users},c.a.createElement(x.a,{_id:l._id,data:l,transparent:!0,myDay:!0,limit:3})))),c.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"}},c.a.createElement(g.a,{options:l._tags,showOptions:!0})))))})))}).call(this,r(525)(e))},1087:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},1088:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},1090:function(e,t,r){e.exports=r.p+"static/media/sample.ab31b41d.xlsx"},1091:function(e,t,r){e.exports=r.p+"static/media/sampleoptions.65339041.xlsx"},1100:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},1156:function(e,t,r){e.exports=r(1792)},1166:function(e,t){},118:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},1308:function(e,t,r){},131:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},1411:function(e,t){},1413:function(e,t){},1424:function(e,t){},1426:function(e,t){},1451:function(e,t){},1453:function(e,t){},1454:function(e,t){},1459:function(e,t){},1461:function(e,t){},1467:function(e,t){},1469:function(e,t){},147:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(478),i=r(1116),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)))}},1488:function(e,t){},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}))},1500:function(e,t){},1503:function(e,t){},1564:function(e,t,r){},1565:function(e,t,r){},1578:function(e,t,r){},161: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.l),{},{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.l),{},{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(288),f=r(806),h=r(652),m=r(478),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=s.a.useState([]),_=Object(a.a)(x,2),O=_[0],w=_[1];return s.a.useEffect((function(){return w(u.a.getState().db[e.dbNode?e.dbNode:"tag"]),function(){w([]),v(!1)}}),[e.options]),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)}},O&&O.length>0&&e.options&&e.options.filter((function(e){return e.value})).map((function(t,r){var a=t;if(u.a.getState().db.tag.filter((function(e){return e.value===t.value})).length>0){a=u.a.getState().db.tag.filter((function(e){return e.value===t.value}))[0];var o=O.filter((function(e){return e.value===a.value})).length>0&&O.filter((function(e){return e.value===a.value}))[0].color?O.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.r)(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.s)("$__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"})))))))}},162:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),a=(r(1065),r(34));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=9;break}return n=c.onUploadProgress,e.next=5,a.a.post("upload/file/",s,{onUploadProgress:n});case 5:(i=e.sent)&&(u=i.data),e.next=13;break;case 9:return e.next=11,a.a.post("upload/file/",s);case 11:(l=e.sent)&&(u=l.data);case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),c&&c.onUploadError&&c.onUploadError(e.t0),r(!1);case 19:return e.prev=19,t(!0),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])})));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)}}()},1771:function(e,t){},1773:function(e,t){},1780:function(e,t,r){},1786:function(e,t,r){},1791:function(e,t,r){},1792:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(44),i=r.n(o),c=r(43),l=r(3),s=r(1922),u=r(14),d=r(72),p=r(2),f=r(8),h=r(7),m=r(5),g=r(229),b=r(63),y=r.n(b),v=r(73),x=r.n(v),_=r(9),O=r.n(_),w=r(154),j=(r(1169),r(60)),E=r(1803),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,2),n=r[0],o=(r[1],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),h=d[0],g=d[1],b=a.a.useState(!0),y=Object(m.a)(b,2),v=y[0],x=y[1];a.a.useEffect((function(){setTimeout((function(){x(!1)}),6e3)}),[c]);var _=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:x(!0),g(!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 h?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:!n,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.s)("$__TermsOfUseAndPrivacyPolicy")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},c?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.s)(c?"$__accepted":"$__IReadAndIAgree","*"),text:c?null:Object(S.s)("$__IReadAndIAgree","*"),color:c?"green":Object(S.d)("menu"),icon:"verified",onClick:c?null:function(){s(!0)},size:"25px"}),c?Object(S.s)("$__PrivacyPolicy","*"):a.a.createElement(a.a.Fragment,null)),c&&!v?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(k.a,{id:"termsofuseButtonConsent",title:Object(S.s)("$__IReadAndIAgreeTheTermsOfUse","*"),text:Object(S.s)("$__IReadAndIAgreeTheTermsOfUse","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){_()},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.useState(!0),n=Object(m.a)(r,2),o=(n[0],n[1]),i=a.a.useRef();if(a.a.useEffect((function(){return function(){}}),[]),t&&(!t.require||t.require&&!t.require.licensingAgreement))return a.a.createElement(a.a.Fragment,null);var c=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:o(!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 4: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.s)("$__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:i,onLoad:function(){console.log(i.current,i.current.contentWindow.window),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.s)("$__IReadAndIAgree","*"),text:Object(S.s)("$__IReadAndIAgree","*"),color:Object(S.d)("menu"),icon:"verified",onClick:function(){c()},size:"25px"}))))))})),N=r(29),A=r(30),P=r(36),$=r(37),M=r(466),z=r.n(M),Y=r(1833),B=r(34),R=function(e){Object(P.a)(r,e);var t=Object($.a)(r);function r(e){var n;return Object(N.a)(this,r),(n=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},n}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};B.a.post("/ErrorBoundary/add",{_id:Object(Y.a)(),uid:z.a.MD5(JSON.stringify(r)).toString(),origin:"web",error:r}),console.log({SUPPORT_ID:z.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?a.a.createElement("div",null,Object(S.s)("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(a.a.Component),G=r(478),H=r(1926),W=r(1882),U=(r(1883),r(6)),V=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:U.q[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(p.a)(Object(p.a)({},U.e),{},{minHeight:"50px"}),flex:{flex:1},title:Object(p.a)(Object(p.a)({},U.l),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:U.O,letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:U.O}}),appResponsive:{top:"8px"},primary:Object(p.a)({backgroundColor:U.z[0],color:U.O},U.k),info:Object(p.a)({backgroundColor:U.u[0],color:U.O},U.k),success:Object(p.a)({backgroundColor:U.G[0],color:U.O},U.k),warning:Object(p.a)({backgroundColor:U.N[0],color:U.O},U.k),danger:Object(p.a)({backgroundColor:U.j[0],color:U.O},U.k),list:Object(p.a)(Object(p.a)({},U.l),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:U.O,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:U.O,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:U.O,background:"rgba("+Object(U.r)(U.q[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(U.r)(U.O)+", 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"},U.c),{},{width:U.m},U.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"},U.I),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:U.b,opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:U.O},top:"-2px"}}};Object(G.a)(V);var q=r(1804),X={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 "+U.q[15],padding:"15px 0"},U.l),{},{zIndex:4}),container:Object(p.a)(Object(p.a)({zIndex:3},U.e),{},{position:"relative"}),containerFluid:Object(p.a)(Object(p.a)({zIndex:3},U.f),{},{position:"relative"}),a:{color:U.z[0],textDecoration:"none",backgroundColor:"transparent"},list:{marginBottom:"0",padding:"0",marginTop:"0"},inlineBlock:{display:"inline-block",padding:"0",width:"auto"},whiteColor:{"&,&:hover,&:focus":{color:U.O}}},J=Object(G.a)(X);function K(e){var t,r,n=J(),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(q.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.s)("$__footerDescription",1)?Object(S.s)("$__footerDescription",1):""))))}var Z=r(10),Q=r(757),ee=r.n(Q),te=r(287),re=r.n(te),ne=r(1116),ae=r(31),oe=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"}}},ie=r(385),ce=r.n(ie);var le,se,ue=Object(u.b)((function(e){return{lightbox:e.lightBox}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(oe)((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(!1),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(null),L=Object(m.a)(k,2),C=L[0],I=L[1],T=a.a.useState(null),F=Object(m.a)(T,2),D=(F[0],F[1]),N=a.a.useState(!0),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState(.5),z=Object(m.a)(M,2),Y=z[0];z[1],a.a.useEffect((function(){s||(u(!0),window.addEventListener("keydown",(function(e){B(e)}),!1))})),a.a.useEffect((function(){if(o.open&&o.files.length>0&&o.file&&o.file!==w){g(!0),j(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=e&&e.file?"https://machen.azureedge.net/".concat(e.file):null,i=t.length>0?t[t.length-1]:null;"pdf"===(i?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].viewer:"file":null)&&($(!0),I(r));n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&(n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(i.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(e.file)),setTimeout((function(){g(!1),I(r),D(a)}),1e3)}}),[o]);var B=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.map((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,H("R");else{if(37!==e.keyCode&&38!==e.keyCode)return 27===e.keyCode&&void G();0===t?t=l.a.getState().lightBox.files.length-1:t-=1,H("L")}g(!0),setTimeout((function(){g(!1)}),1e3)}},G=function(){setTimeout((function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}),500),window.removeEventListener("keydown",(function(e){B(e)}),!1)},H=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l.a.getState().lightBox.open&&(g(!0),l.a.getState().lightBox.files.map((function(e,r){e._id===l.a.getState().lightBox.file&&(t=r)})),"R"===v||"R"===r?t+1===l.a.getState().lightBox.files.length?t=0:t+=1:"L"!==v&&"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(){g(!1),x(!1)}),700))};if(!l.a.getState().lightBox.open&&0===l.a.getState().lightBox.files.length)return null;var W=l.a.getState().lightBox.files.filter((function(e){return e._id===w}))[0];if(!W||!W.file)return a.a.createElement(a.a.Fragment,null);var U=W&&W.name?W.name.split("."):null,V=U.length>0?U[U.length-1]:null,q=V?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].viewer:"file":null,X=C,J=W&&W.file?"https://fl.machen.ai/?arq=".concat(W.file.replace("&","||MCH-ECOM||"),"&name=").concat(W.name.replace("&","||MCH-ECOM||")):null,K="https://fls.machen.ai/".concat(encodeURIComponent(W.file),"/name/").concat(encodeURIComponent(W.name));return n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0&&(X=n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].icon?n.fileExtensions.filter((function(e){return e.ext.indexOf(V.toLowerCase())>-1}))[0].icon:"https://machen.azureedge.net/".concat(W.file)),a.a.createElement(R,null,a.a.createElement(ee.a,{onSwipeMove:function(e,t){e.x>100?x("L"):e.x<-100?x("R"):e.y<-100&&G()},onSwipeEnd:function(e){!1!==v&&H()}},a.a.createElement(E.a,{className:t.backdrop,open:l.a.getState().lightBox.open,onClick:function(e){G()}},a.a.createElement("div",{id:"lightBox",className:t.header,style:{zIndex:"9999 !important"},onClick:function(e){G(),e.stopPropagation()}},a.a.createElement("div",{className:t.btClose},a.a.createElement(Z.a,{title:Object(S.s)("$__close","*"),color:Object(S.d)("light"),onClick:function(){G()}},"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()}},h?a.a.createElement("div",{className:t.loader},a.a.createElement(ne.a,null)):"img"===q?a.a.createElement("div",{className:t.img},"string"===typeof C&&(-1===C.indexOf("https://")||C.indexOf("svg")>-1)?a.a.createElement(a.a.Fragment,null,"img"===q&&X&&X.indexOf("svg")>-1&&a.a.createElement("a",{href:J},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},a.a.createElement("img",{src:ce.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Object(S.s)("$__clickHereToDownload",1)))):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:"".concat(X),onError:function(e){return e.target.src=X}})):h||"movie"!==q?h||"microsoft"!==q?h||"text"!==q?!h&&"pdf"===q&&C?a.a.createElement("div",{className:t.embed},P&&a.a.createElement("div",{className:t.loader},a.a.createElement(ne.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(100*Y,"%")}},a.a.createElement(R,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(K),d:!0})))))):h||"audio"!==q?h||"file"!==q?h?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(C)}):a.a.createElement("a",{href:J},a.a.createElement("div",{style:{color:"#FFFFFF",fontWeight:"bolder",fontSize:"22px"}},Object(S.s)("$__clickHereToDownload",1))):a.a.createElement(re.a,{src:C,autoPlay:!0,controls:!0}):a.a.createElement(a.a.Fragment,null,a.a.createElement(R,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(K)}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(R,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(K)}))):a.a.createElement("video",{className:t.movie,src:C,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(Z.a,{title:Object(S.s)("$__previous","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){H("L")}},"keyboard_arrow_left")),a.a.createElement("div",{className:t.rightButtom},a.a.createElement(Z.a,{title:Object(S.s)("$__next","*"),color:Object(S.d)("light"),size:"33px",onClick:function(){H("R")}},"keyboard_arrow_right"))),a.a.createElement("div",{className:t.footer,onClick:function(e){e.stopPropagation()}},a.a.createElement("a",{href:J},a.a.createElement(Z.a,{title:Object(S.s)("$__download","*"),color:Object(S.d)("light"),size:"33px"},"get_app")))))))}))),de=j.b.div(le||(le=Object(d.a)(["\n  position: relative;\n  width: 100%;\n  height: 100%;\n  padding-top: 20px;\n  padding-bottom: 20px;\n"]))),pe=j.b.div(se||(se=Object(d.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 fe(e){return a.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?a.a.createElement(pe,null,a.a.createElement(ne.a,{size:50|e.size})):a.a.createElement(de,null,a.a.createElement(ne.a,null)))}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,null)))};r(1214);var me=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(oe)((function(e){var t=e.classes,r=l.a.getState(),n=(r.db,r.lightBox,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],p=(u[1],a.a.useState(!1)),f=Object(m.a)(p,2),h=(f[0],f[1],a.a.useState(null)),g=Object(m.a)(h,2),b=(g[0],g[1],a.a.useState(null)),y=Object(m.a)(b,2),v=(y[0],y[1],a.a.useState(!0)),x=Object(m.a)(v,2),_=(x[0],x[1],a.a.useState(.5)),O=Object(m.a)(_,2);return O[0],O[1],a.a.useEffect((function(){i||c(!0)})),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(Z.a,{title:Object(S.s)("$__close","*"),color:Object(S.d)("light"),onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX_CLOSE")}},"close"))),a.a.createElement("div",{className:t.content,style:{zIndex:1e3}},d?a.a.createElement("div",{className:t.loader},a.a.createElement(ne.a,null)):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(25),be=r(1884),ye=a.a.forwardRef((function(e,t){var r={root:Object(p.a)(Object(p.a)({},U.l),{},{color:Object(S.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(S.d)("mediumText"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(S.d)("mediumText"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?0:"filled"===Object(S.d)("fieldVariant")?"-15px":0,borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})},n=Object(G.a)(r)();return a.a.createElement(be.a,Object.assign({},e,{ref:t,className:n.root}))})),ve=r(578),xe=r(420),_e=r(579),Oe=r.n(_e),we=r(652),je=r(806),Ee=Object(G.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function ke(e){var t=Ee();return a.a.createElement(we.a,{title:e.title?e.title:""},a.a.createElement(je.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle,style:e.style||{}},a.a.createElement(Z.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Object(S.d)("menu"),icon:e.icon?e.icon:"circle"})))}var Se=r(85),Le=r(161),Ce=r(288),Ie=r(813),Te=r(805),Fe=r(1117),De=r(1810),Ne=r(1115),Ae=r(1886),Pe=r(1885),$e=r(807),Me=r(1114),ze=Object(G.a)((function(e){return{iconButtonStyleTransaparent:Object(p.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(p.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));var Ye=Object(n.memo)((function(e){var t=ze(),r=a.a.useState(!1),o=Object(m.a)(r,2),i=o[0],c=o[1],l=a.a.useRef(null),s=Object(n.useRef)();Object(n.useEffect)((function(){return s.current={mounted:!0},function(){s&&s.current&&s.current.mounted&&(s.current.mounted=!1)}}),[]);var u=function(t){t.preventDefault(),t.stopPropagation(),l.current&&l.current.contains(t.target)||setTimeout((function(){var t;(null===s||void 0===s||null===(t=s.current)||void 0===t?void 0:t.mounted)&&c(!1),e.onClose&&e.onClose()}),150)};function d(t){var r;"Tab"===t.key&&(t.preventDefault(),(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.mounted)&&c(!1),e.onClose&&e.onClose())}return e.options&&0!==e.options.length?a.a.createElement("div",{style:Object(p.a)({zIndex:"100 !important"},e.style?e.style:{}),className:i?"ignoreCardClickAway":""},a.a.createElement(we.a,{title:e.title?e.title:Object(S.s)("$__options",1)},e.text?a.a.createElement(Fe.a,{ref:l,"aria-controls":i?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.mounted)&&c((function(e){return!e})),!i&&e.onOpen&&e.onOpen(),i&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(S.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),a.a.createElement(Z.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):a.a.createElement(je.a,{ref:l,"aria-controls":i?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){var r;(null===s||void 0===s||null===(r=s.current)||void 0===r?void 0:r.mounted)&&c((function(e){return!e})),!i&&e.onOpen&&e.onOpen(),i&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(Z.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),a.a.createElement(Me.a,{open:i,anchorEl:l.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps;t.placement;return a.a.createElement(Ne.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:u},a.a.createElement(Pe.a,{autoFocusItem:i,id:"menu-list-grow",onKeyDown:d,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return a.a.createElement(Ae.a,{key:r,style:{color:t&&t.color?t.color:Object(S.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.forceStopPropagation||u(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},a.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?a.a.createElement(Ie.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)):a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},a.a.createElement(Z.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(S.d)("menu")})),!t.render&&a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.s)(t.name,1))))}))))))}))):a.a.createElement(a.a.Fragment,null)})),Be=r(592),Re=r(1113),Ge=r(1066),He=r.n(Ge),We=r(56);function Ue(){Ue=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 Ve=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var qe=Object(u.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().session,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=Boolean(o);a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{period:"$__last7Days",dashboard:Object(p.a)(Object(p.a)({},l.a.getState().session),{},{period:"$__last7Days"})}))}}),[]);var s=function(){var t=Object(f.a)(Ue().mark((function t(r){var n;return Ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(null),"string"!==typeof r){t.next=7;break}return e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{period:r,dashboard:Object(p.a)(Object(p.a)({},l.a.getState().session),{},{period:r})})),n=(n=String(r).replace("$__last","")).replace("Days",""),t.next=7,Object(We.d)(e,n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(je.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){i(e.currentTarget)},style:Object(p.a)({},e.style?e.style:{})},a.a.createElement(He.a,null)),a.a.createElement(Re.a,{id:"long-menu",anchorEl:o,keepMounted:!0,open:c,onClose:s,PaperProps:{style:{maxHeight:216,width:"20ch"}}},Ve.map((function(e){return a.a.createElement(Ae.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return s(e)}},Object(S.s)(e,1))}))))}));function Xe(){Xe=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 Je=Object(G.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(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("colorText"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));var Ke=function(e){var t,r=l.a.getState(),n=r.session,o=r.functions,i=r.db,c=o.socket,s=Je(),u=a.a.useState((null===(t=e.title)||void 0===t?void 0:t.trim())||null),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(!1),O=Object(m.a)(_,2),w=O[0],j=O[1];a.a.useEffect((function(){"0"===String(e.unlockedPrivates)&&w&&j(!1)}),[e.unlockedPrivates]),a.a.useEffect((function(){!e.title&&e.editable&&x(!0)}),[e.title]);var E=function(){var t=Object(f.a)(Xe().mark((function t(r){return Xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&c.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(p.a)({_id:e._id},r)),e.onEdit&&e.onEdit(h,e._id?e._id:null)}catch(n){console.log(n)}x(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:s.header,style:Object(p.a)(Object(p.a)({minHeight:e.style&&e.style.minHeight?e.style.minHeight:"30px"},e.style),e.backClick?{cursor:"pointer"}:{})},a.a.createElement("div",{className:!e.onExpanding||v?s.content:s.contentWithExpand},a.a.createElement("div",{className:s.info},!e.private||l.a.getState().controls.lockPrivate||w?a.a.createElement(a.a.Fragment,null,e.icon&&a.a.createElement("div",{className:s.headerIcon,style:Object(p.a)({color:e.color?e.color:Object(S.d)("colorText")},e.backClick?{cursor:"pointer"}:{})},a.a.createElement(Se.a,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:e.icon,color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),e.searchText?a.a.createElement("div",{style:Object(p.a)({marginLeft:"7px"},e.searchTextStyle?e.searchTextStyle:{})},Object(S.b)(e.title?e.title:"",e.searchText,!!e.dark)):a.a.createElement("div",{className:s.headerTitle,style:Object(p.a)(Object(p.a)({fontSize:e.fontSize?e.fontSize:"14px",color:e.color?e.color:Object(S.d)("colorText"),marginLeft:e.icon?"7px":"none"},e.textStyle?e.textStyle:{}),e.backClick?{cursor:"pointer"}:{}),onClick:e.backClick?function(t){e.backClick(),t.stopPropagation()}:null},v?a.a.createElement("div",{style:Object(p.a)({position:"relative",float:"left",width:"100%",paddingTop:"10px",paddingLeft:"7px",display:"flex",alignItems:"center",justifyContent:"space-between"},e.inputStyle?e.inputStyle:{}),onClick:function(e){e.stopPropagation()}},a.a.createElement(ye,{style:{width:"calc(100% - 60px)"},label:e.fieldName?e.fieldName:Object(S.s)("$__nameOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){g(e.target.value)},onKeyDown:function(t){var r;(13===t.keyCode&&h&&E({name:h}),27===t.keyCode)&&(x(!1),g(e.value?e.value:e.title?null===(r=e.title)||void 0===r?void 0:r.trim():""))}},value:h,placeholder:Object(S.s)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),a.a.createElement(Se.a,{color:Object(S.d)("medium"),onClick:function(){return v?x(!1):e.onCancel()},icon:"cancel",title:Object(S.s)("$__close","*"),size:e.actionsSize||"25px"}),a.a.createElement(Se.a,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){v?E({name:h}):e.onSave()},title:Object(S.s)("$__save"," * "),size:e.actionsSize||"25px"})):a.a.createElement(we.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},a.a.createElement("div",{style:Object(p.a)({},e.expanded?{width:"100%"}:{width:"100%",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:e.viewAllName&&!0===e.viewAllName?"":"nowrap"}),onDoubleClick:function(){var t;e.onEdit&&e.editable&&(g(e.value?e.value:e.title?null===(t=e.title)||void 0===t?void 0:t.trim():""),x(!0))}},"".concat(e.showOrder?"".concat(e.showOrder,". "):"").concat(e.title&&e.title.indexOf("$__")>-1?Object(S.s)(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):""))))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:s.headerIcon,style:{color:"lightgray"}},a.a.createElement(Se.a,{overlap:"rectangular",size:"calc(".concat(e.fontSize," + 4px)")||!1,icon:"private_connectivity",color:"parent",title:e.iconTitle?e.iconTitle.substring(0,1).toUpperCase().concat(e.iconTitle.substring(1)):""})),a.a.createElement("div",{style:{marginLeft:"7px",fontSize:12,color:"lightgray"}},e.privateTitle?e.privateTitle:Object(S.s)("$__privateActivity")))),e.periodFilter&&n&&n.period&&a.a.createElement("div",{style:{position:"absolute",right:0,textAlign:"right",color:"#FFFFFF",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},Object(S.s)(n.period),a.a.createElement(qe,{style:{color:"#FFFFFF",height:"20px",width:"20px"}}))),!v&&a.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()}},!e.moreButton&&a.a.createElement(Be.a,{nodeId:e._id}),e.moreButton&&a.a.createElement("div",{style:{position:"absolute",top:0,right:0,display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation()}},!e.private||l.a.getState().controls.lockPrivate||w?a.a.createElement(a.a.Fragment,null,e.colorPicker&&a.a.createElement("div",{style:{zIndex:1e3}},a.a.createElement(Ce.a,{color:e._id&&i.cards[e._id]&&i.cards[e._id].color?i.cards[e._id].color:null,_id:e._id,onChange:function(t){e.colorPicker(t)},style:{zIndex:5e3}})),e.options&&e.options.length>0&&e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0})).length>0&&a.a.createElement(we.a,{title:Object(S.s)(e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].name)},a.a.createElement(je.a,{onClick:function(t){e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].onClick()},className:s.iconButtonStyle},a.a.createElement(Z.a,{size:"22px",color:Object(S.d)("menu"),icon:e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].icon,usePropagation:!0}))),e.options&&e.options.filter((function(e){return e&&e.show&&"fixed"===e.show})).length>0?e.options.filter((function(e){return e&&e.show&&"fixed"===e.show})).map((function(e,t){return a.a.createElement(we.a,{key:"opt".concat(t),title:Object(S.s)(e.name)},a.a.createElement(je.a,{onClick:function(){return e.onClick()},className:s.iconButtonStyle},a.a.createElement(Z.a,{size:"22px",color:e.color||Object(S.d)("menu"),icon:e.icon,usePropagation:!0})))})):a.a.createElement(a.a.Fragment,null),!e.noExpanding&&e.onExpanding&&a.a.createElement(we.a,{title:Object(S.s)(e.isExpanded?"$__collapse":"$__expand")},a.a.createElement(je.a,{onClick:function(t){e.onExpanding()},className:s.iconButtonStyle},a.a.createElement(Z.a,{size:"22px",color:Object(S.d)("menu"),icon:e.isExpanded?"expand_less":"expand_more",usePropagation:!0}))),e.options&&e.options.length>0&&a.a.createElement(Ye,Object.assign({noButton:!0,options:[].concat(Object(ge.a)(e.options),Object(ge.a)(e.private&&w?[{color:"lightblue",icon:"lock",name:"$__lockThisPrivateCard",onClick:function(){j((function(e){return!e})),e.setPrivate&&e.setPrivate(!w)},show:"hover"}]:[]))},e.optionsProps?e.optionsProps:{}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{title:Object(S.s)("$__showPrivateActivity","*"),color:"lightGray",icon:"lock_open",onClick:function(){j((function(e){return!e})),e.setPrivate&&e.setPrivate(!w)},size:"21px",style:{padding:"0px !important"}})))))},Ze={button:Object(p.a)(Object(p.a)({},U.l),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(p.a)(Object(p.a)({},U.l),{},{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"}},Qe=Object(G.a)(Ze),et=function(e){var t,r,n=Qe(),o=e.text,i=x()((t={},Object(h.a)(t,n.button,!0),Object(h.a)(t,n.reverse,!!e.reverse),t)),c=x()((r={},Object(h.a)(r,n.buttonText,!0),Object(h.a)(r,n.reverse,!!e.reverse),r));return a.a.createElement("div",{className:e.text?c:i,onClick:function(){return e.onClick?e.onClick():null},style:Object(p.a)({},e.style)},a.a.createElement("div",{className:n.iconButton,style:{color:e.iconColor?Object(S.d)(e.iconColor):Object(S.d)("color"),backgroundColor:e.iconBackground?Object(S.d)(e.iconBackground):"none"}},e.icon?a.a.createElement(Se.a,{className:e.iconBackground?n.icon:n.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(p.a)({},e.style?e.style:{})}):a.a.createElement(Se.a,{className:e.iconBackground?n.icon:n.onlyIcon,icon:"stop_circle",color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(p.a)({},e.style?e.style:{})})),o&&a.a.createElement("div",{className:n.text,style:{color:e.textColor?Object(S.d)(e.textColor):Object(S.d)("medium")}},o))},tt=r(295),rt=r(323),nt=r.n(rt),at=r(22),ot=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:{}}};r(688);function it(){it=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(689);var ct=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ot)((function(e){var t=e.classes,r=(l.a.getState().functions.socket,a.a.useState(!1)),n=Object(m.a)(r,2),o=(n[0],n[1]),i=a.a.useState(""),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(0),h=Object(m.a)(d,2),g=h[0],b=h[1],y=e.timer||{},v=e.data||{},x=function(){var e=Object(f.a)(it().mark((function e(t,r){var n;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!0),n=String(g),(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)),b(n);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();if(!v)return null;var _=function(){var t=Object(f.a)(it().mark((function t(){var r,n;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||s?(r=isNaN(g)?g.replace(",","."):g,n=Object(p.a)(Object(p.a)({_id:Object(Y.a)(),cardId:v._id,idRel:v._id,value:e.PositiveValue?r:"-".concat(r),type:"kpi"},e.manualEntry?{manualEntry:!0}:{}),{},{kpi_type:v.kpi_type?v.kpi_type:null,message:s||""}),e.timer&&(n=Object(p.a)(Object(p.a)({},n),{},{value:y.diff,ini:y.created_at,fin:y.updated_at,type:"timer",kpi_type:"timer",to:y.to})),B.a.post("timeline/add",Object(p.a)({},n)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&Object(at.v)(e,v._id,y._id),b(0),u("")):Object(S.c)({message:Object(S.s)("$__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?a.a.createElement("div",{className:t.dataSave},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__new",1)),!e.timer&&a.a.createElement(ye,{placeholder:Object(S.s)("$__value",1),value:Object(S.h)(g||0,"time"===v.kpi_type?"number":v.kpi_type,v.kpi_currency?v.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){x(e,"ini")}}}),a.a.createElement(ye,{multiline:!0,placeholder:Object(S.s)("$__description",1),onChange:function(e){return u(e.target.value)},value:s,InputProps:{autoComplete:"new-password"}}),a.a.createElement("div",{style:{display:"flex",textAlign:"right"}},a.a.createElement(k.a,{title:Object(S.s)("$__save",1),color:"green",icon:"save",onClick:function(){return _()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&a.a.createElement(k.a,{title:Object(S.s)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(){e.callBack&&e.callBack()},size:"25px",transparent:!0})))):a.a.createElement("div",null,"NO DATA RECEIVED")}))),lt=r(1887),st=r(1888),ut=r(1889),dt=r(49),pt=r(162);function ft(){ft=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 ht=function(){var e=Object(f.a)(ft().mark((function e(t,r){var n,a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/M_User_List_V3",{id:r});case 3:if(!(n=e.sent)||!n.data){e.next=9;break}return a={},n.data.map(function(){var e=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},t.data._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.users&&l.a.getState().db.users[t.data._id]?l.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!==l.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(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)(Object(p.a)({},l.a.getState().db.users),a)})),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)}}(),mt=function(){var e=Object(f.a)(ft().mark((function e(t,r){var n,a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.a.post("/UsersList",{id:r});case 3:if(!(n=e.sent)||!n.data){e.next=9;break}return a={},n.data.map(function(){var e=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},t.data._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.users&&l.a.getState().db.users[t.data._id]?l.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!==l.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(p.a)(Object(p.a)({},l.a.getState().db),{},{users:Object(p.a)(Object(p.a)({},l.a.getState().db.users),a)})),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)}}(),gt=function(){var e=Object(f.a)(ft().mark((function e(t){var r,n,a,o,i,c,s,u;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket),n=l.a.getState(),a=n.sideModule,o=a.data,i=l.a.getState().db[a.db][a.id]||{},(c=window.location.hash.split("/"))[0]=c[0].replace("#",""),"user"===o.type&&c&&c.length>2&&c[2]&&36===c[2].length&&(o.type="user",o._parent=c[2]),Object.keys(o).forEach((function(e){(o[e]&&o[e].low||o[e]&&o[e].low&&"0"===String(o[e].low))&&(o[e]=o[e].low)})),s=o.file||null,delete o.file,"new"!==o._id&&o._id){e.next=21;break}return e.prev=11,r.emit("data",{module:"user",method:"post",action:"add"},Object(p.a)(Object(p.a)({},o),{},{oldData:i}),function(){var e=Object(f.a)(ft().mark((function e(n){var a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o._id=n.id,o._token={_id:n.tokenId},!s){e.next=8;break}return e.next=5,Object(pt.a)(o._id,s);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=o.image;case 9:a=e.t0,o.image=a,yt(t,o),r.emit("data",{module:"user",method:"put",action:"update"},Object(p.a)(Object(p.a)({},o),{},{image:a,oldData:i})),t.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:n.id,data:Object(p.a)(Object(p.a)({},l.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(!s){e.next=27;break}return e.next=24,Object(pt.a)(o._id,s);case 24:e.t1=e.sent,e.next=28;break;case 27:e.t1=o.image;case 28:return u=e.t1,(s&&u||!s)&&(yt(t,o),t.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{id:o._id,data:Object(p.a)(Object(p.a)({},l.a.getState().sideModule.data),{},{_id:o._id})})),r.emit("data",{module:"user",method:"put",action:"update"},Object(p.a)(Object(p.a)({},o),{},{image:u,oldData:i}))),e.abrupt("return",!0);case 31:case"end":return e.stop()}}),e,null,[[11,16]])})));return function(t){return e.apply(this,arguments)}}(),bt=function(){var e=Object(f.a)(ft().mark((function e(t){var r,n,a,o;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket),n=l.a.getState(),a=n.sideModule,o=a.data,r.emit("data",{module:"user",method:"post",action:"access"},{_id:o._id,email:o.email,name:o.name,access:o._access,safety:o._safety},function(){var e=Object(f.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(h.a)({_id:o._id},o._id,Object(p.a)({},o)));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)}}(),yt=function(e,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._id,Object(p.a)(Object(p.a)({},l.a.getState().db.users[t._id]||{}),t||{})))}))},vt=function(e,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._id,Object(p.a)({},t[t._id]?t[t._id]:{})))}))};function xt(e){return _t.apply(this,arguments)}function _t(){return(_t=Object(f.a)(ft().mark((function e(t){var r;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.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,dt.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 Ot(e){return wt.apply(this,arguments)}function wt(){return(wt=Object(f.a)(ft().mark((function e(t){var r;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.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,dt.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 jt(e){return Et.apply(this,arguments)}function Et(){return(Et=Object(f.a)(ft().mark((function e(t){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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 kt(e,t){return St.apply(this,arguments)}function St(){return(St=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.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 Lt(e,t){return Ct.apply(this,arguments)}function Ct(){return(Ct=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.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 It=function(e,t,r,n,a){var o,i=l.a.getState().db.users[t]?l.a.getState().db.users[t]:a;o=(e&&e.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket);var c=l.a.getState().db;return Object(at.c)(e,{cardId:n,userId:t,access:r,userData:{_id:t,name:i.name,image:i.image?i.image:null}}),o.emit("data",{module:"cards",method:"post",action:"access"},{cardType:c.cards[n].type,cardId:n,parentUser:c.cards[n]._parent,userId:t,access:r,userData:{_id:t,name:i.name,image:i.image?i.image:null}},function(){var e=Object(f.a)(ft().mark((function e(t){return ft().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},Tt=function(){var e=Object(f.a)(ft().mark((function e(t,r,n){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.a.post("/card/groupAccess",{groupId:r,cardId:n}),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)({},n,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[n]),{},{_groups:Object(p.a)(Object(p.a)({},l.a.getState().db.cards[n]._groups||{}),{},Object(h.a)({},r,{_id:r}))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Ft=function(){var e=Object(f.a)(ft().mark((function e(t,r,n){var a;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.a.post("/card/groupAccessRemove",{groupId:r,cardId:n}),delete(a=l.a.getState().db.cards[n]._groups)[r],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)({},n,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[n]),{},{_groups:a})))}));case 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Dt=function(){var e=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(p.a)({},r)),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Nt=function(){var e=Object(f.a)(ft().mark((function e(t,r){return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t&&t.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"userParam"},Object(p.a)({},r),function(){var e=Object(f.a)(ft().mark((function e(t){return ft().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 At=function(e){var t=l.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)},Pt=function(e){try{return B.a.delete("/user/unique/".concat(e)),!0}catch(t){return console.log(t),!1}};function $t(){$t=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 Mt=Object(G.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 zt=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i,c=Mt(),s=a.a.useRef(null),u=a.a.useState(!1),d=Object(m.a)(u,2),g=d[0],b=d[1],y=e.data,v=l.a.getState(),x=v.db,_=v.session,O=v.sideModule,w=a.a.useState(e.selected?e.selected:[]),j=Object(m.a)(w,2),E=j[0],k=j[1],L=a.a.useState(""),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.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)),D=Object(m.a)(F,2),N=D[0],A=D[1],P=a.a.useState(!(!e.selectedShow||!String(null===(n=e.selectedShow)||void 0===n?void 0:n.external))&&(null===(o=e.selectedShow)||void 0===o?void 0:o.external)),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useRef();a.a.useEffect((function(){return Y.current=!0,function(){Y.current=!1}}),[]),a.a.useEffect((function(){e.selected&&JSON.stringify(e.selected)!==JSON.stringify(E)&&Y.current&&k(e.selected)}),[e.selected]);var B=e.admins?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=l.a.getState(),n=r.db,a={};if(Object.keys(n.users).filter((function(e){return!n.users[e]._parent&&n.users[e]._access&&n.users[e]._access.admin})).map((function(e){a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e,n.users[e]))})),(!e||e&&!e.isArray)&&a){var o={};return Object.keys(a).forEach((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&(o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,a[e])))})),o}if(e&&e.isArray&&a){var i=[];return Object.keys(a).forEach((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&0===i.filter((function(t){return t._id===e})).length&&i.push(a[e])})),i}return{}}(y&&y._id?y._id:null,null,{onlyCard:!(!y||!y._id)}):Object(at.u)(y&&y._id?y._id:null,{onlyCard:!(!y||!y._id),all:!0,allPlataform:e.allPlataform||!1}),R=O&&O.id?Object(at.t)(O.id):0,G=function(){var t=Object(f.a)($t().mark((function t(r){var n;return $t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=Array.from(E),e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],Y.current&&k(n),e.onSelect&&e.onSelect(n),e.multiple||Y.current&&b(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(t){var r=t.pr,n=t.selected,o=B[r];return o?a.a.createElement(Ae.a,{autoFocus:!1,onClick:function(e){G(r),e.preventDefault(),e.stopPropagation()},className:"ignoreClickAway"},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center",cursor:"pointer",pointerEvents:"none"}},a.a.createElement(Ie.a,{alt:o.name||null,src:o.image||null,style:Object(p.a)({},e.avatarSize?{width:e.avatarSize,height:e.avatarSize}:{})},o&&o.name?o.name.substr(0,1):""),a.a.createElement("div",{style:{marginLeft:"15px",color:"black"}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},className:"ignoreClickAway"},o.name||o.name),a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center"}},o._parent&&x.users[o._parent]&&x.users[o._parent].image?a.a.createElement("div",{style:{position:"relative",bottom:-4,right:-7,width:17,height:17,borderRadius:"50%",backgroundImage:"url(".concat(x.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null),o._parent&&x.users[o._parent]&&x.users[o._parent].name?a.a.createElement("div",{style:{position:"relative",float:"left",fontSize:11,color:"lightgray",marginLeft:7}},x.users[o._parent].name):a.a.createElement(a.a.Fragment,null)),n?a.a.createElement("div",{style:{position:"absolute",right:0,top:0,bottom:0,alignItems:"center",justifyContent:"center",display:"flex"}},0===E.indexOf(o._id)?a.a.createElement("div",null,a.a.createElement(Z.a,{icon:"admin_panel_settings",color:"lightgray"})):a.a.createElement(a.a.Fragment,null),a.a.createElement(Z.a,{icon:"check",color:"green"})):a.a.createElement(a.a.Fragment,null)))):a.a.createElement(a.a.Fragment,null)};return a.a.createElement("div",null,a.a.createElement(Fe.a,{ref:s,"aria-controls":g?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!y||e.permission||y&&B&&B[_._id]&&B[_._id].access&&parseInt(B[_._id].access)>2||R>3)&&b(!0)},className:e.transparent?c.iconButtonStyleTransaparent:c.iconButtonStyleWhite},E&&0===E.length?Object(S.s)(e.text||"$__selectUser"):a.a.createElement("div",null,a.a.createElement(lt.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},null===E||void 0===E||null===(i=E.filter((function(e){return e&&l.a.getState().db.users[e]})))||void 0===i?void 0:i.map((function(t){var r,n,o,i;return a.a.createElement(we.a,{key:t,title:l.a.getState().db.users[t]&&l.a.getState().db.users[t].displayName?l.a.getState().db.users[t].displayName:(null===(r=l.a.getState().db.users[t])||void 0===r?void 0:r.name)||""},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Ie.a,{alt:l.a.getState().db.users[t].name||"",src:l.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=l.a.getState().db.users[t])||void 0===n||null===(o=n.name)||void 0===o?void 0:o.substr(0,1))||""),!e.multiple&&a.a.createElement("span",{style:{marginLeft:15}},l.a.getState().db.users[t].displayName?l.a.getState().db.users[t].displayName:(null===(i=l.a.getState().db.users[t])||void 0===i?void 0:i.name)||"")))})),e.multiple&&a.a.createElement(we.a,{title:Object(S.s)(e.text||"$__selectUser")},a.a.createElement(Ie.a,{style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"},alt:"ADD",src:null},"+"))))),a.a.createElement(st.a,{open:g},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"space-between"}},a.a.createElement(De.a,{onClickAway:function(e){s.current&&s.current.contains(e.target)||Y.current&&b(!1)}},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative"}},a.a.createElement(ye,{id:"quickUser_Search",label:Object(S.s)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"searchValue",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end",style:{cursor:"pointer"},onClick:function(){T(""),b(!1)}},a.a.createElement(Z.a,{icon:"close"})),onChange:function(e){T(e.target.value)}},value:I,placeholder:Object(S.s)("$__searchByName",1),autoFocus:!0})),a.a.createElement("div",{style:{display:"flex",padding:"0px 15px",fontSize:12,marginTop:-5}},a.a.createElement("div",{style:{border:"solid 1px ".concat(N?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",borderRadius:10,backgroundColor:"".concat(N?"#585858":"lightGray"),color:Object(S.r)(N?"#585858":"#d3d3d3",!0)},onClick:function(){A((function(e){return!e}))}},Object(S.s)("$__showInternal")),a.a.createElement("div",{style:{border:"solid 1px ".concat(M?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",marginLeft:7,borderRadius:10,backgroundColor:"".concat(M?"#585858":"lightGray"),color:Object(S.r)(M?"#585858":"#d3d3d3",!0)},onClick:function(){z((function(e){return!e}))}},Object(S.s)("$__showExternals"))),a.a.createElement("div",{style:{width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray",position:"relative",maxHeight:250,overflowY:"auto"}},a.a.createElement(Pe.a,{id:"menu-list-grow",autoFocusItem:!1,autoFocus:!1,onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),Y.current&&b(!1))}},Object.keys(B).filter((function(e){return!(B[e].deleted||!(""===I||I&&B[e].name&&B[e].name.toLowerCase().indexOf(I.toLowerCase())>-1)||!(!M&&"external"!==B[e].type||M&&"external"===B[e].type||!N&&"user"!==B[e].type||N&&"user"===B[e].type))})).sort((function(e,t){return B[e].name<B[t].name?-1:B[e].name>B[t].name?1:0})).filter((function(e){return B&&B[e]&&B[e]._id})).map((function(e){return a.a.createElement(H,{pr:e,key:e,selected:-1!==E.indexOf(B[e]._id)})})))))))))})),Yt=r(593);function Bt(){Bt=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(689);var Rt,Gt,Ht=Object(u.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ot)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.db,i=n.session,c=o.cards,s=a.a.useState(!1),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({}),_=Object(m.a)(x,2),w=_[0],j=_[1],E=e.data,L=a.a.useState([]),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.a.useState(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT06:00")),D=Object(m.a)(F,2),N=D[0],A=D[1],P=a.a.useState(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT07:00")),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useState(!1),B=Object(m.a)(Y,2),G=B[0],H=B[1],W=a.a.useState(0),U=Object(m.a)(W,2),V=U[0],q=U[1],X=a.a.useState(1),J=Object(m.a)(X,2),K=J[0],Q=J[1],ee="time"===E.kpi_type&&E.kpi_ini?parseFloat(E.kpi_ini):0,te="time"===E.kpi_type&&E.kpi_fin?parseFloat(E.kpi_fin):0;a.a.useEffect((function(){t&&clearTimeout(t),ae(),ne(e.data._id)}),[y]),a.a.useEffect((function(){t&&clearTimeout(t),ae(),ne(e.data._id)}),[JSON.stringify(e.card[e.data._id])]);var re=[e.data._id],ne=function e(t,r){var n=Object.keys(c).filter((function(e){return c[e].kpi_useParent&&c[e]._parent===t}));return n.length>0?n.forEach((function(t){e(t,!0),re.push(t),T(Array.from(new Set(re)))})):r||T(re),n},ae=function(){var t=Object(p.a)({},l.a.getState().db.cards[e.data._id]);if(t&&t._kpiTimer&&Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id})).length>0){var r=Object(p.a)({},t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id}))[0]]);r.diff=O()().tz("America/Sao_Paulo").unix("x")-r.created_at,r&&r.updated_at&&(r.diff=parseInt(r.updated_at)-parseInt(r.created_at)),oe(r,!!r.updated_at)}else h(!1),j({}),v(!1);0===Object.keys(w).length&&e.manualAdd&&(j({created_at:O()(N).tz("America/Sao_Paulo").unix("X"),updated_at:O()(M).tz("America/Sao_Paulo").unix("X")}),oe({created_at:O()(N).tz("America/Sao_Paulo").unix("X"),updated_at:O()(M).tz("America/Sao_Paulo").unix("X")},!!w.updated_at))},oe=function(e,r){var n,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object(p.a)({},e),i=!1;if(o.diff?n=parseInt(o.diff):(n=parseInt(e.updated_at-e.created_at),e.updated_at-e.created_at<0&&(n=null)),n||G)if(n<60)o.diffText="".concat(o.diff," ").concat(Object(S.s)("$__seconds",1)),a||Q(0);else if(n>=3600){var c=Math.trunc(n/3600);n-=3600*c;var l=Math.trunc(n/60)>0?Math.trunc(n/60):0,s=(n-=60*l)>0?n:0;o.diffText="".concat(c," hora").concat(c>1?"s":""," ").concat(l," ").concat(Object(S.s)("$__minutes",1)," ").concat(s," ").concat(Object(S.s)("$__seconds",1)),a||(Q(c),q(l))}else{var u=Math.trunc(n/60)>0?Math.trunc(n/60):0,f=(n-=60*u)>0?n:0;o.diffText="".concat(u," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1)),a||(Q(0),q(u))}else o.diffText=Object(S.s)("$__theEndMustBeGreaterThanTheBeginning");j(Object(p.a)(Object(p.a)({},w),o)),e.updated_at?(o.diff=parseInt(e.updated_at)-parseInt(e.created_at),d||h(!0)):(o.diff=O()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),y||(v(!0),i=!0)),r||e.updated_at||!i||(t=setTimeout((function(){ae()}),1e3))};if(!E)return null;var ie=function(){var t=Object(f.a)(Bt().mark((function t(){var r;return Bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(at.w)(e,E._id);case 2:(r=t.sent)&&(oe(r),v(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ce=function(){var t=Object(f.a)(Bt().mark((function t(){var r;return Bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v(!1),t.next=3,Object(at.x)(e,E._id);case 3:(r=t.sent)&&j(Object(p.a)(Object(p.a)({},w),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),le=Object(p.a)({},Yt.model),se=[],ue=[],de={};I.forEach((function(e){de=Object(p.a)(Object(p.a)({},de),o.cards[e]._timeline||{})})),de=Object.keys(de).filter((function(e){return"kpi"===de[e].type})).map((function(e){return de[e]}));var pe="time"!==E.kpi_type?parseFloat(ee):0,fe=parseFloat(ee)-parseFloat(te);fe<0&&(fe*=-1),de&&Object.keys(de).length>0&&Object.keys(de).sort((function(e,t){return de[e].created_at<de[t].created_at?-1:1})).forEach((function(e,t){pe=parseFloat(pe)+parseFloat(de[e].value),se.push({meta:de[e].value,total:pe,value:parseFloat(ee)>parseFloat(te)?100-Math.floor(100*pe/fe):Math.floor(100*pe/fe)}),ue.push(t+1),t+1===Object.keys(de).length&&(le=Object(p.a)(Object(p.a)({},le),{},{data:{labels:ue,series:[[].concat(se)]},options:Object(p.a)(Object(p.a)({},le.options),{},{low:0,high:100,plugins:[nt.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Object(S.h)(e,"time"===E.kpi_type?"number":E.kpi_type)+"<br>"+Object(S.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var he=ee<te?te-ee:ee-te;de&&Object.keys(de).length>0&&Object.keys(de).forEach((function(e){he=parseFloat(he)+parseFloat(de[e].value)}));var me=Math.ceil(ee<te?te-ee:ee-te);return(me=100*Math.ceil(he)/me-100)<0&&(me*=-1),e.data?a.a.createElement("div",{className:r.root},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(S.d)("color")}},e.manualAdd?Object(S.s)("$__timerLog",1):Object(S.s)("$__timer",1)),e.manualAdd&&a.a.createElement(a.a.Fragment,null,G?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"schedule"}),a.a.createElement(ye,{label:Object(S.s)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"date",inputProps:{max:O()().format("YYYY-MM-DD"),autoComplete:"start-date",onChange:function(e){O()(e.target.value).isValid()&&A(e.target.value);var t=w.updated_at-w.created_at;oe(Object(p.a)(Object(p.a)({},w),{},{created_at:O()("".concat(e.target.value," 00:00:00")).unix("X"),updated_at:O()("".concat(e.target.value," 00:00:00")).unix("X")+t}),!0,!0)}},value:N}))):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"schedule"}),a.a.createElement(ye,{label:Object(S.s)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{max:M,autoComplete:"start-date",onChange:function(e){O()(e.target.value).isValid()&&(A(e.target.value),oe(Object(p.a)(Object(p.a)({},w),{},{created_at:O()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:N})),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"watch_later"}),a.a.createElement(ye,{label:Object(S.s)("$__finalDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:N,autoComplete:"new-password",onChange:function(e){O()(e.target.value).isValid()&&(z(e.target.value),oe(Object(p.a)(Object(p.a)({},w),{},{updated_at:O()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:M}))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"more_time"}),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ye,{label:Object(S.s)("$__hours",1),variant:Object(S.d)("fieldVariant",1),name:"hours",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,autoComplete:"hours",onChange:function(e){Q(e.target.value),H(!0),N.indexOf("T")>-1&&A(N.substring(0,10)),oe(Object(p.a)(Object(p.a)({},w),{},{created_at:O()("".concat(N.substring(0,10)," 00:00:00")).unix("X"),updated_at:O()("".concat(N.substring(0,10)," 00:00:00")).unix("X")+60*e.target.value*60+60*V}),!0,!0)}},value:K,style:{paddingLeft:7,paddingRight:7}}),a.a.createElement(ye,{label:Object(S.s)("$__minutes",1),variant:Object(S.d)("fieldVariant",1),name:"minutes",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,max:59,autoComplete:"new-password",onChange:function(e){q(e.target.value),H(!0),N.indexOf("T")>-1&&A(N.substring(0,10)),oe(Object(p.a)(Object(p.a)({},w),{},{created_at:O()("".concat(N.substring(0,10)," 00:00:00")).unix("X"),updated_at:O()("".concat(N.substring(0,10)," 00:00:00")).unix("X")+60*K*60+60*e.target.value}),!0,!0)}},value:V,style:{paddingLeft:7,paddingRight:7}}),a.a.createElement(k.a,{title:Object(S.s)("$__reset",1),icon:"update_disabled",color:Object(S.d)("menu"),onClick:function(){H(!1),A("".concat(N," 00:00:00"))},size:"17px",style:{marginLeft:3,marginRight:3,backgroundColor:"rgba(0,0,0,0.05)",padding:3},transparent:!0}))),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}}),w&&w.diffText&&a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText)),parseInt(o.cards[E._id]._users[i._id].access)>=3?a.a.createElement(R,null,a.a.createElement(zt,{includeMe:!0,data:o.cards[E._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){oe(Object(p.a)(Object(p.a)({},w),{},{to:e}),!0)}})):a.a.createElement(a.a.Fragment,null)),d||e.manualAdd?a.a.createElement("div",null,!e.manualAdd&&w&&w.created_at&&w.updated_at&&w.diffText&&O()(1e3*w.created_at).isValid()&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},O()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},O()(1e3*w.updated_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm:ss"))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText))),w.created_at<w.updated_at?a.a.createElement(R,null,a.a.createElement(ct,{manualAdd:!!e.manualAdd,data:E,timer:w,manualEntry:G,callBack:function(){h(!1),e.callBack&&e.callBack()}})):a.a.createElement(a.a.Fragment,null)):a.a.createElement("div",{className:r.time},y?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){ce()}})}},"pause_circle_filled"),a.a.createElement("div",{className:"text"},w.diffText)):a.a.createElement(a.a.Fragment,null,te&&pe?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:60*te<pe?"red":"color",icon:"schedule"}),a.a.createElement("div",{className:"text",style:{color:60*te<pe?"red":"grey"}},Object(S.s)("$__timeLeft",1),": ",60*te-pe>-60&&60*te-pe<60?"".concat(60*te-pe," ").concat(Object(S.s)("$__seconds",1)," "):"".concat(Math.trunc((60*te-pe)/60)," ").concat(Object(S.s)("$__minutes",1)," ").concat(60*te-pe-60*Math.trunc((60*te-pe)/60)," ").concat(Object(S.s)("$__seconds",1)," "))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",onClick:function(){ie()},title:Object(S.s)("$__playRegisterLogWork")},"play_circle_outline"),a.a.createElement("span",{style:{marginLeft:7,color:Object(S.d)("color")}},Object(S.s)("$__startStopWatch"))))))):a.a.createElement("div",null,"NO DATA RECEIVED")}))),Wt={containerNoShadow:Object(p.a)(Object(p.a)({},U.l),{},(Rt={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(h.a)(Rt,"padding","3px"),Object(h.a)(Rt,"display","flow-root"),Rt)),container:Object(p.a)(Object(p.a)({},U.l),{},(Gt={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(h.a)(Gt,"padding","3px"),Object(h.a)(Gt,"display","flow-root"),Object(h.a)(Gt,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),Gt)),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",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(S.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"}}};var Ut=Object(ae.a)(Wt)((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(S.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(Z.a,{icon:"lock",size:"39px",color:e.avatarIconColor?e.avatarIconColor:Object(S.d)("AvatarIconColor")})))))})),Vt=r(65),qt=r(594);function Xt(){Xt=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 Jt,Kt=function(){var e=Object(f.a)(Xt().mark((function e(t){var r,n,a,o,i;return Xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(p.a)({},t),Object.keys(n).map((function(e){n[e]||delete n[e]})),a={},o={},n.users&&n.users.length>0&&n.users.map((function(e,t){var r=l.a.getState().db.users[e];o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,Object(p.a)({_id:e,name:r.name,image:r.image||null},0===t?{isResponsible:!0}:{})))})),i=Object(Y.a)(),B.a.post("card/add",Object(p.a)({_id:i},n)),a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},i,Object(p.a)(Object(p.a)({_id:i},n),{},{_users:o}))),(null===(r=a[i])||void 0===r?void 0:r.users)&&delete a[i].users,e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Zt=function(){var e=Object(f.a)(Xt().mark((function e(t){var r,n,a=arguments;return Xt().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,B.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(){Zt(t,r,n+1)}),3e3);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t){return e.apply(this,arguments)}}(),Qt=function(){var e=Object(f.a)(Xt().mark((function e(t){return Xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.a.put("card/link",t);case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),setTimeout((function(){Qt(t)}),3e3);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),er=function(e,t,r,n){var a=l.a.getState().db.cards[r],o=l.a.getState().db.cards[t],i={};a&&a.automationDueDateType&&"add"===a.automationDueDateType&&(i=Object(p.a)({endDate:O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add((null===a||void 0===a?void 0:a.automationDueDate)||1,"days").unix("X")},o.startDate?{}:{startDate:O()().unix("X")})),a&&a.automationStatusType&&"replace"===a.automationStatusType&&(i=Object(p.a)(Object(p.a)({},i),{},{status:a.automationStatus||"notStarted"},a.automationStatus&&"completed"===a.automationStatus?{completed_at:O()().unix("x")}:{}));var c,s=[];if(a&&a.automationUsers&&"add"===a.automationUsers&&a._users&&Object.keys(a._users).filter((function(e){return e})).length>0&&Object.keys(a._users).filter((function(e){return e})).map((function(t){if(a._users[t].isResponsible&&(c=t),o&&(!o._users||o._users&&!o._users[t])){var r=!(!o._users||!o._users[t]);It(e,t,a._users[t].access,o._id,r)}})),a&&a.automationTags&&"doNotChange"!==a.automationTags&&a._tags&&a._tags.length>0){var u=o._tags?Array.from(o._tags):[];if("replace"===a.automationTags){var d=[],f=[];a._tags.map((function(e){u.findIndex((function(t){return t.value===e.value}))>-1&&(d.push(e.value),u.splice(u.findIndex((function(t){return t.value===e.value})),1))})),a._tags.map((function(e){-1===u.findIndex((function(t){return t.value===e.value}))&&(u.push(e),-1===f.indexOf(e.value)&&f.push(e.value))})),i=Object(p.a)(Object(p.a)(Object(p.a)({},i),d.length>0?{removeTags:d}:{}),f.length>0?{addTags:f}:{}),u=Array.from(a._tags)}if("add"===a.automationTags){var h=[];a._tags.map((function(e){0===u.filter((function(t){return t.value===e.value})).length&&(h.push(e.value),u.push(e))})),i=Object(p.a)(Object(p.a)({},i),{},{addTags:h})}if("remove"===a.automationTags){var m=[];a._tags.map((function(e){u.findIndex((function(t){return t.value===e.value}))>-1&&(m.push(e.value),u.splice(u.findIndex((function(t){return t.value===e.value})),1))})),i=Object(p.a)(Object(p.a)({},i),{},{removeTags:m})}i=Object(p.a)(Object(p.a)({},i),{},{_tags:u})}return a&&a.automationUsers&&"remove"===a.automationUsers&&a._users&&Object.keys(a._users).filter((function(e){return e})).length>0&&Object.keys(a._users).filter((function(e){return e})).map((function(e){o&&o._users&&o._users[e]&&-1===s.indexOf(e)&&s.push(e)})),a&&a.automationUsers&&"replace"===a.automationUsers&&a._users&&Object.keys(a._users).filter((function(e){return e})).length>0&&(Object.keys(a._users).filter((function(e){return e})).map((function(t){if(a._users[t].isResponsible&&(c=t),o&&(!o._users||o._users&&!o._users[t])){var r=!(!o._users||!o._users[t]);It(e,t,a._users[t].access,o._id,r)}})),o&&o._users&&Object.keys(o._users).filter((function(e){return e})).length>0&&Object.keys(o._users).filter((function(e){return e})).map((function(e){a._users[e]||-1!==s.indexOf(e)||s.push(e)}))),a&&a.keepUserWhoCreatedActivity&&n&&s.indexOf(n)>-1&&s.splice(s.indexOf(n),1),s.length>0&&B.a.put("cards/removeAccess/",{cardId:o._id,userIds:s}),c&&Dt(e,{cardId:o._id,userId:c}),a.setIcon&&(i=Object(p.a)(Object(p.a)({},i),{},{icon:a.setIcon})),"{}"!==JSON.stringify(i)&&tr(Object(p.a)({_id:t},i)),t&&r&&l.a.getState().db.cards[r]&&l.a.getState().db.cards[t]&&Qt({idRel:t,destination:r}),i&&i.status&&"completed"===i.status&&!i.completed_at&&(i=Object(p.a)(Object(p.a)({},i),{},{completed_at:O()().unix("x")})),i},tr=function(){var e=Object(f.a)(Xt().mark((function e(t){var r,n;return Xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(p.a)({},t),e.next=3,B.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)}}(),rr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.a.getState().db.cards,n={},a=[];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})).map((function(o,i){var c=[];Object.keys(r).length>0&&Object.keys(r).filter((function(n){return r[n]._parent===o&&(!t.deleted&&!r[n].deleted||t.deleted)||0===i&&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})).map((function(e,t){r[e].deleted&&console.log(r[e]),c.push(Object(p.a)(Object(p.a)({},r[e]),{},{order:String(t)}))})),n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},o,{id:o,name:r[o].name,icon:r[o].icon||null,items:c})),-1===a.indexOf(o)&&a.push(o)})),{columns:n,columnOrder:a}},nr=function(){var e=Object(f.a)(Xt().mark((function e(t){var r,n,a,o,i,c,s,u,d,f,m,g,b;return Xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.nodeId,n=t.reason,a=void 0===n?null:n,o=t.approval,i=void 0!==o&&o,c=t.approved,s=void 0!==c&&c,u=l.a.getState().db.cards[r],d=l.a.getState().db.cards[u._parent],f=d.onConcludedStepMoveTo?d.onConcludedStepMoveTo: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&&parseInt(l.a.getState().db.cards[e].step)===parseInt(d.step)+1}))[0],m=l.a.getState().db.cards[f],!i||!d._id){e.next=10;break}return g={_id:Object(Y.a)(),idRel:r,cardId:d._id,message:"".concat(s?"$__approved":"$__rejected"," - ").concat(a?"$__reason: ".concat(a):""),type:"log",filesCount:0,approval:!0,db:"cards"},e.next=9,B.a.post("timeline/add",g);case 9:!s&&d._parent&&(Qt({idRel:r,destination:d._parent}),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)({},r,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[r]),{},{_parent:d._parent,requireApproval:null})))})));case 10:(!i||i&&s)&&(b=er(t,r,f,l.a.getState().db.cards[r]._createdBy._id),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)({},r,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[r]),b),{},{_parent:d.onConcludedStepMoveTo},(null===m||void 0===m?void 0:m.requireApproval)?{requireApproval:!0}:{requireApproval:null})))})));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ar(){ar=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 or,ir=j.b.div(Jt||(Jt=Object(d.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(S.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            "})),cr=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(qt.a)((function(e){var t=e.classes,r=l.a.getState().db,n=e.data&&e.data._id?l.a.getState().db.cards[e.data._id]:{},o=a.a.useState(n.name?n.name:""),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],_=function(){var t=Object(f.a)(ar().mark((function t(r){return ar().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(at.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:n._id}}),r),g(!1);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),O=function(){var e=Object(f.a)(ar().mark((function e(){return ar().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmDeleteThisFullDescription",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){_({deleted:!0})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(ir,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}),a.a.createElement("div",e.provided&&e.provided.dragHandleProps,h?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(ye,{label:Object(S.s)("$__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&&g(!h)},onKeyDown:function(e){13===e.keyCode&&c&&_({name:c}),27===e.keyCode&&(g(!h),s())}},autoFocus:!0,value:c,placeholder:Object(S.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return _({name:c})}},a.a.createElement(Z.a,{color:"green",icon:"save",title:Object(S.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){g(!h),s("")}},a.a.createElement(Z.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.s)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:function(){x(!0)},onMouseLeave:function(){x(!1)}},a.a.createElement("div",Object.assign({style:{width:"100%",padding:"0px 7px",wordBreak:"break-word"},onDoubleClick:function(){g(!h)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?a.a.createElement(on,{db:"cards",cardId:e.data._id,viewTimer:!0,viewAllName:!0}):n.name?n.name:Object(S.s)("$__new",1)),"completed"!==n.status||e.showCard?a.a.createElement(a.a.Fragment,null):a.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"}},a.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?a.a.createElement("div",{style:{position:"absolute",right:33,top:"calc(50% - 15px)",fontSize:10,textAlign:"right",backgroundColor:"#f1f1f1",paddingLeft:7}},Object(S.k)(n.completed_at)):a.a.createElement(a.a.Fragment,null)),v&&e.permission&&!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(k.a,{title:Object(S.s)("$__undoConclude",1),color:"lightgrey",icon:"delete_forever",onClick:function(){return O()},transparent:!0}),n.checklist?a.a.createElement(k.a,{title:Object(S.s)("$__turnIntoActivity",1),color:"lightgrey",icon:"change_circle",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmTurnIntoActivity",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){_({checklist:null})}})},transparent:!0}):a.a.createElement(a.a.Fragment,null)),(!e.showCard||!e.dragStatus&&e.showCard)&&a.a.createElement(k.a,{title:"completed"!==n.status?Object(S.s)("$__conclude",1):Object(S.s)("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){n._hasStep?nr(Object(p.a)(Object(p.a)({},e),{},{nodeId:n._id})):Object(at.J)(e,n)},transparent:!0}))),e.locked?a.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"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:"lightgray",icon:"lock",size:"22px"}))):a.a.createElement(a.a.Fragment,null))}))),lr=r(1890),sr=Object(ae.a)({switchBase:{color:Object(S.d)("medium"),"&$checked":{color:Object(S.d)("color")},"&$checked + $track":{backgroundColor:Object(S.d)("color")}},checked:{},track:{}})(lr.a);function ur(){ur=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 dr=j.b.div(or||(or=Object(d.a)(["\n            background-color:none\n            ","\n            "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""})),pr=Object(u.b)((function(e){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=l.a.getState().functions.socket,i=a.a.useState(e.name?e.name:""),c=Object(m.a)(i,2),s=(c[0],c[1],a.a.useState(!1)),u=Object(m.a)(s,2),d=u[0],g=u[1],b=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),y=window.location.hash.split("/");y[0]=y[0].replace("#",""),36!==y[0].length&&(y[0]=null);var v={};l.a.getState().db[e.db]&&l.a.getState().db[e.db][e.nodeId]&&(v=l.a.getState().db[e.db][e.nodeId]);var x=Object.keys(l.a.getState().db.cards).filter((function(t){return!(e.myDay||"step"===l.a.getState().db.cards[t].type||!(!e.noChecklist&&l.a.getState().db.cards[t]&&!l.a.getState().db.cards[t].deleted&&l.a.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!l.a.getState().db.cards[t].deleted&&l.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&&O()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b&&l.a.getState().db.cards[t])||l.a.getState().db.cards[t].deleted)||void 0)})).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})),_=function(){var t=Object(f.a)(ur().mark((function t(n){var a,i,c,s,u;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),a=n.destination,i=n.source,c=n.draggableId,a){t.next=4;break}return t.abrupt("return",!1);case 4:if(a.droppableId!==i.droppableId||a.id!==i.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(s=Array.from(x.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(i.index,1),t.next=10,setTimeout(500);case 10:return s.splice(a.index,0,c),t.next=13,setTimeout(500);case 13:return o.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u=Object(p.a)({},l.a.getState().db.cards),t.next=17,new Promise((function(e,t){s.map((function(t,r){u=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},u[t]),{},{order:"".concat(r+1)}))),r+1===s.length&&e(!0)}))}));case 17:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(p.a)(Object(p.a)({},r),{},{cards:Object(p.a)(Object(p.a)({},r.cards),u)})),t.abrupt("return");case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),w=function(){var e=Object(f.a)(ur().mark((function e(t){return ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g(!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(f.a)(ur().mark((function e(t){return ur().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=x.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 a.a.createElement("div",{style:{width:"100%"},onClick:function(e){return e.stopPropagation()}},e.permission?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",alignItems:"center",padding:"3px 10px",justifyContent:"center"}},a.a.createElement("div",{style:{marginRight:15}},Object(S.s)("$__requireConcludedByStep")),a.a.createElement(sr,{checked:!!v.listStepLock,onChange:function(){Object(at.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:v._id}}),{listStepLock:!v.listStepLock})},name:"listStepLock",inputProps:{"aria-label":"secondary checkbox"}}),a.a.createElement(k.a,{title:Object(S.s)("$__openBoard"),text:Object(S.s)("$__openBoard"),color:"lightgrey",textColor:"lightgrey",icon:"open_in_new",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{board:e.nodeId})),e.reduxFunction("ASYNC","CLEAR_MODULE")},size:"25px"})):a.a.createElement(a.a.Fragment,null),e.showProgress&&x.length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{position:"absolute",right:7,bottom:0,fontSize:9,color:Object(S.d)("menu"),fontWeight:"bold"}},x.filter((function(e){return"completed"===r.cards[e].status})).length,"/",a.a.createElement("span",{style:{fontWeight:"normal"}},x.length)),a.a.createElement("div",{style:{position:"relative",width:"100%",height:5,backgroundColor:"lightGray"}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,backgroundColor:Object(S.d)("menu"),width:"".concat(100/x.length*x.filter((function(e){return"completed"===r.cards[e].status})).length,"%")}}))):a.a.createElement(a.a.Fragment,null),x.filter((function(e){return"completed"!==r.cards[e].status})).length>0?a.a.createElement(Vt.a,{onDragEnd:_,onDragStart:w,onDragUpdate:j},a.a.createElement(Vt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return a.a.createElement(dr,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),E.map((function(t,n){return a.a.createElement(Vt.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(o,i){return a.a.createElement(cr,{dragStatus:d,provided:o,snapshot:i,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:v.listStepLock&&n>0&&"completed"!==r.cards[E[n-1]].status})}))})),t.placeholder)}))):a.a.createElement(a.a.Fragment,null),(e.permission||e.myDay)&&a.a.createElement("div",{style:{position:"relative",float:"right",width:"100%",padding:"7px",display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(et,{text:Object(S.s)("$__new","*"),icon:"add_box",iconColor:Object(S.d)("color"),onClick:function(){var t,r,n,a,o;e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{myDay:!!e.myDay,addCard:{myDay:!!e.myDay,_parent:(null===(t=v)||void 0===t?void 0:t._id)||null,rows:x.length,type:v&&v.type&&(null===(r=v)||void 0===r||null===(n=r.type)||void 0===n?void 0:n.indexOf("guideline"))>-1?"objective":"objective"===(null===(a=v)||void 0===a?void 0:a.type)?"goal":(null===(o=v)||void 0===o||o.type,"task")}}))},style:{padding:7}}),e.myDay?a.a.createElement(a.a.Fragment,null):a.a.createElement(et,{text:Object(S.s)("$__newSimpleTask","*"),icon:"playlist_add",iconColor:Object(S.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{myDay:e.myDay||!1,checklist:!0,addCard:{_parent:v._id,rows:x.length,type:v.type.indexOf("guideline")>-1?"objective":"objective"===v.type?"goal":(v.type,"task"),checklist:!0}}))},style:{padding:7}})),x.filter((function(e){return"completed"===r.cards[e].status})).length>0?a.a.createElement(a.a.Fragment,null,x.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 a.a.createElement("div",{key:"".concat(t).concat(n)},a.a.createElement(cr,{dragStatus:d,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:v.listStepLock&&n>0&&E[n-1]&&r.cards[E[n-1]]&&"completed"!==r.cards[E[n-1]].status}))}))):a.a.createElement(a.a.Fragment,null))}));function fr(e){var t=l.a.getState(),r=t.db,n=t.session,o=Object(at.h)(e.id),i=Object(S.j)();if(0===Object.keys(o).length)return a.a.createElement(a.a.Fragment,null);var c=Object.keys(o).map((function(t,c){var l=Object(at.t)(t);if(o[t].icon&&o[t].type&&o[t].name)return a.a.createElement("div",{style:{marginRight:"10px",width:"100%"},key:c},a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:e.open&&((i.planAdmin||i.planModerate)&&("plan"!==r.cards[o[t]._id].type||"plan"===r.cards[o[t]._id].type&&Object(at.B)(o[t]._id))||l>=1)&&(!r.cards[o[t]._id].private||r.cards[o[t]._id].private&&r.cards[o[t]._id]._users&&r.cards[o[t]._id]._users[n._id])?function(r){e.open(o[t]._id),r.stopPropagation()}:null},a.a.createElement(Se.a,{overlap:"rectangular",icon:o[t].icon,title:"".concat(Object(S.s)("$__".concat(o[t].type),"*"),": ").concat(o[t].name),size:"16px",color:Object(S.d)("color")}),a.a.createElement("span",{style:{marginLeft:"5px"}},o[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(S.s)(e.legend||"$__connectedIn",1)),c):c,a.a.createElement("div",{style:{clear:"both"}}))}var hr=r(1067),mr=r.n(hr),gr=r(1891);var br=function(e){var t={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Object(S.d)("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},bar:{borderRadius:7}},r=Object(G.a)(t)(),n=Object(p.a)({},e);return n.showText&&delete n.showText,n.customColor&&delete n.customColor,a.a.createElement("div",{className:r.root,style:e.showText?{width:"calc(100% - 40px)"}:{}},a.a.createElement(gr.a,n),e.showText&&a.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))},yr=Object(G.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 vr=function(e){var t=yr(),r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useRef(null),l=function(e){c.current&&c.current.contains(e.target)||i(!1)};return a.a.createElement("div",{onClick:function(e){e.stopPropagation()},style:{zIndex:100}},a.a.createElement(we.a,{title:Object(S.s)("$__options",1)},a.a.createElement(je.a,{ref:c,"aria-controls":o?"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},a.a.createElement(Z.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Object(S.d)("menu"),icon:e.icon?e.icon:"design_services",title:e.title?e.title:"NO_ALIAS"}))),a.a.createElement(Me.a,{open:o,anchorEl:c.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ne.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:l},a.a.createElement("div",{onClick:function(e){e.stopPropagation(),e.preventDefault()}},a.a.cloneElement(e.children,{callBack:function(e){i(!1)}})))))})))};function xr(){xr=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(207).config();var _r=function(){var e=Object(f.a)(xr().mark((function e(t,r){var n,a,o,i,c,s;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n={},a=l.a.getState(),o=a.db,i=a.session,(l.a.getState().timeline[r.id]||l.a.getState().timeline[r.readedBy])&&(n=l.a.getState().timeline,c=r.id,s={},"cards"!==r.db?(c=n[r.readedBy]?r.readedBy:r.id,s={_id:r.readedBy,name:o.users[r.readedBy].name,image:o.users[r.readedBy].image}):o.cards[r.id]&&o.cards[r.id]._users&&o.cards[r.id]._users[r.readedBy]&&(s=o.cards[r.id]._users[r.readedBy]),n&&n[c]&&Object.keys(n[c]).filter((function(e){if(r&&r.type&&("all"!==r.type&&n[c][e].type===r.type||"all"===r.type)&&n[c][e].user._id!==r.readedBy&&(!n[c][e].readedBy||i&&i._id&&n[c][e].readedBy&&!n[c][e].readedBy[i._id]))return!0})).map((function(e,t){n[c]&&n[c][e]&&(n[c][e]=Object(p.a)(Object(p.a)({},n[c][e]||{}),{},{readedBy:Object(p.a)(Object(p.a)({},n[c]&&n[c][e]&&n[c][e].readedBy?n[c][e].readedBy:{}),{},Object(h.a)({},r.readedBy,Object(p.a)(Object(p.a)(Object(p.a)({},n[c]&&n[c][e]&&n[c][e].readedBy&&n[c][e].readedBy[r.readedBy]?n[c][e].readedBy[r.readedBy]:{}),s),{},{readedDate:{low:O()().unix("x")}})))}))}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)({},n)),l.a.getState().db.cards[r.id]&&r.type&&l.a.getState().db.cards[r.id]._notifications&&(l.a.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&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)({},r.id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(p.a)(Object(p.a)({},l.a.getState().db.cards[r.id]&&l.a.getState().db.cards[r.id]._notifications?l.a.getState().db.cards[r.id]._notifications:{}),{},Object(h.a)({},r.type,0))})))}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Or=function(){var e=Object(f.a)(xr().mark((function e(t,r){var n,a,o,i,c,s,u,d;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=l.a.getState(),a=n.db,o=n.timeline,i=n.session,c={},s=r.nodeId!==i._id?s=r.nodeId:r.user,a.users[r.user]?c=a.users[r.user]:r.user&&a[r.db]&&o[s]&&o[s]._users&&o[s]._users[r.user]&&(c=o[s]._users[r.user]),s&&r.message&&o&&o[i._id]&&o[i._id][r.message]&&(s=i._id),a[r.db]&&o[s]&&o[s][r.message]&&(u=Object(p.a)(Object(p.a)({},o[s][r.message]&&o[s][r.message]._reactions?o[s][r.message]._reactions:{}),{},Object(h.a)({},r.react,Object(p.a)(Object(p.a)({},o[s][r.message]&&o[s][r.message]._reactions&&o[s][r.message]._reactions[r.react]?o[s][r.message]._reactions[r.react]:{}),{},Object(h.a)({},r.user,Object(p.a)(Object(p.a)({},c),{},{reactDate:{low:O()().tz("America/Sao_Paulo").unix("x")}}))))),Object.keys(u).map((function(e){e!==r.react&&Object.keys(u[e]).map((function(t){u[e][t]&&t===r.user&&delete u[e][t]}))})),d=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},s,Object(p.a)(Object(p.a)({},o[s]),{},Object(h.a)({},r.message,Object(p.a)(Object(p.a)({},o[s][r.message]),{},{_reactions:u}))))),t.reduxFunction("ASYNC","SET_TIMELINE",d));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),wr=function(){var e=Object(f.a)(xr().mark((function e(t,r){var n,a,o,i;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(f.a)(xr().mark((function e(n,a){return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||l.a.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,Object(We.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 n=r,a=l.a.getState(),a.timeline,o=a.session,(i=n._parent?n._parent:n.cardId?n.cardId:n.node)===o._id&&(i=n.comment.user._id),n.to&&(n.to.map((function(e){var t=l.a.getState().db.users[e];n._toUser=Object(p.a)(Object(p.a)({},n._toUser?n._toUser:{}),{},Object(h.a)({},e,{_id:e,name:t.displayName?t.displayName:t.name,image:t.image?t.image:null}))})),delete n.to),i&&n.comment&&t.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),{},Object(h.a)({},i,Object(p.a)(Object(p.a)({},l.a.getState().timeline[i]),{},Object(h.a)({},n.comment._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id]?l.a.getState().timeline[i][n.comment._id]:{}),n.comment),n._toUser?{_toUser:n._toUser}:{}),{},{type:l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id]&&l.a.getState().timeline[i][n.comment._id].type?l.a.getState().timeline[i][n.comment._id].type:n&&n.comment&&n.comment.type?n.comment.type:l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id]&&l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id].type?l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id].type:"comment",readedBy:Object(p.a)(Object(p.a)({},l.a.getState().timeline[i]&&l.a.getState().timeline[i][n.comment._id]&&l.a.getState().timeline[i][n.comment._id].readedBy?l.a.getState().timeline[i][n.comment._id].readedBy:{}),n.comment&&n.comment.readedBy?n.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)}}(),jr=function(){var e=Object(f.a)(xr().mark((function e(t,r){var n,a,o,i,c,s,u,d,m,g,b,v,x,_,O,w,j,E,k,S,L,C,I,T,F;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=(null===(n=l.a.getState().chat)||void 0===n?void 0:n.lastMessageDate)||0,o=l.a.getState().timelineLoader,!r.type||"kpi"!==r.type){e.next=7;break}if(i=y()("".concat(JSON.stringify(r))).toString(),!o[i]){e.next=6;break}return e.abrupt("return",{result:!0,total:0});case 6:t.reduxFunction("ASYNC","SET_TIMELINE_LOADER",Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},i,!0)));case 7:if(c=r.ids,s=r.db,u=r.type,d=r.limit,m=void 0===d?0:d,g=r.skip,b=void 0===g?0:g,v=r.toId,x=void 0===v?null:v,_=r.ini,O=void 0!==_&&_,w=r.reqChildrens,j=void 0!==w&&w,E=r.newUpdates,k=void 0!==E&&E,S=r.lastDate,void 0===S?null:S,L=l.a.getState(),C=L.session,I=[],T=[],"string"===typeof c?T.push(c):T=c,T&&T.length>0&&T.map((function(e){-1===I.indexOf(e)&&I.push(e)})),!(I.length>0)){e.next=22;break}return e.next=16,new Promise(function(){var e=Object(f.a)(xr().mark((function e(n,o){var i,c,d;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(I.length>0)){e.next=13;break}return e.prev=1,e.next=4,dt.a.post("/M_Timeline_Get_V3",{nodesIds:I,db:s,type:u||"comment",skip:parseInt(b),limit:m,toId:x,ini:O,newUpdates:k,reqChildrens:j,lastDate:k?r.lastDate?r.lastDate:a:null});case 4:(i=e.sent)&&i.data&&i.data.length>0?(c=Object(p.a)({},l.a.getState().timeline),d=null,i.data.map((function(e){var t=c&&c[o]&&c[o][e.data._id]&&c[o][e.data._id].readedBy?c[o][e.data._id].readedBy:{},n={},o=e.nodeId!==C._id?e.nodeId:e.params.user._id;e&&e.params&&e.params.readedBy&&e.params.readedBy.filter((function(e){return e._id})).length>0&&e.params.readedBy.map((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.map((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.type,Object(p.a)(Object(p.a)({},n[e.type]),{},Object(h.a)({},e._id,e))))}));var i={};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})).map((function(e){i=Object(p.a)(Object(p.a)({},i),{},Object(h.a)({},e._id,e))})),C&&C._id&&t&&!t[C._id]&&c[o]&&Object.keys(c[o]).filter((function(r){c[o][r]&&c[o][r].readedBy&&c[o][r].readedBy[C._id]&&parseInt(c[o][r].created_at)>parseInt(e.data.created_at)&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},C._id,Object(p.a)({},c[o][r].readedBy[C._id]))))})),(r.ini||r.newUpdates)&&parseInt(e.data.created_at)>parseInt(a)&&(a=parseInt(e.data.created_at),d=o),c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},o,Object(p.a)(Object(p.a)({},c&&c[o]?c[o]:{}),{},Object(h.a)({},e.data._id,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.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:t,_reactions:n},i!=={}?{_toUser:i}:{})))))})),t.noReg||t.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),c)),n({result:!0,total:i.data.length,timelines:c,chatOpenId:d,lastMessageDate:a})):n({result:!0,total:i.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((F=e.sent)&&(F.chatOpenId||F.lastMessageDate)&&t.reduxFunction("IMMEDIATE","SET_CHAT",Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().chat),(r.ini||r.newUpdates)&&F.lastMessageDate?{lastMessageDate:F.lastMessageDate}:{}),r.ini&&F.chatOpenId?{nodeId:F.chatOpenId}:{})),!F){e.next=20;break}return e.abrupt("return",F);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)}}(),Er=function(){var e=l.a.getState(),t=e.db,r=e.session,n=e.timeline,a=0,o=0;return Object.keys(n).map((function(e){Object.keys(n[e]).map((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}},kr=function(){var e=Object(f.a)(xr().mark((function e(t,r){var n,a;return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(f.a)(xr().mark((function e(a,o){return xr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.emit("data",{module:"chat",method:"put",action:"cancel"},r,(function(e){var n=r.idRel,o=l.a.getState().session;l.a.getState().timeline[o._id]&&l.a.getState().timeline[o._id][r.id]&&(n=o._id),t.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)({},r.id,Object(p.a)(Object(p.a)({},l.a.getState().timeline&&l.a.getState().timeline[n]&&l.a.getState().timeline[n][r.id]),{},{deleted:!0},r.deletedReason?{deletedReason:r.deletedReason}:{})))))),a(!0)}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();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}r(689);var Lr=Object(n.memo)((function(e){var t=e.classes,r=e.data,n=l.a.getState(),o=n.db,i=n.timeline,c=o.cards,s=a.a.useState(!1),u=Object(m.a)(s,2),d=u[0],h=u[1],g=a.a.useState(!1),b=Object(m.a)(g,2),v=b[0],x=b[1],_=a.a.useState([]),O=Object(m.a)(_,2),w=O[0],j=O[1],E=parseFloat(r.kpi_ini),k=parseFloat(r.kpi_fin);a.a.useEffect((function(){d||(h(!0),I(e.data._id),L())}),[]),a.a.useEffect((function(){I(e.data._id)}),[c]);var L=function(){var t=Object(f.a)(Sr().mark((function t(){var n,a;return Sr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n={ids:[r._id],db:"cards",reqChildrens:!0,type:"kpi",limit:!0},a=y()("".concat(JSON.stringify(n))).toString(),!i||i[r._id]&&(!i[r._id]||0!==Object.keys(i[r._id]).filter((function(e){return"kpi"===i[r._id][e].type})).length)||l.a.getState().timelineLoader&&(!l.a.getState().timelineLoader||l.a.getState().timelineLoader[a])){t.next=10;break}return x(!0),t.next=6,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Timeline/Index/init()"}),n);case 6:t.sent&&x(!1),t.next=11;break;case 10:x(!1);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=[e.data._id],I=function(){var e=Object(f.a)(Sr().mark((function e(t,r){var n;return Sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(c).filter((function(e){return c[e].kpi_useParent&&c[e]._parent===t}))).length>0?n.map(function(){var e=Object(f.a)(Sr().mark((function e(t){return Sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:I(t,!0),C.push(t),j(Array.from(new Set(C)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):r||j(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 T=Object(p.a)({},Yt.model),F=[],D=[],N={};w.forEach((function(e){N=Object(p.a)(Object(p.a)({},N),i[e]||{})})),N=Object.keys(N).filter((function(e){return"kpi"===N[e].type&&N[e].kpi_type===r.kpi_type})).map((function(e){return N[e]}));var A="time"!==r.kpi_type?parseFloat(E):0,P=parseFloat(E)-parseFloat(k),$=0;P<0&&(P*=-1),N&&Object.keys(N).length>0&&Object.keys(N).sort((function(e,t){return N[e].created_at<N[t].created_at?-1:1})).forEach((function(e,t){A=parseFloat(A)+parseFloat(N[e].value),$+=parseFloat(N[e].value),F.push({meta:N[e].value,total:A,value:parseFloat(E)>parseFloat(k)?100-Math.floor(100*A/P):Math.floor(100*A/P)}),D.push(t+1),t+1===Object.keys(N).length&&(T=Object(p.a)(Object(p.a)({},T),{},{data:{labels:D,series:[[].concat(F)]},options:Object(p.a)(Object(p.a)({},T.options),{},{low:0,high:100,plugins:[nt.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Object(S.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Object(S.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var M=E<k?k-E:E-k,z=M;N&&Object.keys(N).length>0&&Object.keys(N).forEach((function(e){M=parseFloat(M)+parseFloat(N[e].value)}));var Y=z-(M-z),B=z-(z-M),R=Math.ceil(E<k?k-E:E-k);if((R=100*Math.ceil(M)/R-100)<0&&(R*=-1),!e.data)return a.a.createElement("div",null,"NO DATA RECEIVED");if(v)return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(br,null));return a.a.createElement("div",{className:t.root},a.a.createElement(a.a.Fragment,null,e.chartShow&&"time"!==r.kpi_type&&"task"!==r.kpi_type&&N.length>0?a.a.createElement("div",{style:{backgroundColor:Object(S.d)("color")}},a.a.createElement(mr.a,{className:"ct-chart-white-colors",data:T.data,type:"Line",options:T.options,listener:T.animation})):a.a.createElement(a.a.Fragment,null),"task"!==r.kpi_type&&a.a.createElement("fieldset",{style:{position:"relative"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__progress",1)),a.a.createElement("div",{className:t.progress},a.a.createElement(br,{variant:"determinate",size:100,value:R,showText:!0,onClick:function(){}})),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Object(S.d)("color")}},function(){var e=E&&parseInt(E)?parseInt(E):0,t=k&&parseInt(k)?parseInt(k):0;return a.a.createElement(a.a.Fragment,null,Object(S.s)("".concat(e>t?"$__balance":"$__targetValue"),1),": ",Object(S.h)(e<t?Y:B||0,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null),"time"===r.kpi_type?a.a.createElement("span",{style:{marginLeft:5,fontSize:10,textTransform:"lowercase"}},Object(S.s)("$__minutes")):"")}()),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:$>0?Object(S.d)("green"):"red"}},Object(S.s)("$__accomplished",1),": ",$&&parseInt($)>0?Object(S.h)($,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null):0),a.a.createElement("div",{style:{position:"absolute",right:"0px",top:"-33px",display:"flex"}},(R>=0&&R<100&&k>E||R>0&&R<=100&&k<E)&&a.a.createElement(vr,{icon:"add_circle",title:Object(S.s)("$__increase"),iconColor:Object(S.d)("blue"),onClick:function(){},transparent:!0},a.a.createElement(ct,{data:r,PositiveValue:!0,callBack:function(){}})),(R>=0&&R<100&&k<E||R>0&&R<=100&&k>E)&&a.a.createElement(vr,{icon:"remove_circle",iconColor:"orange",title:Object(S.s)("$__decrease"),onClick:function(){},transparent:!0},a.a.createElement(ct,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&a.a.createElement("div",{className:t.time},"TASK")))})),Cr=Object(u.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ot)(Lr)),Ir=r(1933),Tr={root:Object(p.a)({},U.l),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Object(S.d)("color"),display:"flex",alignItems:"center"}},Fr=Object(G.a)(Tr);var Dr,Nr,Ar=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState().db,r=Fr(),n=a.a.useState([]),o=Object(m.a)(n,2),i=o[0],c=o[1];a.a.useEffect((function(){var r=[];return e.data&&e.data.length>0&&e.data.map((function(e){r.push(t.cards[e])})),c(r),function(){}}),[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})),d="guidelineD"===e.type||"guidelineR"===e.type?"strength":"weakness",p="guidelineD"===e.type||"guidelineE"===e.type?"threat":"opportunity",f="guidelineD"===e.type||"guidelineR"===e.type?"forces":"weaknesses",h="guidelineD"===e.type||"guidelineE"===e.type?"threats":"opportunities";return a.a.createElement("div",{className:r.root},a.a.createElement("div",{className:r.aspectsTitle},a.a.createElement(Z.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(S.d)("color"),title:Object(S.s)(d,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(S.s)("$__internalAspects",1)," - ",Object(S.s)("$__".concat(f),1))),s&&s.length>0&&s.sort((function(e,t){return e.name-t.name})).map((function(e,t){return a.a.createElement(Ir.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})),a.a.createElement("div",{className:r.aspectsTitle},a.a.createElement(Z.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(S.d)("color"),title:Object(S.s)(p,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(S.s)("$__externalAspects",1)," - ",Object(S.s)("$__".concat(h),1))),u&&u.length>0&&u.sort((function(e,t){return e.name-t.name})).map((function(e,t){return a.a.createElement(Ir.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),Pr={containerNoShadow:Object(p.a)(Object(p.a)({},U.l),{},(Dr={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(h.a)(Dr,"padding","3px"),Object(h.a)(Dr,"minWidth","150px"),Object(h.a)(Dr,"display","flow-root"),Dr)),container:Object(p.a)(Object(p.a)({},U.l),{},(Nr={position:"relative",border:"0.5px solid ".concat(Object(S.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(h.a)(Nr,"padding","3px"),Object(h.a)(Nr,"minWidth","150px"),Object(h.a)(Nr,"display","flow-root"),Object(h.a)(Nr,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),Nr)),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",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(S.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"}}},$r=r(118),Mr=r.n($r),zr=r(771),Yr=r.n(zr),Br=r(131),Rr=r.n(Br);function Gr(){Gr=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 Hr=Object(u.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Pr)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=a.a.useState(null),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(!0),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],w=x[1],j=a.a.useRef(!0);a.a.useEffect((function(){return function(){j.current=!1}}),[]);var E=l.a.getState().db.cards[e.cardId||e.data._id]||{},k=window.location.hash.split("/");k[0]=k[0].replace("#",""),a.a.useEffect((function(){j.current&&(E._parent&&(!k[0]||k[0]&&36!==k[0].length)?L():w(!1))}),[]);var L=function(){var t=Object(f.a)(Gr().mark((function t(){var r;return Gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!E._loadTimeline||E._loadTimeline&&!E._loadTimeline.kpi)&&E.kpi_type&&"task"!==E.kpiType&&"timer"!==E.kpiType&&"time"!==E.kpiType&&jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[E._id],db:"cards",type:"kpi"}),r=function(){var t=Object(f.a)(Gr().mark((function t(a){return Gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cards[a]){t.next=8;break}return j.current&&w(!0),t.next=4,Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&j.current&&w(!1),t.next=9;break;case 8:n.cards[a]&&n.cards[a]._parent?r(n.cards[a]._parent)&&j.current&&w(!1):w(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(f.a)(Gr().mark((function e(){return Gr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(E._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(_)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.s)("$__loadingData")),a.a.createElement(br,null));if(!E&&!E._id)return null;var C=!1,I=a.a.createElement(a.a.Fragment,null);if(E&&E.url&&(E.url.indexOf(".youtube.com/watch?")>-1||E.url.indexOf("youtu.be")>-1)){var T,F=E.url.indexOf(".youtube.com/watch?")>-1?E.url.split("?")[1].split("v=")[1].split("&")[0]:E.url.split(".be/")[1];if(F)I=a.a.createElement("iframe",(T={title:"outModule",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(F)},Object(h.a)(T,"title","YouTube video player"),Object(h.a)(T,"frameBorder","0"),Object(h.a)(T,"allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),Object(h.a)(T,"allowFullScreen",!0),T)),C=!0}if(E&&E.url&&E.url.indexOf("https://vimeo.com")>-1){var D,N=E.url.replace("https://","").split("/")[1];if(N)I=a.a.createElement("iframe",(D={title:"outModule",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(N)},Object(h.a)(D,"title","Vimeo video player"),Object(h.a)(D,"frameBorder","0"),Object(h.a)(D,"allow","autoplay; fullscreen; picture-in-picture"),Object(h.a)(D,"allowfullscreen",!0),D)),C=!0}return a.a.createElement("div",null,a.a.createElement("div",null,a.a.createElement("div",Object.assign({},e.provided&&e.provided.dragHandleProps,{style:{display:"none"}})),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.infos,onClick:function(t){e.onClick&&e.onClick()}},a.a.createElement("div",{style:{position:"relative",display:"flex"}},C||E.image&&(E.image||e.Avatar||E.image||e.Avatar)&&!o.cards.hide.image?a.a.createElement("div",{className:t.imagePreview,style:s?{backgroundImage:'url("'.concat(s||Mr.a,'")')}:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},C?I:E.image&&!s?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===E.type||"link"===E.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===E.type||"link"===E.type?a.a.createElement(Z.a,{icon:Rr.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Yr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),!b&&a.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},a.a.createElement(fe,null),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),!C&&(!s||e.Avatar||E.image!==s)&&a.a.createElement(a.a.Fragment,null,a.a.createElement("img",{className:t.image,src:"".concat(E.image?E.image:Mr.a),onError:function(e){E.image?u(null):y(!0)},onLoad:function(t){u("".concat(e.Avatar&&!E.image?Mr.a:E.image))},width:"100%"})),a.a.createElement("div",{style:{clear:"both"}})):e.Avatar&&!o.cards.hide.image&&a.a.createElement("div",{className:n.viewList?t.imagePreviewList:t.imagePreview,style:{background:Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},"insight"===E.type||"link"===E.type?a.a.createElement(Z.a,{icon:Rr.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:Yr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),E.image?a.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}},"# ",E._cardCode):a.a.createElement(a.a.Fragment,null),Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&"step"===l.a.getState().db.cards[e].type&&l.a.getState().db.cards[e]._parent===E._id})).length>0&&a.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(p.a)(Object(p.a)({},l.a.getState().control),{},{board:E._id})),t.preventDefault(),t.stopPropagation()}},a.a.createElement(Z.a,{size:"10px",color:"#FFFFFF",icon:"open_in_new"}),Object(S.s)("$__openTaskList"))),"swot"!==n.dataType.filter((function(e){return e.name===E.type}))[0].module&&(E._parent&&E._parent!==E._id||E._planId&&E._planId!==E._id)&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},n.cards[E._parent]?a.a.createElement(fr,{id:E._parent&&l.a.getState().db.cards[E._parent]?E._parent:E._planId&&l.a.getState().db.cards[E._planId]?E._planId:null,loading:_,showLegend:!e.Resume}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:!n.viewList||e.ignoreList?{}:{position:"relative",float:"left",width:"100%"}},E.type.indexOf("guideline")>-1&&(E._aspects&&E._aspects.length>0||E._aspects&&E._aspects.length>0)?a.a.createElement(Ar,{data:E._aspects,type:E.type}):a.a.createElement(a.a.Fragment,null),e.searchText||!E.description&&"plan"!==E.type?a.a.createElement(a.a.Fragment,null):a.a.createElement(we.a,{title:E.description||""},e.Resume?a.a.createElement("div",{className:t.description,style:Object(p.a)({display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",height:90},E.description?{}:{color:"lightgray"})},E.description?"".concat(E.description):"plan"===E.type?Object(S.s)("$__planDescriptionCardPlaceholder"):a.a.createElement(a.a.Fragment,null)):a.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:E.description?Object(S.p)(E.description):""}})),E.kpi_type&&!o.cards.hide.kpi&&a.a.createElement(Cr,{data:E,chartShow:!o.cards.hide.kpiChart}),("link"===E.type||"insight"===E.type)&&a.a.createElement("div",{className:t.dates},a.a.createElement("div",{className:t.dateInfo},a.a.createElement(Se.a,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),O()(1e3*E.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"))),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))),"plan"!==E.type&&Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&l.a.getState().db.cards[e].checklist&&l.a.getState().db.cards[e]._parent===E._id})).length>0&&0===Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&"step"===l.a.getState().db.cards[e].type&&l.a.getState().db.cards[e]._parent===E._id})).length&&a.a.createElement("div",{style:{position:"relative",width:"calc(100%)",top:"16px",clear:"both",marginBottom:"16px"}},a.a.createElement("div",{style:{padding:"7px",backgroundColor:"rgba(0,0,0,0.05)",fontSize:"16px",borderTopLeftRadius:7,borderTopRightRadius:7}},Object(S.s)("$__list",1)),a.a.createElement(pr,{nodeId:E._id,db:"cards",noDelete:!0,showProgress:!0}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))}))),Wr=r(1068),Ur=r.n(Wr),Vr=r(1069),qr=r.n(Vr),Xr=(r(1307),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%"}}}});function Jr(){Jr=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 Kr=a.a.createRef(null);var Zr=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Xr)((function(e){var t,r=a.a.useState(null),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(!1),l=Object(m.a)(c,2),s=l[0],u=l[1],d=a.a.useState(null),p=Object(m.a)(d,2),g=p[0],b=p[1],y=a.a.useState([]),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useRef(null),w=e.classes;a.a.useEffect((function(){j()}),[]),a.a.useEffect((function(){j()}),[e.files,e.img]);var j=function(){var t=x;e.files&&(Object.keys(e.files).map((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),_(t))},E=function(){var t=Object(f.a)(Jr().mark((function t(r){var n,a,o,c,l,s;return Jr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Kr.current.getCroppedCanvas().toDataURL(),i(n),b(null),u(!1),a=O.current.files[0].name,o=O.current.files[0].type,t.next=8,k(n,a,o);case 8:return c=t.sent,{maxSizeMB:.5,maxWidthOrHeight:e.maxWidthOrHeight?e.maxWidthOrHeight:600,useWebWorker:!0},t.prev=10,l=new Promise((function(t){return qr.a.imageFileResizer(c,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,c.type.replace("image/",""),50,0,(function(e){t(k(e,a,o))}))})),t.next=14,l.then((function(e){return e}));case 14:(s=t.sent)&&e.onChange&&e.onChange(n,s),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(10),console.log(t.t0);case 21:case"end":return t.stop()}}),t,null,[[10,18]])})));return function(e){return t.apply(this,arguments)}}(),k=function(e,t,r){return fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:r})}))};return a.a.createElement("div",{className:w.root},a.a.createElement("div",{className:w.viewer,style:{}},!o&&!e.img&&e.avatar&&e.avatarIcon&&a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},a.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(S.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(Z.a,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!o&&!e.img?e.avatar&&(o||e.img)?a.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(S.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(S.d)("AvatarBackground"),backgroundImage:'url("'.concat(o||e.img,'")'),backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",display:"flex",alignItems:"center",justifyContent:"center"}}):a.a.createElement(a.a.Fragment,null):a.a.createElement("img",(t={alt:"MACHEN_IMAGE",className:e.avatar?w.avatarImage:w.image,src:"".concat(o||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=o||e.img},width:"100%"},Object(h.a)(t,"alt",""),Object(h.a)(t,"onClick",(function(){!function(){if(x&&x.length>0){var t=x.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})}}()})),t))),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.onChange?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{padding:"7px"},onClick:function(){O.current.click()}},a.a.createElement(et,{text:Object(S.s)(o||e.img?"$__changeImage":"$__addImage",1),icon:o||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),a.a.createElement("input",{type:"file",onChange:function(e){!function(e){u(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){b(t.result),u(!0)},t.readAsDataURL(r)}else u(!1)}(e.target)},ref:O,id:"file-picker",name:"image",accept:e.accept||".jpg,.jpeg,.png,.gif",style:{display:"none"}})):a.a.createElement(a.a.Fragment,null),e.onDelete&&(o||e.img)?a.a.createElement("div",{style:{padding:"7px"},onClick:function(){e.onDelete()}},a.a.createElement(et,{text:Object(S.s)("$__removeImage",1),icon:"hide_image",textColor:"color",iconColor:"color"})):a.a.createElement(a.a.Fragment,null)),a.a.createElement(st.a,{fullWidth:!0,onClose:function(){return u(!1)},"aria-labelledby":"simple-dialog-title",open:s},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},a.a.createElement(na,{title:Object(S.s)("$__cropImage",1),icon:"crop",onSave:function(){E()},onCancel:function(){u(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),a.a.createElement(Ur.a,{className:e.avatar?w.circleCropper:w.cropper,ref:Kr,src:g||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})))})));function Qr(){Qr=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 en,tn=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Pr)((function(e){var t=l.a.getState().db,r=a.a.useState({}),n=Object(m.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){i(Object(p.a)(Object(p.a)(Object(p.a)({},e.toTemplate&&t.cards[e.cardId].name?{name:"".concat(Object(S.s)("$__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 s=a.a.useState({}),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],x=l.a.getState().db.cards[e.cardId]&&l.a.getState().db.cards[e.cardId].type?t.dataType.filter((function(t){return t.name===l.a.getState().db.cards[e.cardId].type}))[0]:{},_=function(){var r=Object(f.a)(Qr().mark((function r(){var n,a;return Qr().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!o||o.name){r.next=4;break}h(Object(p.a)(Object(p.a)({},d),{},{name:!0})),r.next=15;break;case 4:return v(1),r.prev=5,n=Object(p.a)(Object(p.a)(Object(p.a)({},t.cards[e.cardId]),o),{},{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(at.G)(e,!0,n);case 9:(a=r.sent)&&a._id&&(v(2),setTimeout((function(){O(a._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)}}(),O=function(){var t=Object(f.a)(Qr().mark((function t(r){return Qr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(at.i)(e,e.cardId,r);case 3:t.sent&&(v(3),setTimeout((function(){w(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)}}(),w=function(){var t=Object(f.a)(Qr().mark((function t(r){var n,a;return Qr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.b)(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,Object(We.b)(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(v(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?c.a.push("sp#tab/templates"):c.a.push("sp#".concat(r,"/dashboard"))}),500));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return y>0?a.a.createElement($e.a,{style:{padding:"7px"}},a.a.createElement(Ke,{title:"".concat(o.name?o.name:t.cards[e.cardId].name," "),icon:x&&x.icon?x.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(S.d)("medium"),fontSize:"16px"}),1===y&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",clear:"both"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__installingTemplate")),a.a.createElement(br,null)),2===y&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__templateInstalled")),a.a.createElement(Z.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__copyingData")),a.a.createElement(br,null))),3===y&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__templateInstalled")),a.a.createElement(Z.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__copiedData")),a.a.createElement(Z.a,{icon:"done_all",color:"green"})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",marginTop:"15px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},Object(S.s)("$__preparingToRedirect")),a.a.createElement(br,null))),4===y&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{position:"relative",float:"left",padding:"15px",display:"flex",justifyContent:"center",borderRadius:"50%",border:"solid 1px green"}},a.a.createElement(Z.a,{icon:"done_all",color:"green",size:"50px"}))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement($e.a,{style:{padding:"7px"}},a.a.createElement(Ke,{title:"".concat(Object(S.s)("$__template",1),": ").concat(t.cards[e.cardId].name),icon:x&&x.icon?x.icon:"help",iconTitle:"$__".concat(t.cards[e.cardId].type),color:Object(S.d)("medium"),fontSize:"16px"}),a.a.createElement("div",null,a.a.createElement(Zr,{img:e.toTemplate&&t.cards[e.cardId].image?t.cards[e.cardId].image:null,onChange:function(e,t){i(Object(p.a)(Object(p.a)({},o),{},{image:e,file:t}))},placeholder:""}),a.a.createElement(ye,{error:d&&d.name,helperText:Object(S.s)("$__youMustDefineAName"),label:"".concat(Object(S.s)("$__customName",1)),variant:Object(S.d)("fieldVariant"),name:"name",defaultValue:e.toTemplate&&t.cards[e.cardId].name?"".concat(Object(S.s)("$__template")," - ").concat(t.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{name:e.target.value})),d&&d.name&&h(Object(p.a)(Object(p.a)({},d),{},{name:!1}))}},placeholder:Object(S.s)(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),a.a.createElement(ye,{label:"".concat(Object(S.s)("$__customDescription",1)),variant:Object(S.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:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{icon:"toc"})),onChange:function(e){i(Object(p.a)(Object(p.a)({},o),{},{description:e.target.value}))}},placeholder:Object(S.s)(e.toTemplate?"$__templateDescription_placeholder":"$__planDescription_placeholder",1),multiline:!0})),a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"#4caf50",marginTop:"7px",cursor:"pointer"},onClick:function(e){_(),e.stopPropagation()}},a.a.createElement(et,{text:Object(S.s)("$__ready","*"),icon:"done_all",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:"lightgrey",cursor:"pointer"},onClick:function(t){e.onComplete(),t.stopPropagation()}},a.a.createElement(et,{text:Object(S.s)("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})));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(G.a)(Pr),an=j.b.div(en||(en=Object(d.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(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;"):""})),on=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,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function e(t){var r,o,i,s,u,d,g,b,v,x=nn(),_=l.a.getState(),w=_.db,j=_.session,E=t.cardId&&l.a.getState().db.cards[t.cardId]?l.a.getState().db.cards[t.cardId]:(null===(r=t.data)||void 0===r?void 0:r._id)&&l.a.getState().db.cards[null===(o=t.data)||void 0===o?void 0:o._id]?l.a.getState().db.cards[t.data._id]:{},L=a.a.useState(!1),C=Object(m.a)(L,2),I=C[0],T=C[1],F=a.a.useState(t.cardsExpanded),D=Object(m.a)(F,2),N=D[0],A=D[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useState(!1),B=Object(m.a)(Y,2),R=B[0],G=B[1],H=a.a.useState(!1),W=Object(m.a)(H,2),U=W[0],V=W[1],q=a.a.useState(t.cardColorPicker?Object(at.r)(E):{}),X=Object(m.a)(q,2),J=X[0],K=X[1],Q=a.a.useState(!1),ee=Object(m.a)(Q,2),te=ee[0],re=ee[1],ne=a.a.useState({}),ae=Object(m.a)(ne,2),oe=ae[0],ie=ae[1],ce=a.a.useRef(!0);a.a.useEffect((function(){return ce.current=!0,function(){ce.current=!1}}),[]);var le=y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),se=Object(n.useRef)({});Object(n.useEffect)((function(){if(se.current&&ce.current&&t.onResize){var e=se.current.clientHeight;if(t.separator&&(e+=55),t.onResize(e,I),se&&se.current){se.current.addEventListener("DOMNodeInserted",(function(){var e=se.current.clientHeight;t.separator&&(e+=55),t.onResize(e,I)}));var r=new MutationObserver((function(){if(ce.current){var e=se.current.clientHeight;t.separator&&(e+=55),t.onResize(e,I)}}));return r.observe(se.current,{attributes:!0,childList:!0,subtree:!0}),function(){r.disconnect()}}}}),[se,I,t.manualExpanded,te]),Object(n.useEffect)((function(){le&&t.searchs&&t.searchs[le]&&JSON.stringify(t.searchs[le])!==JSON.stringify(oe)&&ce.current&&ie(t.searchs[le])}),[t.searchs]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&ce.current&&re(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&te&&ce.current&&re(!1)}),[null===t||void 0===t||null===(i=t.snapshot)||void 0===i?void 0:i.combineTargetFor]),a.a.useEffect((function(){"0"===String(t.unlockedPrivates)&&U&&ce.current&&V(!1)}),[t.unlockedPrivates]),a.a.useEffect((function(){ce.current&&A(t.cardsExpanded)}),[t.cardsExpanded]),a.a.useEffect((function(){t.onExpand&&ce.current&&t.onExpand(N)}),[N]);var ue=window.location.hash.split("/");if(ue[0]=ue[0].replace("#",""),a.a.useEffect((function(){ce.current&&t.cardColorPicker&&ue&&"overview"===ue[1]&&K(Object(at.r)(E))}),[t.cards]),E==={}||!E)return a.a.createElement(a.a.Fragment,null);var de=Object(S.j)(),pe=Object(at.t)(E._id);if(!E||!E||!E._id)return null;var fe=!!(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&&ue&&ue[1]&&"matrix"===ue[1]&&"swot"===w.dataType.filter((function(e){return e.name===E.type}))[0].module),he=function(){var e=Object(f.a)(rn().mark((function e(){var r,n,a,o,i,c;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=E.type.indexOf("guideline")>-1?"guideline":"objective"===E.type?"objective":"goal"===E.type?"goal":"action",(a=Object(p.a)({},(null===(r=l.a.getState().searchs[le])||void 0===r?void 0:r.selectedCards)||{}))&&a[n]&&a[n]===E._id?delete a[n]:a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},E.type.indexOf("guideline")>-1?"guideline":"objective"===E.type?"objective":"goal"===E.type?"goal":"action",E._id)),t.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},le,Object(p.a)(Object(p.a)({},l.a.getState().searchs[le]||{}),{},{selectedCards:a})))),fe){e.next=7;break}return me(),e.abrupt("return");case 7:o={},Object.keys(w.cards).filter((function(e){return w.cards[e]&&!w.cards[e].deleted&&(w.cards[e]._planId===ue[0]||w.cards[e]._parent===ue[0])})).map((function(e){o=Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},e,w.cards[e]))})),i=Object(p.a)({},l.a.getState().db.cards),c=!E._selected,"swot"!==w.dataType.filter((function(e){return e.name===E.type}))[0].module&&Object.keys(o).filter((function(e){return o[e]._id!==E._id&&o[e].type&&o[e].type===E.type})).map((function(e){o[e]._selected&&(o[e]._selected=!1)})),E.type.indexOf("guideline")>-1&&Object.keys(o).map((function(e){o[e]._selected&&(o[e]._selected=!1)})),E.type.indexOf("objective")>-1&&Object.keys(o).filter((function(e){return"goal"===o[e].type})).map((function(e){o[e]._selected&&(o[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)({},i),o),{},Object(h.a)({},E._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[E._id]),o[E._id]),{},{_selected:c})))})),"swot"===l.a.getState().db.dataType.filter((function(e){return e.name===E.type}))[0].module&&Object(at.H)(t),c&&"matrix"===l.a.getState().db.dataType.filter((function(e){return e.name===E.type}))[0].module&&Object(at.I)(t,E._id);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=Object(f.a)(rn().mark((function e(){var r,n,a;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(w.cards).filter((function(e){return w.cards[e]&&!w.cards[e].deleted&&(w.cards[e]._planId===ue[0]||w.cards[e]._parent===ue[0])})).map((function(e){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,w.cards[e]))})),n=Object(p.a)({},l.a.getState().db.cards),a=!E._selected,"swot"!==w.dataType.filter((function(e){return e.name===E.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==E._id&&r[e].type&&r[e].type===E.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),E.type.indexOf("guideline")>-1?Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):E.type.indexOf("objective")>-1?Object.keys(r).filter((function(e){return-1===r[e].type.indexOf("objective")||-1===r[e].type.indexOf("guideline")})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):E.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")})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).map((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)({},E._id,Object(p.a)(Object(p.a)(Object(p.a)({},l.a.getState().db.cards[E._id]),r[E._id]),{},{_selected:a})))}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=Object(f.a)(rn().mark((function e(){var r,n=arguments;return rn().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:E._id,module:"cardEdit",activeModule:r,data:E}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(){var e=Object(f.a)(rn().mark((function e(){var r,n,a=arguments;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],E._hasStep&&!r&&nr(Object(p.a)(Object(p.a)({},t),{},{nodeId:E._id})),E._hasStep&&!r){e.next=7;break}return e.next=5,dt.a.post("/Card_Count",{id:E._id});case 5:n=e.sent,parseInt(n.data)>0?Object(S.c)({message:Object(S.s)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.s)("$__concludeAll"),text:Object(S.s)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){Object(at.P)(Object(p.a)(Object(p.a)({},t),{},{data:{_id:E._id}}),{status:"completed"===E.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object(at.e)(t,E._id,"completed"===E.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(S.s)("$__cancel"),text:Object(S.s)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(Object(at.P)(Object(p.a)(Object(p.a)({},t),{},{data:{_id:E._id}}),{status:"completed"===E.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object(at.e)(t,E._id,"completed"===E.status?"inProgress":"completed"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=Object(f.a)(rn().mark((function e(t){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(pe)>2||de.owner||de.plan&&(de.planAdmin||de.planModerate)?c.a.push("sp#".concat(t,"/dashboard")):ge("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.o)(t,{_id:E._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.F)(t,{_id:E._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_e=!t.noExpanded&&(I||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||E._expanded||t.cardsExpanded)),Oe=!!(de&&(de.owner||de.plan&&(de.planAdmin||de.planModerate))||pe>2),je={button:!1,date:null};if(je=E&&E._users&&Object.keys(E._users).filter((function(e){return e===j._id})).length>0&&w.dataType.filter((function(e){return e.name===E.type})).length>0&&w.dataType.filter((function(e){return e.name===E.type}))[0].modules.indexOf("myDay")>-1?E._users[Object.keys(E._users).filter((function(e){return e===j._id}))[0]].myDay?{button:!0,date:E._users[Object.keys(E._users).filter((function(e){return e===j._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},E&&E.private&&(!E._users||E._users&&!E._users[j._id]))return a.a.createElement(a.a.Fragment,null);if(M)return a.a.createElement(tn,{cardId:E._id,toTemplate:!E.isTemplate,onComplete:function(){ce.current&&z(!1)}});var Ee={title:(null===E||void 0===E?void 0:E.name)||Object(S.s)("$__new",1),icon:(null===E||void 0===E?void 0:E.icon)||E.type&&w&&w.dataType&&w.dataType.filter((function(e){return e.name===E.type}))[0]&&w.dataType.filter((function(e){return e.name===E.type}))[0].icon||"$__topic",iconTitle:"$__".concat(E.type)};if(E._planId&&(null===(s=l.a.getState().db.cards[E._planId])||void 0===s?void 0:s.customColumns)&&(E.type.indexOf("guideline")>-1||E.type.indexOf("objective")||E.type.indexOf("goal"))){var ke=JSON.parse(l.a.getState().db.cards[E._planId].customColumns),Ce=E.type.indexOf("guideline")>-1?"guideline":E.type;ke["".concat(Ce,"s")]&&(Ee=Object(p.a)(Object(p.a)(Object(p.a)({},Ee),ke["".concat(Ce,"s")].name?{iconTitle:ke["".concat(Ce,"s")].name}:{}),ke["".concat(Ce,"s")].icon?{icon:ke["".concat(Ce,"s")].icon}:{}))}return a.a.createElement(an,{ref:se,separator:t.separator||!1,plan:!(!_e||"plan"!==E.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:E.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===E.type||!t.inLine),className:t.noShadow?x.containerNoShadow:x.container,selectable:t.showSelected,selected:!!(oe&&oe.selectedCards&&Object.keys(oe.selectedCards).filter((function(e){return oe.selectedCards[e]===E._id})).length>0),priority:E.priority&&w.priority.filter((function(e){return String(e.value)===String(E.priority)})).length>0?w.priority.filter((function(e){return String(e.value)===String(E.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){ce.current&&G(!0)},onMouseLeave:function(){ce.current&&setTimeout((function(){ce.current&&G(!1)}),100)},onClick:function(e){(!E._requireApproval||l.a.getState().db.cards[l.a.getState().db.cards[E._id]._parent]._users[j._id]&&l.a.getState().db.cards[l.a.getState().db.cards[E._id]._parent]._users[j._id].approvalResponsible)&&(t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&fe||t.selectable)?he():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==E.type?t.locked||ge():ye(E._id):t.onClick(),t.onOpen&&t.onOpen()))},onContextMenu:function(e){}},("completed"===E.status||t.cardColorPicker&&J.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&&J.color?J.color:"rgba(0,0,0,1)",opacity:J.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.s)("$__dropHereToLink")),a.a.createElement(Ke,{private:!(!E.private&&!E.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})),ce.current&&V(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:Ee.title,tooltipText:"".concat(E._parent&&l.a.getState().db.cards[E._parent]?"".concat(l.a.getState().db.cards[E._parent].name," / "):"").concat(Ee.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:Ee.icon,iconTitle:Ee.iconTitle,color:"#6d6d6d",editable:!(E.name||t.onlyOption&&!t.editable),_id:E._id,locked:!("link"!==E.type&&!t.locked),colorPicker:Oe&&t.cardColorPicker&&J&&!J.parent?function(e){(!J.color&&e||J.color&&J.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)({},E._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[E._id]),{},{color:e})))}))}:null,onEdit:"completed"!==E.status&&pe&&parseInt(pe)>1||de&&de.plan&&(de.owner||de.planAdmin||de.planEdit||de.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)({},E._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[E._id]),{},{name:e})))}))}:null,moreButton:R,options:E.deleted?[{name:Object(S.s)("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){xe()},show:"hover",color:Object(S.d)("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[Object.keys(l.a.getState().db.cards).filter((function(e){return l.a.getState().db.cards[e]&&"step"===l.a.getState().db.cards[e].type&&l.a.getState().db.cards[e]._parent===E._id})).length>0&&{name:"$__openTaskList",icon:"schema",show:"fixed",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{board:E._id}))}},E.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(E.url,"_blank")}},!E.archived&&"completed"!==E.status&&je&&je.button&&{name:O()(new Date(1e3*je.date)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:O()(new Date(1e3*je.date)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:O()(new Date(1e3*je.date)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(je&&je.date&&(!je||!je.date||O()(new Date(1e3*je.date)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")));Object(at.K)(t,{_id:E._id,userId:j._id,option:e}),t.myDayClick&&t.myDayClick()}},t.suggestion&&{name:"$__removeFromMyDaySuggestions",icon:"playlist_remove",show:"hover",onClick:function(){Object(at.K)(t,{_id:E._id,userId:j._id,option:!1,noLog:!0}),t.myDayClick&&t.myDayClick()}},!E.archived&&!t.onlyOption&&(pe&&parseInt(pe)>1||de.owner||de.planAdmin||de.planEdit||de.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),ge()},show:"hover"},!E.archived&&!E.isTemplate&&E._users&&"completed"!==E.status&&E._users[j._id]&&(!E._kpiTimer||0===Object.keys(E._kpiTimer).length||E._kpiTimer&&Object.keys(E._kpiTimer).length>0&&0===Object.keys(E._kpiTimer).filter((function(e){return j&&j._id&&e&&E._kpiTimer[e]&&E._kpiTimer[e].userId&&E._kpiTimer[e].userId===j._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.w)(t,E._id),!(je&&je.date&&(!je||!je.date||O()(new Date(1e3*je.date)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")))&&Object(at.K)(t,{_id:E._id,userId:j._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},E._users&&"completed"!==E.status&&E._users[j._id]&&E._hasStep&&{name:"$__completeStep",icon:"playlist_add_check",color:"#6ab6c2",show:"hover",onClick:function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:be();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},E._users&&"completed"!==E.status&&E._users[j._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:be(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!E.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&{name:E._selected?"$__removeSelection":"$__selectThis",icon:E._selected?"visibility_off":"visibility",hide:!0,onClick:function(){he()}},{name:"$__duplicate",icon:"content_copy",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(p.a)(Object(p.a)({},l.a.getState().control),{},{toCopyMove:E._id}))}},!E.isTemplate&&"plan"===E.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){ce.current&&z(!0)}},E&&!E.isTemplate&&"plan"===E.type&&!E.archived&&(E._users&&E._users[j._id]&&E._users[j._id].access&&5===parseInt(E._users[j._id].access)||de&&de.planAdmin)&&{name:Object(S.s)("$__shelve"),icon:"archive",onClick:function(){Object(at.N)(t,{_id:E._id,archived:!0})}},(pe&&5===parseInt(pe)||de.owner||de.planAdmin||de.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||E.archived||0===w.dataType.filter((function(e){return e.name===E.type})).length||w.dataType.filter((function(e){return e.name===E.type})).length>0&&"swot"===w.dataType.filter((function(e){return e.name===E.type}))[0].module?ve():ge("delete"),t.onAction&&t.onAction()},show:"hover"},E&&!E.isTemplate&&"plan"===E.type&&E.archived&&(E._users&&E._users[j._id]&&E._users[j._id].access&&parseInt(5===E._users[j._id])||de&&de.planAdmin)&&{name:Object(S.s)("$__unarchive"),icon:"archive",onClick:function(){Object(at.N)(t,{_id:E._id,archived:null})}},!E.archived&&!E.isTemplate&&{name:E._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:E._isFavorite?"favorite":"favorite_border",color:Object(S.d)("medium"),onClick:function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.g)(t,E._id,!!E._isFavorite),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)({},E._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[E._id]),{},{_isFavorite:!E._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!E.isTemplate&&!E.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==E.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==E.status?"lightgray":"green",onClick:function(){var e=Object(f.a)(rn().mark((function e(){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:be();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:!t.noExpanded&&_e,noExpanding:t.expanded||l.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!_e),t.expanded||l.a.getState().db.cardsExpanded||ce.current&&T((function(e){return!e}))},onClick:function(e){}}),E&&(E._cardCode||E.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},E&&E._cardCode&&(!_e||_e&&!E.image)?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",E._cardCode):a.a.createElement(a.a.Fragment,null),E&&E.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",E.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===E.type||"link"===E.type)&&E._createdBy&&w.users[E._createdBy._id]||E._createdBy&&E._createdBy.channel&&E._createdBy._id&&E._createdBy._id!==j._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(we.a,{title:E._createdBy.name||w.users[E._createdBy._id].name},a.a.createElement(Ie.a,{alt:E._createdBy.name||w.users[E._createdBy._id].name,src:(null===(u=w.users[E._createdBy._id])||void 0===u?void 0:u.image)||null,size:"12px",style:{width:16,height:16}},(null===(d=E._createdBy)||void 0===d||null===(g=d.name)||void 0===g?void 0:g.substr(0,1))||w.users[E._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.s)("$__createdBy","*")),": ",(null===(b=E._createdBy)||void 0===b||null===(v=b.name)||void 0===v?void 0:v.split(" ")[0])||w.users[E._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,O()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(1e3*E.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(O()(1e3*E.created_at).tz("America/Sao_Paulo").format("H:mm")):O()(new Date).tz("America/Sao_Paulo").format("YYYY")===O()(1e3*E.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(O()(1e3*E.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(O()(1e3*E.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))),E._kpiTimer&&Object.keys(E._kpiTimer).length>0&&0!==Object.keys(E._kpiTimer).filter((function(e){return E._kpiTimer[e].userId===j._id})).length&&a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Ht,{data:E})),!t.noExpanded&&_e&&(!E.private||E.private&&(U||l.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(Hr,Object.assign({},t,{private:!!E.private,expanded:!0,Resume:!0})),a.a.createElement("div",null,t.searchText&&E.description&&a.a.createElement("div",{className:x.description},Object(S.b)(E.description,t.searchText)))):_e?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ut,null)):a.a.createElement(a.a.Fragment,null),E.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",null,"completed"!==E.status&&(E.startDate&&O()(E.startDate).isValid()||E.endDate&&O()(E.endDate).isValid())?a.a.createElement("div",null,a.a.createElement("div",{className:E.endDate&&O()(new Date(1e3*E.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<O()().format("YYYY-MM-DD")&&"completed"!==E.status?x.lateDates:x.dates},E.startDate&&O()(E.startDate).isValid()&&a.a.createElement("div",{className:x.dateInfo},a.a.createElement(Se.a,{overlap:"rectangular",className:x.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*E.startDate)instanceof Date&&!isNaN(new Date(1e3*E.startDate))?O()(new Date(1e3*E.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):O()(E.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),E.endDate&&O()(E.endDate).isValid()?a.a.createElement("div",{className:x.dateInfo},a.a.createElement(Se.a,{overlap:"rectangular",className:x.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*E.endDate)instanceof Date&&!isNaN(new Date(1e3*E.endDate))?O()(new Date(1e3*E.endDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):O()(E.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")):a.a.createElement(a.a.Fragment,null))):a.a.createElement(a.a.Fragment,null)),E._tags&&E._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:t.showTags||_e?{marginBottom:33}:{}},a.a.createElement(Le.a,{options:E._tags,expanded:!!(t.showTags||_e&&"plan"!==E.type&&"link"!==E.type&&"insight"!==E.type)})):a.a.createElement(a.a.Fragment,null),E._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(Se.a,{overlap:"rectangular",className:x.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(S.s)("$__recurrence")).concat(E.recurrenceCreatedDate?": ".concat(O()(E.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(S.s)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",cardId:E._recurrenceId,Avatar:!0,ignoreList:!0,onlyOption:!0}))}),E.recurrenceCreatedDate?O()(E.recurrenceCreatedDate).format("DD/MM/YYYY"):""),_e||E._users&&Object.keys(E._users).filter((function(e){return null!==String(e)})).length>0&&(!E._users[j._id]||E._users[j._id]&&Object.keys(E._users).length>1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:_e?37:7}},a.a.createElement("div",{className:x.usersContent},a.a.createElement("div",{className:x.users},a.a.createElement(tt.a,{_id:E._id,data:E,permission:Oe,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),E.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(),ce.current&&z(!0)}},a.a.createElement(et,{text:Object(S.s)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),E._requireApproval&&E._parent&&(!l.a.getState().db.cards[E._parent]||l.a.getState().db.cards[E._parent]&&l.a.getState().db.cards[E._parent]._users&&(!l.a.getState().db.cards[E._parent]._users[j._id]||l.a.getState().db.cards[E._parent]._users[j._id]&&!l.a.getState().db.cards[E._parent]._users[j._id].approvalResponsible))?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:"rgba(0,0,0,0.6)",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"white"}},a.a.createElement(Z.a,{icon:"lock",color:"white"}),a.a.createElement("span",null,Object(S.s)("$__awaitApproval")))):!R&&"completed"===E.status&&a.a.createElement("div",{style:{backgroundColor:"rgba(0,0,0,0.4)",position:"absolute",height:"2px",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.s)("$__completeDate"),":",Object(S.k)(E.completed_at||E.updated_at))),"plan"!==E.type&&E.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.s)("$__restoreThis",1),text:Object(S.s)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){xe()},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"}}))})),cn=Object(ae.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}}}}))(Te.a),ln=Object(ae.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}}}}))(Te.a),sn=Object(G.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));var un=Object(u.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(T.b)(I,e)}))((function(e){var t=sn();return a.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?a.a.createElement(ln,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children):a.a.createElement(cn,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children))})),dn=r(53),pn=r(1892),fn=["children","className"],hn=Object(G.a)({grid:{margin:"0",width:"100%"}});function mn(e){var t=hn(),r=e.children,n=e.className,o=Object(dn.a)(e,fn);return a.a.createElement(pn.a,Object.assign({container:!0},o,{className:t.grid+" "+n}),r)}var gn=["children","className"],bn=Object(G.a)({grid:{padding:"0 15px !important"}});function yn(e){var t=bn(),r=e.children,n=e.className,o=Object(dn.a)(e,gn);return a.a.createElement(pn.a,Object.assign({item:!0},o,{className:t.grid+" "+n}),r)}var vn=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:U.O,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:U.O,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(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.b)+", 0.4)"},info:{backgroundColor:U.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.4)"},success:{backgroundColor:U.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.4)"},danger:{backgroundColor:U.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.4)"},warning:{backgroundColor:U.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.4)"},primary:{backgroundColor:U.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.z[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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.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:Object(h.a)({position:"absolute",bottom:"0px",padding:"10px",height:"auto",width:"calc(100% - 0px)",zIndex:10},"padding","7px"),files:{display:"inline-table",position:"relative"},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%",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"}}}},xn=r(642),_n=r.n(xn),On=r(643),wn=r.n(On),jn=r(644),En=r.n(jn),kn=r(1070),Sn=r.n(kn),Ln=r(645),Cn=r.n(Ln),In=r(1893),Tn={button:{minHeight:"auto",minWidth:"auto",backgroundColor:U.q[0],color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.q[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.q[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.q[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:U.O,backgroundColor:U.q[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.q[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.q[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:U.z[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.z[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.z[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.z[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.z[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.z[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.z[0])+", 0.2)"}},info:{backgroundColor:U.u[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.u[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.u[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.u[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.u[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.u[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.2)"}},success:{backgroundColor:U.G[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.G[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.G[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.G[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.G[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.G[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.2)"}},warning:{backgroundColor:U.N[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.N[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.N[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.N[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.N[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.N[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.2)"}},danger:{backgroundColor:U.j[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.j[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.j[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.j[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.j[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.j[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.2)"}},rose:{backgroundColor:U.D[0],boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.D[0])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.D[0])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.D[0])+", 0.12)","&:hover,&:focus":{backgroundColor:U.D[0],boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.D[0])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.D[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:U.O,color:U.q[0]}},twitter:{backgroundColor:U.K,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.K)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.K)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.K)+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:U.K,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.K)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.K)+", 0.2)"}},facebook:{backgroundColor:U.o,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.o)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.o)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.o)+", 0.12)","&:hover,&:focus":{backgroundColor:U.o,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.o)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.o)+", 0.2)"}},google:{backgroundColor:U.p,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.p)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.p)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.p)+", 0.12)","&:hover,&:focus":{backgroundColor:U.p,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.p)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.p)+", 0.2)"}},linkedin:{backgroundColor:U.v,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.v)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.v)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.v)+", 0.12)","&:hover,&:focus":{backgroundColor:U.v,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.v)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.v)+", 0.2)"}},pinterest:{backgroundColor:U.w,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.w)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.w)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.w)+", 0.12)","&:hover,&:focus":{backgroundColor:U.w,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.w)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.w)+", 0.2)"}},youtube:{backgroundColor:U.P,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.P)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.P)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.P)+", 0.12)","&:hover,&:focus":{backgroundColor:U.P,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.P)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.P)+", 0.2)"}},tumblr:{backgroundColor:U.J,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.J)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.J)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.J)+", 0.12)","&:hover,&:focus":{backgroundColor:U.J,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.J)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.J)+", 0.2)"}},github:{backgroundColor:U.q[7],color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.q[6])+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.q[6])+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.q[6])+", 0.12)","&:hover,&:focus":{backgroundColor:U.q[7],color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.q[6])+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.q[6])+", 0.2)"}},behance:{backgroundColor:U.a,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.a)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.a)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.a)+", 0.12)","&:hover,&:focus":{backgroundColor:U.a,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.a)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.a)+", 0.2)"}},dribbble:{backgroundColor:U.n,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.n)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.n)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.n)+", 0.12)","&:hover,&:focus":{backgroundColor:U.n,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.n)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.n)+", 0.2)"}},reddit:{backgroundColor:U.A,color:U.O,boxShadow:"0 2px 2px 0 rgba("+Object(U.r)(U.A)+", 0.14), 0 3px 1px -2px rgba("+Object(U.r)(U.A)+", 0.2), 0 1px 5px 0 rgba("+Object(U.r)(U.A)+", 0.12)","&:hover,&:focus":{backgroundColor:U.A,color:U.O,boxShadow:"0 14px 26px -12px rgba("+Object(U.r)(U.A)+", 0.42), 0 4px 23px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.A)+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:U.O,background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:U.z[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:U.u[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:U.G[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:U.N[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:U.D[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:U.j[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:U.K}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:U.o}},"&$google":{"&,&:focus,&:hover,&:visited":{color:U.p}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:U.v}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:U.w}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:U.P}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:U.J}},"&$github":{"&,&:focus,&:hover,&:visited":{color:U.q[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:U.a}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:U.n}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:U.A}}},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:U.q[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"}}}},Fn=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],Dn=Object(G.a)(Tn),Nn=a.a.forwardRef((function(e,t){var r,n=Dn(),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(dn.a)(e,Fn),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(Fe.a,Object.assign({},y,{ref:t,classes:b,className:v}),c)})),An=function(e){return{popperClose:{pointerEvents:"none",display:"none !important"},popperNav:Object(h.a)({},e.breakpoints.down("sm"),{position:"static !important",left:"unset !important",top:"unset !important",transform:"none !important",willChange:"unset !important","& > div":{boxShadow:"none !important",marginLeft:"0rem",marginRight:"0rem",transition:"none !important",marginTop:"0px !important",marginBottom:"0px !important",padding:"0px !important",backgroundColor:"transparent !important","& ul li":{color:U.O+" !important",margin:"10px 15px 0!important",padding:"10px 15px !important","&:hover":{backgroundColor:"hsla(0,0%,78%,.2)",boxShadow:"none"}}}}),manager:{"& > div > button:first-child > span:first-child, & > div > a:first-child > span:first-child":{width:"100%"}},innerManager:{"& > div > button,& > div > a":{margin:"0px !important",color:"inherit !important",padding:"10px 20px !important","& > span:first-child":{width:"100%",justifyContent:"flex-start"}}},target:{"& > button:first-child > span:first-child, & > a:first-child > span:first-child":{display:"inline-block"},"& $caret":{marginLeft:"0px"}},dropdown:{borderRadius:"3px",border:"0",boxShadow:"0 2px 5px 0 rgba("+Object(U.r)(U.b)+", 0.26)",top:"100%",zIndex:"1000",minWidth:"160px",padding:"5px 0",margin:"2px 0 0",fontSize:"12px",textAlign:"left",listStyle:"none",backgroundColor:U.O,backgroundClip:"padding-box"},menuList:{padding:"0"},popperResponsive:Object(h.a)({zIndex:"1200"},e.breakpoints.down("sm"),{zIndex:"1640",position:"static",float:"none",width:"auto",marginTop:"0",backgroundColor:"transparent",border:"0",boxShadow:"none",color:"black"}),dropdownItem:Object(p.a)(Object(p.a)({},U.l),{},{fontSize:"13px",padding:"10px 20px",margin:"0 5px",borderRadius:"2px",position:"relative",transition:"all 150ms linear",display:"block",clear:"both",fontWeight:"400",height:"100%",color:U.q[7],whiteSpace:"nowrap",minHeight:"unset"}),darkHover:{"&:hover":{boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.q[16])+", 0.4)",backgroundColor:U.q[16],color:U.O}},primaryHover:{"&:hover":Object(p.a)({backgroundColor:U.z[0],color:U.O},U.x)},infoHover:{"&:hover":Object(p.a)({backgroundColor:U.u[0],color:U.O},U.s)},successHover:{"&:hover":Object(p.a)({backgroundColor:U.G[0],color:U.O},U.E)},warningHover:{"&:hover":Object(p.a)({backgroundColor:U.N[0],color:U.O},U.L)},dangerHover:{"&:hover":Object(p.a)({backgroundColor:U.j[0],color:U.O},U.h)},roseHover:{"&:hover":Object(p.a)({backgroundColor:U.D[0],color:U.O},U.B)},dropdownItemRTL:{textAlign:"right"},dropdownDividerItem:{margin:"5px 0",backgroundColor:"rgba("+Object(U.r)(U.b)+", 0.12)",height:"1px",overflow:"hidden"},buttonIcon:{width:"20px",height:"20px"},caret:{transition:"all 150ms ease-in",display:"inline-block",width:"0",height:"0",marginLeft:"4px",verticalAlign:"middle",borderTop:"4px solid",borderRight:"4px solid transparent",borderLeft:"4px solid transparent"},caretActive:{transform:"rotate(180deg)"},caretDropup:{transform:"rotate(180deg)"},caretRTL:{marginRight:"4px"},dropdownHeader:{display:"block",padding:"0.1875rem 1.25rem",fontSize:"0.75rem",lineHeight:"1.428571",color:U.q[1],whiteSpace:"nowrap",fontWeight:"inherit",marginTop:"10px",minHeight:"unset","&:hover,&:focus":{backgroundColor:"transparent",cursor:"auto"}},noLiPadding:{padding:"0"}}},Pn=Object(G.a)(An);function $n(e){var t,r,n,o=a.a.useState(null),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Pn(),u=function(e){c.contains(e.target)||l(null)},d=function(t){l(null),e&&e.onClick&&e.onClick(t)},p=e.buttonText,f=e.buttonIcon,g=e.dropdownList,b=e.buttonProps,y=e.dropup,v=e.dropdownHeader,_=e.caret,O=e.hoverColor,w=e.dropPlacement,j=e.rtlActive,E=e.noLiPadding,k=e.innerDropDown,S=e.navDropdown,L=x()((t={},Object(h.a)(t,s.caret,!0),Object(h.a)(t,s.caretDropup,y&&!c),Object(h.a)(t,s.caretActive,Boolean(c)&&!y),Object(h.a)(t,s.caretRTL,j),t)),C=x()((r={},Object(h.a)(r,s.dropdownItem,!0),Object(h.a)(r,s[O+"Hover"],!0),Object(h.a)(r,s.noLiPadding,E),Object(h.a)(r,s.dropdownItemRTL,j),r)),I=a.a.createElement(Pe.a,{role:"menu",className:s.menuList},void 0!==v?a.a.createElement(Ae.a,{onClick:function(){return d(v)},className:s.dropdownHeader},v):null,g.map((function(e,t){return e.divider?a.a.createElement(In.a,{key:t,onClick:function(){return d("divider")},className:s.dropdownDividerItem}):void 0!==e.props&&"multi"===e.props["data-ref"]?a.a.createElement(Ae.a,{key:t,className:C,style:{overflow:"visible",padding:0}},e):a.a.createElement(Ae.a,{key:t,onClick:function(){return d(e)},className:C},e)})));return a.a.createElement("div",{className:k?s.innerManager:s.manager},a.a.createElement("div",{className:void 0!==p?"":s.target},a.a.createElement(Nn,Object.assign({"aria-label":"Notifications","aria-owns":c?"menu-list":null,"aria-haspopup":"true"},b,{onClick:function(e){c&&c.contains(e.target)?l(null):l(e.currentTarget)}}),void 0!==f?a.a.createElement(e.buttonIcon,{className:s.buttonIcon}):null,void 0!==p?p:null,_?a.a.createElement("b",{className:L}):null)),a.a.createElement(Me.a,{open:Boolean(c),anchorEl:c,transition:!0,disablePortal:!0,placement:w,className:x()((n={},Object(h.a)(n,s.popperClose,!c),Object(h.a)(n,s.popperResponsive,!0),Object(h.a)(n,s.popperNav,Boolean(c)&&S),n))},(function(){return a.a.createElement(Ne.a,{in:Boolean(c),id:"menu-list",style:y?{transformOrigin:"0 100% 0"}:{transformOrigin:"0 0 0"}},a.a.createElement($e.a,{className:s.dropdown},k?I:a.a.createElement(De.a,{onClickAway:u},I)))})))}$n.defaultProps={caret:!0,dropup:!1,hoverColor:"primary"};_n.a,wn.a,En.a,Cn.a,_n.a,wn.a,En.a,Cn.a;var Mn=[{inverted:!0,badgeColor:"danger",badgeIcon:_n.a,title:"Some Title",titleColor:"danger",body:a.a.createElement("p",null,"Wifey made the best Father","'","s Day meal ever. So thankful so happy so blessed. Thank you for making my family We just had fun with the \u201cfuture\u201d theme !!! It was a fun night all together ... The always rude Kanye Show at 2am Sold Out Famous viewing @ Figueroa and 12th in downtown."),footerTitle:"11 hours ago via Twitter"},{badgeColor:"success",badgeIcon:wn.a,title:"Another One",titleColor:"success",body:a.a.createElement("p",null,"Thank God for the support of my wife and real friends. I also wanted to point out that it\u2019s the first album to go number 1 off of streaming!!! I love you Ellen and also my number one design rule of anything I do from shoes to music to homes is that Kim has to like it....")},{inverted:!0,badgeColor:"info",badgeIcon:En.a,title:"Another Title",titleColor:"info",body:a.a.createElement("div",null,a.a.createElement("p",null,"Called I Miss the Old Kanye That\u2019s all it was Kanye And I love you like Kanye loves Kanye Famous viewing @ Figueroa and 12th in downtown LA 11:10PM"),a.a.createElement("p",null,"What if Kanye made a song about Kanye Roy\xe8re doesn","'","t make a Polar bear bed but the Polar bear couch is my favorite piece of furniture we own It wasn\u2019t any Kanyes Set on his goals Kanye")),footer:a.a.createElement($n,{buttonIcon:Cn.a,buttonProps:{round:!0,style:{marginBottom:"0"},color:"info"},dropdownList:["Action","Another action","Something else here",{divider:!0},"Separated link"]})},{badgeColor:"warning",badgeIcon:Sn.a,title:"Another One",titleColor:"warning",body:a.a.createElement("p",null,"Tune into Big Boy","'","s 92.3 I","'","m about to play the first single from Cruel Winter also to Kim\u2019s hair and makeup Lorraine jewelry and the whole style squad at Balmain and the Yeezy team. Thank you Anna for the invite thank you to the whole Vogue team")}],zn=new Date,Yn=zn.getFullYear(),Bn=zn.getMonth(),Rn=zn.getDate(),Gn=(new Date(Yn,Bn,1),new Date(Yn,Bn,1),new Date(Yn,Bn,Rn-1,10,30),new Date(Yn,Bn,Rn-1,11,30),new Date(Yn,Bn,Rn+7,12,0),new Date(Yn,Bn,Rn+7,14,0),new Date(Yn,Bn,Rn-2),new Date(Yn,Bn,Rn-2),new Date(Yn,Bn,Rn+1,19,0),new Date(Yn,Bn,Rn+1,22,30),new Date(Yn,Bn,21),new Date(Yn,Bn,22),new Date(Yn,Bn,21),new Date(Yn,Bn,22),Object(G.a)(vn)),Hn=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(n.memo)((function(e){var t,r=Gn(),o=l.a.getState(),i=o.db,c=o.session,s=o.functions,u=o.timeline,d=s.socket,f=a.a.useState(!1),g=Object(m.a)(f,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(null),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(null),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState(!1),z=Object(m.a)(M,2),R=z[0],G=z[1],H=a.a.useState(null),W=Object(m.a)(H,2),U=W[0],V=W[1],q=e.storie,X=a.a.useRef(!0);a.a.useEffect((function(){return function(){X.current=!1}}),[]);var J=Object(n.useRef)(),K=setTimeout((function(){}),1e4);Object(n.useEffect)((function(){return X.current&&Q(),function(){clearTimeout(K)}}),[J]),Object(n.useLayoutEffect)((function(){return X.current&&Q(),function(){clearTimeout(K)}}),[J]);var Q=function(){X.current&&J.current&&e.onResize&&J.current.clientHeight&&(clearTimeout(K),e.onResize(J.current.clientHeight),K=setTimeout((function(){e.onResize(J.current.clientHeight)}),100))},ee=null;if(q.filesCount&&q.filesCount>0&&Mn.user&&Mn.user._id&&Mn.user._id!==c._id&&(!Mn.files||Mn.files&&Mn.files.length<q.filesCount))return a.a.createElement(a.a.Fragment,null);var te=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log(X.current),X.current&&(w(!0),e&&clearTimeout(ee))},ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;ee=setTimeout((function(){X.current&&w(!1)}),e)},ae=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:l.a.getState().chat.id,react:t,user:c._id,db:e.db,nodeId:r,message:e.storie._id};Or(e,n),d.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!q)return null;var oe="";"timer"===q.type&&String(q.ini)&&String(q.fin)&&(oe=q.fin-q.ini);var ie=null;q.urlPreview&&(ie=JSON.parse(q.urlPreview));var le,se=Object(S.s)(function(e,t){var r,n,a=l.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&&l.a.getState().db.users[a]&&l.a.getState().db.users[a].deleted&&(c=Object(S.s)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(c,"</b></span>"))}else if(a&&36===a.length&&o.users[a]){var s=o.users[a]&&o.users[a].name?o.users[a].name:e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&l.a.getState().db.users[a]&&l.a.getState().db.users[a].deleted&&(s=Object(S.s)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(s,"</b></span>"))}else{var u=e.split("](")[0];i&&i.GlobalData&&i.GlobalData.hideDeletedUsers&&l.a.getState().db.users[a]&&l.a.getState().db.users[a].deleted&&(u=Object(S.s)("$__deletedUser")),n=n.replace(t,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(u,"</b></span>"))}}return!0}))}return n}(q.message,q));q._reactions&&Object.keys(q._reactions).length>0&&Object.keys(q._reactions).forEach((function(e){Object.keys(q._reactions[e]).length>0&&Object.keys(q._reactions[e]).forEach((function(t){t===c._id&&(le=e)}))}));var ue=!1;e.storie&&e.storie.user&&e.storie.user._id===c._id&&(ue=!0);var de=function(){Object(S.c)({message:Object(S.s)("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){kr(e,{id:q._id,idRel:q.idRel,deletedReason:L,deleted:!0}),q.deleted=!0,D(!1),C(null)}})};if(!q.filesCount&&""===q.message&&q.cardId&&q.cardId!==e.nodeId&&!l.a.getState().db.cards[q.cardId])return a.a.createElement(a.a.Fragment,null);if(q.deleted&&q.user._id!==c._id)return a.a.createElement(a.a.Fragment,null);var pe=function(t){var r=t.name.split("."),n=r[r.length-1],o="attachment";i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&(o=i.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 c="img";return i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1})).length>0&&i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer&&(c=i.fileExtensions.filter((function(e){return e.ext.indexOf(n.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",{key:t._id,style:Object(p.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"===c?{width:"350px",height:"50px"}:"movie"===c?{width:"350px",height:"280px"}:{width:"150px",height:"150px"}),onClick:function(r){e.openLightBox&&e.openLightBox(t._id),r.preventDefault()},title:t.name},("img"===c||"movie"!==c&&"audio"!==c&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")||"movie"!==c&&"audio"!==c&&!("img"===c&&o&&o.indexOf("svg")>-1))&&a.a.createElement(we.a,{title:t.name},a.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"===c&&"attachment"===o&&a.a.createElement(Z.a,{icon:o,size:"50px"}),"img"===c&&"string"===typeof o&&o.indexOf("https")>-1&&-1===o.indexOf("svg")&&a.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){q.created_at&&"string"===typeof q.created_at&&parseInt(q.created_at)>O()().unix("X")-60&&(e.target.src=o)}}),"movie"!==c&&"img"!==c&&"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(Z.a,{icon:o,size:"50px"}):"movie"===c||"img"===c||"img"===c&&o&&o.indexOf("svg")>-1?a.a.createElement(a.a.Fragment,null):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:o,style:{width:"100%",height:"100%"}}),"img"===c&&o&&o.indexOf(".svg")>-1?a.a.createElement("img",{alt:"altImage",src:ce.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}):a.a.createElement(a.a.Fragment,null),"movie"===c&&a.a.createElement("video",{style:{width:"100%"},controlsList:"nodownload",src:"https://machen.azureedge.net/".concat(t.file)}),"audio"===c&&a.a.createElement(re.a,{src:"https://machen.azureedge.net/".concat(t.file),controls:!0}),a.a.createElement("div",{style:{clear:"both"}}))};return a.a.createElement("div",{style:Object(p.a)(Object(p.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:J},a.a.createElement("div",{className:"message",style:Object(p.a)(Object(p.a)({position:"relative",maxWidth:"calc(88% - 15px)",float:ue?"right":"left"},ue?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){ne(1e3)},onMouseOver:function(){console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXX",X),e.isReply||te(!0)},onClick:function(){e.isReply||te(!0)}},e.showUserName&&!ue&&a.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Object(S.d)("menu")}},(!c.GlobalData.hideDeletedUsers||c&&c.GlobalData&&c.GlobalData.hideDeletedUsers&&q.user&&!q.user.deleted&&(!l.a.getState().db.users[q.user._id]||l.a.getState().db.users[q.user._id]&&!l.a.getState().db.users[q.user._id].deleted))&&q.user.name?q.user.name:Object(S.s)("$__deletedUser")),a.a.createElement("div",{style:Object(p.a)({position:"relative",float:ue?"right":"left",padding:"7px 15px",width:"100%",background:ue?"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"},q.approval?{border:"solid 4px ".concat(q.message.indexOf("$__approved")>-1?"green":"red")}:{})},q&&q.filesCount&&q&&q.user&&q.user._id===c._id&&parseInt(q.filesCount)>0&&q.files&&0===Object.keys(q.files).length?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{position:"relative",justifyContent:"center",alignItems:"center",color:"lightgray"}},Object(S.s)("$__transferringFile".concat(parseInt(q.filesCount)>1?"s":""))),a.a.createElement("div",{className:"files",style:{position:"relative",maxWidth:"calc(100% - 15px)",width:"100%",display:"flex"}},(parseInt(q.created_at),O()().unix("x"),a.a.createElement(a.a.Fragment,null)))):a.a.createElement(a.a.Fragment,null),q.files&&Object.keys(q.files).length>0?a.a.createElement("div",{className:"files",style:Object(p.a)(Object(p.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ue?"right":"left"},ue?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ue?"flex-end":"none",flexWrap:"wrap"})},Object.keys(q.files).map((function(e,t){return pe(q.files[e])}))):q.files&&q.files.length>0?a.a.createElement("div",{className:"files",style:Object(p.a)(Object(p.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ue?"right":"left"},ue?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ue?"flex-end":"none",flexWrap:"wrap"})},q.files.map((function(e,t){return pe(e)}))):a.a.createElement(a.a.Fragment,null),!e.isReply&&e.storie&&e.storie.reply&&u&&(u[e.nodeId]&&u[e.nodeId][e.storie.reply]||u[c._id]&&u[c._id][e.storie.reply])&&a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 20px)",opacity:.66,display:"flex",justifyContent:"center",marginBottom:"7px"}},a.a.createElement(Hn,{isReply:!0,storie:u[e.nodeId]&&u[e.nodeId][e.storie.reply]?u[e.nodeId][e.storie.reply]:u[c._id][e.storie.reply],db:e.db,nodeId:e.nodeId,openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},messageClick:function(){e.replyClick&&e.replyClick()}})),q.deleted&&"timer"!==q.type?a.a.createElement("div",{style:{color:"lightGray",height:33,padding:7}},Object(S.s)("$__removed","*"),"*"):function(){if("comment"===q.type&&q.message)return a.a.createElement("div",null,q.urlPreview&&ie.img&&ie.title&&ie.contentSnippet?a.a.createElement(mn,{style:{marginBottom:15}},!b&&ie.img&&a.a.createElement(yn,{xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(ie.img),onError:function(e){X.current&&y(!0)},alt:ie.title||ie.link})),a.a.createElement(yn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("menu"),fontWeight:"bold"}},ie.title),ie.site&&a.a.createElement("div",{style:{fontSize:"12px"}},ie.site),ie.contentSnippet&&a.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},ie.contentSnippet),a.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:ie.link,target:"_blank",rel:"noopener noreferrer"},Object(S.s)("$__openLink","*")))):a.a.createElement(a.a.Fragment,null),a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12,xl:12},Object(S.b)(Object(S.o)(se),e.searchText)),a.a.createElement("div",{style:{clear:"both"}}));if("comment"===q.type&&!q.message&&q.cardId!==e.nodeId&&l.a.getState().db.cards[q.cardId])return a.a.createElement(on,{db:"cards",data:l.a.getState().db.cards[q.cardId],Avatar:!0,expanded:!0,ignoreList:!0});if("log"===q.type){var t={};if("$__stepChangeListPosition"===q.message&&q.newData){var n=JSON.parse(q.newData);return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(Z.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.message.indexOf("$__")>-1?Object(S.s)(q.message,1):q.message," "),a.a.createElement("ul",{style:{listStyle:"decimal"}},n.filter((function(e){return l.a.getState().db.cards[e]})).map((function(e){return a.a.createElement("li",null,l.a.getState().db.cards[e].name)}))))}return"$__updated"===q.message?(t=JSON.parse(q.newData),a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(Z.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.message.indexOf("$__")>-1?Object(S.s)(q.message,1):q.message," "),q.newData&&a.a.createElement("ul",{style:{position:"relative",width:"98%"}},Object.keys(t).map((function(r,n){if("icon"===r)return a.a.createElement("li",{key:n,style:{display:"flex"}},Object(S.s)("$__icon",1),":",a.a.createElement(Z.a,{icon:t[r],color:Object(S.d)("color"),size:"17px"}));if("customColumns"===r){var o=JSON.parse(t[r]);return a.a.createElement("li",{key:n},Object(S.s)("$__customColumns",1),":",a.a.createElement("ul",null,Object.keys(o).map((function(e,t){return a.a.createElement("li",{key:t},Object(S.s)("$__".concat(e)),"=>"," ",a.a.createElement("span",{style:{color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.s)("".concat(o[e].name))))}))))}return"customDashboard"===r?a.a.createElement("li",{key:n},Object(S.s)("$__customDashboard",1),": ",Object(S.s)("$__updated",1)):"_id"!==r&&"id"!==r&&"client"!==r&&"planId"!==r&&"_parent"!==r&&"owner"!==r&&"image"!==r?"status"===r?a.a.createElement("li",{key:n},Object(S.s)("$__status",1),": ",Object(S.s)("$__".concat(t[r]),1)):"note"===r?a.a.createElement("li",{key:n},Object(S.s)("$__note",1),": ",a.a.createElement("div",null,Object(S.b)(Object(S.o)(t[r]),e.searchText))):"kpi_type"===r||"priority"===r||"risk"===r||"complexity"===r||"impact"===r?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",Object(S.s)("$__".concat(t[r]),1)):"name"===r||"description"===r?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",t[r]):"url"===r?a.a.createElement("li",{key:n},"url",":",a.a.createElement("a",{href:t[r],target:"blank",style:{}},Object(S.b)(Object(S.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?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",t[r].indexOf("$__")>-1?Object(S.s)("$__".concat(t[r]),1):t[r]):"kpi_ini"===r||"kpi_fin"===r?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",Object(S.h)(t[r],q.kpi_type?q.kpi_type:"decimal")):"startDate"===r||"endDate"===r||"updated_at"===r||"created_at"===r?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",t[r]?O()(new Date(1e3*t[r])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Object(S.s)("$__removed")):"boolean"===typeof t[r]?a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),": ",t[r]?Object(S.s)("$__enable",1):Object(S.s)("$__disable",1)):"_tags"===r?a.a.createElement("li",{key:n},"TAGS: ",a.a.createElement(Le.a,{options:t[r],showOptions:!0})):a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),"::UPDATED_VALUE"):a.a.createElement("li",{key:n},Object(S.s)("$__".concat(r),1),"::UPDATED_VALUE")})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},a.a.createElement(Z.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.approval&&q.message.indexOf("$__approved")>-1?a.a.createElement(Z.a,{icon:"verified",color:"green"}):q.approval&&q.message.indexOf("$__rejected")>-1?a.a.createElement(Z.a,{icon:"gpp_bad",color:"red"}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{wordBreak:"break-word"}},Object(S.b)(Object(S.o)(se),e.searchText)),a.a.createElement("div",{style:{clear:"both"}})),q.cardId?a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},a.a.createElement(on,{db:"cards",data:l.a.getState().db.cards[q.cardId],ignoreList:!0,onlyOption:!0,notGlobalExpanded:!0,noExpanding:!0,disabled:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))}if("timer"===q.type){var o=oe,i="";if(oe<60)i="".concat(o," ").concat(Object(S.s)("$__seconds",1));else if(oe>3600){var c=Math.trunc(o/3600);o-=3600*c;var s=Math.trunc(o/60)>0?Math.trunc(o/60):0,u=(o-=60*s)>0?o:0;i="".concat(c," hora").concat(c>1?"s":""," ").concat(s," ").concat(Object(S.s)("$__minutes",1)," ").concat(u," ").concat(Object(S.s)("$__seconds",1))}else{var d=Math.trunc(o/60)>0?Math.trunc(o/60):0,f=(o-=60*d)>0?o:0;i="".concat(d," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1))}return F?a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},a.a.createElement(ye,{label:Object(S.s)("$__cancelReason",1),variant:Object(S.d)("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){X.current&&C(e.target.value)}},placeholder:Object(S.s)("$__cancelReason_placeholder",1)})),a.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__cancel","*"),color:Object(S.d)("lightgrey"),icon:"cancel",onClick:function(){X.current&&(D(!1),C(null))},size:"25px"}),a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){X.current&&de()},size:"25px"})),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative"}},q&&q._toUser&&Object.keys(q._toUser).length>0&&a.a.createElement("div",{className:r.timeInfo},a.a.createElement(lt.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(q._toUser).map((function(e){return a.a.createElement(we.a,{key:e,title:q._toUser[e].displayName?q._toUser[e].displayName:q._toUser[e].name},a.a.createElement(Ie.a,{alt:q._toUser[e].name,src:q._toUser[e].image||null,style:{width:27,height:27,border:"none"}},q._toUser[e].name.substr(0,1)))})))),q.manualEntry?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},O()(1e3*q.ini).tz("America/Sao_Paulo").format("DD/MM/YYYY"))):a.a.createElement(a.a.Fragment,null,parseInt(O()(1e3*q.ini).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},O()(1e3*q.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):a.a.createElement(a.a.Fragment,null),parseInt(O()(1e3*q.fin).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},O()(1e3*q.fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(Z.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},i)),a.a.createElement("div",{style:{clear:"both"}}),q.deleted?a.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(S.d)("menu")}},Object(S.s)("$__cancelled")):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",null,se),q.deleted&&q.deletedReason&&a.a.createElement("div",{style:{color:"red"}},Object(S.s)("$__cancelReason",1),": ",q.deletedReason),a.a.createElement("div",{style:{clear:"both"}}),q.deleted||!_&&!O()(q.created_at).unix("x")?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px"}},a.a.createElement(Ye,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){D(!0)},show:"hover"}]}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))}if("kpi"===q.type){var h=q&&q.balance?q.balance:0;return a.a.createElement("div",null,q.cardId?a.a.createElement(on,{db:"cards",data:l.a.getState().db.cards[q.cardId],ignoreList:!0,noOptions:!0}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,se),a.a.createElement("div",{className:parseFloat(q.value)>0?r.valuePositive:r.valueNegative},Object(S.h)(q.value,q.kpi_type?q.kpi_type:"decimal")),!e.stories&&a.a.createElement("div",{className:r.lastValue},Object(S.s)("$__balance",1),": ",Object(S.h)(h,q.kpi_type?q.kpi_type:"decimal")),a.a.createElement("div",{style:{clear:"both"}}))}}()),q.user&&q.user._id&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},ue?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},a.a.createElement(un,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:q.user._id},a.a.createElement(Ie.a,Object.assign({},q.user._id&&!(null===(t=l.a.getState().db.users[q.user._id])||void 0===t?void 0:t.deleted)?{alt:q.user.displayName?q.user.displayName:q.user.name,src:"".concat(q.user.image)}:{alt:Object(S.s)("$__deletedUser"),src:null},{style:{width:"22px",height:"22px"}})))),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},ue?{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"})},O()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(O()(1e3*q.created_at).tz("America/Sao_Paulo").format("H:mm")):O()(new Date).tz("America/Sao_Paulo").format("YYYY")===O()(1e3*q.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(O()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(O()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),q.readedBy&&Object.keys(q.readedBy).length>0&&a.a.createElement(we.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q.readedBy).sort((function(e,t){return q&&q.readedBy[e]&&q.readedBy[e].readedDate&&q.readedBy[t]&&q.readedBy[t].readedDate&&String(q.readedBy[e].readedDate.low)&&String(q.readedBy[t].readedDate.low)&&parseInt(q.readedBy[e].readedDate.low)<parseInt(q.readedBy[t].readedDate.low)?-1:q&&q.readedBy[e]&&q.readedBy[e].readedDate&&q.readedBy[t]&&q.readedBy[t].readedDate&&String(q.readedBy[e].readedDate.low)&&String(q.readedBy[t].readedDate.low)&&parseInt(q.readedBy[e].readedDate.low)>parseInt(q.readedBy[t].readedDate.low)?1:0})).map((function(e,t){return q.user._id!==e&&q.readedBy&&q.readedBy[e]&&q.readedBy[e].name&&a.a.createElement("div",{key:e,style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(Ie.a,{alt:q.readedBy[e].name,src:q.readedBy[e].image||null}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q.readedBy[e].displayName?q.readedBy[e].displayName:q.readedBy[e].name,q.readedBy[e].readedDate&&q.readedBy[e].readedDate.low&&" (".concat(O()(1e3*q.readedBy[e].readedDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))},a.a.createElement("div",null,a.a.createElement(Z.a,{color:"#FFFFFF",size:"14px",style:{marginLeft:"7px"}},"done_all"))),!q.deleted&&q._reactions&&Object.keys(q._reactions).length>0&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},q&&q._reactions.like&&Object.keys(q._reactions.like).length>0&&a.a.createElement(et,{icon:"thumb_up",iconColor:Object(S.d)("menu"),title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q._reactions.like).sort((function(e,t){return q._reactions.like[e].reactDate&&String(q._reactions.like[e].reactDate.low)&&q._reactions.like[t].reactDate&&String(q._reactions.like[t].reactDate.low)&&parseInt(q._reactions.like[e].reactDate.low)<parseInt(q._reactions.like[t].reactDate.low)?-1:q._reactions.like[e].reactDate&&String(q._reactions.like[e].reactDate.low)&&q._reactions.like[t].reactDate&&String(q._reactions.like[t].reactDate.low)&&parseInt(q._reactions.like[e].reactDate.low)>parseInt(q._reactions.like[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(Ie.a,{alt:q._reactions.like[e].name,src:q._reactions.like[e].image||Mr.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.like[e].displayName?q._reactions.like[e].displayName:q._reactions.like[e].name,q._reactions.like[e].reactDate&&q._reactions.like[e].reactDate.low&&" (".concat(O()(1e3*q._reactions.like[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))),style:{fontSize:"12px",margin:0}}),q&&q._reactions&&q._reactions.nolike&&Object.keys(q._reactions.nolike).length>0&&a.a.createElement(et,{icon:"thumb_down",iconColor:Object(S.d)("medium"),style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q._reactions.nolike).sort((function(e,t){return q._reactions.nolike[e].reactDate&&String(q._reactions.nolike[e].reactDate.low)&&q._reactions.nolike[t].reactDate&&String(q._reactions.nolike[t].reactDate.low)&&parseInt(q._reactions.nolike[e].reactDate.low)<parseInt(q._reactions.nolike[t].reactDate.low)?-1:q._reactions.nolike[e].reactDate&&String(q._reactions.nolike[e].reactDate.low)&&q._reactions.nolike[t].reactDate&&String(q._reactions.nolike[t].reactDate.low)&&parseInt(q._reactions.nolike[e].reactDate.low)>parseInt(q._reactions.nolike[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(Ie.a,{alt:q._reactions.nolike[e].name,src:q._reactions.nolike[e].image||Mr.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.nolike[e].displayName?q._reactions.nolike[e].displayName:q._reactions.nolike[e].name,q._reactions.nolike[e].reactDate&&q._reactions.nolike[e].reactDate.low&&" (".concat(O()(1e3*q._reactions.nolike[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),q&&q._reactions&&q._reactions.love&&Object.keys(q._reactions.love).length>0&&a.a.createElement(et,{icon:"favorite",iconColor:Object(S.d)("medium"),style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q._reactions.love).sort((function(e,t){return q._reactions.love[e].reactDate&&String(q._reactions.love[e].reactDate.low)&&q._reactions.love[t].reactDate&&String(q._reactions.love[t].reactDate.low)&&parseInt(q._reactions.love[e].reactDate.low)<parseInt(q._reactions.love[t].reactDate.low)?-1:q._reactions.love[e].reactDate&&String(q._reactions.love[e].reactDate.low)&&q._reactions.love[t].reactDate&&String(q._reactions.love[t].reactDate.low)&&parseInt(q._reactions.love[e].reactDate.low)>parseInt(q._reactions.love[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(Ie.a,{alt:q._reactions.love[e].name,src:q._reactions.love[e].image||Mr.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.love[e].displayName?q._reactions.love[e].displayName:q._reactions.love[e].name,q._reactions.love[e].reactDate&&q._reactions.love[e].reactDate.low&&" (".concat(O()(1e3*q._reactions.love[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),q&&q._reactions&&q._reactions.approve&&Object.keys(q._reactions.approve).length>0&&a.a.createElement(et,{icon:"verified",iconColor:"green",style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q._reactions.approve).sort((function(e,t){return q._reactions.approve[e].reactDate&&String(q._reactions.approve[e].reactDate.low)&&q._reactions.approve[t].reactDate&&String(q._reactions.approve[t].reactDate.low)&&parseInt(q._reactions.approve[e].reactDate.low)<parseInt(q._reactions.approve[t].reactDate.low)?-1:q._reactions.approve[e].reactDate&&String(q._reactions.approve[e].reactDate.low)&&q._reactions.approve[t].reactDate&&String(q._reactions.approve[t].reactDate.low)&&parseInt(q._reactions.approve[e].reactDate.low)>parseInt(q._reactions.approve[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(Ie.a,{alt:q._reactions.approve[e].name,src:q._reactions.approve[e].image||Mr.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.approve[e].displayName?q._reactions.approve[e].displayName:q._reactions.approve[e].name,q._reactions.approve[e].reactDate&&q._reactions.approve[e].reactDate.low&&" (".concat(O()(1e3*q._reactions.approve[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),q&&q._reactions&&q._reactions.attention&&Object.keys(q._reactions.attention).length>0&&a.a.createElement(et,{icon:"report_problem",iconColor:"red",style:{fontSize:"12px",margin:0},title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.users},Object.keys(q._reactions.attention).sort((function(e,t){return q._reactions.attention[e].reactDate&&String(q._reactions.attention[e].reactDate.low)&&q._reactions.attention[t].reactDate&&String(q._reactions.attention[t].reactDate.low)&&parseInt(q._reactions.attention[e].reactDate.low)<parseInt(q._reactions.attention[t].reactDate.low)?-1:q._reactions.attention[e].reactDate&&String(q._reactions.attention[e].reactDate.low)&&q._reactions.attention[t].reactDate&&String(q._reactions.attention[t].reactDate.low)&&parseInt(q._reactions.attention[e].reactDate.low)>parseInt(q._reactions.attention[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(Ie.a,{alt:q._reactions.attention[e].name,src:q._reactions.attention[e].image||Mr.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},q._reactions.attention[e].displayName?q._reactions.attention[e].displayName:q._reactions.attention[e].name,q._reactions.attention[e].reactDate&&q._reactions.attention[e].reactDate.low&&" (".concat(O()(1e3*q._reactions.attention[e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})),a.a.createElement("div",{style:{clear:"both"}})))}),a.a.createElement("div",{style:{clear:"both"}})),!e.isReply&&a.a.createElement("div",{style:{position:"relative",float:"left",marginLeft:"7px",marginRight:"7px"}},_&&!e.noReactions&&!q.deleted&&a.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){te(!0)},onMouseLeave:ne,onMouseOut:ne},a.a.createElement(Z.a,{icon:le&&"like"===le?"thumb_up":"thumb_up_off_alt",iconColor:le&&"like"===le?Object(S.d)("menu"):Object(S.d)("medium"),title:Object(S.s)("$__like",1),size:"18px",onClick:function(){ae("like")},onMouseLeave:ne}),a.a.createElement(Z.a,{icon:le&&"nolike"===le?"thumb_down":"thumb_down_off_alt",title:Object(S.s)("$__notlike",1),iconColor:le&&"nolike"===le?Object(S.d)("menu"):Object(S.d)("medium"),size:"18px",onClick:function(){ae("nolike")},onMouseLeave:ne}),a.a.createElement(Z.a,{icon:le&&"love"===le?"favorite":"favorite_border",title:Object(S.s)("$__love",1),iconColor:le&&"love"===le?Object(S.d)("menu"):Object(S.d)("medium"),size:"18px",onClick:function(){ae("love")},onMouseLeave:ne}),a.a.createElement(Z.a,{icon:"verified",title:Object(S.s)("$__approve",1),iconColor:le&&"approve"===le?"green":Object(S.d)("medium"),size:"18px",onClick:function(){ae("approve")},onMouseLeave:ne}),a.a.createElement(Z.a,{icon:"report_problem",title:Object(S.s)("$__attention",1),iconColor:le&&"attention"===le?"red":Object(S.d)("medium"),size:"18px",onClick:function(){ae("attention")},onMouseLeave:ne}),q&&q.user&&q.user._id===c._id&&a.a.createElement(Z.a,{icon:"forward",title:Object(S.s)("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){$(!0)},onMouseLeave:ne}),a.a.createElement(Z.a,{icon:"reply",title:Object(S.s)("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts||{}),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts&&l.a.getState().chats.drafts[e.nodeId]?l.a.getState().chats.drafts[e.nodeId]:{}),{},{reply:q._id})))}))},onMouseLeave:ne}),!q.deleted&&"comment"===q.type&&q.user&&q.user._id&&q.user._id===c._id&&parseInt(q.created_at)>parseInt(O()().unix("x"))-180?a.a.createElement(k.a,{id:"chat_message_delete",title:Object(S.s)("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){de()},size:"18px",transparent:!0}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),P?a.a.createElement(st.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:P},a.a.createElement("div",{className:"forwardMessage"},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__forwardMessage",1),icon:"forward",onCancel:function(){$(!1)}})),a.a.createElement("div",{style:{padding:15}},a.a.createElement(zt,{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){V(e)}})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.s)("$__cancel"),text:Object(S.s)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){$(!1),V(null)}}),U&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(k.a,{shadow:!0,title:Object(S.s)("$__forward"),text:Object(S.s)("$__forward"),icon:"forward",size:"25px",load:!!R,onClick:function(){G(!0),function(e,t){e&&e.store&&l.a.getState().functions&&l.a.getState().functions.socket,l.a.getState().functions.socket;var r=l.a.getState(),n=(r.db,r.session,Object(p.a)(Object(p.a)({},t),{},{forwardedId:t._id,_id:Object(Y.a)(),created_at:"".concat(O()().tz("America/Sao_Paulo").unix("x"))}));n._reactions&&delete n._reactions,n.readedBy&&delete n.readedBy,n._reactions&&delete n._reactions,n._toUser&&delete n._toUser,t._forwardToId.map((function(t){wr(e,{comment:Object(p.a)(Object(p.a)({},n),{},{idRel:t}),node:t}),B.a.post("timeline/add",Object(p.a)(Object(p.a)({},n),{},{idRel:t}))}))}(e,Object(p.a)(Object(p.a)({},q),{},{_forwardToId:U})),setTimeout((function(){$(!1),V(null),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{db:"users",nodeId:U[0],loading:!1})),G(!1)}),6e3)}}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}}))}))),Wn=r(1894),Un={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:Object(h.a)({border:"none",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(S.d)("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},Vn=function(e){var t,r,n;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(h.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(h.a)(t,"color",U.O),Object(h.a)(t,"width","30px"),Object(h.a)(t,"height","30px"),Object(h.a)(t,"lineHeight","25px"),Object(h.a)(t,"fontSize","12px"),Object(h.a)(t,"textAlign","center"),Object(h.a)(t,"position","absolute"),Object(h.a)(t,"bottom","23px"),Object(h.a)(t,"left","50%"),Object(h.a)(t,"marginLeft","-24px"),Object(h.a)(t,"zIndex","1"),Object(h.a)(t,"borderTopRightRadius","50%"),Object(h.a)(t,"borderTopLeftRadius","50%"),Object(h.a)(t,"borderBottomRightRadius","50%"),Object(h.a)(t,"borderBottomLeftRadius","50%"),Object(h.a)(t,"display","flex"),Object(h.a)(t,"alignItems","center"),Object(h.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.b)+", 0.4)"},info:{backgroundColor:U.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.4)"},success:{backgroundColor:U.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.4)"},danger:{backgroundColor:U.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.4)"},warning:{backgroundColor:U.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.4)"},primary:{backgroundColor:U.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(h.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(h.a)(r,"width","45%"),Object(h.a)(r,"float","left"),Object(h.a)(r,"padding","7px"),Object(h.a)(r,"marginBottom","5px"),Object(h.a)(r,"position","relative"),Object(h.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(U.r)(U.b)+", 0.14)"),Object(h.a)(r,"borderRadius","6px"),Object(h.a)(r,"color","rgba("+Object(U.r)(U.b)+", 0.87)"),Object(h.a)(r,"background",U.O),Object(h.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+U.q[10],borderRight:"0 solid "+U.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(h.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+U.O,borderRight:"0 solid "+U.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(h.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:U.O,"&: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(S.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(h.a)({position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",zIndex:"5",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(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:"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(p.a)(Object(p.a)({},U.l),{},{"& textarea":Object(p.a)(Object(p.a)({},U.l),{},{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":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(h.a)(n,"outline","none"),Object(h.a)(n,"fontSize","0.9rem"),Object(h.a)(n,"color","#7288a3"),Object(h.a)(n,"borderColor"," #3a546f"),Object(h.a)(n,"overflow","hidden"),Object(h.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function qn(){qn=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(G.a)(Vn),Jn=Object(u.b)((function(e,t){return{draft:e.chats&&e.chats.drafts?e.chats.drafts[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(""),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],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({}),N=Object(m.a)(D,2),A=N[0],P=N[1],$=a.a.useState(null),M=Object(m.a)($,2),z=M[0],G=M[1],H=a.a.useState(null),W=Object(m.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(m.a)(q,2),J=X[0],K=X[1],Q=a.a.useState([]),ee=Object(m.a)(Q,2),te=ee[0],re=ee[1],ne=a.a.useState(!1),ae=Object(m.a)(ne,2),oe=ae[0],ie=ae[1],ce=a.a.useState(58),le=Object(m.a)(ce,2),se=le[0],ue=le[1],de=Xn(),pe=a.a.createRef(),fe=a.a.createRef(),he=a.a.useRef(!0);a.a.useEffect((function(){return he.current=!0,function(){he.current=!1}}),[]);var me=Object(S.j)(),be=0;n._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(n._id)>-1}))]&&(be=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]);var ye=window.location.hash.split("/");ye[0]=ye[0].replace("#",""),a.a.useEffect((function(){var t;return he.current&&(e.draft&&e.draft.message?s(e.draft.message):s("")),(null===e||void 0===e||null===(t=e.draft)||void 0===t?void 0:t.files)?L(e.draft.files):L([]),function(){s("")}}),[e.nodeId]);var _e=a.a.createRef();a.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 we=function(){var e,t=[];if(e=c){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},je=function(){var t=Object(f.a)(qn().mark((function t(){var a,o,i,u,d,m,g,y;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=[],o={_id:Object(Y.a)(),idRel:e.nodeId,replyData:e.draft&&e.draft.reply&&l.a.getState().timeline[e.nodeId][e.draft.reply]?l.a.getState().timeline[e.nodeId][e.draft.reply]:{},reply:e.draft&&e.draft.reply?e.draft.reply:null,message:c,type:"comment",mentions:we(),notifyUsers:a,filesCount:E.length>0?E.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"},U&&(o=Object(p.a)(Object(p.a)({},o),{},{urlPreview:JSON.stringify(U)}),V(null)),s(""),ie(!1),E.length>0&&b(!0),i=we(),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!==n._id&&-1===i.indexOf(e)})).forEach((function(e){a.push(e)})),e.onSending&&e.onSending(Object(p.a)(Object(p.a)({},o),{},{user:{_id:n._id,name:r.users[n._id].name,image:r.users[n._id].image||null}})),(u=Object(p.a)(Object(p.a)({},o),{},{created_at:"".concat(O()().unix("x")),user:{_id:n._id,name:r.users[n._id].name,image:r.users[n._id].image||null}})).mentions&&delete u.mentions,u.notifyUsers&&delete u.notifyUsers,u.db&&delete u.db,wr({reduxFunction:e.reduxFunction},Object(p.a)(Object(p.a)({},o),{},{comment:u})),e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts),{},Object(h.a)({},e.nodeId,{message:null,reply:null,files:null}))})),t.next=17,B.a.post("timeline/add",o);case 17:return(d=t.sent)&&d.data&&(m=d.data)._id&&(g=Object(p.a)(Object(p.a)({},m.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null}),y=2,be<2&&(y=be),i.map(function(){var t=Object(f.a)(qn().mark((function t(n){return qn().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])&&It(e,n,y,e.nodeId,!0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),E.length>0?Le({comment:g,dataMessage:o}):(e.onSending&&e.onSending(),F([]),L([]),re([]),V(null),K(!1),b(!1),e.onSending&&e.onSending())),t.abrupt("return",!1);case 20:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ee=function(){var e=Object(f.a)(qn().mark((function e(t,r){var n;return qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),P(Object(p.a)(Object(p.a)({},A),{},Object(h.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Se=function(){var e=Object(f.a)(qn().mark((function e(t,r){return qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:G({options:t,fi:r}),P({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Le=function(){var t=Object(f.a)(qn().mark((function t(r){var n,a,o,i,c,l=arguments;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:0,a=l.length>2&&void 0!==l[2]?l[2]:[],o=r.comment,i=r.dataMessage,(c=Array.from(E)).map(function(){var t=Object(f.a)(qn().mark((function t(l,s){var u,d;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,Object(pt.a)(o._id,l,!0,{onUploadProgress:function(e){return Ee(e,s)},onUploadError:function(e){Se(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),F(d),c.length>n+1?Le(r,n+1,d):c.length===n+1&&(i.files=d,setTimeout((function(){B.a.post("timeline/add",i)}),1e3),F([]),L([]),V(null),K(!1),b(!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)}}(),Ce=function(){var t=Object(f.a)(qn().mark((function t(r){var n;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L([].concat(Object(ge.a)(E),Object(ge.a)(Object.keys(r).map((function(e){return r[e]}))))),e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},(null===(n=l.a.getState().chats.drafts)||void 0===n?void 0:n[e.nodeId])||{}),{},{files:[].concat(Object(ge.a)(E),Object(ge.a)(Object.keys(r).map((function(e){return r[e]}))))})))})),_(!1);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Te=function(){var e=Object(f.a)(qn().mark((function e(t){var r,n,a,o,i,c;return qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=29;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(!(!U&&r&&-1===te.indexOf(r)||r&&U&&-1===te.indexOf(r)&&U.link!==r)){e.next=29;break}if(K(!0),-1!==t.indexOf("youtube.com/watch?")){e.next=28;break}return console.log("Verificando URL",r),e.prev=12,e.next=15,dt.a.post("/URL_DATA",{url:r});case 15:(o=e.sent)&&o.data&&(i=o.data)&&i.title&&i.img&&i.contentSnippet?V(i):(K(!1),V(null)),e.next=28;break;case 19:e.prev=19,e.t0=e.catch(12),K(!1),V(null),(c=te).push(r),re(c),Object(S.c)({message:Object(S.s)("$__couldNotLoadDataFromURL",1),variant:"warning",persist:!1,horizontal:"center"}),console.log(e.t0);case 28:t.indexOf("youtube.com/watch?")>-1&&K(!1);case 29:t.indexOf("youtube.com/watch?")>-1&&K(!1);case 30:case"end":return e.stop()}}),e,null,[[12,19]])})));return function(t){return e.apply(this,arguments)}}(),Fe=[];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!==n._id&&r.cards[e.nodeId]._users[t].name&&(!r.users[t]||r.users[t]&&!r.users[t].deleted)){var a=r.cards[e.nodeId]._users[t]._id,o=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;a&&0===Object.keys(Fe).filter((function(e){return Fe[e].id===a})).length&&Fe.push({id:a,display:o})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(me&&(me.owner||me.planAdmin||me.planModerate)||be&&be.access&&parseInt(be.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!==n._id&&0===Object.keys(Fe).filter((function(e){return Fe[e].id===t})).length&&Fe.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!==n._id&&0===Object.keys(Fe).filter((function(e){return Fe[e].id===t})).length&&Fe.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!==n._id&&0===Object.keys(Fe).filter((function(e){return Fe[e].id===t})).length&&Fe.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})})),a.a.createElement(ve.FileDrop,{ref:pe,className:e.relative?de.rootRelative:de.root,onDragOver:function(){!e.disabledSend&&_(!0)},onDrop:Ce,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"},a.a.createElement(a.a.Fragment,null,e.nodeId&&!e.disabledSend?a.a.createElement("div",{className:e.relative?de.editorRelative:de.editor,style:Object(p.a)(Object(p.a)({},e.editorStyle?e.editorStyle:{}),{},{backgroundColor:"#F0F0F0"})},a.a.createElement("div",{className:de.textEditor},J&&!U&&a.a.createElement("div",{className:de.urlPreview,style:{width:"100%",height:"150px"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},a.a.createElement(Wn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(Wn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10})))),e.draft&&e.draft.reply||E&&E.length>0?a.a.createElement("div",{style:{position:"absolute",right:0,left:0,height:"auto",padding:7,bottom:se+4,backgroundColor:"#f0f0f0",display:"flex",justifyContent:"space-between"}},e.draft&&e.draft.reply?a.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",alignItems:"center"}},a.a.createElement("div",{style:{color:Object(S.d)("menu"),display:"flex",alignItems:"center"}},a.a.createElement(Z.a,{icon:"reply",color:Object(S.d)("menu"),size:"22px"}),a.a.createElement("span",{style:{marginLeft:10}},Object(S.s)("$__reply")))),a.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(S.d)("menu"))}},a.a.createElement(R,null,a.a.createElement(Hn,{storie:l.a.getState().timeline[e.nodeId][e.draft.reply],hideCards:!0,db:e.db,nodeId:e.nodeId,showUserName:!0,noReactions:!0}),a.a.createElement("div",{style:{position:"absolute",top:0,right:0}},a.a.createElement(k.a,{title:Object(S.s)("$__cancelReply"),color:"red",icon:"cancel",size:"17px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts[e.nodeId]||{}),{},{reply:null})))}))},transparent:!0}))))):a.a.createElement(a.a.Fragment,null),E&&E.length>0?a.a.createElement("div",{style:{position:"relative",maxHeight:"100%",width:"100%"}},a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.s)("$__clearFiles",1),text:Object(S.s)("$__clearFiles"),color:"gray",icon:"clear_all",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmClearFiles",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t;L([]),e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},(null===(t=l.a.getState().chats.drafts)||void 0===t?void 0:t[e.nodeId])||{}),{},{files:null})))}))}})},size:"25px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left",padding:3,overflow:"auto",display:"flex"}},E.map((function(e,t){var n=e.name.split("."),o="attachment";return r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(o=r.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(e)),a.a.createElement("div",{key:t,title:e.name,style:{position:"relative",padding:7,width:"100px",justifyContent:"center"}},a.a.createElement("div",{style:{position:"relative",width:"50px",height:"50px",margin:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(Z.a,{icon:o,size:"50px"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:o,style:{width:"100%",height:"100%"}})),a.a.createElement("div",{style:{position:"relative",margin:"auto",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"calc(100% - 30px)",overflow:"hidden"}},e.name),a.a.createElement("div",{style:{position:"absolute",top:0,right:3,display:"flex"}},T&&T.length>0&&T[t]?a.a.createElement(Z.a,{icon:"cloud_done",color:"green"}):g?a.a.createElement(a.a.Fragment,null):a.a.createElement(Z.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(E);t.splice(e,1),L(t)}(t)}})),z&&z.fi===t?a.a.createElement(k.a,{title:Object(S.s)("$__uploadFiles",1),text:Object(S.s)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Le({comment:z.options.comment},z.fi,T),G(null)},size:"25px"}):A&&String(A[t])&&A[t]<100?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{minWidth:177}},a.a.createElement(gr.a,{variant:"buffer",className:de.progressBar,value:A[t]<90?A[t]:90,valueBuffer:A[t]})),a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:10,marginLeft:15}},A[t]<90?A[t]:90,"%"))):a.a.createElement(a.a.Fragment,null))})))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),U&&a.a.createElement(mn,{style:{marginBottom:15,backgroundColor:"#f0f0f0",padding:7}},a.a.createElement("div",{style:{position:"absolute",right:"20px"}},a.a.createElement(k.a,{title:Object(S.s)("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){V(null),K(!1)}})),U.img&&a.a.createElement(yn,{xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(U.img?U.img:Mr.a),alt:U.title||U.link})),a.a.createElement(yn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(S.d)("menu"),fontWeight:"bold"}},U.title),U.site&&a.a.createElement("div",{style:{fontSize:"12px"}},U.site),U.contentSnippet&&a.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},U.contentSnippet),a.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:U.link,target:"_blank",rel:"noopener noreferrer"},Object(S.s)("$__openLink","*")))),z?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},a.a.createElement(k.a,{title:Object(S.s)("$__fileSendErrorClickToReSend",1),text:Object(S.s)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Le({comment:z.options.comment},z.fi,T),G(null)},size:"25px"})):g?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Object(S.s)("$__sending",1),a.a.createElement(gr.a,{className:de.progressBar})):a.a.createElement("div",{ref:fe,style:{position:"relative",height:"auto",borderRadius:"7px",display:"flex",alignItems:"center",padding:"3px 0px 4px 0px"}},a.a.createElement(xe.b,{id:"sendingInput_".concat(e.nodeId),value:c.trim().length>0?c:"",inputRef:_e,onChange:function(e){Te(e.target.value),fe.current&&fe.current.clientHeight&&ue(fe.current.clientHeight)},onBlur:function(t){t.target.value&&e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{drafts:Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},l.a.getState().chats.drafts[e.nodeId]||{}),{},{message:t.target.value})))}))},onPaste:function(e){Ce(e.clipboardData.files)},placeholder:Object(S.s)("$__writeMessage"),style:Object(p.a)(Object(p.a)({},Un),{},{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():c.length>0&&c.trim()&&c.trim().length>0?je():s(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(xe.a,{trigger:"@",data:Fe,renderSuggestion:function(t,n,o){var i=r.users[t.id]?r.users[t.id]:t;if(t&&t.id)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative"}},a.a.createElement(Ie.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}),a.a.createElement("div",null,a.a.createElement("div",null,o),i&&i._parent&&l.a.getState().db.users[i._parent]&&l.a.getState().db.users[i._parent].name?a.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},l.a.getState().db.users[i._parent].name):a.a.createElement(a.a.Fragment,null)),i&&i._parent&&l.a.getState().db.users[i._parent]&&l.a.getState().db.users[i._parent].image?a.a.createElement("div",{style:{position:"absolute",bottom:4,right:-7,width:15,height:15,borderRadius:"50%",backgroundImage:"url(".concat(l.a.getState().db.users[i._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null))},style:{backgroundColor:Object(S.d)("color",.5),lineHeight:"17px",borderRadius:"7px",padding:"3px 2px",marginLeft:"-4px",fontWeight:"bold",maxHeight:250,overflow:"auto"}})),a.a.createElement("div",{style:{cursor:"pointer",zIndex:100,display:"flex",alignItems:"center"}},a.a.createElement(ke,{title:Object(S.s)("$__emojis",1),icon:oe?"highlight_off":"sentiment_very_satisfied",color:Object(S.d)("medium"),onClick:function(){ie(!oe)}}),!g&&a.a.createElement("div",{className:de.actionButton},a.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 Ce(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"}),a.a.createElement(Z.a,{icon:"attachment",color:Object(S.d)("medium"),size:"22px"})),!g&&(c.trim().length>0||E.length>0)&&a.a.createElement(ke,{title:Object(S.s)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(S.d)("menu"),onClick:function(){return je()}}),e.closeOption&&a.a.createElement(Z.a,{title:Object(S.s)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(S.d)("color"),onClick:function(){return e.onClose()}}),oe&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},a.a.createElement(Oe.a,{onEmojiClick:function(e,t){s("".concat(c," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):a.a.createElement("div",{className:e.relative?de.editorRelative:de.editor,style:{backgroundColor:"#f0f0f0"}},Object(S.s)("$__avaiableForViewingOnly")),a.a.createElement("div",{className:x?de.onDropFile:de.dropFile,onDragLeave:function(){!e.disabledSend&&_(!1)}},Object(S.s)("$__dropTheFileToAttach","*"))))})),Kn=Object(G.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Object(S.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 Zn(e){var t=Kn(),r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useState(e.icon?e.icon:"add_photo_alternate"),l=Object(m.a)(c,2),s=l[0],u=l[1];return a.a.useEffect((function(){u(e.icon)}),[e.icon]),a.a.createElement("div",{style:Object(p.a)({},e.style?e.style:{})},o?a.a.createElement(E.a,{className:t.backdrop,open:o,onClick:function(){return i(!1)}},a.a.createElement("div",{className:t.box},Qn&&Object.keys(Qn).map((function(r,n){return a.a.createElement("div",{key:n,className:t.list},a.a.createElement("div",{className:t.title},r),a.a.createElement("div",{className:t.iconList},Qn[r]&&Qn[r].map((function(r,n){return a.a.createElement("div",{key:n,className:t.icon},a.a.createElement(Z.a,{icon:r,size:"30px",color:e.color?e.color:Object(S.d)("color"),onClick:function(){u(r),i(!1),e.callBack&&e.callBack(r),e.onChange&&e.onChange(r)}}))}))))})))):a.a.createElement(Z.a,{icon:s,color:e.color?e.color:Object(S.d)("color"),size:e.size||"30px",onClick:function(){e.onChange&&i(!0)}}))}var Qn={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"]},ea={header:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(S.d)("color"),fontWeight:"500",alignItems:"center"}}};function ta(){ta=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 ra=Object(G.a)(ea);var na=Object(u.b)((function(e){return{users:e.db.users,groups:e.db.groups}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.session,n=t.functions.socket,o=ra(),i=a.a.useState(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(e.title?e.title.trim():""),h=Object(m.a)(d,2),g=h[0],b=h[1],y=a.a.useState(e.icon||null),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=e.customButtons&&e.customButtons.filter((function(e){return!1!==e})),D=a.a.useRef(!0);a.a.useEffect((function(){return!e.title&&e.editable&&E(!0),function(){D.current=!1}}),[]);var N=function(){var t=Object(f.a)(ta().mark((function t(){return ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&n.emit("data",{module:"node",method:"put",action:"update",noLog:!0},{_id:e._id,name:g}),e.onEdit&&e.onEdit(Object(p.a)({name:g},x?{icon:x}:{}),e._id?e._id:null)}catch(r){console.log(r)}E(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",{className:o.header,style:Object(p.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return u(!0)},onMouseLeave:function(){D.current&&!I&&u(!1)}},a.a.createElement("div",{className:o.content},a.a.createElement("div",{className:o.info},e.searchText?a.a.createElement("div",{style:{marginLeft:"7px"}},Object(S.b)(e.title?e.title:"",e.searchText)):a.a.createElement("div",{className:o.headerTitle,style:{fontSize:e.fontSize?e.fontSize:"16px",color:e.color?e.color:Object(S.d)("colorText"),paddingRight:"7px",marginLeft:e.icon?"7px":"none",width:"100%"},onDoubleClick:function(){e.onEdit&&e.editable&&D.current&&(b(e.title?e.title.trim():""),E(!0))}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center"}},e.icon||e.permitIcon||e.iconOnEditable&&j?a.a.createElement(Zn,{icon:e.icon||"perm_media",color:e.color?e.color:Object(S.d)("colorText"),onChange:e.onChangeIcon||e.editable&&e.permitIcon?function(t){e.onChangeIcon&&e.onChangeIcon(t),e.onEdit&&e.onEdit(Object(p.a)({name:g},t?{icon:t}:{})),_(t)}:null,size:"calc(".concat(e.fontSize," + 4px)")||!1,style:{marginRight:7}}):a.a.createElement(a.a.Fragment,null),j?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:e.placeholder?e.placeholder:Object(S.s)("$__nameOfCard",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)},onKeyDown:function(t){13===t.keyCode&&g&&N(),27===t.keyCode&&(E(!1),b(e.title?e.title.trim():""))}},value:g,placeholder:e.placeholder?e.placeholder:Object(S.s)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),(j||e.onSave)&&a.a.createElement(k.a,{title:Object(S.s)("$__save",1),color:"green",icon:"save",onClick:function(){j?e.noCancel?g&&N():N():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),(j||e.onCancel)&&a.a.createElement(k.a,{title:Object(S.s)("$__close",1),color:Object(S.d)("colorText"),icon:"cancel",onClick:function(){j&&(e.onCancel?g&&E(!1):E(!1)),e.onCancel&&e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):a.a.createElement(we.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},a.a.createElement("div",{style:Object(p.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(S.s)(e.title,1):e.title?function(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}(e.title):"")))))),e.periodFilter&&r&&r.period&&a.a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap",marginRight:7}},Object(S.s)(r.period),a.a.createElement(qe,{style:{color:Object(S.d)("menu"),height:"20px",width:"20px"}})),a.a.createElement("div",{className:o.actionButtons,style:Object(p.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&a.a.createElement(k.a,{title:Object(S.s)("$__save",1),color:"green",icon:"save",onClick:function(){j?e.noCancel?g&&N():N():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&a.a.createElement(k.a,{title:Object(S.s)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){j?e.noCancel?g&&E(!1):E(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!j&&e.timelineMessage&&s&&a.a.createElement("div",{className:o.button,style:{opacity:s?"1":"0"}},a.a.createElement(Se.a,{overlap:"rectangular",onClick:function(){return T(!0)},icon:"add_comment",size:"20px",tooltipprops:I?{open:I,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{},title:I?a.a.createElement("div",{style:{position:"relative",minWidth:"220px"}},a.a.createElement(Jn,{nodeId:e._id,onSending:function(){u(!1),T(!1)},onClose:function(){T(!1),u(!1)},relative:!0,closeOption:!0})):"$__addComment"})),!j&&F&&F.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(s||"hover"!==e.show)&&a.a.createElement("div",Object.assign({key:t,className:o.button},e.provided),a.a.createElement(k.a,{title:e.title?Object(S.s)(e.title,1):Object(S.s)(e.name,1),color:Object(S.d)(e.color||"colorText"),icon:e.icon,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){I||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)))})),aa=r(147);var oa=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(aa.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.s)("$__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.s)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&a.a.createElement(k.a,{title:Object(S.s)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},ia=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)({},U.l),{},{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)({},U.l),{},{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)({},U.l),{},{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)({},U.l),{},{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")}}},ca=r(69),la=r.n(ca),sa=r(237),ua=r(232),da={messagesContainer:{height:"100%",width:"100%"}};function pa(){pa=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 fa=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=e.messages,o=e.type,i=e.nodeId,c=a.a.useState(0),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useRef(!0);a.a.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]);var b=Object(n.useRef)(null),y=(Object(n.useRef)(),Object(n.useRef)({})),v=Object(n.useRef)({}),x=Object(n.useRef)({});a.a.useEffect((function(){if(g.current){var e,t,n=(null===r||void 0===r||null===(e=r.filter((function(e){return e.type===o&&e.user._id!==l.a.getState().session._id&&(!e.readedBy||e.readedBy&&!e.readedBy[l.a.getState().session._id])})))||void 0===e?void 0:e.length)||0;(null===(t=x.current)||void 0===t?void 0:t.scrolling)?E():E(!0),d(n)}}),[r,o,i]),Object(n.useEffect)((function(){u>0&&g.current&&_()}),[u]),Object(n.useEffect)((function(){return x.current=Object(p.a)(Object(p.a)({},x.current||{}),{},{scrolling:!1}),y.current=Object(p.a)(Object(p.a)({},y.current||{}),{},{lock:!0}),function(){y.current={},x.current={}}}),[e.nodeId,e.type]),Object(n.useLayoutEffect)((function(){parseInt(u)>0&&g.current&&_(!0)}),[e.nodeId,e.type]),Object(n.useEffect)((function(){y.current.lock&&g.current&&E(!0)})),Object(n.useLayoutEffect)((function(){var e,t;r.length>0&&g.current&&((!(null===(e=y.current)||void 0===e?void 0:e.mounted)||(null===y||void 0===y||null===(t=y.current)||void 0===t?void 0:t.messagesLength)&&r.length>y.current.messagesLength)&&(y.current=Object(p.a)(Object(p.a)({},y.current),{},{loading:!1,messagesLength:r.length}),y.current.mounted||(y.current=Object(p.a)(Object(p.a)({},y.current),{},{mounted:!0}))))}),[r]);var _=function(){var t=Object(f.a)(pa().mark((function t(){var r,n,a,c,s=arguments;return pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=s.length>0&&void 0!==s[0]&&s[0],g.current&&(y.current.lock||a)&&!x.current.clearMessages&&parseInt(u)>0&&(a||!(null===(r=x.current)||void 0===r?void 0:r.scrolling)&&(null===y||void 0===y||null===(n=y.current)||void 0===n?void 0:n.length))&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{clearMessages:!0}),c=l.a.getState().functions.socket,_r(e,{readedBy:l.a.getState().session._id,id:i,db:e.db,type:o}),c.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:l.a.getState().session._id,id:i,db:e.db,type:o},(function(e){g.current&&setTimeout((function(){x.current=Object(p.a)(Object(p.a)({},x.current),{},{clearMessages:!1})}),500)})),l.a.getState().chats.unreadeds[e.nodeId]&&e.reduxFunction("ASYNC","SET_CHATS",Object(p.a)(Object(p.a)({},l.a.getState().chats),{},{unreadeds:Object(p.a)(Object(p.a)({},l.a.getState().chats.unreadeds),{},Object(h.a)({},e.nodeId,0))})));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=Object(f.a)(pa().mark((function t(){var n,a,o,i,c;return pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=l.a.getState().db.users[e.nodeId]?"users":"cards",(null===y||void 0===y||null===(n=y.current)||void 0===n?void 0:n.timelineEnd)||!(null===(a=y.current)||void 0===a?void 0:a.mounted)||y.current.lock){t.next=7;break}return y.current=Object(p.a)(Object(p.a)({},y.current),{},{lock:!0,loading:!0}),t.next=5,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:o,type:"comment",limit:!0,skip:r.length});case 5:(i=t.sent)&&(c=Object(p.a)(Object(p.a)({},y.current),{},{length:r.length+i.total}),i.total<20&&(c=Object(p.a)(Object(p.a)({},c),{},{timelineEnd:!0})),y.current=Object(p.a)({},c));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function w(e){var t=r[e];return v.current[t._id]+11||83}function j(t){var n,o=t.index,i=t.style,c=r[o];return(!x.current.lastMessage||x&&x.current&&x.current.lastMessage&&x.current.lastMessage<c.created_at)&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{lastMessage:c.created_at}),y.current=Object(p.a)(Object(p.a)({},y.current),{},{lock:!0}),c.user._id===l.a.getState().session._id&&E(!0)),a.a.createElement("div",{style:i},a.a.createElement(Hn,{storie:c,openLightBox:function(t){g.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){g.current&&function(e,t){var r;v.current=Object(p.a)(Object(p.a)({},v.current),{},Object(h.a)({},e,t)),(null===b||void 0===b||null===(r=b.current)||void 0===r?void 0:r.resetAfterIndex)&&b.current.resetAfterIndex(0)}(c._id,e)}}))}function E(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g.current&&(y.current.lock||e||!x.current.scrolling)){var t,n;y.current=Object(p.a)(Object(p.a)({},y.current),{},{lock:!1});var a=r.length-1,o="end",i=y.current.length||0,c=(null===y||void 0===y||null===(t=y.current)||void 0===t?void 0:t.visibleStartIndex)||0;!e&&x.current&&x.current.scrolling&&(o="start",a=r.length-i+c+1),parseInt(u)>0&&!x.current.scrolling&&_(!0),(null===b||void 0===b||null===(n=b.current)||void 0===n?void 0:n.scrollToItem)?b.current.scrollToItem(a,o):e&&setTimeout((function(){E(!0)}),100)}}var k=setTimeout((function(){}),15e3),S=function(e,t){var r;parseInt(u)>0&&e.overscanStartIndex===e.visibleStartIndex&&e.overscanStopIndex===e.visibleStopIndex&&_(!0);var n=Object(p.a)({},y.current);(null===(r=y.current)||void 0===r?void 0:r.mounted)&&y.current&&!y.current.loading&&e.visibleStartIndex<10&&(clearTimeout(k),n=Object(p.a)(Object(p.a)(Object(p.a)({},y.current),e),{},{loading:!0}),y.current=Object(p.a)({},n),k=setTimeout((function(){g.current&&O()}),1e3)),y.current=Object(p.a)(Object(p.a)({},n),e)};return console.log(g.current),a.a.createElement("div",{style:da.messagesContainer},a.a.createElement(ua.a,{style:da.messagesContainer},(function(e){var t=e.height,n=e.width;return a.a.createElement(sa.b,{className:"List",height:t,itemCount:r.length,itemSize:w,ref:b,width:n,onItemsRendered:S,overscanCount:33,onScroll:function(e){var t;(null===(t=x.current)||void 0===t?void 0:t.scrollOffset)&&e.scrollOffset<x.current.scrollOffset-120&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{scrolling:!0})),e.scrollOffset-120>x.current.scrollOffset&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{scrolling:!1}),parseInt(u)>0&&g.current&&_()),(!x.current.scrollOffset||e.scrollOffset>x.current.scrollOffset-100)&&(x.current=Object(p.a)(Object(p.a)({},x.current),{},{scrollOffset:e.scrollOffset,scrolling:!1}),parseInt(u)>0&&g.current&&_())}},j)})),parseInt(u)>0&&(null===(t=x.current)||void 0===t?void 0:t.scrolling)?a.a.createElement("div",{style:{position:"absolute",bottom:"33px",right:"15px",width:"33px",height:"33px"}},a.a.createElement(et,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){E(!0)}})):a.a.createElement(a.a.Fragment,null))})),ha={};function ma(){ma=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 ga=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((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([]),p=Object(m.a)(d,2),h=p[0],g=p[1],b=l.a.getState(),y=(b.db,b.functions.socket,window.location.hash.split("/"));y[0]=y[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return v()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var v=function(){var t=Object(f.a)(ma().mark((function t(){var r;return ma().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,dt.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(),g(r.data),u(!1)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("COMPONENTS/TIMELINE/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%"}},s&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(br,null)),a.a.createElement(mn,null,Object.keys(h).length>0&&a.a.createElement(yn,{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(Hn,{messageClick:e.onAction?function(){}:null,searchText:e.text.trim(),storie:h[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))})));var ba=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((function(e){l.a.getState().db;var t,r=a.a.useState(""),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],p=a.a.useState(!1),f=Object(m.a)(p,2),g=f[0],b=f[1],y=window.location.hash.split("/");return y[0]=y[0].replace("#",""),a.a.createElement("div",{style:{position:"relative",zIndex:10,padding:10,backgroundColor:"rgba(250,250,250,0.9)",borderRadius:"25px"}},u?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__searchInChat"),variant:Object(S.d)("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"close",color:"lightgray",onClick:function(){i(""),b(!1),d(!1)}})),onChange:function(e,t){i(e.target.value),b(!0)},onBlur:function(){""===o&&(i(""),b(!1),d(!1))}},placeholder:Object(S.s)("$__searchInChat"),value:Object(S.q)(o).toLowerCase(),autoFocus:!0})):a.a.createElement(k.a,{title:Object(S.s)("$__search",1),color:"grey",icon:"search",onClick:function(e){d((function(e){return!e}))},transparent:!0}),""!==o&&o.length>1&&g&&a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(br,null)),""!==o&&o.length>1&&a.a.createElement("div",{style:(t={position:"absolute",top:"50px",right:"15px",backgroundColor:"#FFFFFF",maxHeight:"calc(100vh - 60px)",height:"auto",overflow:"hidden",overflowY:"auto",boxShadow:"0 3px 3px 3px rgba(0,0,0,0.1)"},Object(h.a)(t,"maxHeight","90vh"),Object(h.a)(t,"maxWidth","666px"),Object(h.a)(t,"zIndex",2001),t)},a.a.createElement(ga,{nodeId:e.nodeId,db:e.db,text:o,onFinish:function(e){b(!1)},onAction:function(t){e.onAction&&e.onAction(t),i(""),b(!1),d(!1)}})))})));function ya(){ya=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 va=Object(G.a)(vn),xa=Object(u.b)((function(e,t){var r=e.timeline;t.nodeId;return{timeline:r}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=va(),r=l.a.getState().session,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=e.timeline,d=a.a.useRef(!0);a.a.useEffect((function(){return d.current=!0,function(){d.current=!1}}),[]);var h=e.type||"comment",g=Object(n.useRef)(),b=e.nodeId?l.a.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},y=l.a.getState().db.users[e.nodeId]?"users":"cards";Object(n.useEffect)((function(){return g.current={mounted:!0},function(){g&&g.current&&g.current.mounted&&(g.current.mounted=!1)}}),[]);var v=[],x=[];l.a.getState().db.cards[e.nodeId]&&u[e.nodeId]&&Object.keys(u[e.nodeId]).map((function(t){return x.push(u[e.nodeId][t])}));"kpi"===h&&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})).map((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 x.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===x.filter((function(e){return e._id===t})).length})).map((function(e){x.push(u[r._id][e])})),u&&u[e.nodeId]&&Object.keys(u[e.nodeId]).filter((function(t){return u[e.nodeId]})).map((function(t){x.push(u[e.nodeId][t])})),x=Object.keys(x).sort((function(e,t){return parseInt(x[e].created_at)<parseInt(x[t].created_at)?-1:parseInt(x[e].created_at)>parseInt(x[t].created_at)?1:0})).filter((function(t){return x[t].user&&x[t].user._id&&(x[t].user._id===r._id||x[t].user._id===e.nodeId)})).map((function(e){return x[e]}))),e.kpi_type&&(x=Object.keys(x).filter((function(t){return x[t].kpi_type===e.kpi_type||x[t].reply})).map((function(e){return x[e]})));var _=b&&b.kpi_ini?parseFloat(b.kpi_ini):0;if(a.a.useEffect((function(){if(d.current){var t=function(){var t=Object(f.a)(ya().mark((function t(){var r;return ya().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.type?e.type:"comment",t.next=3,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(p.a)({ids:e.nodeId,db:y,type:r},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:x.filter((function(e){return e.type===r})).length>0?x.filter((function(e){return e.type===r})).length-1:0,reqChildrens:!1}));case 3:d.current&&s(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();d.current&&x.filter((function(e){return e.type===h})).length<10&&(s(!0),t())}}),[h,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(fe,null));var O=Object.keys(x).length>0&&Object.keys(x).filter((function(e){if((!x[e].deleted||x[e].deleted&&x[e].user&&x[e].user._id&&x[e].user._id===r._id)&&(x[e].type===h||x[e].reply&&Object.keys(x).filter((function(t){return x[t]&&x[t]._id===x[e].reply&&x[t].type===h})).length>0))return!0})).sort((function(e,t){return x[e].created_at<x[t].created_at?-1:x[e].created_at>x[t].created_at?1:0})).map((function(e){var t=x[e];return _=parseFloat(parseFloat(_)+parseFloat(t.value)),t.balance=_,t.files&&Object.keys(t.files).length>0&&Object.keys(t.files).map((function(e,r){var n=t.files[e];v.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}},O&&O.length>0?a.a.createElement(fa,{messages:O,hideCards:!!e.hideCards,db:e.db,type:h,nodeId:e.nodeId,openLightBox:function(t){var r;r=t,e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,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(ba,{db:y,nodeId:e.nodeId,onAction:function(e){}}))))})),_a=Object(u.b)(null,(function(e){return Object(T.b)(I,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(R,null,a.a.createElement(xa,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(S.d)("menu")}},Object(S.s)("$__onlyAdminsCanSendMessages",1)):a.a.createElement(a.a.Fragment,null):a.a.createElement(R,null,a.a.createElement(Jn,{db:e.db?e.db:"cards",nodeId:t,editorStyle:{padding:"7px"}})))})),Oa=r(1928);function wa(){wa=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 ja=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=function(){var t=Object(f.a)(wa().mark((function t(r,n){var a,o,i;return wa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,o=l.a.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,a.map(function(){var t=Object(f.a)(wa().mark((function t(r,n){var i,c,s,u;return wa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.value||!e.dbNode||0!==o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length){t.next=7;break}return t.next=3,B.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)&&(c=i&&i.data&&i.data.id?i.data.id:i.data.value,0===o.filter((function(e){return e.value===c})).length&&(o.push({value:c,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},Object(h.a)({},e.dbNode,o)))),0===a.filter((function(e){return e.value===c})).length&&(a.splice(n,1),a.push({value:c,label:r}))),t.next=8;break;case 7:o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label})).length>0&&(s=o.filter((function(e){return r&&r.label&&e.label===r.label||r&&r===e.label}))[0])&&0===a.filter((function(e){return e.value===s.value})).length&&(a.splice(n,1),a.push({value:s.value,label:s.label}));case 8:return u=[],a.filter((function(e){e&&e.value&&u.push(e)})),a=Array.from(u),t.abrupt("return",a);case 12:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 5:i=t.sent,Promise.all(i).then((function(){e.onChange&&e.onChange(r,a)})),t.next=10;break;case 9:e.onChange&&e.onChange(r,a);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),r=Object(p.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,a.a.createElement(Oa.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))})),Ea=Object(ae.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}}}))(Ir.a);function ka(e){var t=a.a.useState(!1),r=Object(m.a)(t,2),n=r[0],o=r[1];return a.a.createElement(Ea,{style:Object(p.a)(Object(p.a)({},e.style?e.style:{}),n?{}:{paddingLeft:10,paddingRight:10}),deleteIcon:e.deleteIcon?e.deleteIcon:null,label:e.label,onMouseOver:function(){o(!0)},onMouseLeave:function(){o(!1)},onDelete:e.onDelete&&n?function(){e.onDelete()}:null,onClick:e.onClick?function(t){e.onDelete()}:null})}var Sa=Object(ae.a)({root:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?0:"filled"===Object(S.d)("fieldVariant")?"-15px":0,borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})})(be.a),La=r(804),Ca={labelTop:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?"0px":"filled"===Object(S.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),noLabel:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(S.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),labelTopLight:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("color")},"& label.MuiFormLabel-filled":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(S.d)("color"),marginTop:"standard"===Object(S.d)("fieldVariant")||"filled"===Object(S.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(S.d)("fieldVariant")?"0px":"filled"===Object(S.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}}),noLabelLight:Object(p.a)(Object(p.a)({},U.l),{},{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(S.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(S.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(S.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(S.d)("fieldRadius"),"& fieldset":{borderColor:Object(S.d)("line")},"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")},"&.Mui-focused":{borderBottomColor:Object(S.d)("line"),"&::before":{borderBottomColor:Object(S.d)("line")},"&::after":{borderBottomColor:Object(S.d)("line")}}}})},Ia=Object(G.a)(Ca);var Ta=function(e){var t=Ia(),r=a.a.useState([]),n=Object(m.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){i(e.value)}),[e.value]);var c=function(t){var r=Array.from(o);r.splice(r.findIndex((function(e){return e.value===t.value})),1),i(r),e.onChange&&e.onChange(r)};return a.a.createElement(ja,{className:e.dark?e.noLabel?t.noLabel:t.labelTop:e.noLabel?t.noLabelLight:t.labelTopLight,value:o,options:e.options||[],getOptionLabel:function(e){return e&&e.label?Object(S.s)(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,renderInput:function(t){return e.dark?a.a.createElement(Sa,Object.assign({},t,{label:Object(S.s)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(p.a)(Object(p.a)({},t.InputProps),e.InputProps)})):a.a.createElement(ye,Object.assign({},t,{label:Object(S.s)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(p.a)(Object(p.a)({},t.InputProps),e.InputProps)}))},renderOption:function(t){var r,n;return a.a.createElement("div",{style:Object(p.a)({zIndex:3e3},(null===(r=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===r?void 0:r.color)?{paddingLeft:7,borderLeft:"solid 3px ".concat(null===(n=e.options.filter((function(e){return e.value===t.parent}))[0])||void 0===n?void 0:n.color)}:{})},t.parent&&e.options.filter((function(e){return e.value===t.parent})).length>0?a.a.createElement("div",{style:{fontSize:10,color:"gray"}},e.options.filter((function(e){return e.value===t.parent}))[0].label):a.a.createElement(a.a.Fragment,null),t.label)},renderTags:function(t,r){return t.map((function(t,r){return a.a.createElement("div",{key:r},e.colorPicker&&t&&t.label?a.a.createElement(Ce.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)}},a.a.createElement(ka,{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(S.r)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(La.a,{style:{color:Object(S.r)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}})):t&&t.label?a.a.createElement(ka,{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(S.r)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(La.a,{style:{color:Object(S.r)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}}):a.a.createElement(a.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})})),i(n)):i(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})},Fa={instruction:{},picture:{}};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 Na=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Fa)((function(e){var t,r=a.a.useState((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.values)||[]),n=Object(m.a)(r,2),o=n[0],i=n[1];a.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})).map((function(e){r.push(e)})),i(r)}}),[null===e||void 0===e?void 0:e.data]);var c=function(){var t=Object(f.a)(Da().mark((function t(r){return Da().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.callBack&&e.callBack(r),i(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(Ta,{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:o,placeholder:e.placeholder||null,onChange:function(e){c(e)},colorPickerCallBack:function(t){e.colorPickerCallBack&&e.colorPickerCallBack(t)}}))}))),Aa=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")}}};function Pa(){Pa=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(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(ae.a)(Aa)((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.t)(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.s)("$__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)(Pa().mark((function t(r){var n;return Pa().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xt(d.email);case 2:if(n=t.sent,d.name){t.next=7;break}Object(S.c)({message:Object(S.s)("$__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.t)(o.data.email)||s[d._id]&&d.email!==s[d._id].email&&n)){t.next=15;break}_(Object(S.s)("$__invalidEmail",1)),t.next=19;break;case 15:return t.next=17,gt(e);case 17:t.sent&&(Object(S.c)({message:Object(S.s)("$__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(oa,{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(Zr,{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(ye,{id:"sideModule_user_fullName",label:Object(S.s)("$__fullName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__fullName",1),autoFocus:!0,disabled:!L}),a.a.createElement(ye,{id:"sideModule_user_displayName",label:Object(S.s)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__displayName",1),disabled:!L}),-1===u.filter((function(e){return e.name===d.type}))[0].disabledFields.indexOf("email")&&a.a.createElement(ye,{id:"sideModule_user_email",label:Object(S.s)("$__email",1),variant:Object(S.d)("fieldVariant"),name:"email",type:"email",helperText:x,InputProps:{autoComplete:"new-password",className:!x&&d.email&&Object(S.t)(d&&d.email?d.email:"")?"":"invalid",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"alternate_email"})),onChange:function(e){_(null),j(e.target)},onBlur:function(){var e=Object(f.a)(Pa().mark((function e(t){var r;return Pa().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.t)(t.target.value)||s[d._id]&&t.target.value===s[d._id].email){e.next=8;break}return e.next=4,xt(t.target.value);case 4:r=e.sent,_(r?Object(S.s)("$__emailAlreadyExists",1):null),e.next=9;break;case 8:_(Object(S.s)("$__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.s)("$__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(Na,{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(Na,{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)))})));function Ma(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],g=a.a.useState(0),b=Object(m.a)(g,2),y=b[0],v=b[1];a.a.useEffect((function(){e.clear&&e.clear!==y&&(v(e.clear),o({cPassword:"",password:""}),s(!1))}));return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.s)("$__passwordTip_1")),a.a.createElement("p",null,Object(S.s)("$__passwordTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.s)("$__passwordTip_3")),a.a.createElement("li",null,Object(S.s)("$__passwordTip_4")),a.a.createElement("li",null,Object(S.s)("$__passwordTip_5")),a.a.createElement("li",null,Object(S.s)("$__passwordTip_6")),a.a.createElement("li",null,Object(S.s)("$__passwordTip_7")))),a.a.createElement(ye,{label:Object(S.s)("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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(ye,{label:Object(S.s)("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__passwordTooWeak",1):2===f?Object(S.s)("$__weakPassword",1):3===f?Object(S.s)("$__goodPassword",1):4===f?Object(S.s)("$__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 za=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")}}};function Ya(){Ya=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 Ba=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((function(e){var t,r=e.classes,n=l.a.getState(),o=n.sideModule,i=n.session,s=n.functions,u=n.db,d=s.socket,g=o.data,b=a.a.useState(g),y=Object(m.a)(b,2),v=y[0],x=(y[1],a.a.useState(!1)),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState(null),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=Object(S.j)(),N=function(t){return w(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},o),{},{data:Object(p.a)(Object(p.a)({},o.data),{},{_access:Object(p.a)(Object(p.a)({},o.data._access),{},Object(h.a)({},t.name,t.value))})})),!0},A=function(t){var r={_id:g._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)}},P=function(t){!t&&O?Object(S.c)({message:Object(S.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},$=function(){var t=Object(f.a)(Ya().mark((function t(r){return Ya().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return w(!1),t.next=3,bt(e);case 3:t.sent&&(Object(S.c)({message:Object(S.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),A(!g._access.admin||null),r&&P(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),M=function(){var e=Object(f.a)(Ya().mark((function e(){return Ya().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.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.s)("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(f.a)(Ya().mark((function e(){return Ya().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.a.post("/user/new-password",{userId:g._id,password:k});case 3:e.sent&&(L(null),Object(S.c)({message:Object(S.s)("$__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.s)("$__invalidRequest",1)," | ").concat(Object(S.s)("$__contactSupport",1)),variant:"warning",persist:!1,horizontal:"right",confirm:null});case 10:F(T+1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),Y=(u.plans[0].settings.space,u.plans[0]);i&&i.GlobalData&&String(i.GlobalData.plan)&&u.plans.filter((function(e){return e.value===i.GlobalData.plan})).length>0&&u.plans.filter((function(e){return e.value===i.GlobalData.plan}))[0].settings&&(u.plans.filter((function(e){return e.value===i.GlobalData.plan}))[0].settings.space,Y=u.plans.filter((function(e){return e.value===i.GlobalData.plan}))[0]);var R=1;Y&&Y.settings&&Y.settings.admins&&(R=parseInt(Y.settings.admins)),i&&i.GlobalData&&i.GlobalData.customAdmins&&(R=parseInt(i.GlobalData.customAdmins));var G=Object.keys(u.users).filter((function(e){return u.users[e]&&e!==g._id&&u.users[e]._access&&u.users[e]._access.admin&&(!u.users[e]._parent||u.users[e]._parent&&u.users[u.users[e]._parent]&&!u.users[u.users[e]._parent].independentAccount)})).length||0;return g._access&&g._access.owner&&i._id!==g._id||i._id===g._id?a.a.createElement("div",null,a.a.createElement(oa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return P(!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(Ma,{onConfirmed:function(e){L(e)},clear:T})),k&&a.a.createElement("div",{style:(t={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(h.a)(t,"display","flex"),Object(h.a)(t,"alignItems","center"),Object(h.a)(t,"justifyContent","center"),Object(h.a)(t,"borderRadius","7px"),t),onClick:function(){z()}},a.a.createElement(et,{icon:"save",text:Object(S.s)("$__save","*"),title:!Object(S.s)("$__save","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")})))):(console.log(R,G),a.a.createElement("div",null,a.a.createElement(oa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return P(!0)}}),a.a.createElement("div",{className:r.data},a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.enabled),onChange:function(e){N({name:"enabled",value:!g._access||!g._access.enabled})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__permitPlataformAccess",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__userAccess_PlataformAccessDescription",1)))),g._access&&"owner"===g._access?a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null," ",Object(S.s)("$__youAreAccountOwner",1)))):G<R||g&&g._access&&g._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:g&&g._access&&g._access.admin?"rgba(0,0,0,0.07)":Object(S.d)("color"),color:g&&g._access&&g._access.admin?"gray":"#FFFFFF"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){N({name:"admin",value:!1})}},a.a.createElement(Z.a,{icon:"supervised_user_circle",size:"33px",color:g&&g._access&&g._access.admin?null:"#FFFFFF"}),Object(S.s)("$__guest"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:g&&g._access&&g._access.admin?Object(S.d)("color"):"rgba(0,0,0,0.07)",color:g&&g._access&&g._access.admin?"#FFFFFF":"gray"}},a.a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},onClick:function(){N({name:"admin",value:!0})}},a.a.createElement(Z.a,{icon:"supervisor_account",size:"33px",color:g&&g._access&&g._access.admin?"#FFFFFF":null}),Object(S.s)("$__supervisorAccount")))),a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)(g&&g._access&&g._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.s)("$__adminLimitReached")),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__adminLimitReachedDescription",1)),a.a.createElement("div",{style:{position:"relative",marginTop:7,color:"red",fontWeight:"bolder"}},Object(S.s)("$__usedUsers","*")," ",G," ",Object(S.s)("$__of","*")," ",R,a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("acc#tab/subscriptionUpgrade")}},Object(S.s)("$__upgradeSubscription")))))),g._access&&g._access.enabled&&g._access.admin&&a.a.createElement(a.a.Fragment,null,a.a.createElement(a.a.Fragment,null,g._token&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.s)("$__unregisteredUserAlert",1)),a.a.createElement(et,{text:Object(S.s)("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){M()}})),g._token&&g._token._id&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(S.s)("$__urlToActivate",1)),a.a.createElement("input",{type:"text",value:"".concat("https://software.machen.ai","/activate?token=").concat(g._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(sr,{checked:!(!g._access||!g._access.user),onChange:function(e){N({name:"user",value:!g._access||!g._access.user})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__users",1)),g._access&&(!g._access||g._access.user&&!1!==g._access.user)?a.a.createElement(a.a.Fragment,null,!g._access.userAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.userRead),onChange:function(e){N({name:"userRead",value:!g._access||!g._access.userRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.userInteract),onChange:function(e){N({name:"userInteract",value:!g._access||!g._access.userInteract})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__interact",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.userEdit),onChange:function(e){N({name:"userEdit",value:!g._access||!g._access.userEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__edit",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.userAdmin),onChange:function(e){N({name:"userAdmin",value:!g._access||!g._access.userAdmin})},name:"checkeduserAdmin",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__userAccess_UserAccessDescription",1)))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(sr,{checked:!(!g._access||!g._access.plan),onChange:function(e){N({name:"plan",value:!g._access||!g._access.plan})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__plan",1)),g._access&&(!g._access||g._access.plan&&!1!==g._access.plan)?a.a.createElement(a.a.Fragment,null,!g._access.planAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.planRead),onChange:function(e){N({name:"planRead",value:!g._access||!g._access.planRead})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.planEdit),onChange:function(e){N({name:"planEdit",value:!g._access||!g._access.planEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.createTemplate),onChange:function(e){N({name:"createTemplate",value:!g._access||!g._access.createTemplate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__createTemplate",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.planModerate),onChange:function(e){N({name:"planModerate",value:!g._access||!g._access.planModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.planAdmin),onChange:function(e){N({name:"planAdmin",value:!g._access||!g._access.planAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__userAccess_StrategyAndPlansAccessDescription")))),D&&D.master&&g._isAdmin?a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(sr,{checked:!(!g._access||!g._access.feed),onChange:function(e){N({name:"feed",value:!g._access||!g._access.feed})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__feed",1)),g._access&&(!g._access||g._access.feed&&!1!==g._access.feed)?a.a.createElement(a.a.Fragment,null,!g._access.feedAdmin&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.feedEdit),onChange:function(e){N({name:"feedEdit",value:!g._access||!g._access.feedEdit})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.feedModerate),onChange:function(e){N({name:"feedModerate",value:!g._access||!g._access.feedModerate})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!(!g._access||!g._access.feedAdmin),onChange:function(e){N({name:"feedAdmin",value:!g._access||!g._access.feedAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__feedAccess_StrategyAndPlansAccessDescription")))):a.a.createElement(a.a.Fragment,null),D&&D.masterAdmin?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:"red"}},a.a.createElement(sr,{checked:!(!g._access||!g._access.masterAdmin),onChange:function(e){N({name:"masterAdmin",value:!g._access||!g._access.masterAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__accountAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__accountAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null),D&&D.masterAdmin&&i&&(i.email.indexOf("@sonne.global")>-1||i.email.indexOf("@machen.ai")>-1)&&(g.email.indexOf("@sonne.global")>-1||g.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(sr,{checked:!(!g._access||!g._access.machenAdmin),onChange:function(e){N({name:"machenAdmin",value:!g._access||!g._access.machenAdmin})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__machenAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(S.s)("$__machenAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null)),v&&v._access&&v._access.admin&&g&&g._access&&!g._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))))})));function Ra(){Ra=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 Ga=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((function(e){e.classes;var t,r,o,i=l.a.getState(),c=i.sideModule,s=(i.db,i.session,i.functions.socket,c.data,a.a.useState(!1)),u=Object(m.a)(s,2),d=u[0],g=(u[1],a.a.useState((t={image:null},Object(h.a)(t,"image",null),Object(h.a)(t,"status",!1),t))),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];Object(n.useEffect)((function(){j()}),[]);var j=function(){var e=Object(f.a)(Ra().mark((function e(){var t,r;return Ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}v(Object(p.a)(Object(p.a)(Object(p.a)({},y),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,dt.a.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&v(Object(p.a)(Object(p.a)(Object(p.a)({},y),r.data.result),{},{status:!1}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Object(f.a)(Ra().mark((function e(){var t;return Ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"verify",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?v(Object(p.a)(Object(p.a)({},y),{},{status:!0})):(Object(S.c)({message:Object(S.s)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),v(Object(p.a)(Object(p.a)({},y),{},{status:!1}))),w(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=Object(f.a)(Ra().mark((function e(){var t,r;return Ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.a.post("/M_User_TwoFactor",{action:"disable",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?(v((r={image:null},Object(h.a)(r,"image",null),Object(h.a)(r,"status",!1),r)),j()):Object(S.c)({message:Object(S.s)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),w(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(oa,{close:function(){d?Object(S.c)({message:Object(S.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),y.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.s)("$__disableTokenTip_1")),a.a.createElement("p",null,Object(S.s)("$__disableTokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.s)("$__disableTokenTip_3")),a.a.createElement("li",null,Object(S.s)("$__disableTokenTip_4")),a.a.createElement("li",null,Object(S.s)("$__disableTokenTip_5")),a.a.createElement("li",null,Object(S.s)("$__disableTokenTip_6")),a.a.createElement("li",null,Object(S.s)("$__disableTokenTip_7")))),a.a.createElement(ye,{label:Object(S.s)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){w(e.target.value)}},autoComplete:"new-password",value:O,max:6}),a.a.createElement("div",{style:(o={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"red",marginTop:"15px"},Object(h.a)(o,"display","flex"),Object(h.a)(o,"alignItems","center"),Object(h.a)(o,"justifyContent","center"),Object(h.a)(o,"borderRadius","7px"),o),onClick:function(){k()}},a.a.createElement(et,{icon:"toggle_on",text:Object(S.s)("$__disableToken","*"),title:Object(S.s)("$__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%"}},y.image&&a.a.createElement("img",{alt:"MACHEN_IMAGE",src:y.image})),a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(S.s)("$__tokenTip_1")),a.a.createElement("p",null,Object(S.s)("$__tokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.s)("$__tokenTip_3")),a.a.createElement("li",null,Object(S.s)("$__tokenTip_4")),a.a.createElement("li",null,Object(S.s)("$__tokenTip_5")),a.a.createElement("li",null,Object(S.s)("$__tokenTip_6")),a.a.createElement("li",null,Object(S.s)("$__tokenTip_7")))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__token",1)),a.a.createElement(ye,{label:Object(S.s)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){w(e.target.value)}},placeholder:Object(S.s)("$__token","*"),autoComplete:"new-token",value:O,max:6})),!y.status&&O&&6===O.length&&a.a.createElement("div",{style:(r={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(h.a)(r,"display","flex"),Object(h.a)(r,"alignItems","center"),Object(h.a)(r,"justifyContent","center"),Object(h.a)(r,"borderRadius","7px"),r),onClick:function(){E()}},a.a.createElement(et,{icon:"check",text:Object(S.s)("$__activeToken","*"),title:!Object(S.s)("$__activeToken","*"),iconColor:Object(S.d)("lightText"),textColor:Object(S.d)("lightText")}))))})));function Ha(){Ha=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 Wa=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((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,2),y=b[0],v=(b[1],a.a.useState(o.data&&o.data.language?o.data.language:"pt-BR")),x=Object(m.a)(v,2),_=x[0],O=x[1],w=JSON.stringify(y)!==JSON.stringify(u),j=function(t){var r=Object(p.a)(Object(p.a)({},u),{},Object(h.a)({},t.name,t.value));"language"===t.name&&O(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)},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];w&&!t?Object(S.c)({message:Object(S.s)("$__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)(Ha().mark((function t(r){return Ha().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gt(e);case 2:t.sent&&(Object(S.c)({message:Object(S.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u.language!==_&&e.reduxFunction("ASYNC","SET_SESSION",Object(p.a)(Object(p.a)({},l.a.getState().session),{},{language:_})),r&&(E(!0),u.language!==_&&setTimeout((function(){window.location.reload()}),1500)));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();console.log(y,u);var L=Object(S.j)(),C=!1;return L&&L.user&&(L.userAdmin||L.userEdit)&&(C=!0),a.a.createElement("div",null,a.a.createElement(oa,{save:w?function(){return k()}:null,saveClose:w?function(){return k(!0)}:null,close:function(){return E(!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.s)("$__language",1)),a.a.createElement(ja,{id:"combo-box-demo",options:i.languages,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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){j({name:"language",value:t.value})}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__sessionDuration",1)),a.a.createElement("div",null,Object(S.s)("$__sessionDurationDescription",1)),a.a.createElement(ja,{id:"combo-box-demo",options:i.expiresIn,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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){j({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.s)("$__thisIsAIndependentAccountExplain",1)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(sr,{checked:!!u.independentAccount,onChange:function(e){C&&j({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.s)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null)))}))),Ua=r(646),Va=r.n(Ua),qa=r(1110);r(690),r(1308);var Xa=a.a.forwardRef((function(e,t){return a.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},a.a.createElement("label",{onClick:e.onClick,ref:t,style:{marginRight:7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.value||e.placeholder),a.a.createElement(Z.a,{size:"22px",color:Object(S.d)("color"),icon:"today",onClick:e.onClick}))})),Ja=function(e){return Object(Ua.registerLocale)("pt",qa.a),a.a.createElement("div",{style:Object(p.a)(Object(p.a)(Object(p.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},a.a.createElement("div",{style:Object(p.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},a.a.createElement(Va.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:Object(S.s)("$__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(S.s)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:a.a.createElement(Xa,null),showYearDropdown:!0}))),e.range?a.a.createElement("div",{style:Object(p.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},a.a.createElement(Va.a,Object.assign({locale:"pt",placeholderText:Object(S.s)("$__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(S.s)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{maxDate:e.maxDate?e.maxDate:null,customInput:a.a.createElement(Xa,null),showYearDropdown:!0}))):a.a.createElement(a.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?a.a.createElement("div",{style:Object(p.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},a.a.createElement(k.a,Object.assign({color:Object(S.d)("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Object(S.s)("$__clearDate","*"),text:Object(S.s)("$__clearDate","*")}))):a.a.createElement(a.a.Fragment,null))};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(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((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.s)("$__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)(Ka().mark((function t(r){return Ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gt(e);case 2:t.sent&&(Object(S.c)({message:Object(S.s)("$__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(oa,{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.s)("$__limitNumberOfUsers",1)),a.a.createElement("div",null,Object(S.s)("$__limitAdminUsersExplain",1),a.a.createElement(ye,{label:Object(S.s)("$__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.s)("$__thisIsAIndependentAccountExplain",1)),a.a.createElement("ul",{style:{color:"gray",fontSize:12,width:"100%",textAlign:"initial"}},u.plan?a.a.createElement("li",null,Object(S.s)("$__signaturePlan",1),": ",Object(S.s)(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.s)("$__expireAccountDate",1),": ",la()(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(sr,{checked:!!u.independentAccount,onChange:function(e){E&&_({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(S.s)("$__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(ja,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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(Ja,{placeholder:Object(S.s)("$__dueDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){_({name:"expireAccountDate",value:String(la()(e).unix("X"))})},maxDate:new Date(1e3*la()().add("days",30).unix("X")),startDate:u&&u.expireAccountDate?new Date(1e3*u.expireAccountDate):null}):a.a.createElement(a.a.Fragment,null)))}))),Qa=r(1072),eo=r.n(Qa),to=r(1073),ro=r.n(to);function no(){no=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 ao=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((function(e){e.classes;var t,r=l.a.getState(),o=r.sideModule,i=(r.db,r.session,r.functions.socket,o.data,a.a.useState(!1)),c=Object(m.a)(i,2),s=c[0],u=(c[1],a.a.useState((t={image:null},Object(h.a)(t,"image",null),Object(h.a)(t,"status",!1),t))),d=Object(m.a)(u,2),p=(d[0],d[1],a.a.useState(null)),g=Object(m.a)(p,2);g[0],g[1],Object(n.useEffect)((function(){b()}),[]);var b=function(){var e=Object(f.a)(no().mark((function e(){return no().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(oa,{close:function(){s?Object(S.c)({message:Object(S.s)("$__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.s)("$__mobileTokenTip_1")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(S.s)("$__mobileTokenTip_2")),a.a.createElement("li",null,Object(S.s)("$__mobileTokenTip_3")),a.a.createElement("li",null,Object(S.s)("$__mobileTokenTip_4")))),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ro.a,style:{width:"52%"}}),a.a.createElement("img",{alt:"MACHEN_IMAGE",src:eo.a,style:{width:"52%",marginTop:"33px"}})))}))),oo=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)({},U.l),{},{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)({},U.l),{},{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)({},U.l),{},{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)({},U.l),{},{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")}}},io=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(ae.a)(oo)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Object(at.j)(r.id)),a.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},a.a.createElement(je.a,{onClick:function(){e.openModule(e.module)}},a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},a.a.createElement(Z.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(Z.a,{className:t.MenuButton_arrow,color:r.activeModule===e.module?Object(S.d)("active"):Object(S.d)("colorText"),icon:"play_arrow"})))})));function co(e){var t=Object(G.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(Fe.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(Fe.a,{variant:e.variant?e.variant:"contained",color:"primary",style:e.style?e.style:{},onClick:e.onClick?function(){return e.onClick()}:null},e.children)}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)((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)(lo().mark((function e(){var t;return lo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(at.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)(lo().mark((function t(){return lo().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.s)("$__beforeRemovingYouneedToMoveAllActivitiesInTheColumn",1),variant:"warning",persist:!1,horizontal:"center"}),t.abrupt("return");case 3:Object(S.c)({message:Object(S.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.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)(lo().mark((function t(){return lo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.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)(lo().mark((function e(){var t;return lo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!1),e.next=3,dt.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)(lo().mark((function e(){return lo().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)(lo().mark((function e(){var t;return lo().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[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(oa,{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.s)("$__deleteOptions",1)),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},"chatGroup"===$.type?Object(S.s)("$__deleteThisChatGroup",1):Object(S.s)("$__deleteThisActivity",1)),a.a.createElement(co,{onClick:function(){B()}},Object(S.s)("$__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.s)("$__thisActivityHasOtherLinkedsActivities",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Object(S.s)("$__deleteAllActiviesLinkedAlert",1)),a.a.createElement(co,{onClick:function(){R()}},Object(S.s)("$__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.s)("$__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.s)("$__delete".concat(n.users[$._id].type,"WithUsersDescription"),1):Object(S.s)("$__delete".concat(n.users[$._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deleteThisDescription",1)),a.a.createElement(co,{onClick:function(){B()}},Object(S.s)("$__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.s)("$__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.s)("$__items"),a.a.createElement("br",null),Object(S.s)("$__deleteCountCardsExplain"))),O?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){w(null)}},a.a.createElement(Ie.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(co,{onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.s)("$__confirm"),text:Object(S.s)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){H()}},{shadow:!0,title:Object(S.s)("$__cancel"),text:Object(S.s)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.s)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.s)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(ye,{label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:A,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.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(Ie.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.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deactivateWhithoutMigration",1)),a.a.createElement(co,{onClick:function(){B()}},Object(S.s)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deactivateUserDescription",1)),a.a.createElement(co,{onClick:function(){B()}},Object(S.s)("$__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(aa.a,null)):a.a.createElement(a.a.Fragment,null)))}));var uo=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(ye,{label:Object(S.s)("$__ApprovalOrRejectReason",1),variant:Object(S.d)("fieldVariant"),name:"reason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"toc"})),onChange:function(e){o(e.target.value)}},value:n,placeholder:Object(S.s)("$__ApprovalOrRejectReason",1)})),l?a.a.createElement(br,null):a.a.createElement("div",{style:{display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(k.a,{reverse:!0,title:Object(S.s)("$__indorse"),text:Object(S.s)("$__indorse"),color:"green",textColor:"green",icon:"approval",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmApproveItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){nr(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.s)("$__reject"),text:Object(S.s)("$__reject"),color:"red",textColor:"red",icon:"backspace",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmRejectItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){nr(Object(p.a)(Object(p.a)({},e),{},{reason:n,approval:!0})),e.onAction&&e.onAction()}})},size:"25px",style:{padding:12}}))))})),po=r(116),fo=r(772),ho=r.n(fo),mo=["currencySymbol"],go=function(e){Object(P.a)(r,e);var t=Object($.a)(r);function r(e){var n;return Object(N.a)(this,r),(n=t.call(this,e)).getValue=n.getValue.bind(Object(po.a)(n)),n.callEventHandler=n.callEventHandler.bind(Object(po.a)(n)),n}return Object(A.a)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.currencySymbol,Object(dn.a)(e,mo));this.autonumeric=new ho.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:"componentWillUnmount",value:function(){this.autonumeric.remove()}},{key:"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(be.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(ut.a,{position:"start"},r)},o),inputProps:Object(p.a)({},n)},i))}}]),r}(a.a.Component);go.defaultProps={type:"text",variant:"standard",currencySymbol:"$",outputFormat:"number",textAlign:"right",maximumValue:"10000000000000",minimumValue:"-10000000000000"};var bo=go,yo=(ho.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.s)("$_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(ge.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})))}),vo=r(1895),xo=r(1074),_o=r.n(xo);function Oo(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(vo.a,{variant:"text",ref:i,"aria-label":"split button"},a.a.createElement(Fe.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(Fe.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(_o.a,null))),a.a.createElement(Me.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ne.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:p},a.a.createElement(Pe.a,{id:"split-button-menu"},e.options.map((function(t,r){return a.a.createElement(Ae.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var wo=r(1930),jo=Object(ae.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Object(S.d)("color")}})(wo.a);function Eo(){Eo=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 ko=Object(G.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%"}}}}));var So=Object(u.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=ko(),r=a.a.useRef(null),n=l.a.getState(),o=n.db,i=n.session,c=a.a.useState(o.cards[e._id]||{}),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(!!e.open),g=Object(m.a)(h,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([]),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState(""),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState(!1),z=Object(m.a)(M,2),Y=z[0],R=z[1],G=a.a.useState(Object(at.u)(u._id)),H=Object(m.a)(G,2),W=H[0],U=H[1];a.a.useEffect((function(){return U(Object(at.u)(u._id)),function(){}}),[e.users]),a.a.useEffect((function(){o.cards[e._id]&&JSON.stringify(o.cards[e._id])!==JSON.stringify(u)&&(d(o.cards[e._id]),U(Object(at.u)(u._id)))}),[e.cards]);var V=Object(S.j)(),q=Object(at.t)(u._id),X=!1;q>3&&(X=!0),!X&&V.plan&&V.planAdmin&&(X=!0);var J=window.location.hash.split("/");function K(e){"Tab"===e.key&&(e.preventDefault(),y(!1))}J[0]=J[0].replace("#","");var Q=function(){var t=Object(f.a)(Eo().mark((function t(r,n){var a,i;return Eo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=1,u&&"plan"===u.type&&(a=3),n?a=n:u._planId&&o.cards[u._planId]&&o.cards[u._planId]._users&&o.cards[u._planId]._users[r]&&o.cards[u._planId]._users[r].access&&(a=u._parent&&o.cards[u._parent]&&o.cards[u._parent]._users&&o.cards[u._parent]._users[r]&&o.cards[u._parent]._users[r].access&&parseInt(o.cards[u._parent]._users[r].access)>parseInt(o.cards[u._planId]._users[r].access)?parseInt(o.cards[u._parent]._users[r].access):parseInt(o.cards[u._planId]._users[r].access)),i=!!(u&&u._users&&u._users[r]),t.next=6,It(e,r,a,u._id,i);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),ee=function(){var e=Object(f.a)(Eo().mark((function e(t){return Eo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.a.put("cards/removeAccess/",{cardId:u._id,userIds:_}),w([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(){var t=Object(f.a)(Eo().mark((function t(){return Eo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L.forEach((function(t){Object(at.K)(e,{_id:u._id,userId:t,option:!0})})),R(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),re=function(e){var t=e.data;return a.a.createElement(Ae.a,null,t.label,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}}))},ne=function(t){var r=t.pr,n=!1;e.permission&&(n=!0);var o=!1;u._users&&u._users[r]&&u._users[r].myDay&&u._users[r].myDay&&O()(1e3*parseInt(u._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0);var i=!!(Object.keys(W).length>1&&W[r]&&W[r].isResponsible),c=!!(e.customDefine&&e.customDefine.name&&Object.keys(W).length>1&&W[r]&&W[r][e.customDefine.name]),l=W[r]?W[r]:u._users[r];return a.a.createElement(Ae.a,{onClick:n?function(){}:null,disabled:!n},a.a.createElement("div",{style:Object(p.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},n?{}:{cursor:"pointer"})},a.a.createElement("div",{style:Object(p.a)(Object(p.a)({width:"33px",height:"33px",borderRadius:"50%"},e.customDefine?{border:c?"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:l.image?'url("'.concat(l.image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center",marginRight:7}),src:l.image||null},!l.image&&l&&l.name?l.name.substr(0,1):""),l.name||l.name,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},!e.customDefine&&u._users[r]&&!u._users[r].isResponsible&&X?a.a.createElement(k.a,{title:Object(S.s)("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Dt(e,{cardId:u._id,userId:r})}})},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.customDefine&&u._users[r]&&X?a.a.createElement(k.a,{title:Object(S.s)(u._users[r][e.customDefine.name]?"$__removeThe".concat(e.customDefine.name):"$__defineAs".concat(e.customDefine.name),1),color:u._users[r][e.customDefine.name]?"green":"lightgray",icon:e.customDefine&&e.customDefine.icon||"check",onClick:function(){Object(S.c)({message:Object(S.s)(u._users[r][e.customDefine.name]?"$__confirmUnSetAs".concat(e.customDefine.name):"$__confirmSetAs".concat(e.customDefine.name),1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Nt(e,{cardId:u._id,userId:r,param:e.customDefine.name,on:!u._users[r][e.customDefine.name]})}})},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.customDefine?a.a.createElement(a.a.Fragment,null):a.a.createElement(jo,Object.assign({},Y?{checked:!!(o||L.indexOf(r)>-1)}:{checked:!!u._users[r]},{disabled:!(!Y||!o),onClick:n?function(){if(Y){var e=Array.from(L);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),C(e)}else!function(e){var t=Array.from(_);u._users[e]&&-1===t.indexOf(e)?(t.push(e),w(t)):u._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),w(t)):u._users[e]||Q(e)}(r)}:null,color:"default"}))),_.indexOf(r)>-1&&a.a.createElement("div",{style:{height:"2px",width:"100%",backgroundColor:"red",position:"absolute",top:"50%"}})))};return a.a.createElement("div",{id:"quickUser",onClick:function(e){e.stopPropagation()}},a.a.createElement(Fe.a,{ref:r,"aria-controls":b?"menu-list-grow":void 0,"aria-haspopup":"true",id:"quick_388","aria-label":"menu",onClick:function(t){(e.permission||u&&u._users&&u._users[i._id]&&u._users[i._id].access&&parseInt(u._users[i._id].access)>3)&&(y((function(e){return!e})),t.stopPropagation())},className:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(tt.a,Object.assign({data:u||{}},e&&e.customDefine?{customDefine:e.customDefine}:{}))),a.a.createElement(Me.a,{open:b,anchorEl:r.current,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ne.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom",maxHeight:"333px",minHeight:"50px",overflowY:"auto"},id:"quick_417"}),a.a.createElement($e.a,null,a.a.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:_&&_.length>0||L&&L.length>0?"50px":0,display:"flex",justifyContent:"space-between"}},a.a.createElement(De.a,{onClickAway:function(){y(!1),R(!1),C([])}},a.a.createElement("div",null,P&&a.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(ye,{id:"quickUser_Search",label:Object(S.s)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end",style:{cursor:"pointer"},onClick:function(){D(""),$(!1)}},a.a.createElement(Z.a,{icon:"close"})),onChange:function(e){D(e.target.value)},onBlur:function(e){}},value:F,placeholder:Object(S.s)("$__searchByName",1),autoFocus:!0})),a.a.createElement(Pe.a,{autoFocusItem:b,id:"menu-list-grow",onKeyDown:K},Y?a.a.createElement("div",{style:{position:"relative",overflow:"auto"}},a.a.createElement(Ae.a,{disabled:!0},Object(S.s)("$__selectUsersToMyDay","*")),Object.keys(u._users).filter((function(e){return e!==i._id})).sort((function(e,t){var r,n,a,o;return(null===(r=u._users[e])||void 0===r?void 0:r.name)&&(null===(n=u._users[t])||void 0===n?void 0:n.name)&&u._users[e].name.toLowerCase()<u._users[t].name.toLowerCase()?-1:(null===(a=u._users[e])||void 0===a?void 0:a.name)&&(null===(o=u._users[t])||void 0===o?void 0:o.name)&&u._users[e].name.toLowerCase()>u._users[t].name.toLowerCase()?1:0})).map((function(e){return a.a.createElement(ne,{pr:e,key:e})}))):a.a.createElement("div",null,e.types&&e.types.indexOf("teams")>-1?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ae.a,{disabled:!0},Object(S.s)("$__usersGroups","*")),l.a.getState().db.userGroup.map((function(e){return a.a.createElement(re,{data:e,key:e.value})}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(Ae.a,{disabled:!0},Object(S.s)("$__users","*")),Object.keys(W).filter((function(t){return!(F&&!(F&&W[t].name.toLowerCase().indexOf(F.toLowerCase())>-1)||"user"!==W[t].type||W[t].deleted||W[t]._parent||!(!e.customDefine||e.customDefine&&u._users[t]))})).sort((function(e,t){return W[e].name<W[t].name?-1:W[e].name>W[t].name?1:0})).map((function(e){return W&&W[e]&&W[e]._id&&a.a.createElement(ne,{pr:e,key:e})})),Object.keys(W).filter((function(t){return!(F&&!(F&&W[t].name.toLowerCase().indexOf(F.toLowerCase())>-1)||"external"!==W[t].type||W[t].deleted||!(!e.customDefine||e.customDefine&&u._users[t]))})).length>0&&a.a.createElement(Ae.a,{disabled:!0},Object(S.s)("$__UnityUsers","*")),Object.keys(W).filter((function(t){return(!F||F&&W[t].name.toLowerCase().indexOf(F.toLowerCase())>-1)&&"external"===W[t].type&&!W[t].deleted&&(!e.customDefine||e.customDefine&&u._users[t])})).sort((function(e,t){return W[e].name<W[t].name?-1:W[e].name>W[t].name?1:0})).map((function(e){return W&&W[e]&&W[e]._id&&a.a.createElement(ne,{pr:e,key:e})})),Object.keys(W).filter((function(t){return!(F&&!(F&&W[t].name.toLowerCase().indexOf(F.toLowerCase())>-1)||"consultant"!==W[t].type||W[t].deleted||!(!e.customDefine||e.customDefine&&u._users[t]))})).length>0&&a.a.createElement(Ae.a,{disabled:!0},Object(S.s)("$__planningUsers","*")),Object.keys(W).filter((function(t){return!(F&&!(F&&W[t].name.toLowerCase().indexOf(F.toLowerCase())>-1)||"consultant"!==W[t].type||W[t].deleted||!(!e.customDefine||e.customDefine&&u._users[t]))})).sort((function(e,t){return W[e].name<W[t].name?-1:W[e].name>W[t].name?1:0})).filter((function(e){return W&&W[e]&&W[e]._id})).map((function(e){return a.a.createElement(ne,{pr:e,key:e})})))),P||Y?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(k.a,{title:Object(S.s)("$__searchUser",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){$(!0)},size:"25px"})),e.customDefine||P||Y||!X?Y?a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(k.a,{title:Object(S.s)("$__back",1),color:Object(S.d)("menu"),icon:"arrow_back",onClick:function(){R(!1)},size:"25px"})):a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:45,top:10}},a.a.createElement(k.a,{title:Object(S.s)("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){R(!0)},size:"25px"}))))),_&&_.length>0&&a.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(S.s)("$__confirmSelectedUsersRemove"),a.a.createElement(k.a,{title:Object(S.s)("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){ee()},size:"25px",transparent:!0})),Y&&L&&L.length>0&&a.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()}},a.a.createElement(lt.a,{style:{flexWrap:"wrap"}},L.map((function(e,t){return e&&l.a.getState().db.users[e]?a.a.createElement(we.a,{title:l.a.getState().db.users[e].name,key:e},a.a.createElement(Ie.a,{alt:l.a.getState().db.users[e].name,src:l.a.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},l.a.getState().db.users[e].name.substr(0,1))):a.a.createElement(a.a.Fragment,null)}))),a.a.createElement(k.a,{title:Object(S.s)("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){te()},size:"25px",transparent:!0}))))})))})),Lo=Object(G.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)}}})),Co={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var Io=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=Lo();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.s)("$__recurrence"),a.a.createElement(Oo,{options:[{value:"0",label:Object(S.s)("$__nonrecurrence")},{value:"1",label:Object(S.s)("$__everyDay")},{value:"7",label:Object(S.s)("$__weekly")},{value:"15",label:Object(S.s)("$__every15days")},{value:"30",label:Object(S.s)("$__every30days")},{value:"everyFirstMonthDay",label:Object(S.s)("$__everyFirstMonthDay")},{value:"everyMonday",label:Object(S.s)("$__everyMonday")},{value:"everyFriday",label:Object(S.s)("$__everyFriday")},{value:"custom",label:Object(S.s)("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(p.a)(Object(p.a)({},Co),{},{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.s)("$__preffers",1),n&&"custom"===n.recurrence&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.s)("$__repeatEvery",1),a.a.createElement(ye,{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(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"replay_10"}),Object(S.s)("$__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.s)("$__limitDate",1),a.a.createElement(ye,{style:{width:"200px"},variant:Object(S.d)("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__recurrenceDuplicateCard",1),a.a.createElement(sr,{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.s)("$__copyCatenation",1),a.a.createElement(sr,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(p.a)(Object(p.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))}));function To(){To=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 Fo=Object(u.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Fa)((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.map((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)(To().mark((function t(r){return To().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(Ta,{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.s)("$__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)}}))}))),Do=r(106),No=r.n(Do);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 Po=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(ae.a)(Aa)((function(e){var t,r,n,o=e.classes,i=e.sideModule,s=l.a.getState(),u=s.db,d=s.session,g=u.planType,b=a.a.useState({}),y=Object(m.a)(b,2),v=y[0],x=y[1],_=a.a.useState({}),w=Object(m.a)(_,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(!1),D=Object(m.a)(F,2),N=D[0],A=D[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useState(!1),R=Object(m.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(null),U=Object(m.a)(W,2),V=U[0],q=U[1],X=a.a.useState(null),J=Object(m.a)(X,2),K=J[0],Q=J[1],ee=a.a.useState(!1),te=Object(m.a)(ee,2),re=te[0],ne=te[1],ae=a.a.useState(0),oe=Object(m.a)(ae,2),ie=oe[0],ce=oe[1],le=a.a.useState(!1),se=Object(m.a)(le,2),ue=se[0],de=se[1],pe=Object(S.j)(),fe=Object(at.t)(i.id);a.a.useEffect((function(){v._id!==i.data._id&&(x(i.data),T(!1)),G||(i.data.startDate&&q(i.data&&i.data.startDate?i.data.startDate:null),i.data.endDate&&Q(i.data&&i.data.endDate?i.data.endDate:null),x(i.data),T(!1),"link"!==v.type||v.name||xe(),H(!0),he()),i.data.name&&""!==i.data.name.trim()&&"link"===i.data.type&&"new"===i.data._id&&(T(!0),e.reqSave&&e.reqSave(!0))}),[i.data,v]),a.a.useEffect((function(){!v.name||v.name&&""===v.name.trim?T(!1):T(!0)}),[j]),a.a.useEffect((function(){e.cards[v._id]&&(e.cards[v._id]._requireApproval&&!v._requireApproval||!e.cards[v._id]._requireApproval&&v._requireApproval)&&x(Object(p.a)(Object(p.a)({},v),{},{_requireApproval:!e.cards[v._id]._requireApproval}))}),[e.cards]);var he=function(){var t=Object(f.a)(Ao().mark((function t(){return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[i.data._id],cardLoad:"parents"});case 2:t.sent&&de(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),me=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!i.data[t.name]&&!v[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)({},v),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(a=Object(p.a)(Object(p.a)(Object(p.a)({},v),a),{},Object(h.a)({},r.name,r.value))),x(a),E(Object(p.a)(Object(p.a)({},j),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},be=function(t){I&&!t?Object(S.c)({message:Object(S.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},ve=function(){var t=Object(f.a)(Ao().mark((function t(){var r,n=arguments;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],N){t.next=19;break}if(T(!1),e.reqSave&&e.reqSave(!1),v.status||(v.status="notStarted"),"new"===i.id&&i.data&&x(Object(p.a)(Object(p.a)({},v),i.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},i),{},{data:v})),v.name&&(!v.name||""!==v.name.trim())){t.next=12;break}A(!1),Object(S.c)({message:Object(S.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(at.G)(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,v);case 14:t.sent&&(j&&j.status&&(Object(at.P)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:v._id}}),{status:j.status}),Object(at.e)(e,v._id,j.status)),A(!1),Object(S.c)({message:Object(S.s)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),T(!1),e.reqSave&&e.reqSave(!1),r&&be(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),xe=function(){var t=Object(f.a)(Ao().mark((function t(){var r;return Ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.a.post("/link/content",{url:v.url});case 2:r=t.sent,x(Object(p.a)(Object(p.a)({},v),{},{content:r.data.article})),T(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_e=i.data&&i.data.type?u.dataType.filter((function(e){return e.name===i.data.type}))[0]:{},Oe=null;if(v._parent&&(Oe=l.a.getState().db.cards[v._parent]),!v)return null;var we=l.a.getState().db.cards[v._id]&&l.a.getState().db.cards[v._id]._users&&l.a.getState().db.cards[v._id]._users[d._id]&&l.a.getState().db.cards[v._id]._users[d._id].myDay?l.a.getState().db.cards[v._id]._users[d._id].myDay:null,je=!!(!we||we&&we&&O()(new Date(1e3*we)).format("YYYY/MM/DD")!==O()().format("YYYY/MM/DD")),Ee=v.isTemplate?v.isTemplate:Object(at.R)(v._id),ke=!!e.permission&&e.permission;!v||!v._planId||u.cards[v._planId]&&Object(at.C)(v._planId)||(ke=!1),!ke&&parseInt(fe)>=4&&(ke=!0),!ke&&Object(at.C)(v._planId)&&pe&&pe.admin&&pe.plan&&(pe.planAdmin||pe.planModerate)&&(ke=!0),v._requireApproval&&v._parent&&l.a.getState().db.cards[v._parent]&&l.a.getState().db.cards[v._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[v._id]._parent]._users[d._id]&&l.a.getState().db.cards[l.a.getState().db.cards[v._id]._parent]._users[d._id].approvalResponsible&&(ke=!1);var Se=!1,Ce=a.a.createElement(a.a.Fragment,null);if(v&&v.url&&v.url.indexOf(".youtube.com/watch?")>-1){var Ie,Te=v.url.split("?")[1].split("v=")[1].split("&")[0];if(Te)Ce=a.a.createElement("iframe",(Ie={title:"outModule",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(Te)},Object(h.a)(Ie,"title","YouTube video player"),Object(h.a)(Ie,"frameBorder","0"),Object(h.a)(Ie,"allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),Object(h.a)(Ie,"allowFullScreen",!0),Ie)),Se=!0}if(v&&v.url&&v.url.indexOf("//youtu.be/")>-1){var Fe,De=v.url.split(".be/")[1];if(De)Ce=a.a.createElement("iframe",(Fe={title:"outModule",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(De)},Object(h.a)(Fe,"title","YouTube video player"),Object(h.a)(Fe,"frameBorder","0"),Object(h.a)(Fe,"allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),Object(h.a)(Fe,"allowFullScreen",!0),Fe)),Se=!0}var Ne=v.formId?JSON.parse(l.a.getState().forms[v.formId].elements):[],Ae={};return Ne.map((function(e){v[e.id]&&(Ae=Object(p.a)(Object(p.a)({},Ae),{},Object(h.a)({},e.id,v[e.id])))})),a.a.createElement(a.a.Fragment,null,a.a.createElement(oa,{save:I&&ke?function(){A(!0),ve()}:null,saveClose:I&&ke?function(){A(!0),ve(!0)}:null,saveLoader:N,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:o.root},v._requireApproval&&v._parent&&l.a.getState().db.cards[v._parent]&&l.a.getState().db.cards[v._parent]._users&&l.a.getState().db.cards[l.a.getState().db.cards[v._id]._parent]._users[d._id]&&l.a.getState().db.cards[l.a.getState().db.cards[v._id]._parent]._users[d._id].approvalResponsible?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.s)("$__attention",1),": ",a.a.createElement("span",{style:{color:"#FFFFFF"}},Object(S.s)("$__thisActivityRequireApproval",1))),a.a.createElement(uo,{nodeId:v._id})):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"}},Ce):a.a.createElement(a.a.Fragment,null),ke&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("imageUpload"))&&a.a.createElement(Zr,{img:v?v.image:null,onChange:function(e,t){me({name:"image",value:e}),me({name:"file",value:t})},files:v._files?v._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===v.type,aspectRatio:"chatGroup"===v.type?null:16/9,onDelete:function(){me({name:"image",value:null},{name:"file",value:null},!0)}}),!ke&&v.image&&a.a.createElement("div",{className:o.image,style:{backgroundImage:"url(".concat(v.image,")")}}),"plan"!==v.type||v._id?a.a.createElement(a.a.Fragment,null):a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(ja,{id:"combo-box-demo",options:g,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"planType",disableClearable:!0,value:v&&v.planType?g.filter((function(e){return e.value===v.planType}))[0]:g[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__planType",1),variant:Object(S.d)("fieldVariant"),value:v&&v.planType?g.filter((function(e){return e.value===v.planType}))[0]:g[0]}))},onChange:function(e,t){me({name:"planType",value:t.value})}}),g.filter((function(e){return!v.planType||v.planType&&e.value===v.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(Z.a,{icon:No.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.s)(g.filter((function(e){return!v.planType||v.planType&&e.value===v.planType}))[0].description,1))),a.a.createElement("div",{className:o.data},(v._parent||v._planId)&&ue?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.s)("$__loadingdata")),a.a.createElement(br,null)):(v._parent&&u.cards[v._parent]||v._planId&&u.cards[v._planId])&&a.a.createElement(fr,{id:v._parent?v._parent:v._planId?v._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"}},v._id&&u.cards[v._id]&&u.cards[v._id]._users&&a.a.createElement(So,{_id:v._id,noLimit:!0,avatarSize:"33px",permission:ke}),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===v.type&&v._id&&ke?a.a.createElement(k.a,{title:Object(S.s)("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){c.a.push("sp#".concat(v._id,"/dashboard")),be(!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.s)(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,v._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)({},v._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[v._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):a.a.createElement(a.a.Fragment,null),v._id&&36===v._id.length&&"chatGroup"!==v.type&&"plan"!==v.type&&a.a.createElement(k.a,{title:Object(S.s)(we&&O()(new Date(1e3*we)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:we&&O()(new Date(1e3*we)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"red":"lightblue",icon:we&&O()(new Date(1e3*we)).format("YYYY/MM/DD")===O()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Object(at.K)(e,{_id:v._id,userId:d._id,option:je}),e.myDayClick&&e.myDayClick()},size:"25px"}))),a.a.createElement("div",null,e.card&&"plan"!==v.type&&"chatGroup"!==v.type&&e.card._id&&e.card._users[d._id]&&"completed"!==v.status&&fe>0?a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(Ht,{data:e.card})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===v.type&&v._id?Object(S.s)("$__plan ".concat(v.planType?g[1].label:g[0].label),1):Object(S.s)("$__data",1)),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:7}},a.a.createElement("div",{style:{color:"gray"}},v._cardCode?"#".concat(v._cardCode," "):""),v.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",textAlign:"right",marginLeft:10}},Object(S.s)("$__createdAt"),": ",Object(S.k)(v.created_at)):a.a.createElement(a.a.Fragment,null)),a.a.createElement(ye,{label:Object(S.s)(_e&&_e.fieldsTitle&&_e.fieldsTitle.name?_e.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(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){me(e.target)}},value:v&&v.name?v.name:"",placeholder:Object(S.s)(_e&&_e.fieldsTitle&&_e.fieldsTitle.placeholder&&_e.fieldsTitle.placeholder.name?_e.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("name")>-1))}),fe>3||v.description||ke?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"toc"})),onChange:function(e){me(e.target)}},value:v&&v.description?v.description:"",placeholder:Object(S.s)("$__descriptionOfCard_placeholder",1),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),"task"===v.type||"iniciative"===v.type?a.a.createElement(bo,{label:Object(S.s)("$__price",1),variant:"standard",currencySymbol:"$",outputFormat:"string",style:{width:"100%",marginBottom:10},value:v&&v.value?v.value:"",onChange:function(e,t){return me({name:"value",value:t})}}):a.a.createElement(a.a.Fragment,null),(fe>3||v.url||ke)&&"chatGroup"!==v.type?a.a.createElement(ye,{label:Object(S.s)("$__URL",1),variant:Object(S.d)("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"http"})),onChange:function(e){me(e.target)}},value:v&&v.url?v.url:"",placeholder:"https://domain.com",disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("name")>-1))}):a.a.createElement(a.a.Fragment,null),v.url?a.a.createElement("div",{style:{width:"100%",textAlign:"right"}},a.a.createElement("a",(t={href:v.url,target:"_blank",rel:"noopener noreferrer"},Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"style",{color:Object(S.d)("menu"),fontWeight:"bold"}),t),Object(S.s)("$__openlink","*"))):a.a.createElement(a.a.Fragment,null)),v.formId&&"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(r=l.a.getState().session)||void 0===r?void 0:r.account)?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__formAnswers")),a.a.createElement(yo,{formId:v.formId,values:Ae,onChange:function(e,t){},disabled:!0})):a.a.createElement(a.a.Fragment,null),(fe>3||v.client||ke)&&!Ee&&ke&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("client"))&&(!v.client||v.client&&u.users[v.client])&&a.a.createElement(ja,{id:"combo-box-demo",options:Object.keys(u.users).filter((function(e){return"client"===u.users[e].type||"group"===u.users[e].type||"sic"===u.users[e].type})).sort((function(e,t){return u.users[e].name<u.users[t].name?-1:u.users[e].name>u.users[t].name?1:0})).map((function(e){return{label:u.users[e].name,value:String(u.users[e]._id)}})),getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"client",value:v&&v.client?Object.keys(u.users).filter((function(e){return v.client&&u.users[e]._id===v.client})).map((function(e){return{label:u.users[e].name,value:String(u.users[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__account",1),variant:Object(S.d)("fieldVariant"),value:v&&v.client?Object.keys(u.users).filter((function(e){return v.client&&u.users[e]._id===v.client})).map((function(e){return{label:u.users[e].name,value:String(u.users[e]._id)}}))[0]:null}))},onChange:function(e,t){me({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("client")>-1))}),((fe>2||v.endDate||v.startDate||ke)&&!Ee&&"chatGroup"!==v.type||!(!ke&&!v.startDate&&!v.endDate)&&!Ee&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("deadline")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__deadline",1)),v.endDate||v.startDate||M?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__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()&&q(O()(e.target.value).unix("X"));var t={startDate:O()(e.target.value).unix("X")};q(O()(e.target.value).unix("X")),(!K||K<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")}),Q(O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),x(Object(p.a)(Object(p.a)({},v),t)),T(!0)}},value:V?O()(1e3*V).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement(ye,{label:Object(S.s)("$__endDate",1),variant:Object(S.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:!K||V?O()(1e3*V).format("YYYY-MM-DDTHH:mm"):null,autoComplete:"end-date",onChange:function(e){var t={endDate:O()(e.target.value).unix("X")};Q(O()(e.target.value).unix("X")),V||(t=Object(p.a)(Object(p.a)({},t),{},{startDate:O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),q(O()("".concat(O()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),x(Object(p.a)(Object(p.a)({},v),t)),T(!0)}},value:K?O()(1e3*K).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(){q(null),Q(null),x(Object(p.a)(Object(p.a)({},v),{},{startDate:null,endDate:null,recurrence:null})),z(!1),T(!0)},size:"15px",title:Object(S.s)("$__clearDate","*"),text:Object(S.s)("$__clearDate","*")})),a.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},a.a.createElement(Oo,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Object(S.s)("$__days").toLowerCase())},{value:15,label:"15 ".concat(Object(S.s)("$__days").toLowerCase())},{value:30,label:"30 ".concat(Object(S.s)("$__days").toLowerCase())},{value:60,label:"60 ".concat(Object(S.s)("$__days").toLowerCase())},{value:90,label:"90 ".concat(Object(S.s)("$__days").toLowerCase())},{value:180,label:"180 ".concat(Object(S.s)("$__days").toLowerCase())},{value:365,label:"365 ".concat(Object(S.s)("$__days").toLowerCase())}].concat(Object(ge.a)(Oe&&Oe.startDate&&Oe.endDate?[{value:"parent",label:"".concat(Object(S.s)("$__useParentDate")," ").concat(O()(1e3*Oe.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(O()(1e3*Oe.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:ie||"",onChange:function(e){"parent"!==e&&0!==e?(Q(O()(new Date(1e3*V)).tz("America/Sao_Paulo").add(e,"days").unix("X")),me({name:"endDate",value:O()(new Date(1e3*V)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(Oe.startDate&&(q(Oe.startDate),me({name:"startDate",value:Oe.startDate},Oe.endDate?{name:"endDate",value:Oe.endDate}:null,!0),Oe.endDate&&Q(Oe.endDate)),!Oe.startDate&&Oe.endDate&&(Q(Oe.endDate),me({name:"endDate",value:Oe.endDate},null,!0))),ce(e)}})),a.a.createElement("div",{className:o.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(S.s)("$__freeChildrenDate",1),a.a.createElement(sr,{checked:!!v.freeChildrenDate,onChange:function(e){me({name:"freeChildrenDate",value:!v.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("freeChildrenDate")>-1))})),v.startDate&&O()(v.startDate).isValid()&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("recurrence"))&&a.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},v._recurrenceId?a.a.createElement("div",{style:{marginTop:"15px"}},Object(S.s)("$__recurrentActivityFrom"),":",a.a.createElement(on,(n={db:"cards",cardId:u.cards[v._recurrenceId]._id},Object(h.a)(n,"db","cards"),Object(h.a)(n,"Avatar",!0),Object(h.a)(n,"ignoreList",!0),Object(h.a)(n,"onlyOption",!0),n))):a.a.createElement("div",null,a.a.createElement(Io,{data:v,onChange:function(e){x(Object(p.a)(Object(p.a)(Object(p.a)({},v),e),{},{recurrenceNextDate:O()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),T(!0)}}),v.recurrence&&"0"!==v.recurrence&&v.recurrenceNextDate&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",null,Object(S.s)("$__NextRecurrenceDate")),a.a.createElement(Ja,{placeholder:Object(S.s)("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:O()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};x(Object(p.a)(Object(p.a)({},v),t)),T(!0)},startDate:v.recurrenceNextDate&&O()(v.recurrenceNextDate).isValid()?new Date(1e3*O()("".concat(v.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){x(Object(p.a)(Object(p.a)({},v),{},{recurrenceNextDate:null})),T(!0)}}))))):ke||(fe>2||v.endDate||v.startDate||ke)&&!Ee?a.a.createElement(et,{text:Object(S.s)("$__addDeadline",1),icon:"timer",onClick:function(){z(!0),q(O()("".concat(O()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),me({name:"startDate",value:O()("".concat(O()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==ie?{name:"endDate",value:O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add(ie,"days").unix("X")}:null),"parent"!==ie&&Q(O()("".concat(O()().format("YYYY-MM-DD")," 23:59:59")).add(ie,"days").unix("X"))}}):a.a.createElement(a.a.Fragment,null)),("completed"===v.status||!ke)&&fe<3?a.a.createElement(a.a.Fragment,null,v._tags&&v._tags.length>0?a.a.createElement(Le.a,{options:v._tags,expanded:!0}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("tags"))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__tags",1)),a.a.createElement(Fo,{data:{values:v._tags?v._tags:[]},callBack:function(e){ke&&me({name:"_tags",value:e})},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.s)("$__selectTheOptions",1)}),v&&v._tags&&v._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{className:o.switch},a.a.createElement(sr,{checked:!!v.childrenAutoTag,onChange:function(e){ke&&me({name:"childrenAutoTag",value:!v.childrenAutoTag})},name:"childrenAutoTag",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("childrenAutoTag")>-1))}),Object(S.s)("$__makeLinksAssumeTheSameLabelsOnAdd",1)):a.a.createElement(a.a.Fragment,null))),(!_e.hideFields||_e.hideFields&&(-1===_e.hideFields.indexOf("priority")||-1===_e.hideFields.indexOf("status")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},!Ee&&(!_e.hideFields||_e.hideFields&&-1===_e.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(ja,{id:"combo-box-demo",options:u.priority,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:v&&v.priority&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.priority)}))[0]:u.priority[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__priority",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.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:v&&v.priority?u.priority.filter((function(e){return String(e.value)===String(v.priority)}))[0].color:u.priority[0].color,borderLeft:"solid 3.33px ".concat(v&&v.priority?u.priority.filter((function(e){return String(e.value)===String(v.priority)}))[0].color:u.priority[0].color)})}),value:v&&v.priority&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.priority)}))[0]:u.priority[0]}))},onChange:function(e,t){ke&&me({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.s)(e.label,1))},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ja,{id:"combo-box-demo",options:u.priority,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:v&&v.risk&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.risk)}))[0]:u.priority[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__risk",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.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:v&&v.risk?u.priority.filter((function(e){return String(e.value)===String(v.risk)}))[0].color:u.priority[0].color,borderLeft:"solid 3.33px ".concat(v&&v.risk?u.priority.filter((function(e){return String(e.value)===String(v.risk)}))[0].color:u.priority[0].color)})}),value:v&&v.risk&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.risk)}))[0]:u.priority[0]}))},onChange:function(e,t){ke&&me({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.s)(e.label,1))},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ja,{id:"combo-box-demo",options:u.priority,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:v&&v.complexity&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.complexity)}))[0]:u.priority[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__complexity",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.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:v&&v.complexity?u.priority.filter((function(e){return String(e.value)===String(v.complexity)}))[0].color:u.priority[0].color,borderLeft:"solid 3.33px ".concat(v&&v.complexity?u.priority.filter((function(e){return String(e.value)===String(v.complexity)}))[0].color:u.priority[0].color)})}),value:v&&v.complexity&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.complexity)}))[0]:u.priority[0]}))},onChange:function(e,t){ke&&me({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.s)(e.label,1))},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(ja,{id:"combo-box-demo",options:u.priority,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:v&&v.impact&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.impact)}))[0]:u.priority[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__impact",1),variant:Object(S.d)("fieldVariant"),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.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:v&&v.impact?u.priority.filter((function(e){return String(e.value)===String(v.impact)}))[0].color:u.priority[0].color,borderLeft:"solid 3.33px ".concat(v&&v.impact?u.priority.filter((function(e){return String(e.value)===String(v.impact)}))[0].color:u.priority[0].color)})}),value:v&&v.impact&&u.priority?u.priority.filter((function(e){return String(e.value)===String(v.impact)}))[0]:u.priority[0]}))},onChange:function(e,t){ke&&me({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(S.s)(e.label,1))},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("priority")>-1))}))),!Ee&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("status"))&&a.a.createElement(ja,{id:"combo-box-demo",options:u.status,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:v&&v.status&&u.status?u.status.filter((function(e){return String(e.value)===String(v.status)}))[0]:u.status[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__status",1),variant:Object(S.d)("fieldVariant"),value:v&&v.status&&u.status?u.status.filter((function(e){return String(e.value)===String(v.status)}))[0]:u.status[0]}))},onChange:function(e,t){(ke||"0"!==String(fe))&&me({name:"status",value:t.value})},disabled:!(ke&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("status")>-1))&&"0"===String(fe)})),(fe>4||pe&&pe.plan&&pe.planAdmin)&&"plan"===v.type&&"completed"!==v.status&&a.a.createElement(a.a.Fragment,null,re||v.miroBoard?re?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__MiroBoard",1)),a.a.createElement(ye,{label:Object(S.s)("$__MiroBoardCode"),variant:Object(S.d)("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"save",color:"green",onClick:function(){return ne(!1)}})),onChange:function(e,t){me({name:"miroBoard",value:e.target.value})}},value:v&&v.miroBoard?v.miroBoard:"",placeholder:Object(S.s)("$__MiroBoardCodePlaceholder",1),disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("miroBoard")>-1))})):v.miroBoard&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__MiroBoard",1)),a.a.createElement(et,{text:Object(S.s)("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:v.miroBoard})}}),a.a.createElement(et,{text:Object(S.s)("$__editBoard",1),icon:"insert_link",onClick:function(){ne(!0)}})):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__MiroBoard",1)),a.a.createElement(et,{text:Object(S.s)("$__addBoard",1),icon:"developer_board",onClick:function(){ne(!0)}}))),(!v._id||v&&v._users&&d&&d._id&&v._users[d._id]&&v._users[d._id].access&&parseInt(v._users[d._id].access)>=3&&(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("private")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:o.switch},a.a.createElement(sr,{checked:!!v.private,onChange:function(e){ke&&me({name:"private",value:!v.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("private")>-1))}),Object(S.s)("$__private",1))),(!_e.hideFields||_e.hideFields&&-1===_e.hideFields.indexOf("private"))&&v.private&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:o.switch},a.a.createElement(sr,{checked:!!v.privateChildrens,onChange:function(e){ke&&me({name:"privateChildrens",value:!v.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(ke&&"completed"!==v.status&&!(_e&&_e.disabledFields&&_e.disabledFields.indexOf("private")>-1))}),Object(S.s)("$__privateChildrens",1))),ke&&"chatGroup"===v.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:o.switch},a.a.createElement(sr,{checked:!!v.onlyAdminsSendMessages,onChange:function(e){ke&&me({name:"onlyAdminsSendMessages",value:!v.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__onlyAdminsCanSendMessage",1))),v.broadcast||l.a.getState().timeline&&(!l.a.getState().timeline[v._id]||l.a.getState().timeline[v._id]&&0===Object.keys(l.a.getState().timeline[v._id]).length)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:o.switch},a.a.createElement(sr,{checked:!!v.broadcast,onChange:function(e){ke&&me({name:"broadcast",value:!v.broadcast})},name:"broadcast",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__workAsABroadcastList",1))):a.a.createElement(a.a.Fragment,null)),pe&&pe.plan&&pe.planAdmin&&Ee&&"plan"===v.type&&d._access&&d._access.userAdmin&&d._access.machenAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(ja,{id:"combo-box-demo",options:u.plans,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:v&&v.plans&&u.plans?u.plans.filter((function(e){return String(e.value)===String(v.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}},renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__avaiablefromplan",1),variant:Object(S.d)("fieldVariant"),value:v&&v.plans&&u.plans?u.plans.filter((function(e){return String(e.value)===String(v.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}}}))},onChange:function(e,t){ke&&me({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null))))}))),$o=r(1109),Mo=r(1911),zo=r(1931),Yo=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 Bo(){Bo=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 Ro=Object(u.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Yo)((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),d=Object(m.a)(u,2),g=(d[0],d[1],a.a.useState(s.kpi_type?"timeline":"settings")),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useState(!(!s._id||"new"!==s._id||!s.name)),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0];E[1],a.a.useEffect((function(){O&&e.reqSave&&e.reqSave()}),[O]);var C=Object(S.j)(),I=Object(at.t)(c.id),T=!1;(parseInt(I)>=4||C.plan&&C.planAdmin)&&(T=!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}))]&&(I=o.cards[s._id]._users[Object.keys(o.cards[s._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]);var F=window.location.hash.split("/");F[0]=F[0].replace("#","");var D=n[s._id]||{};D=Object.keys(D).filter((function(e){return"kpi"===D[e].type})).map((function(e){return D[e]}));var N=null,A=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&&(N=l.a.getState().db.cards[s._parent],A=parseInt(N.kpi_ini)>parseInt(N.kpi_fin)?parseInt(N.kpi_ini)-parseInt(N.kpi_fin):parseInt(N.kpi_fin)-parseInt(N.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===N._id&&l.a.getState().db.cards[e].kpi_type===N.kpi_type&&l.a.getState().db.cards[e].kpi_useParent})).map((function(e){parseInt(N.kpi_ini)>parseInt(N.kpi_fin&&parseInt(l.a.getState().db.cards[e].kpi_ini))?A-=parseInt(l.a.getState().db.cards[e].kpi_ini):parseInt(l.a.getState().db.cards[e].kpi_fin)&&(A-=parseInt(l.a.getState().db.cards[e].kpi_fin))})));var P=function(t){(t.value&&!c.data[t.name]||c.data[t.name]&&c.data[t.name]!==t.value)&&w(!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)&&N&&N.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}))},$=function(){var t=Object(f.a)(Bo().mark((function t(){var r,n=arguments;return Bo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],w(!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.s)("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(at.G)(e,!0,c.data);case 8:t.sent&&Object(S.c)({message:Object(S.s)("$__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)}}(),M=function(){var t=Object(f.a)(Bo().mark((function t(r){return Bo().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)}}(),z=function(){var e=Object(f.a)(Bo().mark((function e(t,r){var n;return Bo().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)),P({name:"kpi_".concat(r),value:n});case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Y=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})).map((function(e,t){Y=parseInt(s.kpi_ini)>parseInt(s.kpi_fin)?Y+parseInt(o.cards[e].kpi_ini)-parseInt(o.cards[e].kpi_fin):Y+parseInt(o.cards[e].kpi_fin)-parseInt(o.cards[e].kpi_ini)})),a.a.createElement("div",null,a.a.createElement(oa,{save:O&&T?function(){$()}:null,saveClose:O&&T?function(){$(!0)}:null,close:function(){e.onClose&&e.onClose(O)}}),a.a.createElement("div",{style:{posision:"absolute",top:5,left:0,right:0}},T?a.a.createElement("div",{style:{width:"100%",position:"relative",display:"flex",flexDirection:"row-reverse"}},a.a.createElement(k.a,{title:Object(S.s)("$__changeKpiType",1),color:Object(S.d)("settings"===y?"menu":"color"),icon:"tune",onClick:function(){return v("settings")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.s)("$__chart",1),color:Object(S.d)("chart"===y?"menu":"color"),icon:"analytics",onClick:function(){return v("chart")},size:"25px",transparent:!0}),a.a.createElement(k.a,{title:Object(S.s)("$__statement",1),color:Object(S.d)("timeline"===y?"menu":"color"),icon:"receipt",onClick:function(){return v("timeline")},size:"25px",transparent:!0})):a.a.createElement("div",null),"chart"===y?a.a.createElement(Cr,{data:s,chartShow:!0}):"settings"===y?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",null,Object(S.s)("$__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(zo.a,{value:s&&s.kpi_type?s.kpi_type:"task",exclusive:!0,onChange:function(e,t){P({name:"kpi_type",value:t})}},a.a.createElement(Mo.a,{value:"decimal"},a.a.createElement(Z.a,{title:Object(S.s)("$__decimal",1),color:"color"},"filter_9_plus")),a.a.createElement(Mo.a,{value:"currency"},a.a.createElement(Z.a,{title:Object(S.s)("$__currency",1),color:"color"},"attach_money")),a.a.createElement(Mo.a,{value:"percent"},a.a.createElement(we.a,{title:Object(S.s)("$__percentage",1)},a.a.createElement("span",{style:{color:"".concat(Object(S.d)("color")),fontSize:"22px"}},"%"))),a.a.createElement(Mo.a,{value:"time"},a.a.createElement(Z.a,{title:Object(S.s)("$__time",1),color:"color"},"hourglass_top")),a.a.createElement(Mo.a,{value:"task"},a.a.createElement(Z.a,{title:Object(S.s)("$__task",1),color:"color"},"task"))):"decimal"===s.kpi_type?a.a.createElement(Z.a,{title:Object(S.s)("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===s.kpi_type?a.a.createElement(Z.a,{title:Object(S.s)("$__currency",1),color:"color"},"attach_money"):"percent"===s.kpi_type?a.a.createElement(Z.a,{title:Object(S.s)("$__percentage",1),color:"color"},"percent"):a.a.createElement(Z.a,{title:Object(S.s)("$__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)),N&&N.kpi_type&&N.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.s)("$__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}},N&&parseInt(N.kpi_ini)>parseInt(N.kpi_fin)?Object(S.s)("$__notAllocatedBudget",1):Object(S.s)("$__notAllocatedGoal",1)),Object(S.h)(A,"time"===N.kpi_type?"number":N.kpi_type,N.kpi_currency?N.kpi_currency:null))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(sr,{checked:!!s.kpi_useParent,onChange:function(e){M({name:"kpi_useParent",value:!s.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__useParentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{color:"red"}},Object(S.s)("$__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.s)("$__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})).map((function(t){i+=parseFloat(n[e][t].value)})),a.a.createElement("li",{key:"ca-".concat(e)},a.a.createElement(on,{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($o.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(ja,{id:"combo-box-demo",options:o.currency,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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){P({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&&N&&parseInt(N.kpi_ini)>parseInt(N.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(ye,{label:s.kpi_useParent?Object(S.s)("$__budget"):"time"===s.kpi_type?Object(S.s)("$__minimumMinutes",1):Object(S.s)("$__initialValue",1),variant:"outlined",name:"kpi_ini",error:!(!L||!L.kpi_ini),helperText:L&&L.kpi_ini?Object(S.s)("$__valueExceedAllocatedValue",1):null,placeholder:Object(S.s)("$__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){z(e,"ini")}}})):a.a.createElement(a.a.Fragment,null),!s.kpi_useParent||s.kpi_useParent&&N&&parseInt(N.kpi_ini)<parseInt(N.kpi_fin)?a.a.createElement("div",{style:{width:"calc(50% - 7px)"}},a.a.createElement(ye,{label:s.kpi_useParent?Object(S.s)("$__goal"):"time"===s.kpi_type?Object(S.s)("$__maximumMinutes",1):Object(S.s)("$__finalValue",1),variant:"outlined",name:"kpi_fin",error:!(!L||!L.kpi_fin),helperText:L&&L.kpi_fin?Object(S.s)("$__valueExceedAllocatedValue",1):null,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){z(e,"fin")}}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:t.switch},a.a.createElement(sr,{checked:!!s.kpi_reqMessage,onChange:function(e){P({name:"kpi_reqMessage",value:!s.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__reqDescription",1)))):a.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},a.a.createElement(Cr,{data:s,chartShow:!1}),a.a.createElement("div",{style:{position:"absolute",top:103,bottom:0,left:0,right:0}},a.a.createElement(_a,{noSearch:!0,nodeId:s._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:s.kpi_type})))))}))),Go=function(e){return{root:{position:"relative",float:"left",width:"calc(100% - 20px)",margin:"10px"},progress:{marginLeft:"7px",width:"calc(100% - 14px)"},image:{width:"100%",paddingTop:"48%",backgroundPosition:"center",backgroundSize:"cover"}}};Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Go)((function(e){var t=e.classes,r=l.a.getState().sideModule,n=r.data||{};return a.a.createElement("div",{className:t.root},r.data.image&&a.a.createElement("div",{className:t.image,style:{backgroundImage:"url(".concat(r.data.image,")")}}),n.kpi_type&&a.a.createElement(Cr,{data:n,chartShow:!0}))})));function Ho(){Ho=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 Wo,Uo,Vo=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Aa)((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],b=a.a.useState(!1),y=Object(m.a)(b,2),v=y[0],x=y[1];a.a.useEffect((function(){v||("link"===c.type&&"new"===c._id&&g(!0),x(!0))}));var _=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)}))},O=function(t){d&&!t?Object(S.c)({message:Object(S.s)("$__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)(Ho().mark((function t(){var r,n=arguments;return Ho().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.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(at.G)(e,!0,o.data);case 8:t.sent&&Object(S.c)({message:Object(S.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&O(!0);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=Object(f.a)(Ho().mark((function t(){return Ho().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(f.a)(Ho().mark((function t(){return Ho().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(at.M)(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)}}(),E=n.dataType.filter((function(e){return e.name===o.data.type}))[0];return a.a.createElement(a.a.Fragment,null,a.a.createElement(oa,{save:d?function(){w()}:null,saveClose:d?function(){w(!0)}:null,close:function(){O(!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.s)("$__unLinkCards",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__unLinkCardsDescription",1)),a.a.createElement(co,{onClick:function(){j()}},Object(S.s)("$__unLinkCards",1))):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!E.hideFields||E.hideFields&&-1===E.hideFields.indexOf("type"))&&a.a.createElement(ja,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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){_({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(ja,{id:"combo-box-demo",options:i,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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){_({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(Z.a,{icon:No.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.s)(i.filter((function(e){return!c.planType||c.planType&&e.value===c.planType}))[0].description,1))):a.a.createElement(a.a.Fragment,null)))})));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 Xo=j.b.div(Wo||(Wo=Object(d.a)(["\n            background-color:none\n            "]))),Jo=(j.b.div(Uo||(Uo=Object(d.a)(["background-color:red\n            padding:7px"]))),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=(l.a.getState().functions.socket,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)(qo().mark((function t(){return qo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.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){if(!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[n._id]))return!0})).map((function(e){return e})),L=function(){var e=Object(f.a)(qo().mark((function e(){var t,r;return qo().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)(qo().mark((function e(r){return qo().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)(qo().mark((function t(n){var a,o,i,c,s;return qo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(l.a.getState().db.cards).filter((function(t){if(l.a.getState().db.cards[t]&&l.a.getState().db.cards[t].checklist&&l.a.getState().db.cards[t]._parent===e.nodeId)return!0})).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)(qo().mark((function e(t){return qo().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)(qo().mark((function e(t){return qo().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.s)("$__loadingCatenation")),a.a.createElement(br,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(Vt.a,{onDragEnd:C,onDragStart:I,onDragUpdate:T},a.a.createElement(Vt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(Xo,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),F.length>0?F.map((function(e,t){return a.a.createElement(Vt.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(on,{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(on,{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(et,{reverse:!0,text:Object(S.s)("$__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(ye,{label:Object(S.s)("$__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.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(k.a,{title:Object(S.s)("$__save",1),color:"green",icon:"save",onClick:function(e){L()},transparent:!0}),a.a.createElement(k.a,{title:Object(S.s)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){b(!g),s("")},transparent:!0})))))})));function Ko(){Ko=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 Zo=function(){var e=Object(f.a)(Ko().mark((function e(t){var r,n,a,o,i,c;return Ko().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)(Ko().mark((function e(n,o){var c,l;return Ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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)}}(),Qo=function(){var e=Object(f.a)(Ko().mark((function e(t){var r;return Ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(f.a)(Ko().mark((function e(r,n){var a;return Ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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)}}(),ei=function(){var e=Object(f.a)(Ko().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,p;return Ko().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)(Ko().mark((function e(a,i){var l,u;return Ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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 ti(){ti=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 ri=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}),Qo(),function(){d({})}}),[]);var _=function(){var t=Object(f.a)(ti().mark((function t(r,n){var a,o;return ti().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Qo({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)(ti().mark((function e(t){var r,n,a,o,i,c,l=arguments;return ti().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(na,{title:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.s)("$__private"):r.name),tooltipText:"".concat(r.private&&!l.a.getState().controls.lockPrivate?Object(S.s)("$__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(ye,{label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:y,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.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)}))))))}));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=function(e){var t=l.a.getState().db;return a.a.createElement(ja,{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.s)(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(ye,Object.assign({},r,{label:Object(S.s)("$__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.s)(e.label,1))},onChange:function(t,r){e.onChange(r.value)}})},oi=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(ae.a)(Aa)((function(e){var t,r=e.classes,n=e.sideModule,o=l.a.getState().db,i=o.planType,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=a.a.useState(!1),_=Object(m.a)(x,2),O=_[0],w=_[1],j=a.a.useState(!1),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState((null===(t=n.data)||void 0===t?void 0:t.onConcludedStepMoveTo)||null),T=Object(m.a)(I,2),F=T[0],D=T[1],N=Object(S.j)(),A=Object(at.t)(n.id);a.a.useEffect((function(){u._id!==n.data._id&&(d(n.data),w(!1)),d(n.data),w(!1),"link"!==u.type||u.name||Y(),P(),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(w(!0),e.reqSave&&e.reqSave(!0))}),[n.data,u]),a.a.useEffect((function(){!u.name||u.name&&""===u.name.trim?w(!1):w(!0)}),[y]);var P=function(){var t=Object(f.a)(ni().mark((function t(){return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!u[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)({},u),{},Object(h.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(p.a)(Object(p.a)(Object(p.a)({},u),o),{},Object(h.a)({},r.name,r.value))),d(o),v(Object(p.a)(Object(p.a)({},y),{},Object(h.a)({},t.name,t.value),r&&r.name&&r.value?Object(h.a)({},r.name,r.value):{}))},M=function(t){O&&!t?Object(S.c)({message:Object(S.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},z=function(){var t=Object(f.a)(ni().mark((function t(){var r,a=arguments;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],L){t.next=19;break}if(w(!1),e.reqSave&&e.reqSave(!1),u.status||(u.status="notStarted"),"new"===n.id&&n.data&&d(Object(p.a)(Object(p.a)({},u),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},n),{},{data:u})),u.name&&(!u.name||""!==u.name.trim())){t.next=12;break}C(!1),Object(S.c)({message:Object(S.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(at.G)(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,u);case 14:t.sent&&(y&&y.status&&(Object(at.P)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:u._id}}),{status:y.status}),Object(at.e)(e,u._id,y.status)),C(!1),Object(S.c)({message:Object(S.s)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),w(!1),e.reqSave&&e.reqSave(!1),r&&M(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){var t=Object(f.a)(ni().mark((function t(){var r;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.a.post("/link/content",{url:u.url});case 2:r=t.sent,d(Object(p.a)(Object(p.a)({},u),{},{content:r.data.article})),w(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=n.data&&n.data.type?o.dataType.filter((function(e){return e.name===n.data.type}))[0]:{};if(u._parent&&l.a.getState().db.cards[u._parent],!u)return null;var G=!!e.permission&&e.permission;return!u||!u._planId||o.cards[u._planId]&&Object(at.C)(u._planId)||(G=!1),!G&&parseInt(A)>=4&&(G=!0),!G&&Object(at.C)(u._planId)&&N&&N.admin&&N.plan&&(N.planAdmin||N.planModerate)&&(G=!0),a.a.createElement(a.a.Fragment,null,a.a.createElement(oa,{save:O?function(){C(!0),z()}:null,saveClose:O?function(){C(!0),z(!0)}:null,saveLoader:L,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"===u.type&&u._id&&G?a.a.createElement(k.a,{title:Object(S.s)("$__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"===u.type&&u._id?Object(S.s)("$__plan ".concat(u.planType?i[1].label:i[0].label),1):Object(S.s)("$__data",1)),u.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},Object(S.s)("$__createdAt"),": ",Object(S.k)(u.created_at)):a.a.createElement(a.a.Fragment,null),a.a.createElement(ye,{label:Object(S.s)(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(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){$(e.target)}},value:u&&u.name?u.name:"",placeholder:Object(S.s)(R&&R.fieldsTitle&&R.fieldsTitle.placeholder&&R.fieldsTitle.placeholder.name?R.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(G&&"completed"!==u.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("name")>-1))}),A>3||u.description||G?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"toc"})),onChange:function(e){$(e.target)}},value:u&&u.description?u.description:"",placeholder:Object(S.s)("$__descriptionOfCard_placeholder",1),disabled:!(G&&"completed"!==u.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(sr,{checked:!!u.showSumValues,onChange:function(e){$({name:"showSumValues",value:!u.showSumValues})},name:"showSumValues",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__showSumValues",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!!u.requireValue,onChange:function(e){$({name:"requireValue",value:!u.requireValue})},name:"requireValue",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__requireValue",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__automation",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__users",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.s)("$__automationUsersExplain",1)),a.a.createElement(ai,Object.assign({value:u.automationUsers||null,onChange:function(e){$({name:"automationUsers",value:e})}},"0"===u.step?{ignoreValues:["remove"]}:{})),u._id&&o.cards[u._id]&&o.cards[u._id]._users&&a.a.createElement(So,{_id:u._id,noLimit:!0,avatarSize:"33px",permission:G}),!u.automationUsers||"remove"!==u.automationUsers&&"replace"!==u.automationUsers?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!!u.keepUserWhoCreatedActivity,onChange:function(e){$({name:"keepUserWhoCreatedActivity",value:!u.keepUserWhoCreatedActivity})},name:"keepUserWhoCreatedActivity",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__keepUserWhoCreatedActivity",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__dueDate",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__due",1)),a.a.createElement(ai,{value:u.automationDueDateType||null,onChange:function(e){$({name:"automationDueDateType",value:e})},ignoreValues:["replace"]}),u.automationDueDateType&&"add"===u.automationDueDateType?a.a.createElement(ye,{label:Object(S.s)("$__automationDueDate",1),variant:Object(S.d)("fieldVariant"),name:"automationDueDate",min:1,InputProps:{type:"number",min:1,autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},Object(S.s)("$__days","*")),onChange:function(e){var t=e.target.value||1;parseInt(t)<1&&(t=1),$({name:"automationDueDate",value:t})}},value:u&&u.automationDueDate?u.automationDueDate:1}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__tags",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__tags",1)),a.a.createElement(ai,{value:u.automationTags||null,onChange:function(e){$({name:"automationTags",value:e})}}),u.automationTags&&"doNotChange"!==u.automationTags?a.a.createElement(Fo,{data:{values:u._tags?u._tags:[]},callBack:function(e){G&&$({name:"_tags",value:e})},disabled:!(G&&"completed"!==u.status&&!(R&&R.disabledFields&&R.disabledFields.indexOf("_tags")>-1)),placeholder:Object(S.s)("$__selectTheOptions",1)}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__icon",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__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(sr,{checked:!!u.setIcon,onChange:function(e){$({name:"setIcon",value:u.setIcon?null:u.icon?u.icon:"fiber_new"})},name:"changeIcon",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__changeIconWhenReceiveCardTo",1)),u.setIcon?a.a.createElement(Zn,{icon:u.setIcon?u.setIcon:u.icon?u.icon:"fiber_new",color:Object(S.d)("colorText"),onChange:function(e){$({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===u._parent&&"step"===l.a.getState().db.cards[e].type&&!l.a.getState().db.cards[e].deleted})).length===parseInt(u.step)+1?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(S.s)("$__onConcludedStepMoveTo",1)),a.a.createElement("div",{className:r.switch},F&&F===u.onConcludedStepMoveTo?a.a.createElement(k.a,{title:Object(S.s)("$__selectTarget",1),text:Object(S.s)("$__selectTarget",1),color:Object(S.d)("menu"),icon:"assistant_navigation",onClick:function(){D(null)},size:"14px",textSize:"14px"}):a.a.createElement("div",null,a.a.createElement(ri,{onSelect:function(t){l.a.getState().db.cards[t._id]||Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"parents",idRel:t._id}),D(t._id)},ignoreTypes:["chatGroup"],types:["plan","guideline","guidelineC","guidelineD","guidelineE","guidelineR","objective","goal","step"]}),F&&F!==u.onConcludedStepMoveTo?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(k.a,{title:Object(S.s)("$__cancel",1),text:Object(S.s)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){$({name:"onConcludedStepMoveTo",value:(null===u||void 0===u?void 0:u.onConcludedStepMoveTo)||null})}}),a.a.createElement(k.a,{title:Object(S.s)("$__save",1),text:Object(S.s)("$__save",1),color:Object(S.d)("menu"),icon:"check",onClick:function(){$({name:"onConcludedStepMoveTo",value:F})}})):a.a.createElement(a.a.Fragment,null)),u.onConcludedStepMoveTo&&F===u.onConcludedStepMoveTo&&l.a.getState().db.cards[u.onConcludedStepMoveTo]?a.a.createElement(a.a.Fragment,null,a.a.createElement(fr,{id:u.onConcludedStepMoveTo,showLegend:!0,legend:Object(S.s)("$__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.s)("$__status",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(S.s)("$__changeStatusTo",1)),a.a.createElement(ai,{value:u.automationStatusType||null,onChange:function(e){$({name:"automationStatusType",value:e})},ignoreValues:["add","remove"]}),u.automationStatusType&&"doNotChange"!==u.automationStatusType?a.a.createElement(ja,{id:"combo-box-demo",options:o.status,getOptionLabel:function(e){return Object(S.s)(e.label,1)},style:{width:"100%"},name:"automationStatus",disableClearable:!0,value:u&&u.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(u.automationStatus)}))[0]:o.status[0],renderInput:function(e){return a.a.createElement(ye,Object.assign({},e,{label:Object(S.s)("$__status",1),variant:Object(S.d)("fieldVariant"),value:u&&u.automationStatus&&o.status?o.status.filter((function(e){return String(e.value)===String(u.automationStatus)}))[0]:o.status[0]}))},onChange:function(e,t){(G||"0"!==String(A))&&$({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.s)("$__automationApprovalExplain",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!!u.requireApproval,onChange:function(e){$({name:"requireApproval",value:!u.requireApproval})},name:"requireApproval",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__requireApproval",1)),u.requireApproval?a.a.createElement(So,{_id:u._id,selected:"",noLimit:!0,avatarSize:"33px",permission:G,customDefine:{name:"approvalResponsible",icon:"gavel"}}):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.s)("$__showInPanel",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!!u.showInPanel,onChange:function(e){$({name:"showInPanel",value:!u.showInPanel})},name:"showInPanel",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__permitOpenTicketInPanel",1)),u.showInPanel?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Na,{data:{values:u.showGroups||[],_id:u._id},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){$({name:"showGroups",value:e})}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(ja,{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.s)(e.label,1)},style:{width:"100%"},name:"form",value:u&&u.form?Object.keys(l.a.getState().forms).filter((function(e){return u.form&&l.a.getState().forms[e]._id===u.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(ye,Object.assign({},e,{label:Object(S.s)("$__form",1),variant:Object(S.d)("fieldVariant"),value:u&&u.form?Object.keys(l.a.getState().forms).filter((function(e){return u.form&&l.a.getState().forms[e]._id===u.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){$({name:"form",value:t&&t.value?String(t.value):null})}})),a.a.createElement(ye,{label:Object(S.s)("$__shortCutTitle",1),variant:Object(S.d)("fieldVariant"),name:"shortCutTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){$(e.target)}},value:u&&u.shortCutTitle?u.shortCutTitle:"",placeholder:Object(S.s)("$__shortCutTitlePlaceholder")}),a.a.createElement(ye,{label:Object(S.s)("$__shortCutDescription",1),variant:Object(S.d)("fieldVariant"),name:"shortCutDescription",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"toc"})),onChange:function(e){$(e.target)}},value:u&&u.shortCutDescription?u.shortCutDescription:"",placeholder:Object(S.s)("$__shortCutDescriptionPlaceholder",1)}),a.a.createElement(ye,{label:Object(S.s)("$__shortCutButtonToAdd",1),variant:Object(S.d)("fieldVariant"),name:"shortCutButtonToAdd",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){$(e.target)}},value:u&&u.shortCutButtonToAdd?u.shortCutButtonToAdd:"",placeholder:Object(S.s)("$__shortCutButtonToAddPlaceholder")}),a.a.createElement("div",{className:r.switch},a.a.createElement(sr,{checked:!!u.requireDescription,onChange:function(e){$({name:"requireDescription",value:!u.requireDescription})},name:"requireDescription",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__requireDescription",1))):a.a.createElement(a.a.Fragment,null))))))})));var ii=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Aa)((function(e){var t=e.classes,r=l.a.getState(),n=(r.db,r.sideModule.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),p=d[0],f=d[1];return a.a.useEffect((function(){p||("link"===n.type&&"new"===n._id&&s(!0),f(!0))})),a.a.createElement(a.a.Fragment,null,a.a.createElement(oa,{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.s)("$__integration",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__useIdToFeelFlowIdIntegration",1)),a.a.createElement("div",{style:{fontSize:14,fontWeight:"bold",color:"blue"}},n._id))))}))),ci=Object(G.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 li(e){var t=ci(),r=Object(p.a)({},e);return r.title&&delete r.title,e.title?a.a.createElement(we.a,{title:e.title},a.a.createElement(Ie.a,Object.assign({},r,{className:t[e.size]}),e.children)):a.a.createElement(Ie.a,Object.assign({},r,{className:t[e.size]}),e.children)}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 ui=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(){return function(){}}),[]),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.s)("$__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)(si().mark((function e(t){return si().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)(si().mark((function e(){return si().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(Z.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(Z.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(li,{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(li,{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(Ke,{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.s)("$__chatWithUser","*")," - ").concat(d.in._id!==o._id?"".concat(d.in.name):"".concat(d.createdBy.name)):"chatGroup"===d.in.type?"".concat(Object(S.s)("$__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(Ke,{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.s)("$__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(re.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.s)("$__sendedBy"),":"),a.a.createElement(li,{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(Hn,{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(on,{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 di(){di=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 pi,fi,hi=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(!0),i=Object(m.a)(o,2),c=(i[0],i[1]),s=a.a.useState([]),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(!1),_=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.useEffect((function(){return w(!0),function(){h([]),c(!0)}}),[e.nodeId]),a.a.useEffect((function(){w(!0)}),[T]),a.a.useEffect((function(){O&&N()}),[O]);var N=function(){var t=Object(f.a)(di().mark((function t(){var n,a;return di().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(y){t.next=5;break}return t.next=3,Zo({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:T});case 3:(n=t.sent)&&(n.length<20&&v(!0),a=Array.from(d),n.map((function(e){0===a.filter((function(t){return t&&t.data&&e&&e.data&&t.data._id===e.data._id})).length&&a.push(e)})),h(a),c(!1),w(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:D,file:t})};return a.a.createElement("div",{style:{position:"relative",width:"100%",height:"100%"},id:"sideModule_files"},(!k&&d.length>10||k)&&a.a.createElement("div",{style:{position:"relative",padding:"10px"}},a.a.createElement(ye,{label:Object(S.s)("$__fileNameSearch",1),variant:Object(S.d)("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"find_in_page"})),onChange:function(e){L(e.target.value)}},value:Object(S.q)(k).toLowerCase(),placeholder:Object(S.s)("$__fileNameSearch")})),a.a.createElement("div",{style:{position:"absolute",bottom:0,top:d&&d.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(Z.a,{color:Object(S.d)("color"),icon:"folder_open",title:Object(S.s)("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Object(S.s)("$__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&&!O&&F(T+1)}()}},d&&d.length>0&&d.filter((function(e){return!k||""===k||k&&e.data.name.toLowerCase().indexOf(k.toLocaleLowerCase())>-1})).sort((function(e,t){return parseInt(e.data.created_at)<parseInt(t.data.created_at)})).map((function(t,o){D.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){A(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},a.a.createElement(ui,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:k,openLightBox:function(){A(t.data._id)}}))})),(d.length>0||O)&&!y?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(br,null),Object(S.s)("$__checkingFiles","*")):0!==d.length||O?a.a.createElement(a.a.Fragment,null):Object(S.s)("$__hasNoFiles","*"))))}));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}var gi=j.b.div(pi||(pi=Object(d.a)(["\n            background-color:none;\n            "]))),bi=(j.b.div(fi||(fi=Object(d.a)(["background-color:red;\n            padding:7px;"]))),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,l.a.getState().functions.socket),o=a.a.useState(e.name?e.name:""),i=Object(m.a)(o,2),c=(i[0],i[1],a.a.useState(!1)),s=Object(m.a)(c,2),u=(s[0],s[1],window.location.hash.split("/"));u[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null),l.a.getState().db[e.db]&&l.a.getState().db[e.db][e.nodeId]&&l.a.getState().db[e.db][e.nodeId];var d=Object.keys(l.a.getState().db.cards).filter((function(t){if(!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)return!0})).map((function(e){return e})),g=function(){var t=Object(f.a)(mi().mark((function t(a){var o,i,c,s,u,d;return mi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(l.a.getState().db.cards).filter((function(t){if(l.a.getState().db.cards[t]&&l.a.getState().db.cards[t].checklist&&l.a.getState().db.cards[t]._parent===e.nodeId)return!0})).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})),i=a.destination,c=a.source,s=a.draggableId,i){t.next=4;break}return t.abrupt("return",!1);case 4:if(i.droppableId!==c.droppableId||i.id!==c.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(u=o).splice(c.index,1),u.splice(i.index,0,s),n.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),d={},u.map((function(e,t){return d=Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},e,r.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(t+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)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=function(){var e=Object(f.a)(mi().mark((function e(t){return mi().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)}}(),y=function(){var e=Object(f.a)(mi().mark((function e(t){return mi().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("div",{style:{width:"100%"}},a.a.createElement(Vt.a,{onDragEnd:g,onDragStart:b,onDragUpdate:y},a.a.createElement(Vt.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(gi,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),d.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,t){return a.a.createElement(Vt.b,{draggableId:e,index:t,key:e},(function(t,r){return a.a.createElement(on,{provided:t,snapshot:r,cardId:e,db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))}))),yi=function(e){return{root:Object(h.a)({height:"auto",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 vi(){vi=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 xi=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(yi)((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)(vi().mark((function t(){return vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.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)(vi().mark((function t(){var r;return vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={_id:Object(Y.a)(),cardId:v._id,idRel:u,_parent:u,type:"comment",message:"",shared:!0},wr(e,Object(p.a)(Object(p.a)({},r),{},{user:Object(p.a)({},g.users[b._id]),files:{}})),B.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)(vi().mark((function t(){return vi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__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(at.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.s)("$__action")),a.a.createElement(co,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return k()}},Object(S.s)("$__share","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(S.s)("$__AttachInCard")),a.a.createElement(co,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return L()}},Object(S.s)("$__Attach","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(co,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){d(null)}},Object(S.s)("$__cancel","*"))))),a.a.createElement("div",{style:{width:"100%",padding:"15px"}},a.a.createElement(ri,{styles:{height:"auto",maxHeight:u?"calc(100vh - 400px)":"none"},onSelect:function(e){d(e._id)},ignoreTypes:["chatGroup"]})))}))),_i=r(105),Oi=r(202),wi=r.n(Oi);var ji=function(e){var t=wi.a.ExcelFile,r=wi.a.ExcelFile.ExcelSheet,n=wi.a.ExcelFile.ExcelColumn,o=e.data,i=[],c=[],s=0,u=0,d=0,f=0;if(o&&Object.keys(o).length>0){Object.keys(o).map((function(e){var t=[];o[e]._times&&Object.keys(o[e]._times>0)&&Object.keys(o[e]._times).map((function(r){var n=l.a.getState().db.cards[o[e]._times[r].cardId],a=parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini);s+=a;var c=a,u="",d=0,p=0,f=0;a<60?u="".concat(c," ").concat(Object(S.s)("$__seconds",1)):a>3600?(c-=3600*(d=Math.trunc(c/3600)),f=(c-=60*(p=Math.trunc(c/60)>0?Math.trunc(c/60):0))>0?c:0,u="".concat(d," ").concat(Object(S.s)("$__hour",1)).concat(d>1?"s":""," ").concat(p," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1))):(f=(c-=60*(p=Math.trunc(c/60)>0?Math.trunc(c/60):0))>0?c:0,u="".concat(p," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1))),i.push({name:o[e].name,type:Object(S.s)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:O()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:O()(1e3*o[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:u,hours:d,minutes:p,seconds:f,calc:(parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini))/3600}),t.push({name:o[e].name,type:Object(S.s)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:O()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:O()(1e3*o[e]._times[r].fin).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),total:u,hours:d,minutes:p,seconds:f,calc:(parseInt(o[e]._times[r].fin)-parseInt(o[e]._times[r].ini))/3600})})),console.log(o[e]),t.push({name:"",email:"",type:"",card:"",description:"",iniData:"",finalData:"",total:o[e].timerText,hours:"",minutes:"",seconds:"",calc:parseInt(o[e].totalTimer)/3600}),c=Object(p.a)(Object(p.a)({},c),{},Object(h.a)({},e,t))}));var m=s,g="";s<60?(f=m,g="".concat(m," ").concat(Object(S.s)("$__seconds",1))):s>3600?(m-=3600*(u=Math.trunc(m/3600)),f=(m-=60*(d=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(u," ").concat(Object(S.s)("$__hour",1)).concat(u>1?"s":""," ").concat(d," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1))):(f=(m-=60*(d=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(d," ").concat(Object(S.s)("$__minutes",1)," ").concat(f," ").concat(Object(S.s)("$__seconds",1))),i.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:g,hours:"",minutes:"",seconds:"",calc:""})}return a.a.createElement(t,{filename:"".concat(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_timeSheet"),element:a.a.createElement(k.a,{title:Object(S.s)("$__export"),text:Object(S.s)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:i,name:"timeSheet"},a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__valueForCalculation",1)),value:"calc"})),c&&Object.keys(c).length>0&&Object.keys(c).map((function(e,t){var o=c[e][0].name;return a.a.createElement(r,{data:c[e],name:o,key:e},a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__valueForCalculation",1)),value:"calc"}))})))},Ei={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Object(U.r)(U.b)+", 0.87)",background:U.O,width:"100%",boxShadow:"0 1px 4px 0 rgba("+Object(U.r)(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.r)(U.b)+", 0.56), 0 4px 25px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(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.r)(U.b)+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Object(U.r)(U.O)+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Object(U.r)(U.b)+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:U.q[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Object(U.r)(U.q[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:U.q[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.O,borderColor:"rgba("+Object(U.r)(U.O)+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:U.O,fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+U.z[1]+","+U.z[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},info:{background:"linear-gradient(60deg,"+U.u[1]+","+U.u[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},success:{background:"linear-gradient(60deg,"+U.G[1]+","+U.G[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},warning:{background:"linear-gradient(60deg,"+U.N[1]+","+U.N[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},danger:{background:"linear-gradient(60deg,"+U.j[1]+","+U.j[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},rose:{background:"linear-gradient(60deg,"+U.D[1]+","+U.D[4]+")","& h1 small":{color:"rgba("+Object(U.r)(U.O)+", 0.8)"},color:U.O},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Object(U.r)(U.b)+")",transition:"all 300ms linear"}},ki=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],Si=Object(G.a)(Ei);function Li(e){var t,r=Si(),n=e.className,o=e.children,i=e.plain,c=e.profile,l=e.blog,s=e.raised,u=e.background,d=e.pricing,p=e.color,f=e.product,m=e.testimonial,g=e.chart,b=e.login,y=Object(dn.a)(e,ki),v=x()((t={},Object(h.a)(t,r.card,!0),Object(h.a)(t,r.cardPlain,i),Object(h.a)(t,r.cardProfile,c||m),Object(h.a)(t,r.cardBlog,l),Object(h.a)(t,r.cardRaised,s),Object(h.a)(t,r.cardBackground,u),Object(h.a)(t,r.cardPricingColor,d&&void 0!==p||d&&void 0!==u),Object(h.a)(t,r[p],p),Object(h.a)(t,r.cardPricing,d),Object(h.a)(t,r.cardProduct,f),Object(h.a)(t,r.cardChart,g),Object(h.a)(t,r.cardLogin,b),Object(h.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:v},y),o)}var Ci={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.r)(U.O)+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},Ii=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],Ti=Object(G.a)(Ci);function Fi(e){var t,r=Ti(),n=e.className,o=e.children,i=e.background,c=e.plain,l=e.formHorizontal,s=e.pricing,u=e.signup,d=e.color,p=e.profile,f=e.calendar,m=Object(dn.a)(e,Ii),g=x()((t={},Object(h.a)(t,r.cardBody,!0),Object(h.a)(t,r.cardBodyBackground,i),Object(h.a)(t,r.cardBodyPlain,c),Object(h.a)(t,r.cardBodyFormHorizontal,l),Object(h.a)(t,r.cardPricing,s),Object(h.a)(t,r.cardSignup,u),Object(h.a)(t,r.cardBodyColor,d),Object(h.a)(t,r.cardBodyProfile,p),Object(h.a)(t,r.cardBodyCalendar,f),Object(h.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var Di={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:U.O},"&: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(U.r)(U.b)+", 0.24), 0 8px 10px -5px rgba("+Object(U.r)(U.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:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.M)},successCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.F)},dangerCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.i)},infoCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.t)},primaryCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.y)},roseCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.C)},customCardHeader:{color:U.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(p.a)({},U.g)}},Ni=["className","children","color","plain","image","contact","signup","stats","icon","text"],Ai=Object(G.a)(Di);function Pi(e){var t,r=Ai(),n=e.className,o=e.children,i=e.color,c=e.plain,l=e.image,s=e.contact,u=e.signup,d=e.stats,p=e.icon,f=e.text,m=Object(dn.a)(e,Ni),g=x()((t={},Object(h.a)(t,r.cardHeader,!0),Object(h.a)(t,r[i+"CardHeader"],i),Object(h.a)(t,r.cardHeaderPlain,c),Object(h.a)(t,r.cardHeaderImage,l),Object(h.a)(t,r.cardHeaderContact,s),Object(h.a)(t,r.cardHeaderSignup,u),Object(h.a)(t,r.cardHeaderStats,d),Object(h.a)(t,r.cardHeaderIcon,p),Object(h.a)(t,r.cardHeaderText,f),Object(h.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var $i=r(1934),Mi=r(1913),zi=r(1912),Yi=r(1914),Bi=r(1831);function Ri(){Ri=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}Object(G.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 Gi=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),A=N[0],P=N[1],$=window.location.hash.split("/");$[0]=$[0].replace("#",""),a.a.useEffect((function(){return z(),function(){}}),[]),a.a.useEffect((function(){M()}),[e.cards]);var M=function(){var t=Object(f.a)(Ri().mark((function t(){var r;return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(at.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)}}(),z=function(){var t=Object(f.a)(Ri().mark((function t(){return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,jr(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&&P(!1),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0),P(!1);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),Y={},B={},R=0,G=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object(S.s)("$__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.s)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(S.s)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(S.s)("$__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.s)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(S.s)("$__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})).map((function(e){Object.keys(n[e]).filter((function(t){return"timer"===n[e][t].type&&!n[e][t].deleted})).map((function(t){n[e][t]._toUser&&Object.keys(n[e][t]._toUser).length>0?Object.keys(n[e][t]._toUser).map((function(r){B=Object(p.a)(Object(p.a)({},B),{},Object(h.a)({},r,Object(p.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})):B=Object(p.a)(Object(p.a)({},B),{},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)})).map((function(t){n[e][t].message.indexOf("Primeira Entrevistas")>-1&&console.log(n[e][t]._toUser),Object.keys(B).map((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])){R+=parseInt(n[e][t].fin)-parseInt(n[e][t].ini);var a=parseInt(n[e][t].fin)-parseInt(n[e][t].ini),o=a=Y&&Y[r]&&Y[r].totalTimer?parseInt(Y[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.s)("$__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.s)("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Object(S.s)("$__minutes",1)," ").concat(d>0?"".concat(d," ").concat(Object(S.s)("$__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.s)("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Object(S.s)("$__seconds",1)):""),l="".concat(f,"M ").concat(m," S")}Y=Object(p.a)(Object(p.a)({},Y),{},Object(h.a)({},r,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},Y[r]?Y[r]:{}),B[r]?B[r]:{}),Y&&Y[r]&&Y[r].totalTimer?{totalTimer:parseInt(Y[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)({},Y[r]&&Y[r]._times?Y[r]._times:{}),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},n[e][t]),{},{cardId:e})))})))}1}))}))}));var H=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(we.a,{title:e.data.name},a.a.createElement(Ie.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(Li,null,a.a.createElement(na,{title:Object(S.s)("$__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)}}]}),A?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,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.s)("$__timeCourse",1)),a.a.createElement(ye,{label:Object(S.s)("$__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(ye,{label:Object(S.s)("$__endDate",1),variant:Object(S.d)("fieldVariant"),name:"endDate",type:"date",min:c||null,InputLabelProps:{shrink:!0},inputProps:{min:c||null},InputProps:{autoComplete:"new-password",onChange:function(e){b(e.target.value)}},value:g})),r.users&&Object.keys(r.users).length>0&&a.a.createElement($i.a,{style:{width:"100%"}},a.a.createElement(zi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(Z.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.s)("$__users"),a.a.createElement(lt.a,{max:6},Object.keys(E).length>0&&Object.keys(E).map((function(e,t){return a.a.createElement(we.a,{title:r.users[e].name,key:t},a.a.createElement(Ie.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(Mi.a,{style:{minWidth:"100%"}},a.a.createElement(Bi.a,null,Object.keys(B).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Yi.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Ie.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(jo,{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(ji,{data:Y}),a.a.createElement(k.a,{title:Object(S.s)("$__closeFilter"),text:Object(S.s)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){_(!x)},size:"25px"}))),a.a.createElement(Pi,{style:{height:"333px"}},a.a.createElement(_i.a,{data:Object(ge.a)(Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return{id:Y[e].name,label:Y[e].name,value:Y[e].totalTimer,color:"#929497",textMini:Y[e].timerText}}))),valueFormat:function(e){return G(e,!0),G(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"}},G(R,!0))),a.a.createElement(Fi,null,a.a.createElement(mn,null,Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return a.a.createElement(H,{data:Y[e],key:e})})),a.a.createElement(H,{data:{name:Object(S.s)("$__total"),timerText:G(R)}}))),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.s)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(S.s)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),Hi=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 Wi=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Hi)((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];Object(S.j)(),i._id&&n.cards[c._id]&&n.cards[c._id]._users&&n.cards[c._id]._users[Object.keys(n.cards[c._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&n.cards[c._id]._users[Object.keys(n.cards[c._id]._users).find((function(e){return e.indexOf(i._id)>-1}))];var 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]})),c._parent&&c._parent!==y[0]&&l.a.getState().db.cards[c._parent],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.s)("$__add"),text:Object(S.s)("$__add"),icon:"more_time",size:"25px",onClick:function(){p(!0)}}),"chart"!==g&&a.a.createElement(k.a,{title:Object(S.s)("$__showChart"),text:Object(S.s)("$__showChart"),icon:"analytics",size:"25px",onClick:function(){b("chart")}}),"timeline"!==g&&a.a.createElement(k.a,{title:Object(S.s)("$__showTimeline"),text:Object(S.s)("$__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(Gi,{nodeId:c._id})),(d||"timeline"===g)&&a.a.createElement("div",{style:{position:"absolute",top:35,left:0,right:0,bottom:0}},a.a.createElement(_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(Ht,{data:c,manualAdd:!0,callBack:function(){p(!1)}})))})));function Ui(){Ui=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(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,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({}),w=Object(m.a)(O,2),j=(w[0],w[1]),E=a.a.useState(0),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=r.data||{};a.a.useEffect((function(){return"user"===N.type?$():b(!1),function(){}}),[]),a.a.useEffect((function(){A()}),[N._id]);var A=function(){var e=Object(f.a)(Ui().mark((function e(){var t;return Ui().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(at.s)(N._id);case 2:(t=e.sent)&&j(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var t=Object(f.a)(Ui().mark((function t(){return Ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Pt(N._id),Object(S.f)(e,{_id:N._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(){var e=Object(f.a)(Ui().mark((function e(){var t;return Ui().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,dt.a.post("/Card_Count",{id:N._id,all:!0,rel:"INN",node:"User"});case 3:(t=e.sent)&&(b(!1),C(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=Object(f.a)(Ui().mark((function e(){var t;return Ui().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,B.a.post("/user/migrateActivities",{from:N._id,fromData:N,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[N._id]})).map((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[N._id].access,_id:x}))),delete t[e]._users[N._id]})),b(!1)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0),setTimeout((function(){M()}),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(oa,{close:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}),N._id&&n.users[N._id]&&("client"===n.users[N._id].type||"group"===n.users[N._id].type||"sic"===n.users[N._id].type||"unity"===n.users[N._id].type)&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__deleteOptions",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object.keys(n.users).filter((function(e){return n.users[e]._parent===N._id})).length>0?Object(S.s)("$__delete".concat(n.users[N._id].type,"WithUsersDescription"),1):Object(S.s)("$__delete".concat(n.users[N._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deleteThisDescription",1)),a.a.createElement(co,{onClick:function(){P()}},Object(S.s)("$__deleteThis",1))),N._id&&n.users[N._id]&&"user"===n.users[N._id].type&&a.a.createElement(a.a.Fragment,null,g?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,L>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.s)("$__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"}},L," ",Object(S.s)("$__items"),a.a.createElement("br",null),Object(S.s)("$__deleteCountCardsExplain"))),x?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(null)}},a.a.createElement(Ie.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(co,{onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(S.s)("$__confirm"),text:Object(S.s)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){M()}},{shadow:!0,title:Object(S.s)("$__cancel"),text:Object(S.s)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(S.s)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(S.s)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(ye,{label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:F,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{color:Object(S.d)("color")},"search")),onChange:function(e){D(e.target.value)}}}),Object.keys(n.users).filter((function(e){return e!==N._id&&"user"===n.users[e].type&&!n.users[e].deleted&&(!N._parent&&!n.users[e]._parent||N._parent&&n.users[e]._parent===N._parent)&&(!F||F&&n.users[e].name.toLowerCase().indexOf(F.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(Ie.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.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deactivateWhithoutMigration",1)),a.a.createElement(co,{onClick:function(){P()}},Object(S.s)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(S.s)("$__deactivateUserDescription",1)),a.a.createElement(co,{onClick:function(){P()}},Object(S.s)("$__deactivateThis",1)))),g?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(aa.a,null)):a.a.createElement(a.a.Fragment,null)))})),qi=r(19),Xi=r(1929),Ji=Object(G.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 Ki=function(e){var t=Ji();return a.a.createElement(Xi.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:a.a.createElement("span",{className:Object(qi.default)(t.icon,t.checkedIcon)}),icon:a.a.createElement("span",{className:t.icon})},e))},Zi=r(1915),Qi=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")}}},ec=r(764),tc=r.n(ec);function rc(){rc=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 nc=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(ae.a)(Qi)((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],A=(null===(t=o.cards[N._planId])||void 0===t?void 0:t.client)||null,P=Object(p.a)({},o.users),$=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):{}),P),M=Array.from(l.a.getState().db.userGroup),z=window.location.hash.split("/");z[0]=z[0].replace("#","");var Y=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)(rc().mark((function t(r,n,a){var c,l;return rc().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,It(e,r,c,i.data._id,l);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)(rc().mark((function t(r){return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Tt(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)(rc().mark((function t(r,n){return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.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;P=P&&Object.keys(P).length>0&&Object.keys(P).filter((function(e){return e&&N&&N._users&&N._users[P[e]._id]&&!N._users[P[e]._id].deleted})).sort((function(e,t){return e.name<t.name?-1:0})).map((function(e){return P[e]})),$=($=Object.keys($).filter((function(e){if("A10"===$[e].name&&console.log($[e],A),e&&(!$[e].type||$[e].type&&"client"!==$[e].type&&"unity"!==$[e].type&&"group"!==$[e].type)&&!$[e].deleted&&(!A&&(!$[e]._parent||$[e]._parent&&$[e]._parent===c.account)||A&&($[e]._parent&&($[e]._parent===A||$[e]._parent===c.account)||!$[e]._parent)))return!0})).map((function(e){return $[e]}))).filter((function(e){return e&&(!A||A&&(e._parent===A||!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)(rc().mark((function e(t){return rc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.map((function(e){G(e._id,null,e)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=Object(f.a)(rc().mark((function e(t){return rc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(""),t.map((function(e){}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=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.s)("$__removeTeam"):Object(S.s)("$__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):Ft(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(at.C)(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.s)("$__responsible",1)):"",n&&!d._id?a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__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(Ye,{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.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Dt(e,{cardId:i.data._id,userId:s._id})}})}}].concat(Object(ge.a)(l&&(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||Y&&Y.plan&&(Y.planAdmin||Y.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.s)("$__confirmRemoveUser",1):Object(S.s)("$__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:tc.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)||Y&&Y.plan&&(Y.planAdmin||Y.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.s)("$__owner",1):"0"===u?Object(S.s)("$__reader",1):"1"===u?Object(S.s)("$__executioner",1):"2"===u?Object(S.s)("$__collaborator",1):"3"===u?Object(S.s)("$__leadership",1):"4"===u?Object(S.s)("$__supervisor",1):"5"===u?Object(S.s)("$__admin",1):Object(S.s)("$__reader",1),")")))};if(d&&d._id){var J=1;N._users&&N._users[d._id]&&N._users[d._id].access&&(J=String(N._users[d._id].access));var K=N._users[d._id],Q=!1;return N&&N._planId&&Object(at.C)(N._planId)&&(Q=!0),a.a.createElement(a.a.Fragment,null,X(K,!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.s)("$__save"),icon:"save",color:Object(S.d)("color"),onClick:function(){G(d._id,d.access,K)}}),P.length>1&&a.a.createElement(k.a,{transparent:!0,title:d._id!==c._id?Object(S.s)("$__removeAccess",1):Object(S.s)("$__getOut",1),icon:d._id!==c._id?"delete_forever":"logout",color:"red",onClick:function(){Object(S.c)({message:d._id!==c._id?Object(S.s)("$__confirmRemoveUser",1):Object(S.s)("$__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.s)("$__close","*"),icon:"undo",color:Object(S.d)("medium"),onClick:function(){y?Object(S.c)({message:Object(S.s)("$__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||Y.plan&&Y.planAdmin)&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement(Zi.a,{defaultValue:String(J),"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&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"0",control:a.a.createElement(Ki,null),label:Object(S.s)("$__reader",1)}),"plan"!==N.type&&(R&&parseInt(R.access)>=1||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"1",control:a.a.createElement(Ki,null),label:Object(S.s)("$__executioner",1)}),"plan"!==N.type&&"chatGroup"!==N.type&&(R&&parseInt(R.access)>=2||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"2",control:a.a.createElement(Ki,null),label:Object(S.s)("$__collaborator",1)}),(R&&parseInt(R.access)>=3||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"3",control:a.a.createElement(Ki,null),label:Object(S.s)("$__leadership",1)}),"chatGroup"!==N.type&&(R&&parseInt(R.access)>=4||Q&&Y&&Y.plan&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"4",control:a.a.createElement(Ki,null),label:Object(S.s)("$__supervisor",1)}),(R&&parseInt(R.access)>=5||Y&&Y.plan&&Q&&(Y.planAdmin||Y.planModerate))&&a.a.createElement(Yi.a,{value:"5",control:a.a.createElement(Ki,null),label:Object(S.s)("$__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.s)("$__readOnlyTodo",1)),a.a.createElement("li",null,Object(S.s)("$__readTimeline",1))),parseInt(d.access)>=1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.s)("$__executioner",1)),a.a.createElement("li",null,Object(S.s)("$__timeSheetRegister",1)),a.a.createElement("li",null,Object(S.s)("$__interactonTheTimeline",1))),parseInt(d.access)>1&&a.a.createElement("li",null,Object(S.s)("$__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.s)("$__access",1)," BRIGHT & CONNECTED"),a.a.createElement("li",null,Object(S.s)("$__access",1)," INSIGHTS")),a.a.createElement("li",null,Object(S.s)("$__updateDueDate",1)),a.a.createElement("li",null,Object(S.s)("$__updateTags",1)),a.a.createElement("li",null,Object(S.s)("$__updateIndicators",1)),a.a.createElement("li",null,Object(S.s)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.s)("$__defineResponsible",1))),parseInt(d.access)>3&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.s)("$__updateData",1)),a.a.createElement("li",null,Object(S.s)("$__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.s)("$__access",1)," MATRIX SWOT")),a.a.createElement("li",null,Object(S.s)("$__settings",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.s)("$__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.s)("$__viewAndInteract",1)),parseInt(d.access)>2&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(S.s)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(S.s)("$__update",1))),5===parseInt(d.access)&&a.a.createElement("li",null,Object(S.s)("$__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.s)("$__setAsResponsible"),text:Object(S.s)("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Dt(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(ye,{id:"quickUser_Search",label:Object(S.s)("$__searchByName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end",style:{cursor:"pointer"},onClick:function(){C(""),D(!1)}},a.a.createElement(Z.a,{icon:"close"})),onChange:function(e){C(e.target.value)},onBlur:function(e){}},value:L,placeholder:Object(S.s)("$__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.s)("$__permittedUsers",1)),P&&P.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.s)("$__permittedTeams",1)),M.filter((function(e){return N._groups[e.value]})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:e},q(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(Z.a,{icon:"supervised_user_circle",size:"33px",color:"users"!==O?null:"#FFFFFF"}),Object(S.s)("$__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(Z.a,{icon:"group_work",size:"33px",color:"users"!==O?"#FFFFFF":null}),Object(S.s)("$__showTeams")))),"users"===O&&$&&$.length>0&&!d._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(S.d)("color")}},Object(S.s)("$__avaiableUsers",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__add"),icon:"person_add",text:Object(S.s)("$__addAllUsers"),size:"20px",onClick:function(){U($)}})),$.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&&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.s)("$__avaiableTeams",1)),a.a.createElement("div",null,a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__add"),icon:"person_add",text:Object(S.s)("$__addAllTeams"),size:"20px",onClick:function(){V(M)}})),M.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},q(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.s)("$__search",1),color:Object(S.d)("menu"),icon:"search",onClick:function(){D(!0)},size:"25px"})))}))),ac=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 oc(){oc=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 ic=function(){var e=Object(f.a)(oc().mark((function e(t){var r,n,a;return oc().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,B.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)}}(),cc=function(){var e=Object(f.a)(oc().mark((function e(t){var r,n,a,o=arguments;return oc().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)(oc().mark((function e(n,a){var o,i;return oc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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 lc(){lc=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 sc=Object(G.a)(ac);var uc=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=sc(),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(at.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.s)("$__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)(lc().mark((function t(r){return lc().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.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,ic(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.s)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&C(!0)):(Object(S.c)({message:Object(S.s)("$__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)(lc().mark((function t(r){var a,o,i,c;return lc().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.s)("$__invalidUrl",1),": ").concat(Object(S.s)("$__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,B.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,B.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.s)("$__invalidFeedUrl",1),": ").concat(Object(S.s)("$__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)(lc().mark((function t(r){var a;return lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,B.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.s)("$__invalidFeedUrl",1),": ").concat(Object(S.s)("$__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(oa,{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.s)("$__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(ye,Object.assign({label:Object(S.s)("$__titleOfFeed",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){L(e.target)}},value:c&&c.name?c.name:"",placeholder:Object(S.s)("$__titleOfFeed_placeholder")},o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account||c&&c.name?{disabled:!0}:{})),a.a.createElement(ye,{label:Object(S.s)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"title"})),onChange:function(e){L(e.target)}},value:c&&c.customTitle?c.customTitle:"",placeholder:Object(S.s)("$__customTitle",1)}),o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account?a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"copyright"})),onChange:function(e){L(e.target)}},value:c&&c.font?c.font:"",placeholder:Object(S.s)("$__nameOfFontData",1)}),a.a.createElement(ye,{label:Object(S.s)("$__descriptionOfRss",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.description?c.description:"",placeholder:Object(S.s)("$__descriptionOfRss",1)})):a.a.createElement(a.a.Fragment,null),a.a.createElement(ye,{label:Object(S.s)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"subtitles"})),onChange:function(e){L(e.target)}},value:c&&c.customDescription?c.customDescription:"",placeholder:Object(S.s)("$__customDescription",1)}),a.a.createElement(ye,{label:Object(S.s)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:_,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__tags",1)),a.a.createElement(Fo,{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(ja,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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(sr,{checked:!!c.private,onChange:function(e){L({name:"private",value:!c.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__private",1))):a.a.createElement(ye,{label:Object(S.s)("$__feedUrl","*"),variant:Object(S.d)("fieldVariant"),ref:_,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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(et,{text:Object(S.s)("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(aa.a,null)),c.feed&&c.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.s)("$__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.s)("$__openLink","*")))))})))))}));function dc(){dc=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 pc=Object(G.a)(ac);var fc=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=pc(),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.useState(!1),v=Object(m.a)(y,2),x=v[0],_=(v[1],a.a.useRef()),w=0,j=window.location.hash.split("/");j[0]=j[0].replace("#",""),j[0]&&36===j[0].length&&(w=Object(at.t)(j[0]));var E=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))}))},L=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c&&!t?Object(S.c)({message:Object(S.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},C=function(){var t=Object(f.a)(dc().mark((function t(n){return dc().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.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,ic(e,!0);case 7:t.sent?(Object(S.c)({message:Object(S.s)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&L(!0)):(Object(S.c)({message:Object(S.s)("$__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)}}(),I=function(){var t=Object(f.a)(dc().mark((function t(n){var a,o,i;return dc().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.s)("$__invalidUrl",1),": ").concat(Object(S.s)("$__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,B.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.s)("$__invalidFeedUrl",1),": ").concat(Object(S.s)("$__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.s)("$__invalidUrl",1),": ").concat(Object(S.s)("$__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)}}(),T=!!e.permission&&e.permission;return!T&&parseInt(w)>=3&&(T=!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"}},x&&a.a.createElement(a.a.Fragment,null,a.a.createElement(aa.a,{size:"25px"})),T&&c&&a.a.createElement(a.a.Fragment,null,a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),color:Object(S.d)("color"),icon:"save",onClick:function(){C()},size:"25px"}),a.a.createElement(k.a,{title:Object(S.s)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){C(!0)},size:"25px"})),a.a.createElement(k.a,{title:Object(S.s)("$__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(ye,{label:Object(S.s)("$__titleOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_headline"})),onChange:function(e){E(e.target)}},value:n&&n.name?n.name:"",placeholder:Object(S.s)("$__titleOfUrl_placeholder"),disabled:!0}),a.a.createElement(ye,{label:Object(S.s)("$__customTitle",1),variant:Object(S.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"title"})),onChange:function(e){E(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Object(S.s)("$__customTitle",1)}),a.a.createElement(ye,{label:Object(S.s)("$__nameOfFontData",1),variant:Object(S.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"copyright"})),onChange:function(e){E(e.target)}},value:n&&n.font?n.font:"",placeholder:Object(S.s)("$__nameOfFontData",1)}),a.a.createElement(ye,{label:Object(S.s)("$__descriptionOfUrl",1),variant:Object(S.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"subtitles"})),onChange:function(e){E(e.target)}},value:n&&n.description?n.description:"",placeholder:Object(S.s)("$__descriptionOfUrl",1)}),a.a.createElement(ye,{label:Object(S.s)("$__customDescription",1),variant:Object(S.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"subtitles"})),onChange:function(e){E(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Object(S.s)("$__customDescription",1)}),a.a.createElement("div",{className:t.switch},a.a.createElement(sr,{checked:!!n.private,onChange:function(e){E({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__private",1))),a.a.createElement(ye,{label:Object(S.s)("$__url","*"),variant:Object(S.d)("fieldVariant"),ref:_,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"http"})),onChange:function(e){E(e.target)},onBlur:function(e){I(e.target.value)}},value:n&&n.url?n.url:"",placeholder:"http://www.domain.com/",disabled:!!n._lock}),!n._lock&&!g&&a.a.createElement(et,{text:Object(S.s)("$__validUrl",1),icon:"check",onClick:function(){return I(_.current.value)}}),g&&a.a.createElement("div",{className:t.loader},a.a.createElement(aa.a,null)),n.feed&&n.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(S.s)("$__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.s)("$__openLink","*")))))})))))}));var hc,mc=Object(u.b)((function(e){return{sideModuleWindow:e.session.sideModuleWindow,sideModule:e.sideModule,cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ia)((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(at.t)(o.id),k=!1;!_||!_._planId||i.cards[_._planId]&&Object(at.C)(_._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(at.C)(_._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.map((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:Po,closeOption:!1,permission:0,buttonsCount:3,template:!0}].concat(Object(ge.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:yo,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:uc,closeOption:!1,permission:3,template:!0},{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:$a,closeOption:!1,permission:0},{name:"checklist",icon:"checklist",title:"$__list",reqId:!0,module:pr,closeOption:!0,permission:1,props:{nodeId:o.data._id,db:o.db?o.db:"cards",permission:k,showProgress:!0},template:!0}],Object(ge.a)(_.type.indexOf("guideline")>-1||_.type.indexOf("objective")>-1||_.type.indexOf("goal")>-1?[{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:Jo,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:bi,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:fc,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:_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:Ba,closeOption:!1,permission:c._id===_._id?0:4},{name:"users",icon:"supervised_user_circle",title:"$__usersAndDepartments",reqId:!0,module:nc,closeOption:!0,permission:3,template:!0}],Object(ge.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:Ro,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:Wi,closeOption:!0,permission:1,count:"timer"},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:hi,closeOption:!0,permission:3,props:{nodeId:o.id,db:o.db}},{name:"log",icon:"history",title:"$__log",reqId:!0,module:_a,props:{type:"log",nodeId:o.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:0,count:"log"}],Object(ge.a)(c._id===_._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Ga,closeOption:!1,permission:c._id===_._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:ao,closeOption:!1,permission:c._id===_._id?0:6,ownerLock:!0}]:[]),[{name:"columnEdit",icon:"tune",title:"$__edition",reqId:!1,module:oi,closeOption:!1,permission:0,buttonsCount:3,template:!0}],Object(ge.a)("users"===w?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:Vi,closeOption:!0}]:[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:so,closeOption:!0,permission:5,template:!0}]),[{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:xi,closeOption:!0,permission:3,template:!0}],Object(ge.a)("client"===_.type||"group"===_.type||"unity"===_.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Za,closeOption:!1,permission:1,template:!0}]:[]),Object(ge.a)("user"===_.type&&c._id===_._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Wa,closeOption:!1,permission:1,template:!0}]:[]),Object(ge.a)("step"===_.type&&k?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:ii,closeOption:!1,permission:5,template:!0}]:[]),Object(ge.a)("user"!==_.type&&"step"!==_.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:Vo,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.s)("$__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(at.R)(_._id),N=(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||!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||N.indexOf(e.name)>-1)&&("recurrence"!==e.name||"recurrence"===e.name&&Object.keys(l.a.getState().db.cards).filter((function(e){if(!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)return!0})).length>0)})).map((function(t,r){return a.a.createElement(io,{key:r,icon:t.icon,module:t.name,title:Object(S.s)(t.title,1),count:t.count?t.count:null,openModule:function(t){!function(t){d?Object(S.c)({message:Object(S.s)("$__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(na,Object.assign({title:o&&o.data&&o.data.name||"".concat(Object(S.s)("$__create")," ").concat(Object(S.s)("$__".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(at.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:o.data._id}}),{icon:t})}}:{})),T.closeOption&&a.a.createElement(oa,{close:function(){return F()}})),a.a.createElement("div",{className:x.content},a.a.createElement(R,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.s)(T.title.toLowerCase(),1),o&&o.data&&o.data.private?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(S.s)("$__isPrivate","*"),a.a.createElement(Z.a,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):a.a.createElement(a.a.Fragment,null)))):null}))),gc=r(1077),bc=r.n(gc),yc=Object(ae.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(st.a),vc=function(){return Object(p.a)(Object(p.a)({},Ca),{},{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(S.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(S.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(S.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(p.a)(Object(p.a)({},U.l),{},{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(p.a)(Object(p.a)({},U.l),{},{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(S.d)("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Object(S.d)("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Object(S.d)("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Object(S.d)("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})},xc=Object(G.a)(vc);var _c,Oc=JSON.stringify((hc={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}},Object(h.a)(hc,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(hc,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(hc,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(hc,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),hc)),wc=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r=e.field,n=xc(),o=l.a.getState(),i=o.db,c=o.searchs,s=a.a.useState(Object(p.a)({},JSON.parse(Oc))),u=Object(m.a)(s,2),d=u[0],f=u[1],g=a.a.useState(null),b=Object(m.a)(g,2),y=b[0],v=b[1],x=JSON.parse(Oc);a.a.useEffect((function(){var t;if(e.onChange){var r={};Object.keys(d).map((function(e){x[e]||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,d[e]))),x[e]&&JSON.stringify(Oc[e])!==JSON.stringify(d[e])&&(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,d[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(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},e.nodeId,Object(p.a)(Object(p.a)({},JSON.parse(Oc)),d))))}),[d]),a.a.useEffect((function(){var t=Object(p.a)(Object(p.a)({},JSON.parse(Oc)),c[e.nodeId]||{});JSON.stringify(t)!==JSON.stringify(d)&&f(t)}),[r]),a.a.useEffect((function(){e.searchs&&!e.searchs[e.nodeId]&&f(JSON.parse(Oc))}),[e.searchs]);var _=window.location.hash.split("/");_[0]=_[0].replace("#",""),36!==_[0].length&&(_[0]=null),window.location.pathname.split("/");var w=function(t,r){var n,a,o=d[t]||{};"all"===r?Object.keys(o).map((function(e){o[e]=!0})):(o.all&&Object.keys(o).map((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).map((function(e){o[e]=!1})),f(Object(p.a)(Object(p.a)({},d),{},Object(h.a)({},t,Object(p.a)(Object(p.a)({},o),{},Object(h.a)({},r,"all"===r||!o[r])))))},j=function(t){var r;return a.a.createElement($i.a,{style:{width:"100%"},expanded:y===t,onChange:function(){v(y===t?null:t)}},a.a.createElement(zi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(Z.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.s)("$__".concat(t))),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(d[t]).map((function(e,r){if(d[t][e]&&"all"!==e)return a.a.createElement(we.a,{title:Object(S.s)(i.priority.filter((function(t){return String(t.value)===String(e)}))[0].label,1),key:r},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(Mi.a,{style:{minWidth:"100%"}},a.a.createElement(Bi.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(Yi.a,{style:{minWidth:"100%"},control:a.a.createElement(jo,{checked:!(!d[t]||!d[t].all),onChange:function(){w("priority","all")},color:"default"}),label:Object(S.s)("$__allPriorities")}),i.priority.map((function(e,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Yi.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:a.a.createElement(jo,{indeterminate:!(!d[t]||!d[t].all),checked:!(!d[t]||!d[t][e.value]),onChange:function(){w(t,e.value)},color:"default"}),label:Object(S.s)(e.label)}))})))))};return"admin"===r?a.a.createElement(sr,{checked:!!d.admin,onChange:function(e){f(Object(p.a)(Object(p.a)({},d),{},{admin:!d.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"text"===r?a.a.createElement("div",{className:n.textField,style:{width:"100%"}},a.a.createElement(ye,{className:n.noLabelLight,label:Object(S.s)("$__search","*"),autoFocus:!0,value:d.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{color:Object(S.d)("color")},"search")),onChange:function(e){f(Object(p.a)(Object(p.a)({},d),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"date"===r?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ja,{type:"datetime",onChangeStartDate:function(t){var r,n={startDate:O()(t).unix("x")};(!(null===(r=l.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||l.a.getState().searchs[e.nodeId].endDate<O()(t).unix("x"))&&(n=Object(p.a)(Object(p.a)({},n),{},{endDate:O()("".concat(O()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),f(Object(p.a)(Object(p.a)({},d),n))},onChangeEndDate:function(e){f(Object(p.a)(Object(p.a)({},d),{},{endDate:O()(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(){f(Object(p.a)(Object(p.a)({},d),{},{startDate:null,endDate:null}))}})):"tags"===r?a.a.createElement(Ta,{dbNode:"tag",options:l.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(S.s)("$__tags"),onChange:function(e){f(Object(p.a)(Object(p.a)({},d),{},{tags:e}))}}):"status"===r?a.a.createElement($i.a,{style:{width:"100%",padding:0},expanded:"status"===y,onChange:function(){v("status"===y?null:"status")}},a.a.createElement(zi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(Z.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(S.s)("$__status")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===d||void 0===d?void 0:d.status)&&Object.keys(d.status).map((function(e,t){if((d.status[e]||d.status.all)&&"all"!==e)return a.a.createElement(we.a,{title:Object(S.s)(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(Mi.a,{style:{minWidth:"100%"}},a.a.createElement(Bi.a,{style:{width:"100%"}},a.a.createElement(Yi.a,{style:{minWidth:"100%"},control:a.a.createElement(jo,{checked:!(!d.status||!d.status.all),onChange:function(){w("status","all")},color:"default"}),label:Object(S.s)("$__allStatus")}),i.status.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(Yi.a,{style:{minWidth:"100%"},control:a.a.createElement(jo,{indeterminate:!(!d.status||!d.status.all),checked:!(!d.status||!d.status[e.value]),onChange:function(){w("status",e.value)},color:"default"}),label:Object(S.s)(e.label)}))}))))):"priority"===r?j("priority"):"complexity"===r?j("complexity"):"risk"===r?j("risk"):"impact"===r?j("impact"):"users"===r?a.a.createElement("div",{style:{marginTop:5}},a.a.createElement(zt,Object.assign({includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:l.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!0,onSelect:function(e){f(Object(p.a)(Object(p.a)({},d),{},{users:e}))},selected:(null===d||void 0===d?void 0:d.users)||[],transparent:!0},(null===e||void 0===e||null===(t=e.fieldsProps)||void 0===t?void 0:t.users)||{}))):"userGroups"===r?a.a.createElement(Na,{data:{values:d.userGroups||[]},options:l.a.getState().db.userGroup?l.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){f(Object(p.a)(Object(p.a)({},d),{},{userGroups:e}))},colorPickerCallBack:function(e){},noAdd:!0}):a.a.createElement(a.a.Fragment,null)}));var jc=JSON.stringify((_c={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}},Object(h.a)(_c,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(_c,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(_c,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(h.a)(_c,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),_c)),Ec=Object(u.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n=l.a.getState().searchs,o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(Object(p.a)({},JSON.parse(jc))),d=Object(m.a)(u,2),f=d[0],g=d[1],b=a.a.useState(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),v=Object(m.a)(b,2),x=v[0],_=v[1],O=(JSON.parse(jc),a.a.useRef(!0));a.a.useEffect((function(){return O.current=!0,function(){O.current=!1}}),[]),a.a.useEffect((function(){var e=Object(p.a)(Object(p.a)({},JSON.parse(jc)),n[x]||{});JSON.stringify(e)!==JSON.stringify(f)&&O.current&&g(e)}),[x]),a.a.useEffect((function(){e.onChange&&e.onChange(Object(p.a)({},f||{}))}),[f]),a.a.useEffect((function(){O.current&&_(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]);var w=window.location.hash.split("/");return w[0]=w[0].replace("#",""),36!==w[0].length&&(w[0]=null),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(wc,{nodeId:x,field:t,onChange:e.onChange?function(e){O.current&&g(e)}:null}))})),JSON.stringify(f)!==jc?a.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){s(!c)}},a.a.createElement(et,{reverse:!0,icon:"clear_all",text:Object(S.s)("$__removeFilter","*"),onClick:function(){!function(){var t=Object(p.a)({},l.a.getState().searchs);t[x]&&delete t[x],e.reduxFunction("IMMEDIATE","SET_SEARCH",t),O.current&&g(Object(p.a)({},JSON.parse(jc))),e.onSearch&&e.onSearch()}()}})):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(k.a,{color:Object(S.d)("menu"),icon:"search",onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},x,Object(p.a)(Object(p.a)({},JSON.parse(jc)),f)))),e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(S.s)("$__search")),text:"".concat(Object(S.s)("$__search"))}):a.a.createElement(a.a.Fragment,null)))}));function kc(){kc=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 Sc=function(e,t){var r=l.a.getState().db.tag;r.filter((function(e){return e.value===t.value})).length>0?r.map((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(ge.a)(r)}))},Lc=function(){var e=Object(f.a)(kc().mark((function e(t,r){return kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.a.delete("/tag/unique/".concat(r._id),Object(p.a)({},r))&&Cc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Cc=function(e,t){var r=[];l.a.getState().db.tag.map((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}))},Ic=function(){var e=Object(f.a)(kc().mark((function e(t,r){return kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.a.put("/tag/unlink/",Object(p.a)({},r))&&Fc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Tc=function(){var e=Object(f.a)(kc().mark((function e(t,r){var n,a;return kc().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,B.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)}}(),Fc=function(e,t){var r=[],n=l.a.getState(),a=n.session,o=n.db;o.tag.map((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})).map((function(e){var r=[];i[e]._tags.map((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}))},Dc=function(e){return Object(p.a)(Object(p.a)({},U.l),{},{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"}})};r(969);function Nc(){Nc=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 Ac=function(e){var t=e.data,r=a.a.useState(!1),n=Object(m.a)(r,2),o=(n[0],n[1]),i=a.a.useState(!1),l=Object(m.a)(i,2),s=l[0],u=l[1],d=Object(S.j)(),h=function(){var t=Object(f.a)(Nc().mark((function t(r){return Nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Lc(e,{_id:r.value})}});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(f.a)(Nc().mark((function t(r){return Nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Ic(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(){d&&d.plan&&d.planAdmin&&u(!0)},onMouseLeave:function(e){u(!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 e;e=t.item,c.a.push("tags#".concat(e.value))}},t.item.text," ",t.item._count?"(".concat(t.item._count,")"):""),s&&a.a.createElement("div",{style:{zIndex:1}},a.a.createElement(Ye,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(S.d)("color"),onOpen:function(){o(!0)},onClose:function(){o(!1)},options:[].concat(Object(ge.a)(d&&d.plan&&d.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(){h(t.item)}},parseInt(t.item._count)>0&&parseInt(t.item._countOthers)>0&&{name:"$__unlinkMyActivities",icon:"label_off",onClick:function(){g(t.item)}}])}))):a.a.createElement("div",{style:{fontWeight:"bold",color:Object(S.d)("color"),fontSize:"12px"}},t.item.text)};function Pc(){Pc=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 $c=Object(u.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Object(G.a)(Dc)(),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],N=a.a.useState(null),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState([]),z=Object(m.a)(M,2),Y=z[0],H=z[1],W=a.a.useState(!1),U=Object(m.a)(W,2),V=U[0],q=U[1],X=a.a.useState(null),J=Object(m.a)(X,2),K=J[0],Q=J[1],ee=a.a.useState(!0),te=Object(m.a)(ee,2),re=te[0],ne=te[1],ae=wi.a.ExcelFile,oe=wi.a.ExcelFile.ExcelSheet,ie=wi.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(){return se(),function(){}}),[P,JSON.stringify(e.tag)]);var le=Object(S.j)(),se=function(){var e=[];i.filter((function(e){var t=P?Object(S.q)(P.toLowerCase().trim()):"",r=Object(S.q)(e.label.toLowerCase().trim());if(!e.parent&&(!P||P&&r.indexOf(t)>-1))return!0})).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})).map((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})).map((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})).map((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(Y)&&H(e)},ue=function(){C({}),D(!1),y(!1)},de=function(e){y(!0),C(e||{})},pe=function(){var t=Object(f.a)(Pc().mark((function t(){var r;return Pc().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,B.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&&(Sc(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,B.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),Sc(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)(Pc().mark((function e(){var t;return Pc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return q(!0),e.next=3,dt.a.post("Rel_TagUser_Used");case 3:(t=e.sent)&&(q(!1),Q(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.s)("$__export"),text:Object(S.s)("$__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.s)("$__user",1)),value:"user"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__tag",1)),value:"tag"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__activity",1)),value:"card"}),a.a.createElement(ie,{style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__status",1)),value:"status"})))));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(R,null,a.a.createElement("div",{className:t.menu},a.a.createElement("div",{style:{marginTop:"5px"}},a.a.createElement(Ke,{title:Object(S.s)("$__tags",1),icon:"bookmarks",iconTitle:Object(S.s)("$__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:re?"$__showFilters":"$__showTagList",icon:re?"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}),re?a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",clear:"both"}},a.a.createElement(ye,{label:Object(S.s)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:P?a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"cancel",color:"green",onClick:function(){return $(null)}})):null,onChange:function(e){$(e.target.value)}},placeholder:Object(S.s)("$__nameOfTagSearch_placeholder",1)})):a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",padding:7,width:"-webkit-fill-available"}},a.a.createElement(Ec,{nodeId:"tagsView",customLabels:{text:"$__"},fields:["tags","date","users","status","priority","impact","risk","complexity"].concat(Object(ge.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}}}}))),re&&a.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},a.a.createElement(bc.a,{collapse:"ALL",items:Y,maxDepth:3,renderItem:function(e){return a.a.createElement(Ac,{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;Tc(e,{_id:t.dragItem.id,target:n.id}),H(r)}})),a.a.createElement(yc,{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(Ke,{title:L.value?Object(S.s)("$__editTag",1):Object(S.s)("$__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(ye,{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.s)("$__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.s)("$__nameOfTag_placeholder",1)})),a.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},a.a.createElement("span",{style:{marginRight:"7px"}},Object(S.s)("$__tagColor"),":"),a.a.createElement(Ce.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.s)("$__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.s)("$__cancel"),text:Object(S.s)("$__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.s)("$__save"),text:Object(S.s)("$__save"),icon:"save",size:"25px",load:!!F,onClick:function(){pe()}})))),V?a.a.createElement(fe,{fullScreen:!0}):a.a.createElement(a.a.Fragment,null))}));var Mc=Object(u.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=Er();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),a.a.createElement(a.a.Fragment,null,a.a.createElement(Te.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),zc={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"+U.q[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"+U.q[8]}},Yc=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],Bc=Object(G.a)(zc);function Rc(e){var t,r=Bc(),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(dn.a)(e,Yc),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 Gc=function(e){return{container:Object(p.a)(Object(p.a)({},U.e),{},Object(h.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(p.a)(Object(p.a)({},U.d),{},{color:U.O}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:U.O},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:U.q[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function Hc(){Hc=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 Wc=Object(G.a)(Gc);var Uc,Vc,qc=r(1932),Xc=r(1917),Jc=r(1925);function Kc(){Kc=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 Zc=j.b.div(Uc||(Uc=Object(d.a)(["\n            background-color:none;\n\n            "]))),Qc=j.b.div(Vc||(Vc=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            "]))),el=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)(Kc().mark((function e(t){var r,n,a,o,i,c;return Kc().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),B.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)(Kc().mark((function e(t){var r,a,i,c;return Kc().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,B.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,B.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)(Kc().mark((function e(t,r){var n,a;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.a.getState().functions.socket,e.prev=1,e.next=4,B.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)(Kc().mark((function t(){var r;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,B.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(mn,null,L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&Object.keys(L.cards.boardModels.boards).map((function(t){return a.a.createElement(Vt.a,{onDragEnd:I,key:t},a.a.createElement(yn,{md:3},a.a.createElement("fieldset",{style:{width:"100%"}},a.a.createElement("legend",null,L.cards.boardModels.boards[t].name),a.a.createElement(Vt.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return a.a.createElement(Zc,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(Vt.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return a.a.createElement(Qc,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),L.cards.boardModels.boards[t].columns[e].name&&a.a.createElement(na,{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(Qc,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(Zn,{callBack:function(e){y(e)}})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(ye,{label:Object(S.s)("$__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.s)("$__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(et,{icon:"save",text:Object(S.s)("$__save","*"),onClick:function(){T(t)}}),a.a.createElement(et,{icon:Object(S.s)("$__cancel","*"),iconColor:"red",text:Object(S.s)("$__cancel","*"),onClick:function(){u(""),O({})}}))):a.a.createElement(et,{icon:"add_box",text:Object(S.s)("$__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(ye,{label:Object(S.s)("$__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.s)("$__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(et,{icon:"save",text:Object(S.s)("$__save","*"),onClick:function(){D()}}),a.a.createElement(et,{icon:"cancel",iconColor:"red",text:Object(S.s)("$__cancel","*"),onClick:function(){u(""),k({open:!1,name:""})}}))):a.a.createElement(et,{icon:"add_box",text:Object(S.s)("$__addBoard",1),onClick:function(){k(Object(p.a)(Object(p.a)({},E),{},{open:!0}))}})))})),tl=r(1927),rl=function(e){return{root:Object(p.a)(Object(p.a)({},U.l),{},{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 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(u.b)((function(e){return{languages:e.languages}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(rl)((function(e){var t=e.classes,r=l.a.getState(),n=r.languages,o=r.db,i=l.a.getState().functions.socket,c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],p=a.a.useState(0),h=Object(m.a)(p,2),g=h[0],b=h[1],y=a.a.useState(25),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(""),w=Object(m.a)(O,2),j=w[0],E=w[1],k=function(){var e=Object(f.a)(nl().mark((function e(t,r,n,a){return nl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?i.emit("language.UPD",{alias:r,locale:n,text:a}):i.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 o.myTasksMenuExpanded,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.s)("$__page")," ",g+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(n).length/x),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.a,{component:"div",count:Object.keys(n).length,page:g,onChangePage:function(e,t){b(t)},rowsPerPage:x,onChangeRowsPerPage:function(e){_(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.s)("$__cardsPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(ye,{label:Object(S.s)("$__search",1),variant:Object(S.d)("fieldVariant"),value:j,onChange:function(e){E(e.target.value)}}),a.a.createElement(et,{text:Object(S.s)("$__showOnlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){d(!u)}})),a.a.createElement($e.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.s)("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,n&&Object.keys(n)&&Object.keys(n).length>0&&Object.keys(n).filter((function(e){if((!j||j&&(e.indexOf(j)>-1||n[e]&&n[e].locales&&Object.keys(n[e].locales).filter((function(t){return n[e].locales[t].name.indexOf(j)>-1})).length>0))&&(u&&n[e]&&(!n[e].locales||!n[e].locales["pt-BR"]||!n[e].locales["pt-BR"].name)||!u))return!0})).sort((function(e,t){return e<T.b?-1:e>t?1:0})).map((function(e,r){if(r<=(g+1)*x&&r>=g*x)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(na,{key:"".concat(e,"_pt-BR"),title:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].name&&n[e].locales["pt-BR"].name,editable:!0,_id:n[e].locales&&n[e].locales["pt-BR"]&&n[e].locales["pt-BR"].id&&n[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(na,{key:"".concat(e,"_en-US"),title:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].name&&n[e].locales["en-US"].name,editable:!0,_id:n[e].locales&&n[e].locales["en-US"]&&n[e].locales["en-US"].id&&n[e].locales["en-US"].id,onEdit:function(t,r){k(r,e,"en-US",t)},color:Object(S.d)("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),ol=function(e){Object(P.a)(r,e);var t=Object($.a)(r);function r(e){var n;return Object(N.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(A.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 il=Object(u.b)((function(){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(rl)((function(e){e.classes;var t=l.a.getState(),r=!!(t.languages,t.db).myTasksMenuExpanded;return a.a.createElement("div",{style:r?{width:"calc(100% - 400x)",marginLeft:"388px"}:{width:"calc(100% - 138px)",marginLeft:"138px"}},a.a.createElement(ol,null))}))),cl=["children","value","index"];function ll(e){var t=e.children,r=e.value,n=e.index,o=Object(dn.a)(e,cl);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(qc.a,{p:3},t))}function sl(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var ul=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(W.a,{position:"static",color:"default"},a.a.createElement(Jc.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(Xc.a,Object.assign({label:"Data",icon:a.a.createElement(Z.a,{color:Object(S.d)(0===r?"medium":"color",1)},"Data")},sl(0))),a.a.createElement(Xc.a,Object.assign({label:"Languages",icon:a.a.createElement(Z.a,{color:Object(S.d)(1===r?"medium":"color",1)},"translate")},sl(1))),a.a.createElement(Xc.a,Object.assign({label:"Versions",icon:a.a.createElement(Z.a,{color:Object(S.d)(2===r?"medium":"color",1)},"app_registration")},sl(2))))),a.a.createElement(ll,{value:r,index:0},a.a.createElement("div",null,a.a.createElement(il,null))),a.a.createElement(ll,{value:r,index:1},a.a.createElement("div",null,a.a.createElement(al,null))),a.a.createElement(ll,{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(co,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("version")}},Object(S.s)("$__send","*")),a.a.createElement(co,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("logout")}},Object(S.s)("$__logout","*")),a.a.createElement(co,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){d("reload")}},Object(S.s)("$__reload","*")))),a.a.createElement(ll,{value:r,index:3},a.a.createElement("div",null,a.a.createElement(el,null))),a.a.createElement(ll,{value:r,index:4},Object(S.s)("$__accounts",1)),a.a.createElement(ll,{value:r,index:5},Object(S.s)("$__users",1)),a.a.createElement(ll,{value:r,index:6},Object(S.s)("$__support",1)),a.a.createElement(ll,{value:r,index:7},Object(S.s)("$__finance",1)))}));var dl=Object(u.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Yo)((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.s)("$__loadingData")),a.a.createElement(br,null)))}))),pl=r(265),fl=Object(G.a)(vc);var hl=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=fl(),r=l.a.getState(),n=r.session,o=r.search,i=r.db,c=a.a.useState(!1),s=Object(m.a)(c,2),u=(s[0],s[1],Object(S.j)(),[]),d=window.location.hash.split("/");d[0]=d[0].replace("#",""),36!==d[0].length&&(d[0]=null);var p=window.location.pathname.split("/"),f="/".concat(p[1]),h=1;if(d[0]){var g=i.cards[d[0]]||{};(h=g&&g._users&&Object.keys(g._users).length>0?g._users[Object.keys(g._users).find((function(e){return e.indexOf(n._id)>-1}))]:0)&&h.access&&(h=h.access)}return d[1]&&Kf.filter((function(e){return e.path===f})).length>0&&Kf.filter((function(e){return e.path===f}))[0].tabs&&Kf.filter((function(e){return e.path===f}))[0].tabs.length>0?(Kf.filter((function(e){return e.path===f}))[0].tabs&&Kf.filter((function(e){return e.path===f}))[0].tabs).map((function(e){e.path===d[1]&&(u=e.searchFields)})):Kf.filter((function(e){return e.path===f})).length>0&&Kf.filter((function(e){return e.path===f}))[0].searchFields&&(u=Kf.filter((function(e){return e.path===f}))[0].searchFields),JSON.stringify(pl.a)===JSON.stringify(o)?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{}},a.a.createElement(mn,null,a.a.createElement(yn,{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(Z.a,{size:"18px"},"search"),Object(S.s)("$__appliedFilters"))),a.a.createElement(yn,{xs:12,sm:3,md:3,lg:3,xl:3},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(et,{reverse:!0,icon:"clear_all",text:Object(S.s)("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),u&&u.indexOf("text")>-1&&o.text&&a.a.createElement(yn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{className:t.textField,style:{width:"100%"}},Object(S.s)("$__text"),": ",o.text)),u&&u.indexOf("status")>-1&&JSON.stringify(o.cards.status)!==JSON.stringify(pl.a.cards.status)&&a.a.createElement(yn,{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.s)("$__status")),Object.keys(o.cards.status).map((function(e,t){if(o.cards.status[e]&&"all"!==e)return a.a.createElement(we.a,{title:Object(S.s)(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"}}))})))),u&&u.indexOf("priority")>-1&&JSON.stringify(o.cards.priority)!==JSON.stringify(pl.a.cards.priority)&&a.a.createElement(yn,{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.s)("$__priority")),Object.keys(o.cards.priority).map((function(e,t){if(o.cards.priority[e]&&"all"!==e)return a.a.createElement(we.a,{title:Object(S.s)(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"}}))})))),u&&u.indexOf("users")>-1&&JSON.stringify(o.users)!==JSON.stringify(pl.a.users)&&a.a.createElement(yn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.s)("$__users"),a.a.createElement(lt.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(we.a,{title:i.users[e].name,key:t},a.a.createElement(Ie.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(we.a,{title:Object(S.s)("$__unassigned",1),key:t},a.a.createElement(Ie.a,{style:{width:"30px",height:"30px"},alt:Object(S.s)("$__unassigned",1),src:Mr.a},Object(S.s)("$__unassigned",1)))}))))),u&&u.indexOf("units")>-1&&JSON.stringify(o.units)!==JSON.stringify(pl.a.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&u.indexOf("units")>-1&&a.a.createElement(yn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.s)("$__units"),a.a.createElement(lt.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(we.a,{title:i.users[e].name,key:t},a.a.createElement(Ie.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(we.a,{title:Object(S.s)("$__unassigned",1),key:t},a.a.createElement(Ie.a,{style:{width:"30px",height:"30px"},alt:Object(S.s)("$__unassigned",1),src:Mr.a},Object(S.s)("$__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&&u&&u.indexOf("plans")>-1&&a.a.createElement(yn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(S.d)("color"),fontSize:"16px"}},Object(S.s)("$__plans"),a.a.createElement(lt.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(we.a,{title:i.cards[e].name,key:t},a.a.createElement(Ie.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(we.a,{title:Object(S.s)("$__unassigned",1),key:t},a.a.createElement(Ie.a,{style:{width:"30px",height:"30px"},alt:Object(S.s)("$__unassigned",1),src:Mr.a},Object(S.s)("$__unassigned",1)))}))))),a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12,xl:12})))}));function ml(){ml=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 gl=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,r=l.a.getState().search,n=a.a.useState(0),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(21),u=Object(m.a)(s,1)[0],d=a.a.useState(!1),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.useRef(!0);a.a.useEffect((function(){return function(){w.current=!1}}),[]);var j=function(){var t=Object(f.a)(ml().mark((function t(r,n){var a;return ml().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w.current){t.next=6;break}return y(!0),t.next=4,Object(We.b)(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&w.current&&(y(!1),a.total<n&&O(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();a.a.useEffect((function(){b||_||!w.current||j(i,u)}),[i,u]);var E=window.location.hash.split("/");E[0]=E[0].replace("#","");var k=l.a.getState().db,L=Object.keys(k.cards).filter((function(e){return k.cards[e]&&"insight"===k.cards[e].type&&!k.cards[e].deleted&&At(e)})).sort((function(e,t){return k.cards[e].created_at>k.cards[t].created_at?-1:k.cards[e].created_at<k.cards[t].created_at?1:0})).map((function(e){return k.cards[e]}));L=L.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})),r.tags.length>0&&(L=L.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return r.tags.forEach((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var C=function(e){var t=document.getElementById("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&w.current&&c(i+1)};return 0===L.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){C()}},a.a.createElement(mn,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(yn,{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(Z.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.s)("$__youHaveNoIdeasAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.s)("$__visitLinkToHowGetStarted")),a.a.createElement("a",(t={href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer"},Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"style",{fontSize:18,color:"blue",texAlign:"center"}),t),Object(S.s)("$__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){C()}},a.a.createElement(mn,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(L).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(yn,{key:L[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,{db:"cards",data:L[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))})),bl=function(e){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 yl=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(bl)((function(e){e.data;var t=e.classes;return a.a.createElement("div",{className:t.feed},a.a.createElement(Wn.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(Wn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Wn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Wn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),a.a.createElement("div",{className:t.linkContent},a.a.createElement(Wn.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Wn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Wn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Wn.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(Wn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function vl(){vl=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 xl=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,r=l.a.getState(),n=r.db,o=r.search,i=a.a.useState(0),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(!1),x=Object(m.a)(v,2),_=x[0],O=x[1],w=a.a.useRef(!0);a.a.useEffect((function(){return j(s,18),function(){w.current=!1}}),[]),a.a.useEffect((function(){b||_||!w.current||j(s,18)}),[s,18]);var j=function(){var t=Object(f.a)(vl().mark((function t(r,n){var a;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w.current){t.next=6;break}return y(!0),t.next=4,Object(We.b)(e,{cardLoad:"links",limit:n,skip:r*n,ignoreLoader:!0});case 4:(a=t.sent)&&w.current&&(y(!1),a.total<n&&O(!0));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),E=window.location.hash.split("/");E[0]=E[0].replace("#","");var k={};k=(k=Object.keys(n.cards).filter((function(e){return"link"===n.cards[e].type&&n.cards[e]._users&&At(e)&&!n.cards[e].deleted})).sort((function(e,t){return n.cards[e].created_at>n.cards[t].created_at?-1:0})).map((function(e){return n.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(o.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(o.text.toLowerCase())>-1})).map((function(e){return e})),o.tags.length>0&&(k=k.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return o.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var L=function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&w.current&&u(s+1)},C=function(){for(var e=[],t=0;t<18;t++)e.push(a.a.createElement(yn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(yl,null)));return a.a.createElement(a.a.Fragment,null,e)};return 0===Object.keys(k).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){L()}},a.a.createElement(mn,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(yn,{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(Z.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(S.s)("$__youHaveNoRadarAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(S.s)("$__visitLinkToHowGetStarted")),a.a.createElement("a",(t={href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",rel:"noopener noreferrer"},Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"style",{fontSize:18,color:"blue",texAlign:"center"}),t),Object(S.s)("$__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){L()}},a.a.createElement(mn,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement("div",null),Object.keys(k).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(yn,{key:k[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,{db:"cards",data:k[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),b?a.a.createElement(C,null):a.a.createElement(a.a.Fragment,null)))})),_l=r(790),Ol=r.n(_l),wl=r(791),jl=r.n(wl),El=r(104);var kl=Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(bl)((function(e){var t,r,n=e.data,o=e.classes,i=a.a.useState(n.img),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState({backgroundSize:"contain"}),f=Object(m.a)(d,2),g=f[0],b=f[1],y=a.a.useRef({});return a.a.useEffect((function(){if(y.current&&e.onResize){var t=new ResizeObserver((function(){var t=y.current.clientHeight;e.onResize(t)}));return t.observe(y.current),function(){return t.disconnect()}}}),[]),a.a.createElement("div",{className:o.feed,ref:y,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:s,onError:function(){u(null)},onLoad:function(e){var t=e.target;t&&t.width&&t.height&&(t.width>t.height&&t.width/t.height>1.75?b({backgroundSize:"contain"}):b({backgroundSize:"cover"}))}})),a.a.createElement("div",{className:o.image,style:Object(p.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},s?Object(p.a)({backgroundImage:'url("'.concat(s,'")')},g):{background:Object(S.d)("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(n.link,"_blank")}},!s&&a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(Z.a,{icon:Rr.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.s)("$__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:n.title,description:n.contentSnippet,pubDate:n.isoDate?n.isoDate:n.pubDate,image:n.img,url:n.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()(n.isoDate?n.isoDate:n.pubDate).format("DD/MM/YYYY HH:MM"))),a.a.createElement(El.a,{title:a.a.createElement(a.a.Fragment,null,!e.clickChannel&&a.a.createElement("a",(t={href:n.link,target:"_blank",rel:"noopener noreferrer"},Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"style",{fontSize:"14px",fontWeight:"bold"}),t),Object(S.s)("$__clickHereToReadNews",1)))},a.a.createElement("div",{className:o.infos,onClick:function(){e.clickChannel||window.open(n.link,"_blank")}},a.a.createElement("div",{className:o.linkTitle},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:n&&n.title&&jl()(n.title)?n.title:n.title?Ol()(n.title):""}})),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:n.contentSnippet&&jl()(n.contentSnippet)?n.contentSnippet:n.contentSnippet?Ol()(n.contentSnippet):""},className:o.linkContent}),a.a.createElement("div",{className:o.feedFooter},a.a.createElement("div",{className:o.feedLink},!e.clickChannel&&a.a.createElement("a",(r={href:n.link,target:"_blank",rel:"noopener noreferrer"},Object(h.a)(r,"rel","noopener noreferrer"),Object(h.a)(r,"rel","noopener noreferrer"),Object(h.a)(r,"style",{fontSize:"14px",fontWeight:"bold"}),r),Object(S.s)("$__readMore",1)))))),a.a.createElement("div",{style:{top:-30}},a.a.createElement(Le.a,{options:e._tags})))})));var Sl=Object(ae.a)(bl)((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(Z.a,{icon:Rr.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.s)("$__attention")),a.a.createElement("div",{className:r.linkContent},Object(S.s)("$__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 Ll(){Ll=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 Cl=Object(u.b)((function(e){return{store:e}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(bl)((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)(Ll().mark((function t(a){var i,c;return Ll().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),B.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)(Ll().mark((function e(t){return Ll().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.s)("$__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)(Ll().mark((function t(n){var a,i;return Ll().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=n||s[0],B.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)(Ll().mark((function t(n){var a,i=arguments;return Ll().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.length>1&&void 0!==i[1]&&i[1],B.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(Ke,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.s)("$__folowRSS"):Object(S.s)("$__hideRSS"),icon:o.hide?"visibility":"visibility_off",onClick:function(){g()}}].concat(Object(ge.a)(i&&i.feed&&(i.feedAdmin||i.feedModerate)?[{name:Object(S.s)("$__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(ge.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(ge.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(Se.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(ge.a)(t),[{name:Object(S.s)("$__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(Se.a,{overlap:"rectangular",icon:"rss_feed",title:Object(S.s)("$__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.s)("$__globalAccount}")),a.a.createElement("div",{style:{width:"16px"}},a.a.createElement(Se.a,{overlap:"rectangular",icon:"delete_forever",title:Object(S.s)("$__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.s)("$__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=z.a.MD5(t.link);return a.a.createElement(kl,{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(Sl,{data:o,clickChannel:function(){c.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})))})));function Il(){Il=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 Tl=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(0),o=Object(m.a)(n,2),i=o[0],c=(o[1],a.a.useState(!1)),s=Object(m.a)(c,2),u=s[0],d=s[1],g=a.a.useState(window.location.hash.split("/")),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=a.a.useState(!0),E=Object(m.a)(j,2),k=E[0],L=E[1],C=a.a.useRef({}),I=a.a.useRef(!0);a.a.useEffect((function(){C.current={loading:!1};var e=window.location.hash.split("/");return e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(y)&&v(e),L(!0),function(){I.current=!1}}),[]),a.a.useEffect((function(){y.length>0&&I.current&&(T(),y[2]&&36!==y[2].length&&L(!0))}),[y]),a.a.useEffect((function(){!u>Object.keys(O).length&&I.current&&(L(!0),T())}),[i]),a.a.useEffect((function(){I.current&&L(!1)}),[O]);var T=function(){var e=Object(f.a)(Il().mark((function e(){var t,r;return Il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u||C.current.loading){e.next=10;break}return C.current={loading:!0},I.current&&L(!0),e.next=5,dt.a.post("/Feed_Links_V2",{ids:y[2]&&y[2].length?y[2]:null,skip:Object.keys(O).length,limit:21});case 5:t=e.sent,r=Array.from(O),t&&t.data&&(t.data.map((function(e){0===r.filter((function(t){return t.link===e.link})).length&&r.push(e)})),I.current&&w(r)),t.data&&0===t.data.length&&I.current&&d(!0),C.current={loading:!1};case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var n=Object(f.a)(Il().mark((function n(a){var o;return Il().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:B.a.put("/rel/update",{_id:t.idRel,customTitle:a}),(o=r.cards[y[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)({},y[0].replace("#",""),Object(p.a)(Object(p.a)({},r.cards[y[0].replace("#","")]),{},{_feeds:o})))}));case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),D=function(){var n=Object(f.a)(Il().mark((function n(a){var o,i;return Il().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:window.history.back(),o=a.replace("#",""),B.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)}}(),N=function(){for(var e=[],t=0;t<21;t++)e.push(a.a.createElement(yn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(yl,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(et,{icon:"undo",text:Object(S.s)("$__back","*"),onClick:function(){return window.history.back()}}),y[0]&&"bright-and-connected"===y[1]&&y[2]&&a.a.createElement(et,{icon:"delete_sweep",text:Object(S.s)("$__removeChannel","*"),onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){D(y[0])}})}})),a.a.createElement(na,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return F(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");!k&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&T()}()}},a.a.createElement(mn,{style:Object(p.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},O.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(yn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(kl,{db:"cards",data:e}))})),!u&&k?a.a.createElement(N,null):a.a.createElement(a.a.Fragment,null))))})),Fl=function(e){return{}};function Dl(){Dl=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 Nl=Object(u.b)((function(e){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Fl)((function(e){var t,r=l.a.getState(),n=r.search,o=r.session,i=a.a.useState(!0),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=window.location.hash.split("/");v[0]=v[0].replace("#",""),a.a.useEffect((function(){_()}),[e.store.feeds]),a.a.useEffect((function(){x()}),[]);var x=function(){var t=Object(f.a)(Dl().mark((function t(){return Dl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u(!0),"hideFeeds"!==v[1]){t.next=8;break}return t.next=4,cc(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&_(),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,cc(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}));case 11:t.sent&&_(),t.next=16;break;case 15:_();case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=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(n.text.toLowerCase())>-1||e[t].customTitle&&e[t].customTitle.toLowerCase().indexOf(n.text.toLowerCase())>-1||e[t].customDescription&&e[t].customDescription.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(r){(Object.keys(n.plans.selected).length>0&&Object.keys(n.plans.selected).map((function(t){return n.plans.selected[t]&&e[r]._parent[t]})).length>0||0===Object.keys(n.plans.selected).length)&&(t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},r,e[r])))})),y(t),u(!1)};return s?a.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},a.a.createElement(br,null)):v[2]&&36===v[2].length?a.a.createElement("div",null,a.a.createElement(Tl,{follow:!0})):a.a.createElement("div",{style:(t={width:"100%"},Object(h.a)(t,"width","calc(100% - 20px)"),Object(h.a)(t,"position","relative"),Object(h.a)(t,"display","flex"),t)},a.a.createElement(mn,null,b&&Object.keys(b).length>0&&Object.keys(b).filter((function(t){if(36===v[0].length&&l.a.getState().db.cards[v[0]]&&b[t]._parent&&Object.keys(b[t]._parent).length>0&&b[t]._parent[v[0]])return!0;if("tab"===v[0]){var r=!1;if(b[t].hide&&(r=!0),!e.showHidden&&!r)return!0;if(e.showHidden&&r)return!0}})).sort((function(e,t){var r=b[e].customTitle?b[e].customTitle.toLowerCase().trim():b[e].name.toLowerCase().trim(),n=b[t].customTitle?b[t].customTitle.toLowerCase().trim():b[t].name.toLowerCase().trim();return v[0]&&36!==v[0].length&&(o&&o.account&&b[e]._parent&&b[e]._parent[o.account]&&b[e]._parent[o.account].customTitle&&(r=b[e]._parent[o.account].customTitle.toLowerCase().trim()),o&&o.account&&b[t]._parent&&b[t]._parent[o.account]&&b[t]._parent[o.account].customTitle&&(n=b[t]._parent[o.account].customTitle.toLowerCase().trim())),r<n?-1:r>n?1:0})).map((function(e,t){var r=b[e];return a.a.createElement(yn,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},a.a.createElement(Cl,{data:r,follow:!0,onChange:function(){_()}}))}))))})));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=Object(G.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),$l=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=Pl();a.a.useEffect((function(){s(e.data)}),[e.data]);var d=function(){var t=Object(f.a)(Al().mark((function t(a,o){var i,l;return Al().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(et,{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.s)("$__".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(Ie.a,{alt:c._reactions[n][e].name,src:c._reactions[n][e].image||Mr.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.s)("$__".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)))},Ml={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:Object(h.a)({border:"none",lineHeight:"17px",padding:1},"border","2px inset")},suggestions:{position:"absolute",bottom:"100%",top:"none",left:"33px",maxHeight:"217px !important",overflow:"auto !important",list:{position:"absolute",width:"300px",backgroundColor:"white",border:"1px solid rgba(0,0,0,0.15)",borderRadius:"7px 7px",boxShadow:"0 0 3px 5px rgba(0,0,0,0.09)",fontSize:14,maxHeight:"217px",overflow:"auto"},item:{padding:"5px 15px",borderBottom:"1px solid rgba(0,0,0,0.15)","&focused":{backgroundColor:Object(S.d)("color")}}}},zl=function(e){var t,r,n;return{root:{position:"absolute",top:0,left:0,right:0,bottom:0},rootRelative:{position:"relative",top:0,left:0,right:0,bottom:0},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:0,position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%",display:"flex",position:"absolute",bottom:0,left:0,right:0,height:"auto"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",padding:0,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(h.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(h.a)(t,"color",U.O),Object(h.a)(t,"width","30px"),Object(h.a)(t,"height","30px"),Object(h.a)(t,"lineHeight","25px"),Object(h.a)(t,"fontSize","12px"),Object(h.a)(t,"textAlign","center"),Object(h.a)(t,"position","absolute"),Object(h.a)(t,"bottom","23px"),Object(h.a)(t,"left","50%"),Object(h.a)(t,"marginLeft","-24px"),Object(h.a)(t,"zIndex","1"),Object(h.a)(t,"borderTopRightRadius","50%"),Object(h.a)(t,"borderTopLeftRadius","50%"),Object(h.a)(t,"borderBottomRightRadius","50%"),Object(h.a)(t,"borderBottomLeftRadius","50%"),Object(h.a)(t,"display","flex"),Object(h.a)(t,"alignItems","center"),Object(h.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(S.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.b)+", 0.4)"},info:{backgroundColor:U.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.4)"},success:{backgroundColor:U.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.4)"},danger:{backgroundColor:U.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.4)"},warning:{backgroundColor:U.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.4)"},primary:{backgroundColor:U.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(h.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(h.a)(r,"width","45%"),Object(h.a)(r,"float","left"),Object(h.a)(r,"padding","7px"),Object(h.a)(r,"marginBottom","5px"),Object(h.a)(r,"position","relative"),Object(h.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(U.r)(U.b)+", 0.14)"),Object(h.a)(r,"borderRadius","6px"),Object(h.a)(r,"color","rgba("+Object(U.r)(U.b)+", 0.87)"),Object(h.a)(r,"background",U.O),Object(h.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+U.q[10],borderRight:"0 solid "+U.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(h.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+U.O,borderRight:"0 solid "+U.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(h.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:U.O,"&:before":{borderLeftWidth:0,borderRightWidth:"15px",left:"-15px",right:"auto"},"&:after":{borderLeftWidth:0,borderRightWidth:"14px",left:"-14px",right:"auto"}}),timelineHeading:{marginBottom:0},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(S.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(h.a)({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:"5",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)"},"zIndex",11),editor:{position:"absolute",bottom:0,height:"auto",width:"calc(100% - 0px)"},editorRelative:{position:"relative",bottom:0,minHeight:"50px",height:"auto",width:"calc(100% - 0px)",zIndex:10},files:{display:"inline-table",position:"relative",backgroundColor:"rgba(250,250,250,0.9)",width:"100%"},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:"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:0,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(p.a)(Object(p.a)({},U.l),{},{"& textarea":Object(p.a)(Object(p.a)({},U.l),{},{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":(n={padding:"0.7rem 1rem",outline:0,border:0,resize:"none"},Object(h.a)(n,"outline","none"),Object(h.a)(n,"fontSize","0.9rem"),Object(h.a)(n,"color","#7288a3"),Object(h.a)(n,"borderColor"," #3a546f"),Object(h.a)(n,"overflow","hidden"),Object(h.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};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=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(zl)((function(e){var t=l.a.getState(),r=t.db,n=t.session,o=(t.chat,e.classes),i=l.a.getState().functions.socket,c=a.a.useState(!1),s=Object(m.a)(c,2),u=s[0],d=s[1],h=a.a.useState(""),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],k=j[1],L=a.a.useState([]),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],A=D[1],P=a.a.useState(null),$=Object(m.a)(P,2),M=$[0],z=$[1],B=a.a.useState(!1),R=Object(m.a)(B,2),G=R[0],H=R[1],W=a.a.useState([]),U=Object(m.a)(W,2),V=U[0],q=U[1],X=a.a.useState(!1),J=Object(m.a)(X,2),K=J[0],Q=J[1],ee=a.a.createRef(),te=a.a.createRef(),re=Object(S.j)(),ne=0;n._id&&r.cards[e.nodeId]&&r.users&&r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]&&(ne=r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]);var ae=window.location.hash.split("/");ae[0]=ae[0].replace("#",""),a.a.useEffect((function(){u||d(!0)}));var oe=function(){var e,t=[];if(e=b){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){"@[".concat(e.split(")")[0],")");var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},ie=function(){var t=Object(f.a)(Yl().mark((function t(){var a,o,c;return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Q(!1),O(!0),a=[],o=oe(),console.log(e),c={_id:Object(Y.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:b,type:"comment",mentions:oe(),notifyUsers:a,filesCount:I.length>0?I.length:0,_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null},M&&(c=Object(p.a)(Object(p.a)({},c),{},{urlPreview:JSON.stringify(M)})),wr(e,Object(p.a)(Object(p.a)({},c),{},{user:Object(p.a)({},r.users[n._id]),files:{}})),i.emit("data",{module:"timeline",method:"post",action:"add"},c,(function(t){if(console.log(t),t._id)if(I.length>0)ce(t);else{e.onSending&&e.onSending();var n=Object(p.a)(Object(p.a)({},t),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null});M&&(n=Object(p.a)(Object(p.a)({},n),{},{urlPreview:JSON.stringify(M)})),o.map(function(){var t=Object(f.a)(Yl().mark((function t(n){return Yl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.cards[e.nodeId]||r.users&&(!r.users||r.users[n])){t.next=3;break}return t.next=3,It(e,n,2,e.nodeId,!0);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),A([]),T([]),q([]),y(""),z(null),O(!1),e.onSending&&e.onSending()}})),y(""),z(null);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ce=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=Array.from(I),t.next=3,Promise.all(n.map(function(){var e=Object(f.a)(Yl().mark((function e(t,n){var a;return Yl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A([].concat(Object(ge.a)(N),[t])),e.next=3,Object(pt.a)(r._id,t,!0);case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())).then((function(t){e.onSending&&e.onSending(),r.files=t,r._parent=e.nodeId,i.emit("timeline.COMMENT",{node:e.nodeId,comment:r,db:e.db?e.db:"cards"},(function(e){})),A([]),T([]),y(""),z(null),O(!1),e.onSending&&e.onSending()}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),le=function(){var e=Object(f.a)(Yl().mark((function e(t){return Yl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T([].concat(Object(ge.a)(I),Object(ge.a)(Object.keys(t).map((function(e){return t[e]}))))),k(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var e=Object(f.a)(Yl().mark((function e(t){var r,n,a,o;return Yl().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=9;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.map((function(e){(e.indexOf("http://")>-1||e.indexOf("https://")>-1)&&a.test(e)&&(r=e)}));case 8:if(!M&&r&&-1===V.indexOf(r)||r&&M&&-1===V.indexOf(r)&&M.link!==r){H(!0);try{i.emit("data",{module:"link",method:"post",action:"exist"},{idRel:ae[0],url:r},(function(e){z(e),H(!1)}))}catch(c){H(!1),(o=V).push(r),q(o),console.log(c)}}case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=[];return r.cards[e.nodeId]&&r.users&&Object.keys(r.users).map((function(e){if(e&&null!==e&&void 0!==e&&e!==n._id&&r.users[e].name&&r.users[e]&&!r.users[e].deleted){var t=r.users[e]._id,a=r.users[e].name?r.users[e].name:r.users[e].name.split(" ").length>0?r.users[e].name.split(" ")[0]:r.users[e].name;t&&0===Object.keys(ue).filter((function(e){return ue[e].id===t})).length&&ue.push({id:t,display:a})}})),(re&&(re.owner||re.planAdmin||re.planModerate)||ne&&ne.access&&parseInt(ne.access)>3)&&Object.keys(r.users).filter((function(e){return!r.users[e].deleted&&"client"!==r.users[e].type&&"group"!==r.users[e].type&&"account"!==r.users[e].type&&!r.users[e]._parent})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(ue).filter((function(e){if(ue[e].id===t)return!0})).length&&ue.push({id:t,display:e.nodeId&&r.cards[e.nodeId]&&r.users&&r.users[t]&&r.users[t].name?r.users[t].name:r.users[t].displayName?r.users[t].displayName:r.users[t].name})})),a.a.createElement(ve.FileDrop,{ref:ee,className:e.relative?o.rootRelative:o.root,onDragOver:function(){!e.disabledSend&&k(!0)},onClick:function(){te&&te.current&&te.current.focus()},onDrop:le,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"},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:e.relative?o.editorRelative:o.editor,style:e.editorStyle?e.editorStyle:{},onClick:function(){te&&te.current&&te.current.focus()}},a.a.createElement("div",{className:o.files},I&&I.length>0&&I.map((function(t,r){var n=t.name.split("."),o="attachment";return e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1})).length>0&&(o=e.store.db.fileExtensions.filter((function(e){return e.ext.indexOf(n[n.length-1].toLowerCase())>-1}))[0].icon||URL.createObjectURL(t)),a.a.createElement("div",{key:r,style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center",marginBottom:"5px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"50px",height:"50px",marginRight:"7px",overflow:"hidden"}},"string"===typeof o&&-1===o.indexOf("blob:")&&-1===o.indexOf("svg")?a.a.createElement(Z.a,{icon:o,size:"50px"}):a.a.createElement("img",{alt:"MACHEN_IMAGE",src:o,style:{width:"100%",height:"100%"}})),N.length>0&&N[r]&&N[r].name===t.name?a.a.createElement(Z.a,{icon:"cloud_done",color:"green"}):_?a.a.createElement(a.a.Fragment,null):a.a.createElement(Z.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(I);t.splice(e,1),T(t)}(r)}}),t.name)}))),a.a.createElement("div",{className:o.textEditor},G&&!M&&a.a.createElement("div",{className:o.urlPreview,style:{width:"100%",height:"150px"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{marginLeft:"7px",width:"200px",height:"110px",maxWidth:"50%"}},a.a.createElement(Wn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(Wn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10}),a.a.createElement(Wn.a,{variant:"text",height:10})))),M&&a.a.createElement("div",{className:o.urlPreview},a.a.createElement("img",{src:"".concat(M.img?M.img:Mr.a),onError:function(e){e.target.src=Mr.a},alt:M.title}),a.a.createElement("div",{className:"data"},a.a.createElement("div",{className:"title"},M.title),M.site&&a.a.createElement("div",{className:"siteName"},M.site),M.contentSnippet&&a.a.createElement("div",{className:"contentSnippet"},M.contentSnippet)),a.a.createElement(ke,{title:Object(S.s)("$__removeLink",1),icon:"delete_forever",color:"red",onClick:function(){return z(null)}})),_?a.a.createElement("div",{className:o.sendingMessage},Object(S.s)("$__sending",1),a.a.createElement(gr.a,{className:o.progressBar})):a.a.createElement("div",{style:{position:"relative",height:"auto",backgroundColor:"#ffffff",border:"solid 1px rgba(0,0,0,0.05)",display:"flex",alignItems:"center",zIndex:1}},a.a.createElement(xe.b,{ref:te,value:b,onChange:function(e){se(e.target.value)},onPaste:function(e){le(e.clipboardData.files)},placeholder:e.placeholder?e.placeholder:Object(S.s)("$__writeMessage"),style:Object(p.a)(Object(p.a)({},Ml),{},{position:"relative",width:"calc(100% - 130px)",paddingRight:"7px",background:"none",border:"none",overflow:"auto !important"}),onKeyDown:function(e){13==e.keyCode&&(e.shiftKey?e.stopPropagation():b.trim()&&ie())},placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(xe.a,{trigger:"@",data:ue,renderSuggestion:function(e,t,n){if(e&&e.id)return a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Ie.a,{style:{width:"25px",height:"25px",marginRight:"7px"},alt:n,src:r.users[e.id]&&r.users[e.id].image||r.users[e.id]&&r.users[e.id].image?r.users[e.id].image:null}),n)}})),a.a.createElement("div",{style:{position:"absolute",right:"0px",bottom:"0px",cursor:"pointer",display:"flex",alignItems:"center"}},a.a.createElement(ke,{title:Object(S.s)("$__emojis",1),icon:K?"highlight_off":"sentiment_very_satisfied",color:Object(S.d)("medium"),onClick:function(){Q(!K)}}),!_&&a.a.createElement("div",{className:o.actionButton},a.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 le(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"}),a.a.createElement(Z.a,{icon:"attachment",color:Object(S.d)("medium"),size:"22px"})),!_&&(b||I.length>0)&&a.a.createElement(ke,{title:Object(S.s)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(S.d)("menu"),onClick:function(){return ie()}}),e.closeOption&&a.a.createElement(Z.a,{title:Object(S.s)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(S.d)("color"),onClick:function(){return e.onClose()}}),K&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px"}},a.a.createElement(Oe.a,{onEmojiClick:function(e,t){y("".concat(b," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))),a.a.createElement("div",{className:E?o.onDropFile:o.dropFile,onDragLeave:function(){!e.disabledSend&&k(!1)}},Object(S.s)("$__dropTheFileToAttach","*"))))}))),Rl=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(vn)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=r.functions,c=(r.usersStatus,i.socket,a.a.useState(!1)),s=Object(m.a)(c,2),u=s[0],d=s[1],p=a.a.useState(!1),f=Object(m.a)(p,2),h=(f[0],f[1]),g=a.a.useState(null),b=Object(m.a)(g,2),y=(b[0],b[1],a.a.useState(null)),v=Object(m.a)(y,2),x=(v[0],v[1],null);w&&w._parent&&n.cards[w._parent]?w._parent:w&&w.idRel&&n.cards[w.idRel]&&w.idRel;var _=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(!0),e&&clearTimeout(x)},w=e.storie;if(!w)return null;"timer"===w.type&&String(w.ini)&&String(w.fin)&&(w.fin,w.ini);var j=null;w.urlPreview&&(j=JSON.parse(w.urlPreview));var E=function(e){var t,r;if(w&&w._parent&&n.cards[w._parent]?t=w._parent:w&&w.idRel&&n.cards[w.idRel]&&(t=w.idRel),r=e,e){var a=e.split("@[");a.length>0&&a.map((function(e){if(e){var a="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&n.cards[t]&&n.cards[t]._users&&n.cards[t]._users[o]){var i=n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name||n.cards[t]._users&&n.cards[t]._users[o]&&n.cards[t]._users[o].name?n.cards[t]._users[o].name:e.split("](")[0];r=r.replace(a,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(i,"</b></span>"))}else if(o&&36===o.length&&n.users[o]){var c=n.users[o]&&n.users[o].name||n.users[o].name?n.users[o].name:Object(S.s)("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Object(S.d)("menu"),'"><b>').concat(c,"</b></span>"))}}return!0}))}return r}(w.message);w._reactions&&Object.keys(w._reactions).length>0&&Object.keys(w._reactions).map((function(e){Object.keys(w._reactions[e]).length>0&&Object.keys(w._reactions[e]).map((function(t){t===o._id&&e}))}));var k=!1;e.storie&&e.storie.user&&e.storie.user._id===o._id&&(k=!0);return""===w.message&&w.cardId&&w.cardId!==e.nodeId&&!l.a.getState().db.cards[w.cardId]?null:a.a.createElement("div",null,a.a.createElement("div",{className:"message",style:{position:"relative",float:"left",width:"100%",marginBottom:"20px",display:"flex",alignItems:"center"},onMouseLeave:function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;x=setTimeout((function(){h(!1)}),e)}(1e3)},onMouseOver:function(){e.isReply||_(!0)},onClick:function(){e.isReply||_(!0)}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left",fontSize:"10px",fontWeight:"bold",display:"flex",alignItems:"center",whiteSpace:"nowrap",marginRight:"15px"}},a.a.createElement(un,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:w.user._id},a.a.createElement(Ie.a,{alt:w.user.displayName?w.user.displayName:w.user.name,src:"".concat(w.user.image),style:{width:"22px",height:"22px"}})),w.user.displayName?w.user.displayName:w.user.name," ",a.a.createElement("span",{style:{fontSize:"10px"}},"(",O()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===O()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(O()(1e3*w.created_at).tz("America/Sao_Paulo").format("H:mm")):O()(new Date).tz("America/Sao_Paulo").format("YYYY")===O()(1e3*w.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(O()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(O()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")),")"))),a.a.createElement("div",null,w.files&&Object.keys(w.files).length>0&&a.a.createElement("div",{className:"files",style:{position:"relative",display:"flex",justifyContent:k?"flex-end":"none",flexWrap:"wrap"}},w.files&&Object.keys(w.files).length>0&&Object.keys(w.files).map((function(t,r){var o=w.files[t],i=o.name.split("."),c=i[i.length-1],l="attachment";n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&(l=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(o.file));var s="img";return n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1})).length>0&&n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer&&(s=n.fileExtensions.filter((function(e){return e.ext.indexOf(c.toLowerCase())>-1}))[0].viewer),a.a.createElement("div",{key:t,style:{position:"relative",display:"flex",alignItems:"center",marginBottom:"5px",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:"pointer",overflow:"hidden",padding:"7px",zIndex:"10 !important",borderRadius:"15px",width:"img"===s?Object.keys(w.files).length<4?"33%":"25%":"movie"===s||"audio"===s?"50%":"20%",maxWidth:"img"===s?"440px":"none",minWidth:"img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)?"140px":"100%"},onClick:function(r){e.openLightBox&&e.openLightBox(w.files[t]._id),r.preventDefault()},title:w.files[t].name},("img"===s||"movie"!==s&&"audio"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")||"movie"!==s&&"audio"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1))&&a.a.createElement(we.a,{title:w.files[t].name},a.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"}},w.files[t].name)),"img"===s&&"string"===typeof l&&l.indexOf("https")>-1&&-1===l.indexOf("svg")&&a.a.createElement("img",{src:"".concat(l),style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"},onError:function(e){w.created_at&&"string"===typeof w.created_at&&parseInt(w.created_at)>O()().unix("X")-60&&(e.target.src=l)}}),"movie"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")?a.a.createElement(Z.a,{icon:l,size:"50px"}):"movie"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)&&a.a.createElement("img",{alt:"MACHEN_IMAGE",src:l,style:{width:"100%",height:"100%"}}),"img"===s&&l&&l.indexOf("svg")>-1&&a.a.createElement("img",{src:ce.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"33vh"}}),"movie"===s&&a.a.createElement("video",{style:{width:"100%"},src:"https://machen.azureedge.net/".concat(o.file),controls:!0}),"audio"===s&&a.a.createElement(re.a,{src:"https://machen.azureedge.net/".concat(o.file),controls:!0}))}))),function(){if("comment"===w.type&&w.message&&!w.urlPreview)return a.a.createElement("div",{style:{wordBreak:"break-word"}},Object(S.b)(E,e.searchText));if("comment"===w.type&&w.message&&w.urlPreview){var r=E.replace(j.link,'<a href="'.concat(j.link,'" target="_blank" rel="noopener noreferrer">').concat(j.link,"</a>"));return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{className:t.urlPreview},!u&&j.img&&a.a.createElement("img",{src:"".concat(j.img),onError:function(e){d(!0)},alt:j.title||j.link}),a.a.createElement("div",{className:"data"},a.a.createElement("div",{className:"title"},j.title),j.site&&a.a.createElement("div",{className:"siteName"},j.site),j.contentSnippet&&a.a.createElement("div",{className:"contentSnippet"},j.contentSnippet))),a.a.createElement("a",{style:{position:"relative",float:"right",fontWeight:"bold",fontSize:"12px",color:"#000000",zIndex:1},href:j.link,target:"_blank",rel:"noopener noreferrer"},Object(S.s)("$__openLink","*"))),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:Object(S.p)(r,!0,"\n","\n")}}))}}())))}))),Gl=function(e){return{root:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto"},content:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"auto",backgroundColor:"rgba(249,249,249,1)"},timeline:{listStyle:"none",padding:"0",position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",width:"100%","& .file-drop-target":{width:"100%"}},scrollEnd:{marginTop:"160px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},scrollEndNoEditor:{marginTop:"30px",position:"relative",width:"100%",height:0,marginBottom:"-100px"},timelineSimple:{position:"relative",overflow:"hidden",marginTop:0,padding:"0 0 20px",width:"-webkit-fill-available","&:before":{left:"15px"},"&:after":{clear:"both"}},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:U.O,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:U.O,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(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.b)+", 0.4)"},info:{backgroundColor:U.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.4)"},success:{backgroundColor:U.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.4)"},danger:{backgroundColor:U.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.4)"},warning:{backgroundColor:U.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.4)"},primary:{backgroundColor:U.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.z[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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.b)+", 0.87)",background:"#ffffff"},timelineHeading:{marginBottom:0,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:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#FFFFFF",backgroundColor:"rgba(0,0,0,0.77)",zIndex:1},editor:{position:"absolute",bottom:0,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:0,right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}};function Hl(){Hl=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}Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Gl)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=r.functions,c=(r.chat,r.timeline),s=i.socket,u=a.a.useState(e.stories||{}),d=Object(m.a)(u,2),h=d[0],g=d[1],b=a.a.useState(!0),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],a.a.useState(!1)),E=Object(m.a)(j,2),k=E[0],S=(E[1],[]);a.a.useEffect((function(){return c&&c[e.data._id]&&Object.keys(c[e.data._id]).length!==Object.keys(h).length&&g(c[e.data._id]),function(){}}),[c]),a.a.useEffect((function(){e.data._id&&L()}),[e.data]);var L=function(){var t=Object(f.a)(Hl().mark((function t(){var r;return Hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"Timeline/social/init()"}),{ids:[e.data._id],db:"cards",type:"comment",limit:k,skip:w});case 2:(r=t.sent)&&r.timelines&&r.timelines[e.data._id]?(g(r.timelines[e.data._id]),setTimeout((function(){x(!1)}),300)):r&&r.result&&setTimeout((function(){x(!1)}),300);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),C=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:S,file:t})},I=function(){var t=Object(f.a)(Hl().mark((function t(){return Hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object.keys(h).filter((function(e){if(h[e].user&&h[e].user._id!==o._id&&(!h[e].readedBy||h[e].readedBy&&!h[e].readedBy[o._id]))return!0})).length>0&&(_r(e,{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users"}),s.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:o._id,id:e.nodeId,db:n.cards[e.nodeId]?"cards":"users",_client:n.cards[e.nodeId]&&n.cards[e.nodeId].client?n.cards[e.nodeId].client:null}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return v?a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Wn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(Wn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(Wn.a,{variant:"text",height:11,style:{marginBottom:"3px"}})):a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement("ul",{className:t.timelineSimple,id:"tms_".concat(e.nodeId),style:{zIndex:1}},h&&Object.keys(h).length>0&&Object.keys(h).sort((function(e,t){return parseInt(h[e].created_at)<parseInt(h[t].created_at)?-1:parseInt(h[e].created_at)>parseInt(h[t].created_at)?1:0})).map((function(r,n){var i=h[r];return!e.showUnReaded&&n>Object.keys(h).length-4?(i.files&&Object.keys(i.files).length>0&&Object.keys(i.files).map((function(e,t){var r=i.files[e];S.push(r)})),a.a.createElement("li",{key:r},a.a.createElement(Rl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?h[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).map((function(e,t){var r=i.files[e];S.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Rl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?h[i.reply]:null,hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))):void 0})),a.a.createElement("div",{style:{marginBottom:"15px",clear:"both"}})),e.data&&e.data._id&&a.a.createElement(Bl,{nodeId:e.data._id,onSending:function(){I()},placeholder:"Escreva um coment\xe1rio"}))})));var Wl=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(bl)((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",{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($l,{data:o},a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(et,{icon:"settings_input_antenna",title:Object(S.s)("$__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 Ul(){Ul=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 Vl=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(bl)((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)(Ul().mark((function e(){var t,r,n,a;return Ul().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,dt.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(mn,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(mn,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(yn,{xs:12,sm:10,md:8,lg:6,xl:6},a.a.createElement(Wl,{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(br,null))))})));function ql(){ql=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 Xl=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)(ql().mark((function e(t,r){var n,a;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y.current&&b(!0),e.prev=2,e.next=5,dt.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(mn,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(mn,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(yn,{xs:12,sm:6,md:6,lg:6,xl:6},a.a.createElement(Wl,{db:"cards",data:s[e],onClick:function(){window.open(s[e].link,"_blank")}})))})):a.a.createElement(mn,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(yn,{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(br,null))))}));var Jl=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(dl,null),t[1]&&"home"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Vl,null)),t[1]&&"read"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(hl,null),a.a.createElement(Xl,null)),t[1]&&"insight-boards"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(hl,null),a.a.createElement(gl,null)),t[1]&&"radar"===t[1]&&a.a.createElement("div",{style:{top:33}},a.a.createElement(xl,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&a.a.createElement(a.a.Fragment,null,a.a.createElement(hl,null),a.a.createElement(Nl,null)),t[1]&&"hideFeeds"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(hl,null),a.a.createElement(Nl,{showHidden:!0})),t[1]&&"allNews"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(hl,null),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement(Tl,null))))})),Kl=r(799),Zl=r(1085),Ql=r.n(Zl),es=(r(1563),Object(ae.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"}}}))(we.a));r(1564),r(1565);var ts=Object(n.memo)((function(e){var t=Object(G.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(S.d)("color")),backgroundColor:"#FFFFFF"}}}))(),r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1],c=a.a.useRef(null),l=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(){i(!1),e.onClose&&e.onClose()}),100)};function s(t){"Tab"===t.key&&(t.preventDefault(),i(!1),e.onClose&&e.onClose())}return a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},e.style?e.style:{}),e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},a.a.createElement("div",{style:Object(p.a)({display:"flex",alignItems:"center"},e.onClick?{pointerEvents:"none"}:{})},a.a.createElement(we.a,{title:Object(S.s)("$__options",1)},e.hideText?a.a.createElement(je.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement(Z.a,{usePropagation:!0,size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"})):a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Fe.a,{ref:c,"aria-controls":o?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){i((function(e){return!e})),!o&&e.onOpen&&e.onOpen(),o&&e.onClose&&e.onClose(),t.stopPropagation()},className:e.active?t.active:e.transparent?t.iconButtonStyleTransaparent:t.iconButtonStyleWhite},a.a.createElement("div",{style:Object(p.a)({display:"flex",alignItems:"center",pointerEvents:"none"},e.icon?{}:{paddingLeft:7})},e.icon?a.a.createElement("div",{style:{marginTop:-2,marginRight:7}},a.a.createElement(Z.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:e.icon})):a.a.createElement(a.a.Fragment,null),a.a.createElement("span",{style:{marginRight:"15px",color:e.textColor?e.textColor:e.color?e.color:Object(S.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text||"BUTTON_NAME"),e.popper||e.options?a.a.createElement(Z.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(S.d)("menu"),icon:"arrow_drop_down"}):a.a.createElement(a.a.Fragment,null)))))),e.popper||e.options?a.a.createElement(Me.a,{open:o,anchorEl:c.current,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ne.a,Object.assign({},r,{style:Object(p.a)(Object(p.a)({},"bottom"===n?{transformOrigin:"center top"}:{transformOrigin:"center bottom"}),{},{zIndex:"100 !important"})}),a.a.createElement($e.a,{style:{marginTop:5}},a.a.createElement(De.a,{onClickAway:function(e){l(e)}},e.popper?e.popper:e.options&&e.options.length>0?a.a.createElement(Pe.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 a.a.createElement(Ae.a,{key:r,style:{color:t&&t.color?t.color:Object(S.d)("menu"),padding:"12px 7px"},className:"ignoreClickAway",onClick:function(r){e.stopPropagation&&l(r),t.onClick&&t.onClick(),e.onClose&&e.onClose(),r.preventDefault(),r.stopPropagation()},disabled:!!t.disabled},a.a.createElement("div",{style:{pointerEvents:"none"}},t.render?t.render:t.avatar?a.a.createElement(Ie.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)):a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},a.a.createElement(Z.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(S.d)("menu")})),!t.render&&a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.s)(t.name,1))))}))):a.a.createElement(a.a.Fragment,null))))})):a.a.createElement(a.a.Fragment,null))}));function rs(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(ts,{text:Object(S.s)("$__showActivitiesType"),icon:"collections_bookmark",options:[].concat(Object(ge.a)(i.type.filter((function(e){return e.calendar})).map((function(e){return{name:Object(S.s)("".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.s)("$__showAll",1):Object(S.s)("$__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 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=Ql()(Kl.a),os={allDay:Object(S.s)("$__allDay"),previous:"<",next:">",today:Object(S.s)("$__today"),month:Object(S.s)("$__month"),week:Object(S.s)("$__week"),day:Object(S.s)("$__aday"),agenda:Object(S.s)("$__agenda"),date:Object(S.s)("$__date"),time:Object(S.s)("$__hour"),event:Object(S.s)("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(Object(S.s)("$__activities"))}};function is(e){l.a.getState().session,e.localizer.messages;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.s)("$__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.s)("$__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.s)("$__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.s)("$__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.s)("$__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.s)("$__month"))))}var cs=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(null),g=Object(m.a)(h,2),b=g[0],y=(g[1],a.a.useState("week")),v=Object(m.a)(y,2),x=v[0],_=v[1],O=a.a.useState(la()().toLocaleString()),w=Object(m.a)(O,2),j=w[0],E=w[1],k=a.a.useState(null),L=Object(m.a)(k,2),C=(L[0],L[1]),I=a.a.useState(!1),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState([]),z=Object(m.a)(M,2),Y=z[0],B=z[1];la.a.locale(i.language?i.language.toLowerCase():"pt-br",{week:{dow:1}});var R=Object(Kl.b)(la.a);a.a.useEffect((function(){var e=i&&i.calendarPreffers?JSON.parse(i.calendarPreffers):{};e.view&&_(e.view),e.view&&D(e.showAllEvents),e.severalDaysActivities&&$(e.severalDaysActivities),e.disabledTypes&&B(Array.from(e.disabledTypes))}),[]),a.a.useEffect((function(){H()}),[e.cards,r]),a.a.useEffect((function(){H(),G()}),[P,Y]);var G=function(){var e=Object(f.a)(ns().mark((function e(){var t;return ns().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(Y),showAllEvents:F,severalDaysActivities:P,view:x}),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)}}(),H=function(){var e=Object(f.a)(ns().mark((function e(){var t;return ns().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)&&la()(1e3*l.a.getState().db.cards[e].startDate).isValid()&&la()(1e3*l.a.getState().db.cards[e].endDate).isValid()&&(0===Y.length||Y.length>0&&-1===Y.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&&(P||!P&&la()(1e3*l.a.getState().db.cards[e].startDate).format("YYYY-MM-DD")===la()(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.map((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)})).map((function(e){var r=!1,n=la()(1e3*l.a.getState().db.cards[e].startDate).toDate(),a=la()(1e3*l.a.getState().db.cards[e].endDate).toDate(),o=la()(1e3*l.a.getState().db.cards[e].endDate).unix("x")-la()(1e3*l.a.getState().db.cards[e].startDate).unix("x");("00:00:00"===la()(1e3*l.a.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===la()(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,b,a.a.createElement(dl,null),a.a.createElement(mn,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},a.a.createElement(Ye,{text:Object(S.s)("$__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.s)("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:Object(S.s)("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(ge.a)(o.status.map((function(e){return{name:Object(S.s)("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:Object(S.s)("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(ge.a)(o.priority.map((function(e){return{name:Object(S.s)("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),a.a.createElement(rs,{options:Y,onChange:function(e){B(e)}}),a.a.createElement(Ye,{text:Object(S.s)("$__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.s)("$__showAllEvents","*"),icon:F?"check_circle_outline":"radio_button_unchecked",onClick:function(){D((function(e){return!e}))}},{name:Object(S.s)("$__activitiesTInSeveralDays","*"),icon:P?"check_circle_outline":"radio_button_unchecked",onClick:function(){$((function(e){return!e}))}}]})),a.a.createElement(yn,{xs:12,sm:12,md:12},a.a.createElement(Li,null,a.a.createElement(Fi,null,a.a.createElement(as,{selectable:!0,localizer:R,events:u,messages:os,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:la()(e.start).unix("x"),endDate:la()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){_(e)},onSelectEvent:function(e){C(e._id),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=la()(new Date(t)).unix("x"),s=la()(new Date(r)).unix("x");la()(new Date(r)).unix("x")<la()().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"===x||"day"===x?{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=(la()(t.startDate).unix("x"),la()(t.endDate).unix("x"),l.a.getState().db.cards[t._id]);l.a.getState().db.status.filter((function(e){return e.value===r.status}))[0].color;la()(t.endDate).format("YYYY-MM")===la()().format("YYYY-MM")&&(la()(t.endDate).format("DD"),la()().format("DD"));var 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(es,{leaveDelay:800,title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",zIndex:5e3}},a.a.createElement(on,{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(Se.a,{overlap:"rectangular",size:"12px",icon:n,color:"bkack",title:Object(S.s)("$__".concat(r.type))})),t.title))},toolbar:is,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){j&&la()(e).format("YYYY-MM")===la()(j).format("YYYY-MM")||E(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&_(r)},view:x,onEventResize:function(t){Object(at.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:la()(t.start).unix("x"),endDate:la()(t.end).unix("x")})},onEventDrop:function(t){Object(at.O)(Object(p.a)(Object(p.a)({},e),{},{data:{_id:t.event._id}}),{startDate:la()(t.start).unix("x"),endDate:la()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:F,popup:!0,resizable:!0,defaultView:"week"}))),a.a.createElement("div",{style:{height:300,width:"100%"}}))))})),ls=r(1923),ss=r(1086),us={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}};var ds=Object(u.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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;if(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)return!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(mn,{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.s)("$__myChannels"),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ts,{style:{marginRight:7,marginLeft:7},text:Object(S.s)("$__channels"),active:!c,onClick:function(){s(!1)}}),a.a.createElement(ts,{text:Object(S.s)("$__showMyRequests"),active:c,onClick:function(){s(!0)}}))),c?a.a.createElement(yn,{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.s)("$__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.s)("$__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.s)("$__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.s)("$__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(ss.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(yn,{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(El.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))}))),ps=r(1087),fs=r.n(ps),hs=r(1088),ms=r.n(hs);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 bs=Object(u.b)((function(e){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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(ls.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)(gs().mark((function e(){var t;return gs().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)}}(),N=O()().format("YYYY-MM-DD"),A=window.location.hash.split("/");A[0]=A[0].replace("#","");var P=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")!==N||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(N)).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")!==N)))})).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(on,{db:"cards",data:t,noShadow:!0,suggestion:!0}),a.a.createElement(Fe.a,{onClick:function(){Object(at.K)(e,{_id:t._id,userId:n._id,option:!0})}},a.a.createElement(Z.a,{icon:"add",color:Object(S.d)("menu"),title:Object(S.s)("$__addOnMyDay")})))})),$=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")!==N)&&(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(N)).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(N)).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(on,{db:"cards",key:e._id,data:e,noShadow:!0})})),M=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}))]:{},z=new Date,Y=z.getHours()>=0&&z.getHours()<5?"$__goodNight":z.getHours()>=5&&z.getHours()<12?"$__goodMorning":z.getHours()>=12&&z.getHours()<18?"$__goodAfternoon":"$__goodNight",B=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(on,{db:"cards",data:t,noShadow:!0}))}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(mn,null,E.banner||n.hideSupportAndAppBanner?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement(yn,{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.s)(Y,1),", ",M&&M.displayName?M.displayName:M.name?M.name:"","!"),a.a.createElement(mn,{style:{width:"100%"}},a.a.createElement(yn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("img",{alt:"MACHEN_IMAGE",src:ms.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(yn,{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.s)("$__supportWelcomeMessage",1))}}),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},a.a.createElement(k.a,{title:Object(S.s)("$__clickToaccessSupportPage","*"),text:Object(S.s)("$__clickToaccessSupportPage"),color:Object(S.d)("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),a.a.createElement(yn,{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:fs.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.s)("$__hideSupportAndAppBanner","*"),text:Object(S.s)("$__hideSupportAndAppBanner"),color:Object(S.d)("menu"),icon:"close",onClick:function(){D()},size:"12px"})))))),B.length>0?a.a.createElement(mn,{style:{marginTop:"33px",marginBottom:"33px"}},a.a.createElement(yn,{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.s)("$__favoritePlans"),B.length>3?a.a.createElement(k.a,{title:"".concat(Object(S.s)("$__viewAllFavorites","*")," (").concat(B.length,")"),text:"".concat(Object(S.s)("$__viewAllFavorites","*")," (").concat(B.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(mn,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},B.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(yn,{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(on,{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(R,null,a.a.createElement(ds,null)),a.a.createElement(mn,{style:{paddingBottom:33,marginTop:33}},a.a.createElement(yn,{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(Fe.a,{onClick:function(){d(!1)}},a.a.createElement(Z.a,{icon:"undo",color:Object(S.d)("menu"),title:Object(S.s)("$__backToMyDay")})),Object(S.s)("$__taskSuggestions")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(rs,{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,P)):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.s)("$__myDay"),P.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(Z.a,{icon:"info",color:Object(S.d)("medium"),style:{marginRight:"15px"}}),Object(S.s)("$__clickHereToCheckTaskSuggestions"))),a.a.createElement(pr,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))),a.a.createElement(yn,{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.s)("$__nextTasks")),a.a.createElement("div",null,a.a.createElement(k.a,{title:Object(S.s)("$__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,$))),G.length>0?a.a.createElement(yn,{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.s)("$__myFavorites"))),a.a.createElement("div",null,H))):a.a.createElement(a.a.Fragment,null)))}))),ys=(r(975),r(299)),vs=r.n(ys);var xs=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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(mn,null,t.GlobalData.strategicStatement?a.a.createElement(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(R,null,a.a.createElement(bs,null)),a.a.createElement(mn,{style:{paddingBottom:33}},a.a.createElement(yn,{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.s)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(Tl,{max:6,horizontal:!0})))),a.a.createElement(yn,{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.s)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(xl,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(yn,{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.s)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllInsights"),color:"white",icon:vs.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(gl,{max:6,horizontal:!0,noPagination:!0}))))))})));var _s=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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(mn,{style:{paddingBottom:33}},a.a.createElement(yn,{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.s)("$__lastAddInsights","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllInsights"),color:"white",icon:vs.a,transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(gl,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(yn,{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.s)("$__lastAddRadar","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(xl,{max:6,horizontal:!0,noPagination:!0}))))),r?a.a.createElement(mn,null,t.GlobalData.strategicStatement?a.a.createElement(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__strategicStatement",1),icon:"history_edu",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__presidentMessage",1),icon:"account_box",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__vocation",1),icon:"spoke",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__history",1),icon:"menu_book",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__values",1),icon:"join_inner",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(yn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement(Li,{style:{height:"calc(100% - 33px)"}},a.a.createElement(Ke,{title:Object(S.s)("$__legacy",1),icon:"subtitles",color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Fi,{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(R,null,a.a.createElement(bs,null)),a.a.createElement(mn,{style:{paddingBottom:33}},a.a.createElement(yn,{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.s)("$__lastNews","*")),a.a.createElement(k.a,{title:Object(S.s)("$__save","*"),text:Object(S.s)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){c.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(R,null,a.a.createElement(Tl,{max:6,horizontal:!0}))))))}))),Os=r(648),ws=r.n(Os);var js=function(e){var t=l.a.getState(),r=t.db,n=t.session,o=(r.dataType,e.data),i=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),c=a.a.useState(null),s=Object(m.a)(c,2),u=s[0],d=s[1],p=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[o._id]&&e._users[o._id].myDay&&(!e.private||e.private&&e._users[n._id])&&O()(new Date(1e3*parseInt(e._users[o._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===i})).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(on,{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"}},(o.name,o.name)," (",p.length,")")),!u||o.image&&o.image!==u?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(o.image?o.image:ws.a),onError:function(e){e.target.src="".concat(ws.a)},onLoad:function(e){d("".concat(o.image?o.image:ws.a))},width:"100%"}):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(u,'")'),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"}},p)))};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(u.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((function(e){var t=l.a.getState().db,r=(t.dataType,t.users),n=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object(S.j)();if(a.a.useEffect((function(){return c||(l.a.getState().session.cards.adminViewLoader||d(),s(!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]),u&&u.plan&&!u.planAdmin&&!u.planModerate)return console.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"),a.a.createElement(a.a.Fragment,null);var d=function(){var t=Object(f.a)(Es().mark((function t(r){return Es().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)}}(),h=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")===n})).length>0})).map((function(e){return l.a.getState().db.cards[e]}));console.log("----------------------------------------------",h.length);var g=Object.keys(r).filter((function(e){return!r[e].deleted&&"user"===r[e].type&&(!r[e]._parent||""===r[e]._parent)&&h.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")===n})).length>0})).sort((function(e,t){return r[e].name<r[t].name?-1:r[e].name>r[t].name?1:0})).map((function(e){return r[e]}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(mn,null,a.a.createElement(yn,{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.s)("$__dayTasks",1))),g.map((function(e){return a.a.createElement(yn,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},a.a.createElement(js,{data:e}))}))))})));var Ss=Object(u.b)((function(e,t){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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(R,null,a.a.createElement(dl,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(R,null,a.a.createElement(_s,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(R,null,a.a.createElement(ks,null))):a.a.createElement("div",null,a.a.createElement(dl,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(R,null,a.a.createElement(xs,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(R,null,a.a.createElement(ks,null)))}))),Ls=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:U.O,padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(p.a)(Object(p.a)({},U.H),{},{fontSize:"13.7em",color:U.O,letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},Cs=Object(G.a)(Ls);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 Ts=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([]),v=Object(m.a)(y,2),x=(v[0],v[1]),_=a.a.useState(0),O=Object(m.a)(_,2),w=O[0],j=O[1],E=a.a.useState(10),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],N=(F[1],a.a.useState(P)),A=Object(m.a)(N,2),P=A[0],$=(A[1],a.a.useState([])),M=Object(m.a)($,2),z=M[0],Y=M[1],B=a.a.useState(0),G=Object(m.a)(B,2),H=G[0],W=G[1],U=a.a.useState("created_at"),V=Object(m.a)(U,2),q=V[0],X=V[1],J=a.a.useState(!0),K=Object(m.a)(J,2),Q=K[0],ee=K[1],te=a.a.useState(""),re=Object(m.a)(te,2),ne=re[0],ae=re[1],oe=a.a.useState(!0),ie=Object(m.a)(oe,2),ce=ie[0],le=ie[1],se=a.a.useState({}),ue=Object(m.a)(se,2),de=ue[0],pe=ue[1],fe=a.a.useState(""),he=Object(m.a)(fe,2),me=he[0],ge=he[1],be=a.a.useState({all:{name:Object(S.s)("$__all",1),icon:"inventory",open:!1,size:0,type:"all"},users:{name:Object(S.s)("$__users",1),open:!1,size:0,type:"user"},plans:{name:Object(S.s)("$__plans",1),open:!1,size:0,type:"plan"},myCards:{name:Object(S.s)("$__unlinkedCards",1),open:!1,size:0,type:"myTask"}}),ve=Object(m.a)(be,2),xe=(ve[0],ve[1],window.location.hash.split("/"));xe[0]=xe[0].replace("#","");var _e=null;xe[0]&&36===xe[0].length&&l.a.getState().db.cards[xe[0]]&&l.a.getState().db.cards[xe[0]]._users&&l.a.getState().db.cards[xe[0]]._users[n._id]&&(_e=xe[0]),a.a.useEffect((function(){return Oe({id:_e}),Qo(),function(){Y([]),pe({}),le(!0)}}),[]),a.a.useEffect((function(){g&&we({id:g})}),[g]),a.a.useEffect((function(){j(0),le(!0),x([]),c||s(!0);var e=setTimeout((function(){z&&we({id:_e})}),1e3);return function(){return clearTimeout(e)}}),[ne]),a.a.useEffect((function(){we({id:_e})}),[D,w,C,q,Q]);var Oe=function(){var e=Object(f.a)(Is().mark((function e(t,r){var n,a;return Is().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qo({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||de,_e&&(a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},_e,{name:l.a.getState().db.cards[_e].name,parent:l.a.getState().db.cards[_e]._parent,private:null,type:"plan",_id:_e,open:!0}))),n.map((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)))})),pe(a));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),we=function(){var e=Object(f.a)(Is().mark((function e(t){var r;return Is().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ei({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:C,skip:w*C,asc:!Q,orderBy:q||"created_at",search:ne});case 2:(r=e.sent)&&(W(r&&r[0]&&r[0].total?parseInt(r[0].total):0),Y(r),le(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),je=[],Ee=function(e){var t=q,r=Q;q===e?r=!Q:t=e,X(t),ee(r)},ke=function(){var e=Object(f.a)(Is().mark((function e(t){var r,n,a,o,i,c,l=arguments;return Is().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=de,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(de).filter((function(e){return de[e].parent===a})).length?Oe({id:a,type:i},c):pe(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Se=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)&&(ke({id:n},!de[n]||!de[n].open),b(n)),e.preventDefault(),e.stopPropagation()}},a.a.createElement(Ke,{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.s)("$__private"):t.name),icon:t.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===t.type}))[0].icon||"$__topic",fontSize:"12px"}),de[n]&&de[n].open?Le(n):a.a.createElement(a.a.Fragment,null))},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(de).filter((function(t){return!e||e&&de[t].parent===e})).length>0?Object.keys(de).filter((function(t){return!e||e&&de[t].parent===e})).sort((function(e,t){return de[e].name.toLowerCase().trim()<de[t].name.toLowerCase().trim()?-1:de[e].name.toLowerCase().trim()>de[t].name.toLowerCase().trim()?1:0})).map((function(e){return Se(de[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement(R,null,a.a.createElement("div",{style:e.expanded?{width:"calc(100% - 220px)",marginLeft:"220px"}:{width:"calc(100% - 0px)",marginLeft:"0px"}},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(ye,{label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:ne,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{color:Object(S.d)("color")},"search")),onChange:function(e){ae(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"===q&&Q?Object(S.s)("$__mostRecent",1):Object(S.s)("$__olderFirst",1),color:"created_at"===q?Object(S.d)("color"):"gray",icon:"calendar_month",onClick:function(){Ee("created_at")},size:"25px"}),"created_at"===q&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},Q?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(Z.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},Q?"south":"north"))),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(k.a,{id:"sideModule_saveButton",title:"name"===q&&Q?Object(S.s)("$__nameDesc",1):Object(S.s)("$__nameAsc",1),color:"name"===q?Object(S.d)("color"):"gray",icon:"sort_by_alpha",onClick:function(){Ee("name")},size:"25px"}),"name"===q&&a.a.createElement("div",{style:Object(p.a)(Object(p.a)({position:"absolute"},Q?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(Z.a,{size:"15px",color:Object(S.d)("menu"),style:{marginLeft:"-3px"}},Q?"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(Ke,{title:Object(S.s)("$__folders",1),icon:"folder",fontSize:"20px",color:Object(S.d)("menu")}),a.a.createElement(ye,{label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:me,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{color:Object(S.d)("lightgray")},"search")),onChange:function(e){ge(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(de).filter((function(e){return((!xe[0]||xe[0]&&36!==xe[0].length)&&!de[e].parent||xe&&xe[0]&&36===xe[0].length&&de[e]._id===xe[0])&&(""===me||me&&de[e].name.toLowerCase().indexOf(me.toLowerCase().trim())>-1)})).sort((function(e,t){return de[e].name.toLowerCase().trim()<de[t].name.toLowerCase().trim()?-1:de[e].name.toLowerCase().trim()>de[t].name.toLowerCase().trim()?1:0})).map((function(e){return Se(de[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(Ke,{title:Object(S.s)("$__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.s)("$__page")," ",w+1," ",Object(S.s)("$__of")," ",Math.ceil(H/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.a,{component:"div",count:H,page:w,onPageChange:function(e,t){j(t)},rowsPerPage:C,onRowsPerPageChange:function(e){I(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.s)("$__filesPerPage")})))),ce?a.a.createElement(br,null):z&&z.length>0?z.map((function(t,r){je.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(ui,{data:o,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:je,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),H>10?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:"15px",display:"flex",alignItems:"center",justifyContent:"center"}},Object(S.s)("$__page")," ",w+1," ",Object(S.s)("$__of")," ",Math.ceil(H/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.a,{component:"div",count:H,page:w,onPageChange:function(e,t){j(t)},rowsPerPage:C,onRowsPerPageChange:function(e){I(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.s)("$__filesPerPage")}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{style:{clear:"both"}}))))})),Fs=r(423),Ds=r(792),Ns=r.n(Ds),As=r(1089),Ps=r.n(As),$s=r(1808),Ms=r(1836),zs=r(1809),Ys=r(1805),Bs={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:U.q[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:U.z[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:U.j[0]}},underlineSuccess:{"&:after":{borderColor:U.G[0]}},labelRoot:Object(p.a)(Object(p.a)({},U.l),{},{color:U.q[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:U.j[0]+" !important"},labelRootSuccess:{color:U.G[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:U.q[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:U.O},"&:after":{backgroundColor:U.O}},input:{color:U.q[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:U.q[3]}},whiteInput:{"&,&::placeholder":{color:U.O,opacity:"1"}}},Rs=Object(G.a)(Bs);function Gs(e){var t,r,n,o,i,c=Rs(),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($s.a,Object.assign({},l,{className:i}),void 0!==s?a.a.createElement(Ms.a,Object.assign({className:c.labelRoot+" "+v,htmlFor:u},d),s):null,a.a.createElement(Ys.a,Object.assign({classes:{input:w,root:O,disabled:c.disabled,underline:_},id:u},p)),void 0!==y?a.a.createElement(zs.a,{id:u+"-text",className:j},y):null)}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}r(207).config();var Ws="".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")),Us=Object(G.a)(Gc);var Vs=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=Us(),k=function(){var t=Object(f.a)(Hs().mark((function t(){var r,a,o,i;return Hs().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.s)("$__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.s)("$__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.s)("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return j(!0),t.next=15,Ns.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,Ns.a.hash(String(n.password),10);case 18:if(a=t.sent,o=Object(Fs.encode)("".concat(a,"//").concat(Ws)),!(r&&a&&o)){t.next=32;break}return t.prev=21,t.next=24,dt.a.post("/Login",Object(Fs.encode)(Object(Fs.encode)(JSON.stringify({lp:o,login:n.email,password:Object(Fs.encode)("".concat(r,"///").concat(Object(Fs.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.s)("$__".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.s)("$__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)(Hs().mark((function t(){var r;return Hs().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.s)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,dt.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.s)("$__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)(Hs().mark((function t(r){var n;return Hs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Object(S.s)("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,dt.a.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Object(S.s)("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Object(S.s)("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Object(S.s)("$__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(mn,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(yn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement(Li,{db:"cards",login:!0},a.a.createElement(Pi,{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.s)("$__login"))),a.a.createElement(Fi,null,h?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__token",1)),a.a.createElement(ye,{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(ut.a,{position:"end"},a.a.createElement(La.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(Gs,{labelText:Object(S.s)("$__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(ut.a,{position:"end"},a.a.createElement(Ps.a,{className:E.inputAdornmentIcon}))}}),a.a.createElement(Gs,{labelText:Object(S.s)("$__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(ut.a,{position:"end"},a.a.createElement(La.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),a.a.createElement(et,{icon:"lock",text:Object(S.s)("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){C(n.email)}}))),a.a.createElement(Rc,{className:E.justifyContentCenter},h?a.a.createElement(Nn,{style:{backgroundColor:w?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return L()}},Object(S.s)("$__validateTokenAndSigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(br,null)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(Nn,{style:{backgroundColor:w?"gray":Object(S.d)("menu"),color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return k()}},Object(S.s)("$__sigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(br,null)):a.a.createElement(a.a.Fragment,null)))))))})),qs=Object(G.a)(Ls);var Xs=Object(G.a)(Ls);var Js,Ks={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(p.a)(Object(p.a)({},U.l),{},{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 Zs,Qs=j.b.div(Js||(Js=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                ")})),eu=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(ae.a)(Ks)(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(at.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.s)(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.s)(x[e.column.name.replace("$__","")].name,1)),x&&x[e.column.name.replace("$__","")]&&x[e.column.name.replace("$__","")].icon&&(v=Object(S.s)(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(at.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(Vt.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(on,{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(Vt.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){return a.a.createElement(Qs,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(na,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(at.O)(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.s)("$__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(Vt.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(ua.a,{style:{width:"100%",height:"100%"}},(function(r){var n=r.height,o=r.width;return a.a.createElement(sa.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(et,{text:Object(S.s)("$__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 tu(){tu=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 ru=j.b.div(Zs||(Zs=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                ")})),nu=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)(tu().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y;return tu().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)(tu().mark((function e(t){return tu().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)(tu().mark((function e(t){return tu().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(Vt.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(Vt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(ru,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(eu,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"}}))})))}));var au=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({}),s=Object(m.a)(c,2),u=s[0],d=s[1],f=a.a.useState(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),g=Object(m.a)(f,2),b=g[0],v=g[1],x=a.a.useRef();a.a.useEffect((function(){v(e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]),a.a.useEffect((function(){e.defaultValues&&e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},b,Object(p.a)(Object(p.a)({},e.defaultValues||{}),l.a.getState().searchs[b]||{})))),JSON.stringify(e.searchs[b])!==JSON.stringify(u)&&d(Object(p.a)(Object(p.a)({},e.defaultValues||{}),l.a.getState().searchs[b]||{}))}),[b]);var _=function(t){var r=t.card,n=t.type;return console.log(r,n),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(Z.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[b].selectedCards;t[n]&&delete t[n],e.reduxFunction("ASYNC","SET_SEARCH",Object(p.a)(Object(p.a)({},l.a.getState().searchs),{},Object(h.a)({},b,Object(p.a)(Object(p.a)({},l.a.getState().searchs[b]||{}),{},{selectedCards:t}))))}}))};return a.a.createElement("div",{style:Object(p.a)({zIndex:"100 !important"},e.style?e.style:{})},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ts,{text:Object(S.s)("$__filter"),icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px",zIndex:1},ref:x,id:"cal-menufilter"},a.a.createElement(Ec,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"}},u.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.s)("$__text"),": ",a.a.createElement("span",{style:{color:Object(S.d)("darkText")}}," ",u.text)),u.startDate&&u.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*u.startDate).format("YYYY-MM-DD  HH:MM:ss")),a.a.createElement(Z.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*u.endDate).format("YYYY-MM-DD  HH:MM:ss")),a.a.createElement(Z.a,{size:"22px",color:Object(S.d)("color"),icon:"today",onClick:e.onClick}))),u.users&&u.users.length>0?a.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},a.a.createElement(zt,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!1,data:l.a.getState().db.cards[b],noLimit:!0,multiple:!0,selected:u.users,transparent:!0})):a.a.createElement(a.a.Fragment,null),u.tags&&a.a.createElement("div",{style:{display:"flex",fontSize:11}},u.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.r)(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)}))),u.status&&!u.status.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.s)("$__status"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(u.status).filter((function(e,t){return u.status[e]})).map((function(e,t){return a.a.createElement(we.a,{title:Object(S.s)(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"}}))})))),u.priority&&!u.priority.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.s)("$__priority"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(u.priority).filter((function(e,t){return u.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(we.a,{title:Object(S.s)(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"}}))})))),u.risk&&!u.risk.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.s)("$__risk"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(u.risk).filter((function(e,t){return u.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(we.a,{title:Object(S.s)(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"}}))})))),u.complexity&&!u.complexity.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.s)("$__complexity"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(u.complexity).filter((function(e,t){return u.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(we.a,{title:Object(S.s)(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"}}))})))),u.impact&&!u.impact.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(S.s)("$__impact"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(u.impact).filter((function(e,t){return u.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(we.a,{title:Object(S.s)(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)),u&&u.selectedCards&&Object.keys(u.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=u.selectedCards)||void 0===r?void 0:r.guideline)?a.a.createElement(_,{card:u.selectedCards.guideline,type:"guideline"}):a.a.createElement(a.a.Fragment,null),(null===(n=u.selectedCards)||void 0===n?void 0:n.objective)?a.a.createElement(_,{card:u.selectedCards.objective,type:"objective"}):a.a.createElement(a.a.Fragment,null),(null===(o=u.selectedCards)||void 0===o?void 0:o.goal)?a.a.createElement(_,{card:u.selectedCards.goal,type:"goal"}):a.a.createElement(a.a.Fragment,null),(null===(i=u.selectedCards)||void 0===i?void 0:i.action)?a.a.createElement(_,{card:u.selectedCards.action,type:"action"}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null))}));var ou=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=(t.searchs,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=a.a.useState(!1),h=Object(m.a)(f,2),g=h[0],b=h[1],v=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),x=window.location.hash.split("/");x[0]=x[0].replace("#","");var _=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();if(a.a.useEffect((function(){g||b(!0)}),[r.cards,r.users]),window.location.hash.split("/")[0].replace("#","")||c.a.push("t#tab/myTasks"),!r.cards)return null;var w=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 w=l.a.getState().session.cards.adminView?w.filter((function(e){if(!e.private||e.private&&e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})):w.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&&(w=w.filter((function(e){return-1===u.indexOf(e.type)}))),"tab"===x[0]&&"unreaded"===x[1]&&(w=w.filter((function(e){if(Object(at.j)(e._id).total>0)return!0})),"unreaded"),"tab"===x[0]&&"myDay"===x[1]&&(w=w.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")===v})).map((function(e){return e})),"myDay"),"tab"===x[0]&&"ourDay"===x[1]&&(w=w.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")===v})).length>0})).map((function(e){return e})),"ourDay"),"tab"===x[0]&&"private"===x[1]&&(w=w.filter((function(e){return e.private})).map((function(e){return e})),"nextTasks"),"tab"===x[0]&&"nextTasks"===x[1]&&(w=w.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(v)).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(v)).add(10,"days").format("YYYY-MM-DD")})).map((function(e){return e})),"nextTasks"),"tab"===x[0]&&"lateTasks"===x[1]&&(w=w.filter((function(e){return e.endDate&&O()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(v)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e})),"lateTasks"),"tab"===x[0]&&"unlinkedCards"===x[1]&&(w=w.filter((function(e){return!e.parent&&!e._parent})).map((function(e){return e})),"lateTasks"),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(rs,{options:u,onChange:function(e){d(e)}}),a.a.createElement(au,{fields:["text","date","users","tags","priority","complexity","risk","impact"],showFilters:!0,nodeId:_,style:{marginLeft:7},onChange:function(e){console.log(e)}})),a.a.createElement(na,{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(dl,null)),a.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},a.a.createElement(nu,{cards:w.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 iu=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(rl)((function(e){return a.a.createElement("div",{style:{width:"100%"}},"Resume")})));var cu=function(e){var t=wi.a.ExcelFile,r=wi.a.ExcelFile.ExcelSheet,n=wi.a.ExcelFile.ExcelColumn,o=e.data,i=[],c=[];return o.map((function(e){e.users.filter((function(e){return!e.deleted})).sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()})).map((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()})).map((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.s)("$__companies"),"_").concat(Object(S.s)("$__users")),element:a.a.createElement(k.a,{title:Object(S.s)("$__export"),text:Object(S.s)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:o.sort((function(e,t){return e.name<t.name})),name:Object(S.s)("$__accounts")},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__company",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__signaturePlan",1)),value:"plan"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__activeUsersCount",1)),value:"usersCount"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__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.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__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.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__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.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(S.s)("$__removed",1)),value:"deleted"}))})))};function lu(){lu=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 su=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(rl)((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)(lu().mark((function e(){var t,r;return lu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.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=la()(1e3*e.created_at).format("DD/MM/YYYY HH:mm:ss"),e.lastSession=e.lastSession?la()(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:la()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.s)(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:la()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(S.s)(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.s)("".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.s)("$__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.s)("$__users"),a.a.createElement(k.a,{transparent:!0,title:Object(S.s)("$__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.s)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("name")}},Object(S.s)("$__name")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){I("email")}},Object(S.s)("$__email")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("createdAt")}},Object(S.s)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("lastSession")}},Object(S.s)("$__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(cu,{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.s)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},Object(S.s)("$__company")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.s)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(S.s)("$__plan")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.s)("$__users")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(S.s)("$__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 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 du=Object(u.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(rl)((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)(uu().mark((function e(t,r,n,a){return uu().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.s)("$__page")," ",b+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(o).length/_),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.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.s)("$__aliasPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(ye,{label:Object(S.s)("$__search",1),variant:Object(S.d)("fieldVariant"),value:E,onChange:function(e){k(e.target.value)}}),a.a.createElement(et,{text:d?Object(S.s)("$__all","*"):Object(S.s)("$__onlyEmpty","*"),icon:d?"subtitles_off":"subtitles",iconColor:Object(S.d)("medium"),onClick:function(){p(!d)}})),a.a.createElement($e.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(S.s)("$__alias",1)),a.a.createElement("div",{className:t.column},Object(S.s)("$__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){if((!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))return!0})).sort((function(e,t){return e<t?-1:e>t?1:0})).map((function(e,r){if(r<=(b+1)*_&&r>=b*_)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(na,{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(na,{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(na,{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 pu=Object(u.b)((function(e){return{history:e.db.history}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(us)((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(iu,null),"tab"===t[0]&&"accounts"===t[1]&&a.a.createElement(su,null),"tab"===t[0]&&"languages"===t[1]&&a.a.createElement(du,null),"tab"===t[0]&&"tests"===t[1]&&a.a.createElement("div",{style:{width:"300px"}},a.a.createElement(Ja,{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")}))),fu={badge:{borderRadius:"12px",padding:"5px 12px",textTransform:"uppercase",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:U.O,textAlign:"center",verticalAlign:"baseline",display:"inline-block"},primary:{backgroundColor:U.z[0]},warning:{backgroundColor:U.N[0]},danger:{backgroundColor:U.j[0]},success:{backgroundColor:U.G[0]},info:{backgroundColor:U.u[0]},rose:{backgroundColor:U.D[0]},gray:{backgroundColor:U.q[0]}};Object(G.a)(fu);var hu=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:U.O,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:U.O,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(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.b)+", 0.4)"},info:{backgroundColor:U.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.u[0])+", 0.4)"},success:{backgroundColor:U.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.G[0])+", 0.4)"},danger:{backgroundColor:U.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.j[0])+", 0.4)"},warning:{backgroundColor:U.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.N[0])+", 0.4)"},primary:{backgroundColor:U.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(U.r)(U.b)+", 0.14), 0 7px 10px -5px rgba("+Object(U.r)(U.z[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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.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(U.r)(U.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(U.r)(U.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 mu(){mu=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 gu=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(hu)((function(e){var t=e.classes,r=l.a.getState(),n=r.db,o=r.session,i=r.functions,c=(r.chat,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})).map((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]).map((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)(mu().mark((function t(){return mu().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})).map((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).map((function(e,t){var r=i.files[e];y.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Hn,{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).map((function(e,t){var r=i.files[e];y.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Hn,{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(Jn,{nodeId:e.nodeId,onSending:function(){_()}}))})));function bu(){bu=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 yu=Object(G.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 vu=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=yu(),s="cards";i.nodeId&&l.a.getState().db.users[i.nodeId]&&(s="users");var u=function(){var t=Object(f.a)(bu().mark((function t(r,a){return bu().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})):(jr(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.s)("$__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(li,{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.s)(i.description)," - ",e,i.readed&&a.a.createElement(Z.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(Hn,{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(on,{db:"cards",cardId: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(mn,null,a.a.createElement(yn,{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(on,{db:"cards",cardId: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(yn,{xs:12,sm:12,md:8,lg:8,xl:8},a.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},a.a.createElement(gu,{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"})))))})),xu=function(e){var t,r;return{bar:{position:"fixed",top:"0px",left:"0px",width:"147px",height:"calc(100vh - 0px)"},item:{height:"47px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={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"},Object(h.a)(t,"alignItems","center"),Object(h.a)(t,"cursor","pointer"),t),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:(r={},Object(h.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(h.a)(r,e.breakpoints.down("sm"),{left:"0  !important",right:"auto !important"}),r),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 _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}r(207).config();var Ou=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(xu)((function(e){var t=l.a.getState(),r=t.db,n=(t.session,t.chat),o=t.notifications,i=t.timeline,s=e.classes,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],_=window.location.hash.split("/");_[0]=_[0].replace("#",""),a.a.useEffect((function(){h||g(!0)}),[o]);var O=function(){var t=Object(f.a)(_u().mark((function t(r,a,o){var i,l=arguments;return _u().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!==v||c.a.push(r),x(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)}}(),w=[],j=[];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})).map((function(e,t){-1===j.indexOf(o[e].nodeId)&&(w.push(e),j.push(o[e].nodeId))}));var E=[],k=[];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})).map((function(e,t){o[e].inNode&&o[e].inNode._id&&-1===k.indexOf(o[e].inNode._id)&&(E.push(e),k.push(o[e].inNode._id))})),r.myTasksMenuExpanded,a.a.createElement("div",null,a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{className:s.moduleTitle},Object(S.s)("$__notifications"))),a.a.createElement(yn,{xs:12,sm:6,md:4,lg:4,xl:4},a.a.createElement("div",{className:s.moduleTitle},Object(S.s)("$__cardsUpdated")),w.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(vu,{data:o[e],key:e})}))),a.a.createElement(yn,{xs:12,sm:6,md:8,lg:8,xl:8},a.a.createElement("div",{className:s.moduleTitle},Object(S.s)("$__timelineUpdated")),E.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(vu,{data:o[e],key:e,openChat:function(e,t){return O(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]:{}})})))))}))),wu={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 ju=Object(ae.a)(wu)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.root},a.a.createElement(gr.a,null))})),Eu=r(1835),ku={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:U.z[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Object(U.r)(U.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Object(U.r)(U.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:U.b,opacity:"0.26",color:U.b}},label:{cursor:"pointer",paddingLeft:"0",color:U.q[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Object(U.r)(U.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(U.r)(U.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:U.j[0]},radio:{color:U.z[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+U.z[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Object(U.r)(U.b)+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:U.q[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:U.q[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:U.D[0],"& > span:first-child":{borderColor:U.D[0]}}},iconCheckboxChecked:{color:U.D[0],"& > span:first-child":{borderColor:U.D[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:U.z[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Object(U.r)(U.b)+", 0.4)",color:U.O+" !important",border:"1px solid rgba("+Object(U.r)(U.b)+", .54)"},switchIconChecked:{borderColor:U.z[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Object(U.r)(U.q[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Object(U.r)(U.z[0])+", 1) !important"},"& $switchIcon":{borderColor:U.z[0]}}},Su=Object(p.a)(Object(p.a)({},ku),{},{cardTitle:Object(p.a)(Object(p.a)({},U.d),{},{textAlign:"center"}),container:Object(p.a)(Object(p.a)({},U.e),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Object(U.r)(U.b)+", 0.14), 0 6px 30px 5px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.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:U.q[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Object(U.r)(U.b)+", 0.26)"}});function Lu(){Lu=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 Cu=Object(G.a)(Su);r(976);function Iu(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 Tu=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:Iu({draggableStyle:t.draggableProps.style,virtualStyle:n,isDragging:o}),className:"item ".concat(o?"is-dragging":""),ref:t.innerRef}),a.a.createElement(on,{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)}}))},Fu=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(Vt.b,{draggableId:s._id,index:n,key:s._id},(function(t){return a.a.createElement(Tu,{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.map((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(Vt.c,{droppableId:r.id,mode:"virtual",renderClone:function(t,r,n){var o=u[n.source.index];return a.a.createElement(Tu,{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(ua.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(sa.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)}))}))})),Du=a.a.memo((function(e){var t=e.column,r=e.index,n=(e.searchs,a.a.useState(!1)),o=Object(m.a)(n,2),i=o[0],c=(o[1],a.a.useState(!1)),s=Object(m.a)(c,2),u=s[0],d=(s[1],a.a.useState(!1)),f=Object(m.a)(d,2),h=f[0],g=f[1];a.a.useEffect((function(){var e=new ResizeObserver((function(){g(y.current.clientHeight)}));return e.observe(y.current),function(){return e.disconnect()}}),[y]);var b=l.a.getState().db.cards[t.id],y=a.a.useRef(),v=0;return b.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})).map((function(e){v+=parseFloat(e.value)})),a.a.createElement(Vt.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:y},n.dragHandleProps),a.a.createElement(na,{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.s)("$__columnName"),customButtons:[{name:Object(S.s)("$__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"}]}),b&&b.description&&!i?a.a.createElement(El.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,b.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}},b.description.substr(0,133),"...")):a.a.createElement(a.a.Fragment,null),b.showSumValues&&v>0&&!u?a.a.createElement("div",{style:{position:"relative",width:"100%",color:"black",fontWeight:"bold",fontSize:12,padding:"0px 15px",paddingBottom:15}},"R$ ",v):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement(Fu,Object.assign({column:t,index:r},e,{discount:h||0})),a.a.createElement("div",{id:"AgileKanbanColumn_304",style:{position:"relative",float:"left",width:"100%",padding:"15px 7px"}},a.a.createElement(et,{text:Object(S.s)("$__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}}))}})))}))})),Nu=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)}))(Du);function Au(){Au=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 Pu(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 $u=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)(rr(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(at.t)(e.nodeId);function y(){return(y=Object(f.a)(Au().mark((function t(r){var n,a,i,c,s,u,d,f,m,g,b,y,v,x,_,O;return Au().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=15;break}if(a=Pu(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=11;break}return t.abrupt("return");case 11:if(!s||!s.showInPanel&&!s.onConcludedStepMoveTo){t.next=13;break}return t.abrupt("return");case 13:return JSON.stringify(a)!==JSON.stringify(o.columnOrder)&&Zt(a,"step"),t.abrupt("return");case 15: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(),b=g.session,!(parseInt(f.step)>=parseInt(l.a.getState().db.cards[r.source.droppableId].step)&&m._requireApproval&&m._users[b._id])||m._users[b._id].approvalResponsible){t.next=22;break}return t.abrupt("return");case 22:if(r.source.droppableId!==r.destination.droppableId){t.next=31;break}return y=o.columns[r.source.droppableId],v=Pu(y.items,r.source.index,r.destination.index),x={},_=[],v.forEach((function(e,t){x=Object(p.a)(Object(p.a)({},x),{},Object(h.a)({},e._id,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[e._id]),{},{order:"".concat(t+1)}))),-1===_.indexOf(e._id)&&_.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),x)})),Zt(_,"order"),t.abrupt("return");case 31:if(!(parseInt(f.step)>parseInt(l.a.getState().db.cards[r.source.droppableId].step)&&m._requireApproval&&m._users[b._id])||m._users[b._id].approvalResponsible){t.next=33;break}return t.abrupt("return");case 33:O=er(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?O=Object(p.a)(Object(p.a)({},O),{},{_requireApproval:!0}):!f.requireApproval&&d._requireApproval&&(O=Object(p.a)(Object(p.a)({},O),{},{_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]),O),{},{_parent:r.destination.droppableId})))}));case 36:case"end":return t.stop()}}),t)})))).apply(this,arguments)}a.a.useEffect((function(){i(rr(e.nodeId,{deleted:!1}))}),[e.cards,e.nodeId,e.searchs]);var v=function(){var t=Object(f.a)(Au().mark((function t(r){var n;return Au().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kt(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(Vt.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(Vt.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(Nu,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(na,{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.s)("$__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.s)("$__addColumn"),text:Object(S.s)("$__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(au,{nodeId:e.nodeId,fields:["text","date","tags","status","priority","impact","risk","complexity","users"],showFilters:!0})))})),Mu={container:Object(p.a)(Object(p.a)({},U.l),{},{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 zu,Yu,Bu=Object(ae.a)(Mu)(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,n=r.moveTo,a=(r.curve,r.duration,"translate(".concat(n.x,"px, ").concat(n.y,"px)"));return Object(p.a)(Object(p.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(a," ").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(Vt.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(on,{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 Ru,Gu=j.b.div(zu||(zu=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                ")})),Hu=j.b.div(Yu||(Yu=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                "})),Wu=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(ae.a)(Ks)((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(at.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.s)(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.s)(g[e.column.name.replace("$__","")].name,1)),a.a.createElement(Vt.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){var n,o;return a.a.createElement(Gu,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(na,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(at.O)(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.s)("$__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(Vt.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(Hu,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(Bu,{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(et,{text:Object(S.s)("$__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 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 Vu=j.b.div(Ru||(Ru=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                ")})),qu=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)(Uu().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y;return Uu().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)(Uu().mark((function e(t){return Uu().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)(Uu().mark((function e(t){return Uu().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(Vt.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(Vt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Vu,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(Wu,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"}}))})))}));var Xu=Object(u.b)((function(e,t){return{db:e.db}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=e.db,r=t.dataType,n=window.location.hash.split("/");if(n[0]=n[0].replace("#",""),!t.cards)return a.a.createElement("div",null);var o=Object.keys(t.cards).filter((function(a){if(!t.cards[a].checklist&&t.cards[a]._planId===n[0]&&("actions"===e.type&&t.cards[a]&&t.cards[a].type&&"objective"!==t.cards[a].type&&"goal"!==t.cards[a].type&&"plan"!==t.cards[a].type&&"link"!==t.cards[a].type&&"insight"!==t.cards[a].type&&"chatGroup"!==t.cards[a].type&&-1===t.cards[a].type.indexOf("guideline")&&"swot"!==r.filter((function(e){return e.name===t.cards[a].type}))[0].module||"guidelines"===e.type&&t.cards[a].type.indexOf("guideline")>-1||"objectives"===e.type&&t.cards[a].type.indexOf("objective")>-1||"goals"===e.type&&t.cards[a].type.indexOf("goal")>-1))return!0})).map((function(e){return t.cards[e]}));return a.a.createElement("div",null,a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement(au,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0}),a.a.createElement(na,{title:null,icon:null,color:Object(S.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:t.orderByTitle?"$__orderByName":"$__orderByManualOrder",icon:t.orderByTitle?"sort":"format_list_numbered",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(p.a)(Object(p.a)({},l.a.getState().db),{},{orderByTitle:!t.orderByTitle}))}},t.orderByTitle&&{title:"ASC"===t.orderByTitlePosition?"$__asc":"$__desc",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"===t.orderByTitlePosition?"DESC":"ASC"}))}}]})),a.a.createElement(qu,{cards:o}))})),Ju=r(793),Ku=(r(1576),r(1577),Object(u.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i=window.location.hash.split("/");i[0]=i[0].replace("#","");var c=l.a.getState().db,s=Object(S.j)(),u=Object(at.t)(i[0]);return a.a.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden"}},!e.preview&&a.a.createElement(Li,{style:{marginTop:"0",height:"100%"}},e.edit?a.a.createElement("div",{style:Object(p.a)({width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3"},e.styles)},a.a.createElement(Z.a,{size:24,style:Object(p.a)({alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},e.styles)},"blur_on"),a.a.createElement("p",{style:Object(p.a)({margin:"0px",marginLeft:"7.5px",alignSelf:"center",fontWeight:"bold",marginTop:"1px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},e.styles)},Object(S.s)("$__planResume",1)),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(Z.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(Z.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"))):a.a.createElement(Ke,{title:Object(S.s)("$__planResume",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:"12.8px",borderRadius:"5px 5px 0px 0px ",fontWeight:"normal",borderBottom:"1px solid #D3D3D3"},moreButton:!0,optionsProps:{transparent:!0,btColor:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},options:u&&parseInt(u)>3||s.owner||s.planAdmin||s.planEdit||s.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(p.a)(Object(p.a)({},l.a.getState().sideModule),{},{db:"cards",id:i[0],module:"cardEdit",activeModule:"cardEdit",data:c.cards[i[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Fi,null,a.a.createElement("div",null,a.a.createElement("div",{style:{width:"100%",color:Object(S.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.s)("$__name",1),":")," ",null===(t=c.cards[i[0]])||void 0===t?void 0:t.name),a.a.createElement("div",{style:{width:"100%",color:Object(S.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.s)("$__description",1),":")," ",null===(r=c.cards[i[0]])||void 0===r?void 0:r.description),!(null===(n=c.cards[i[0]])||void 0===n?void 0:n.isTemplate)&&c.cards[i[0]]&&(null===(o=c.cards[i[0]])||void 0===o?void 0:o._users)&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Object(S.d)("menu"),fontWeight:"bold"}},Object(S.s)("$__users","*"),":"),a.a.createElement(So,{_id:i[0],noLimit:!0,avatarSize:"33px",permission:!0}))))))}))),Zu=(r(1578),["children","className"]),Qu=Object(G.a)({grid:{padding:"0 15px"}});function ed(e){var t=Qu(),r=e.children,n=e.className,o=Object(dn.a)(e,Zu);return a.a.createElement(pn.a,Object.assign({item:!0},o,{className:t.grid+" "+n}),r)}var td=r(1806);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)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t=a.a.useState({editor:!1,text:"",height:"auto"}),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=window.location.hash.split("/");d[0]=d[0].replace("#","");var h=l.a.getState().db,g=function(){var t=Object(f.a)(rd().mark((function t(r){return rd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.text&&!r){t.next=6;break}return t.next=3,Object(at.G)(e,!1,Object(p.a)(Object(p.a)({},h.cards[d[0]]),{},{note:r?null:n.text}));case 3:t.sent&&Object(S.c)({message:Object(S.s)("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),o({editor:!1,text:r?"":n.text,height:"auto"});case 6:u(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:{width:"100%",height:"100%"}},a.a.createElement(Li,{style:{marginTop:"0",height:"100%"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"58px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"19.5px",color:e.styles.color?e.styles.color:"grey",marginTop:"2px"}},"note"),a.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(S.s)("$__notes",1)),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(Z.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(Z.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"))):a.a.createElement(na,{title:Object(S.s)("$__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(ge.a)(n.text&&!n.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){g(!0)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},{title:"$__edit",icon:"edit",onClick:function(){o(Object(p.a)(Object(p.a)({},n),{},{editor:!0}))},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}]:[]),[s&&{title:"$__saveNote",icon:"save",onClick:function(){g()},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"},n.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){o(Object(p.a)(Object(p.a)({},n),{},{text:h.cards[d[0]].note,editor:!1})),u(!1)},color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}])}),a.a.createElement(Fi,{style:{display:"flex",justifyContent:"center",height:"100%"}},n.text||n.editor?n.editor?a.a.createElement(td.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(S.s)("$__planNotePlaceholder"),onChange:function(e){u(!0),o(Object(p.a)(Object(p.a)({},n),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==h.cards[d[0]].note||(u(!1),o(Object(p.a)(Object(p.a)({},n),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},n.text):a.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){o(Object(p.a)(Object(p.a)({},n),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:Object(S.p)(n.text)}}):a.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer",height:"100%"},onClick:function(){o(Object(p.a)(Object(p.a)({},n),{},{editor:!0}))}},a.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},a.a.createElement(Z.a,{size:"33px",color:"rgba(0,0,0,0.2)"},"add")),a.a.createElement("div",{style:{color:"rgba(0,0,0,0.2)",fontSize:"22px",fontWeight:"bold",marginLeft:"15px"}},Object(S.s)("$__addNote"))))))})),ad=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=a.a.useState({type:"comment",disabledSend:!1}),n=Object(m.a)(r,2),o=n[0],i=n[1],c=Object(at.j)(t[0]);return a.a.createElement("div",{style:{height:"100%",overflow:"hidden"}},a.a.createElement(Li,{style:{marginTop:"0",height:"100%"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.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"),a.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(S.s)("$__timeline",1)),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(Z.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(Z.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"))):a.a.createElement(na,{title:Object(S.s)("$__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:c.comment,color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",onClick:function(){i({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:c.log,onClick:function(){i({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:c.timer,onClick:function(){i({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)",count:c.kpi,onClick:function(){i({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Fi,null,a.a.createElement(_a,Object(p.a)({nodeId:t[0],db:"cards",loadTimeline:!0},o)))))},od=(r(209),Object(u.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,n,o,i,c=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=l.a.getState().db,d={};return(null===(t=u.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(d=JSON.parse(u.cards[s[0]].customColumns)),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(Li,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"play_arrow"),a.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(S.s)("$__actions",1)),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(Z.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(Z.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"))):a.a.createElement(Ke,{title:(null===(r=d)||void 0===r||null===(n=r.actions)||void 0===n?void 0:n.name)?d.actions.name:Object(S.s)("$__actions",1),icon:(null===(o=d)||void 0===o||null===(i=o.actions)||void 0===i?void 0:i.icon)?d.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"}}),a.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto"}},e.load&&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"}))),!e.load&&a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundColor:"#f5f5f5"}},a.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},a.a.createElement(_i.a,{data:[].concat(Object(ge.a)(u.status.map((function(t,r){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&u.cards[e].status&&u.cards[e].status===t.value&&("iniciative"===u.cards[e].type||"task"===u.cards[e].type||"meeting"===u.cards[e].type||"iniciative"===u.cards[e].type||"myTask"===u.cards[e].type)&&(!u.cards[e].checklist||u.cards[e].checklist&&u.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&("iniciative"===u.cards[e].type||"task"===u.cards[e].type||"meeting"===u.cards[e].type||"iniciative"===u.cards[e].type||"myTask"===u.cards[e].type)&&(!u.cards[e].checklist||u.cards[e].checklist&&u.cards[e].showCard)&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(ge.a)(u.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&&a.a.createElement(Fi,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.s)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&("iniciative"===u.cards[e].type||"task"===u.cards[e].type||"meeting"===u.cards[e].type||"iniciative"===u.cards[e].type||"myTask"===u.cards[e].type)&&(!u.cards[e].checklist||u.cards[e].checklist&&u.cards[e].showCard)})).length)),u.status.map((function(t,r){return a.a.createElement("div",{key:"".concat(r,"_").concat(t.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(Z.a,{color:t.color},t.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)(t.label,1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&("iniciative"===u.cards[e].type||"task"===u.cards[e].type||"meeting"===u.cards[e].type||"iniciative"===u.cards[e].type||"myTask"===u.cards[e].type)&&(!u.cards[e].checklist||u.cards[e].checklist&&u.cards[e].showCard)&&u.cards[e].status&&u.cards[e].status===t.value})).length))})),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(Z.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)("$__late",1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&("iniciative"===u.cards[e].type||"task"===u.cards[e].type||"meeting"===u.cards[e].type||"iniciative"===u.cards[e].type||"myTask"===u.cards[e].type)&&(!u.cards[e].checklist||u.cards[e].checklist&&u.cards[e].showCard)&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length)))))}))),id=function(e){var t,r,o,i,c,l,s,u,d,p,f,h,m,g,b,y,v,x,_,w=e.tittle,j=e.icon,E=e.datafilter,k=e.handleSetoption,S=e.handleSetSelected,L=Object(n.useRef)();return a.a.createElement("div",{ref:L,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(Z.a,{size:28,icon:j&&j,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"}},w&&w),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(Z.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(Z.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")),E&&a.a.createElement(ts,{text:"Filtro",icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement("div",{style:{marginLeft:"11px",marginBottom:"12px"}},a.a.createElement("select",{placeholder:"Quantidade de usuarios por exibi\xe7\xe3o",onChange:function(e){return S({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===(t=e.filterConfig)||void 0===t?void 0:t.filterName)?null===e||void 0===e||null===(r=e.filterConfig)||void 0===r?void 0:r.filterName:"usuarios"," por exibi\xe7\xe3o"),(null===e||void 0===e||null===(o=e.filterConfig)||void 0===o?void 0:o.filterSelect)>5&&a.a.createElement("option",null," 5 ",(null===e||void 0===e||null===(i=e.filterConfig)||void 0===i?void 0:i.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)>10&&a.a.createElement("option",null," 10 ",(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)>15&&a.a.createElement("option",null," 15 ",(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)>10&&a.a.createElement("option",null," 20 ",(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," 25 ",(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"))),a.a.createElement(Ec,{fields:(null===e||void 0===e||null===(x=e.filterConfig)||void 0===x?void 0:x.filterItems)?null===e||void 0===e||null===(_=e.filterConfig)||void 0===_?void 0:_.filterItems:["date","users"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{startDate:O()().subtract(1,"month").format("YYYYMMDD"),endDate:O()().format("YYYYMMDD")},nodeId:"barChart",onChange:function(e){k(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)"})))},cd=function(e){var t=e.legend,r=Object(n.useRef)(),o=Object(n.useState)(t.reverse()),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)([]),u=Object(m.a)(s,2),d=u[0],p=u[1];return Object(n.useEffect)((function(){if(r.current){var e=new ResizeObserver((function(){var e=r.current.clientWidth,t=Object(ge.a)(c),n=[];[510,420,350].forEach((function(r,a){if(e<r){var o;switch(a){case 0:o=4;break;case 1:o=3;break;case 2:o=2;break;default:o=5}t=Object(ge.a)(c),n=t.splice(o,5)}})),l(t),p(n)}));return e.observe(r.current),function(){return e.disconnect()}}}),[]),a.a.createElement("div",{ref:r,style:{marginLeft:"20px",display:"block",alignSelf:"center",width:"100%",overflow:"hidden"}},a.a.createElement("div",{style:{display:"flex",width:"500px"}},c.map((function(e){var t=e.id,r=e.color,n=e.name,o=e.label,i=e.key,c=Object(S.s)(n||(o||t)),l=c.charAt(0)+c.slice(1).toLowerCase();return a.a.createElement("div",{key:i,style:{display:"flex",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center"}},a.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,marginTop:"2px"}}),a.a.createElement("p",{style:{margin:"0px",marginTop:"-0.8px",marginLeft:"6px",fontSize:"14px",display:"block"}},l))})),d.length>0&&a.a.createElement(El.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginBottom:"10px",fontSize:"16px",marginTop:"10px",justifyContent:"center"}},d.map((function(e){var t=e.id,r=e.color,n=e.name,o=e.label,i=e.key,c=Object(S.s)(n||(o||t)),l=c.charAt(0)+c.slice(1).toLowerCase();return a.a.createElement("div",{key:i,style:{display:"flex",marginTop:"4px",marginRight:"16px",whiteSpace:"nowrap",alignSelf:"center",width:"100%"}},a.a.createElement("div",{style:{width:"15px",height:"15px",borderRadius:"10px",backgroundColor:r,alignSelf:"center"}}),a.a.createElement("p",{style:{margin:"0px",marginLeft:"6px",display:"block",fontSize:"16px"}},l))}))))},a.a.createElement("div",{style:{alignSelf:"center",border:"1px solid #D3D3D3 ",fontSize:"16px",borderRadius:"5px",display:"flex",backgroundColor:"#f5f5f5",cursor:"pointer"}},a.a.createElement(Z.a,{style:{alignSelf:"center"},size:16},"add"),a.a.createElement("p",{style:{margin:"0px"}},d.length),a.a.createElement(Z.a,{style:{alignSelf:"center"},size:16},"expand_more")))))},ld=function(e){var t=e.tittle,r=e.preview,o=e.icon,i=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),c=window.location.hash.split("/");c[0]=c[0].replace("#","");var s=l.a.getState().db,u=Object(n.useState)([]),d=Object(m.a)(u,2),p=d[0],f=d[1];return Object(n.useEffect)((function(){f([].concat(Object(ge.a)(s.status.map((function(e){return{id:Object(S.s)(e.label,1),label:Object(S.s)(e.label,1),value:Object.keys(s.cards).filter((function(t){return s.cards[t]._planId===c[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,color:e.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(s.cards).filter((function(e){return s.cards[e]._planId===c[0]&&!s.cards[e].checklist&&!s.cards[e].deleted&&"completed"!==s.cards[e].status&&"objective"===s.cards[e].type&&s.cards[e].endDate&&O()(new Date(1e3*s.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(i)).tz("America/Sao_Paulo").format()})).length,color:"red"}]))}),[e.planCards]),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(id,{styles:e.styles,tittle:Object(S.s)("$__".concat(t)),icon:o,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},a.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},e.load?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"}))):a.a.createElement(_i.a,{data:p,colors:[].concat(Object(ge.a)(s.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]]}}))),!r&&a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:Object(ge.a)(s.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))},sd=function(e){var t=e.tittle,r=e.preview,o=e.icon,i=Object(n.useState)([]),c=Object(m.a)(i,2),s=c[0],u=c[1],d=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),p=window.location.hash.split("/");p[0]=p[0].replace("#","");var f=l.a.getState().db;return Object(n.useEffect)((function(){u([].concat(Object(ge.a)(f.status.map((function(t,r){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return f.cards[e]._planId===p[0]&&!f.cards[e].deleted&&f.cards[e].status&&f.cards[e].status===t.value&&("iniciative"===f.cards[e].type||"task"===f.cards[e].type||"meeting"===f.cards[e].type||"iniciative"===f.cards[e].type||"myTask"===f.cards[e].type)&&(!f.cards[e].checklist||f.cards[e].checklist&&f.cards[e].showCard)})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return f.cards[e]._planId===p[0]&&!f.cards[e].deleted&&"completed"!==f.cards[e].status&&("iniciative"===f.cards[e].type||"task"===f.cards[e].type||"meeting"===f.cards[e].type||"iniciative"===f.cards[e].type||"myTask"===f.cards[e].type)&&(!f.cards[e].checklist||f.cards[e].checklist&&f.cards[e].showCard)&&f.cards[e].endDate&&O()(new Date(1e3*f.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(d)).tz("America/Sao_Paulo").format()})).length,color:"red"}]))}),[e.planCards]),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(id,{styles:e.styles,tittle:Object(S.s)("$__".concat(t)),icon:o,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},a.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},s.length>0&&!e.load?a.a.createElement(_i.a,{data:s,colors:[].concat(Object(ge.a)(f.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]]}}):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"}))))),!r&&a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:Object(ge.a)(f.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))},ud=function(e){var t=e.tittle,r=(e.preview,e.icon,O()().tz("America/Sao_Paulo").format("YYYY/MM/DD")),n=window.location.hash.split("/");n[0]=n[0].replace("#","");var o=l.a.getState().db;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(id,{styles:e.styles,tittle:Object(S.s)("$__".concat(t)),icon:No.a,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},a.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},e.load?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"}))):a.a.createElement(_i.a,{data:[].concat(Object(ge.a)(o.status.map((function(t,r){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return o.cards[e]._planId===n[0]&&!o.cards[e].deleted&&o.cards[e].type.indexOf("guideline")>-1&&o.cards[e].status&&o.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return o.cards[e]._planId===n[0]&&!o.cards[e].deleted&&o.cards[e].type.indexOf("guideline")>-1&&o.cards[e].endDate&&O()(new Date(1e3*o.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(r)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(ge.a)(o.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]]}}))),a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:Object(ge.a)(o.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))},dd=function(e){var 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],s[1],e.tittle),d=(e.preview,e.icon),p=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),f=window.location.hash.split("/");f[0]=f[0].replace("#","");var h=l.a.getState().db;return Object(n.useEffect)((function(){i([].concat(Object(ge.a)(h.status.map((function(t){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===f[0]&&"goal"===h.cards[e].type&&!h.cards[e].checklist&&!h.cards[e].deleted&&h.cards[e].status&&h.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return h.cards[e]._planId===f[0]&&!h.cards[e].checklist&&!h.cards[e].deleted&&"completed"!==h.cards[e].status&&"goal"===h.cards[e].type&&h.cards[e].endDate&&O()(new Date(1e3*h.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(p)).tz("America/Sao_Paulo").format()})).length,color:"#FFFFFF"}]))}),[e.planCards]),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(id,{styles:e.styles,tittle:Object(S.s)("$__".concat(u)),icon:d,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},a.a.createElement("div",{className:"componentCircle",style:{width:"100%",height:"100%",position:"absolute"}},e.load?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"}))):a.a.createElement(_i.a,{data:o,colors:[].concat(Object(ge.a)(h.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]]}}))),a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:Object(ge.a)(h.status.map((function(e,t){return{color:e.color,label:e.label,key:t}})))})))},pd=function(e){var t=e.tittle,r=e.icon,n=e.data;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(id,{styles:e.styles?e.styles:{},tittle:Object(S.s)("$__".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?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"}))):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)))},fd=function(e){var t=e.tittle,r=e.preview,o=e.icon,i=Object(n.useState)([]),c=Object(m.a)(i,2),s=c[0],u=c[1];return Object(n.useEffect)((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#","");var t=l.a.getState().db,r=Object(ge.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}}))),n=0;r.forEach((function(e){n=e.value+n})),u(n)}),[e.planCards]),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(pd,{load:e.load,data:s&&s.toString(),tittle:t,preview:r,icon:o,edit:e.edit,styles:e.styles,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))},hd=function(e){var t=e.tittle,r=e.preview,n=e.icon,o=window.location.hash.split("/");o[0]=o[0].replace("#","");var i=l.a.getState().db,c=Object(ge.a)(i.status.map((function(e,t){return{value:Object.keys(i.cards).filter((function(t){return i.cards[t]._planId===o[0]&&!i.cards[t].checklist&&!i.cards[t].deleted&&"objective"===i.cards[t].type&&i.cards[t].status&&i.cards[t].status===e.value})).length}}))),s=0;return c.forEach((function(e){s=e.value+s})),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(pd,{load:e.load,data:s&&s.toString(),tittle:t,preview:r,icon:n,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)},styles:e.styles}))},md=function(e){var t=e.tittle,r=e.preview,n=(e.icon,window.location.hash.split("/"));n[0]=n[0].replace("#","");var o=l.a.getState().db,i=Object(ge.a)(o.status.map((function(e,t){return{value:Object.keys(o.cards).filter((function(t){return o.cards[t]._planId===n[0]&&!o.cards[t].checklist&&!o.cards[t].deleted&&"guideline"===o.cards[t].type&&o.cards[t].status&&o.cards[t].status===e.value})).length}}))),c=0;return i.forEach((function(e){c=e.value+c})),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(pd,{data:c,tittle:t,load:e.load,preview:r,icon:No.a,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))},gd=function(e){var t=Object(n.useState)(),r=Object(m.a)(t,2),o=r[0],i=r[1],c=e.tittle,s=e.preview,u=e.icon,d=window.location.hash.split("/");d[0]=d[0].replace("#","");var p=l.a.getState().db;return Object(n.useEffect)((function(){var e=Object(ge.a)(p.status.map((function(e,t){return{value:Object.keys(p.cards).filter((function(t){return p.cards[t]._planId===d[0]&&!p.cards[t].deleted&&p.cards[t].status&&p.cards[t].status===e.value&&("iniciative"===p.cards[t].type||"task"===p.cards[t].type||"meeting"===p.cards[t].type||"iniciative"===p.cards[t].type||"myTask"===p.cards[t].type)&&(!p.cards[t].checklist||p.cards[t].checklist&&p.cards[t].showCard)})).length}}))),t=0;e.forEach((function(e){t=e.value+t})),i(t)}),[e.planCards]),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(pd,{load:e.load,data:o&&o.toString(),tittle:c,preview:s,icon:u,edit:e.edit,id:e.id,styles:e.styles,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}))},bd=r(1924),yd=function(e){var t=a.a.useState(1),r=Object(m.a)(t,2),o=r[0],i=r[1],c=window.location.hash.split("/");c[0]=c[0].replace("#","");var s=l.a.getState().db,u=Object(n.useState)(!1),d=Object(m.a)(u,2),p=d[0],f=d[1],h=Object(n.useRef)(),g=Object(n.useState)(""),b=Object(m.a)(g,2),y=b[0],v=b[1],x=Object(n.useState)(0),_=Object(m.a)(x,2),O=_[0],w=_[1];return Object(n.useEffect)((function(){if(h.current){var e=new ResizeObserver((function(){var e=h.current.clientHeight/42;w(e/2-1)}));return e.observe(h.current),function(){return e.disconnect()}}}),[]),a.a.createElement("div",{onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)},style:{height:"100%",overflow:"hidden"}},a.a.createElement(Li,{style:{height:"100%",margin:"0px"}},a.a.createElement("div",null,e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),a.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(S.s)("$__lastCompletedCards",1)),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(Z.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(Z.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"))):a.a.createElement(id,{hover:p,tittle:Object(S.s)("$__lastCompletedCards",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),p&&!e.edit&&a.a.createElement(ts,{text:"Buscar",icon:"search",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(Ec,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&v(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),a.a.createElement(Fi,null,a.a.createElement("div",{ref:h,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,t){return s.cards[e]._planId===c[0]&&!s.cards[e].deleted&&(!s.cards[e].checklist||s.cards[e].checklist&&s.cards[e].showCard)&&"completed"===s.cards[e].status&&s.cards[e].name.toLowerCase().includes(y.toLowerCase()?y:"")})).sort((function(e,t){var r=s.cards[e].completed_at&&s.cards[e].completed_at.low?parseInt(s.cards[e].completed_at.low):"string"===typeof s.cards[e].completed_at?s.cards[e].completed_at:0,n=s.cards[t].completed_at&&s.cards[t].completed_at.low?parseInt(s.cards[t].completed_at.low):"string"===typeof s.cards[t].completed_at?s.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=(o-1)*O&&t<o*O)return a.a.createElement(on,{db:"cards",key:e,data:s.cards[e],inLine:!0})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return s.cards[e]._planId===c[0]&&"completed"===s.cards[e].status})).length/O)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},a.a.createElement(bd.a,{page:o,count:Math.ceil(Object.keys(s.cards).filter((function(e){return s.cards[e]._planId===c[0]&&"completed"===s.cards[e].status&&s.cards[e].name.toLowerCase().includes(y.toLowerCase()?y:"")})).length/O),onChange:function(e,t){i(t)}})))))},vd=function(e){var t=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),r=window.location.hash.split("/");r[0]=r[0].replace("#","");var o=l.a.getState().db,i=Object(n.useState)(!1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)(1),p=Object(m.a)(d,2),f=p[0],h=p[1],g=Object(n.useState)(""),b=Object(m.a)(g,2),y=b[0],v=b[1],x=Object(n.useRef)(),_=Object(n.useState)(0),w=Object(m.a)(_,2),j=w[0],E=w[1];return Object(n.useEffect)((function(){if(x.current){var e=new ResizeObserver((function(){var e=x.current.clientHeight/42;E(e/2-1)}));return e.observe(x.current),function(){return e.disconnect()}}}),[]),a.a.createElement("div",{onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},style:{height:"100%"}},a.a.createElement(Li,{style:{marginTop:"0px",height:"100%",overflow:"hidden",borderRadius:"0px"}},a.a.createElement("div",null,e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),a.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(S.s)("$__todayTasks",1)),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(Z.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(Z.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"))):a.a.createElement(id,{hover:s,tittle:Object(S.s)("$__todayTasks",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),s&&!e.edit&&a.a.createElement(ts,{text:"Buscar",icon:"search",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(Ec,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&v(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),a.a.createElement(Fi,{style:{height:"100%",display:"flex",flexDirection:"column"}},a.a.createElement("div",{ref:x,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},Object.keys(e.planCards).filter((function(e,n){if(o.cards[e]._planId===r[0]&&!o.cards[e].deleted&&o.cards[e].name.toLowerCase().includes(y.toLowerCase()?y:"")&&o.cards[e]._users&&Object.keys(o.cards[e]._users).filter((function(r){return o.cards[e]._users[r].myDay&&O()(new Date(1e3*o.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0)return!0})).map((function(e,t){if(t>=(f-1)*j&&t<f*j)return a.a.createElement(on,{db:"cards",key:e,data:o.cards[e]})}))),Math.ceil(Object.keys(e.planCards).filter((function(e){return o.cards[e]._planId===r[0]&&!o.cards[e].deleted&&o.cards[e].name.toLowerCase().includes(y.toLowerCase()?y:"")&&o.cards[e]._users&&Object.keys(o.cards[e]._users).filter((function(r){return o.cards[e]._users[r].myDay&&O()(new Date(1e3*o.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/j)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},a.a.createElement(bd.a,{page:f,count:Math.ceil(Object.keys(e.planCards).filter((function(e){return o.cards[e]._planId===r[0]&&!o.cards[e].deleted&&o.cards[e].name.toLowerCase().includes(y.toLowerCase()?y:"")&&o.cards[e]._users&&Object.keys(o.cards[e]._users).filter((function(r){return o.cards[e]._users[r].myDay&&O()(new Date(1e3*o.cards[e]._users[r].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===t})).length>0})).length/j),onChange:function(e,t){h(t)}})))))},xd=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=l.a.getState().db,o=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),i=Object(n.useState)(1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)(""),p=Object(m.a)(d,2),f=p[0],h=p[1],g=Object(n.useState)(!1),b=Object(m.a)(g,2),y=b[0],v=b[1],x=Object(n.useRef)(),_=Object(n.useState)(0),w=Object(m.a)(_,2),j=w[0],E=w[1],k=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(f.toLowerCase()?f:"")&&r.cards[e].endDate&&O()(new Date(1e3*r.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(o)).tz("America/Sao_Paulo").format()})).map((function(e){return e}));return Object(n.useEffect)((function(){if(x.current){var e=new ResizeObserver((function(){var e=x.current.clientHeight/42;E(e/2-1)}));return e.observe(x.current),function(){return e.disconnect()}}}),[]),a.a.createElement("div",{onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)},style:{height:"100%"}},a.a.createElement(Li,{style:{marginTop:"0px",height:"100%"}},a.a.createElement("div",null,e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),a.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(S.s)("$__lateActivities",1)),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(Z.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(Z.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"))):a.a.createElement(id,{hover:y,tittle:Object(S.s)("$__lateActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),y&&!e.edit&&a.a.createElement(ts,{text:"Buscar",icon:"search",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(Ec,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&h(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),e.planCards&&a.a.createElement(Fi,{style:{height:"100%",display:"flex",flexDirection:"column"}},a.a.createElement("div",{ref:x,style:{overflowY:"scroll",height:"calc(100% - 70px)",overflowX:"hidden"}},k.sort((function(e,t){var n=r.cards[e].endDate,a=r.cards[t].endDate;return n>a?-1:n<a?1:0})).map((function(e,t){if(t>=(s-1)*j&&t<s*j)return a.a.createElement(on,{db:"cards",key:e,data:r.cards[e],inLine:!0})}))),Math.ceil(k.length/j)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},a.a.createElement(bd.a,{page:s,count:Math.ceil(k.length/j),onChange:function(e,t){u(t)}})))))},_d=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(Z.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")))};function Od(){Od=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 wd,jd=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,o=t.timeline,i=a.a.useState(O()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),c=Object(m.a)(i,2),s=c[0],u=c[1],d=a.a.useState(O()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),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],w=x[1],j=a.a.useState({}),E=Object(m.a)(j,2),L=E[0],C=E[1],I=a.a.useState({}),T=Object(m.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!0),A=Object(m.a)(N,2),P=A[0],$=A[1],M=Object(n.useState)({}),z=Object(m.a)(M,2),Y=z[0],B=z[1],R=Object(n.useRef)(0),G=Object(n.useRef)({}),H=window.location.hash.split("/");H[0]=H[0].replace("#","");var W=H[0];a.a.useEffect((function(){return V(),function(){}}),[]),a.a.useEffect((function(){U()}),[e.planCards]);var U=function(){var e=Object(f.a)(Od().mark((function e(){var t;return Od().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(at.s)(W);case 2:t=e.sent,D(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=function(){var t=Object(f.a)(Od().mark((function t(){return Od().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[W],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&$(!1),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),$(!1);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();Object(n.useEffect)((function(){var e={},t={},r=0;Object.keys(F).filter((function(e){return o[e]&&Object.keys(o[e]).filter((function(t){return"timer"===o[e][t].type})).length>0})).forEach((function(n){Object.keys(o[n]).filter((function(e){return"timer"===o[n][e].type&&!o[n][e].deleted})).forEach((function(e){o[n][e]._toUser&&Object.keys(o[n][e]._toUser).length>0?Object.keys(o[n][e]._toUser).forEach((function(r){t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},r,Object(p.a)({},o[n][e]._toUser[r]?o[n][e]._toUser[r]:{})))})):t=Object(p.a)(Object(p.a)({},t),{},Object(h.a)({},o[n][e].user._id,Object(p.a)({},o[n][e].user)))})),Object.keys(o[n]).filter((function(e){return o[n]&&o[n][e]&&"timer"===o[n][e].type&&!o[n][e].deleted&&(0===Object.keys(L).length||Object.keys(L).length>0&&Object.keys(L).filter((function(t){return o[n]&&o[n][e]&&o[n][e].type&&"timer"===o[n][e].type&&L[t]&&o[n][e].user&&(o[n]&&o[n][e]&&o[n][e].user&&(!o[n][e]._toUser||o[n][e]._toUser&&!o[n][e]._toUser[t])&&o[n][e].user._id===t||o[n]&&o[n][e]&&o[n][e]._toUser&&o[n][e]._toUser[t]&&o[n][e]._toUser[t]!==o[n][e].user._id)})).length>0)})).forEach((function(a){Object.keys(t).forEach((function(i){if(i&&o[n]&&o[n][a]&&"timer"===o[n][a].type&&!o[n][a].deleted&&(parseInt(o[n][a].ini)>=O()("".concat(s," 00:00:01")).unix("X")||0===parseInt(o[n][a].ini))&&parseInt(o[n][a].fin)<=O()("".concat(b," 23:59:59")).unix("X")&&(o[n][a].user&&o[n][a].user._id===i&&o[n][a]._toUser&&0===Object.keys(o[n][a]._toUser).length||o[n][a]._toUser&&Object.keys(o[n][a]._toUser).length>0&&o[n][a]._toUser[i])){r+=parseInt(o[n][a].fin)-parseInt(o[n][a].ini);var c=parseInt(o[n][a].fin)-parseInt(o[n][a].ini),l=c=e&&e[i]&&e[i].totalTimer?parseInt(e[i].totalTimer)+(parseInt(o[n][a].fin)-parseInt(o[n][a].ini)):parseInt(o[n][a].fin)-parseInt(o[n][a].ini),u="",d="";if(c<60)u="".concat(l," ").concat(Object(S.s)("$__seconds",1)),u="".concat(l,"s");else if(c>3600){var f=Math.trunc(l/3600);l-=3600*f;var m=Math.trunc(l/60)>0?Math.trunc(l/60):0,g=(l-=60*m)>0?l:0;u="".concat(f," ").concat(Object(S.s)("$__hour",1)).concat(f>1?"s":""," ").concat(m," ").concat(Object(S.s)("$__minutes",1)," ").concat(g>0?"".concat(g," ").concat(Object(S.s)("$__seconds",1)):""),d="".concat(f,"H ").concat(m,"M ").concat(g," S")}else{var y=Math.trunc(l/60)>0?Math.trunc(l/60):0,v=(l-=60*y)>0?l:0;u="".concat(y," ").concat(Object(S.s)("$__minutes",1)," ").concat(v>0?"".concat(v," ").concat(Object(S.s)("$__seconds",1)):""),d="".concat(y,"M ").concat(v," S")}e=Object(p.a)(Object(p.a)({},e),{},Object(h.a)({},i,Object(p.a)(Object(p.a)(Object(p.a)(Object(p.a)({},e[i]?e[i]:{}),t[i]?t[i]:{}),e&&e[i]&&e[i].totalTimer?{totalTimer:parseInt(e[i].totalTimer)+(parseInt(o[n][a].fin)-parseInt(o[n][a].ini))}:{totalTimer:parseInt(o[n][a].fin)-parseInt(o[n][a].ini)}),{},{timerText:u,timerTextMini:d,_times:Object(p.a)(Object(p.a)({},e[i]&&e[i]._times?e[i]._times:{}),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},o[n][a]),{},{cardId:n})))})))}R.current=r,1}))}))})),G.current=t,B(e)}),[F,P,L]);var q=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="";if(e<60)r="".concat(e," ").concat(Object(S.s)("$__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.s)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(S.s)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(S.s)("$__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.s)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(S.s)("$__seconds",1)):""),n="".concat(c,"M ").concat(l," S")}return t?n:r},X=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(we.a,{title:e.data.name},a.a.createElement(Ie.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(Li,{style:{width:"100%",height:"100%",marginTop:"0px",overflow:"scroll"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"52px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"20px",color:e.styles.color?e.styles.color:"grey",marginTop:"3px"}},"update"),a.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(S.s)("$__timeSheet",1)),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(Z.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(Z.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"))):a.a.createElement(na,{title:Object(S.s)("$__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:[!_&&{title:"$__timeSheetExport",icon:"file_download",color:Object(S.d)("colorText"),onClick:function(){w(!_)}}]}),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,null)):a.a.createElement(a.a.Fragment,null),_&&a.a.createElement("div",{style:{padding:"15px",border:"1px solid black"}},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.s)("$__timeCourse",1)),a.a.createElement(ye,{label:Object(S.s)("$__initialDate",1),variant:Object(S.d)("fieldVariant",1),name:"startDate",style:{marginRight:"15px"},InputLabelProps:{shrink:!0},type:"date",inputProps:{max:b||null},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)}},value:s}),a.a.createElement(ye,{label:Object(S.s)("$__endDate",1),variant:Object(S.d)("fieldVariant"),name:"endDate",type:"date",min:s||null,InputLabelProps:{shrink:!0},inputProps:{min:s||null},InputProps:{autoComplete:"new-password",onChange:function(e){y(e.target.value)}},value:b})),r.users&&Object.keys(r.users).length>0&&a.a.createElement($i.a,{style:{width:"100%"}},a.a.createElement(zi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(Z.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.s)("$__users"),a.a.createElement(lt.a,{max:6},Object.keys(L).length>0&&Object.keys(L).map((function(e,t){return a.a.createElement(we.a,{title:r.users[e].name,key:t},a.a.createElement(Ie.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(Mi.a,{style:{minWidth:"100%"}},a.a.createElement(Bi.a,null,Object.keys(G.current).map((function(e){return r.users&&r.users[e]&&r.users[e]._id&&a.a.createElement(a.a.Fragment,{key:e},a.a.createElement(Yi.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Ie.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(jo,{checked:!(!L||!L[e]),onChange:function(){!function(e){L[e]&&Object.keys(L).filter((function(e){return L[e]})).length<=1?C({}):C(Object(p.a)(Object(p.a)({},L),{},Object(h.a)({},e,!L[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(ji,{data:Y}),a.a.createElement(k.a,{title:Object(S.s)("$__closeFilter"),text:Object(S.s)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){w(!_)},size:"25px"}))),a.a.createElement(Pi,{style:{height:"333px",position:"relative",backgroundColor:"#f5f5f5"}},a.a.createElement(_i.a,{data:Object(ge.a)(Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return{id:Y[e].name,label:Y[e].name,value:Y[e].totalTimer,color:"#929497",textMini:Y[e].timerText}}))),valueFormat:function(e){return q(e,!0),q(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}),a.a.createElement("div",{style:{width:"100px",wordWrap:"break-word",position:"absolute",top:"50%",left:"calc(50% - 50px)",fontWeight:"bold",color:Object(S.d)("menu"),textAlign:"center"}},q(R.current,!0))),a.a.createElement(Fi,null,a.a.createElement(mn,null,Object.keys(Y).sort((function(e,t){return parseInt(Y[e].totalTimer)>parseInt(Y[t].totalTimer)?-1:parseInt(Y[e].totalTimer)<parseInt(Y[t].totalTimer)?1:0})).map((function(e,t){return a.a.createElement(X,{data:Y[e],key:e})})),a.a.createElement(X,{data:{name:Object(S.s)("$__total"),timerText:q(R.current)}}))),a.a.createElement("div",{style:{color:"#CCCCCC",fontSize:"12px",padding:"15px",textAlign:"center"}},r.cards[W]&&"plan"===r.cards[W].type?Object(S.s)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(S.s)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),Ed=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=l.a.getState().db,o=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),i=a.a.useState(1),c=Object(m.a)(i,2),s=c[0],u=c[1],d=Object(n.useState)(!1),p=Object(m.a)(d,2),f=p[0],h=p[1],g=Object(n.useRef)(),b=Object(n.useState)(""),y=Object(m.a)(b,2),v=y[0],x=y[1],_=Object(n.useState)(0),w=Object(m.a)(_,2),j=w[0],E=w[1];return Object(n.useEffect)((function(){if(g.current){var e=new ResizeObserver((function(){var e=g.current.clientHeight/42;E(e/2-1)}));return e.observe(g.current),function(){return e.disconnect()}}}),[]),a.a.createElement("div",{style:{height:"100%"},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)}},a.a.createElement(Li,{style:{marginTop:"0px",height:"100%"}},a.a.createElement("div",null,e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"rgba(0, 0, 0, 0.67)"}},"pending_actions"),a.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(S.s)("$__nextActivities",1)),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(Z.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(Z.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"))):a.a.createElement(id,{hover:f,tittle:Object(S.s)("$__nextActivities",1),icon:"pending_actions",datafilter:!1,styles:e.styles}),f&&!e.edit&&a.a.createElement(ts,{text:"Buscar",icon:"search",popper:a.a.createElement("div",{style:{padding:"15px"}},a.a.createElement(Ec,{fields:["text"],showFilters:!0,style:{position:"absolute",zIndex:"999"},defaultValues:{text:""},onChange:function(e){return e.text&&x(null===e||void 0===e?void 0:e.text)}})),style:{alignSelf:"center",position:"absolute",right:"40px",borderRadius:"5px",backgroundColor:"white",top:"7px"}})),a.a.createElement(Fi,null,a.a.createElement("div",{ref:g,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(v.toLowerCase()?v:"")&&"completed"!==r.cards[e].status&&r.cards[e].startDate&&O()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=O()(new Date(o)).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})).map((function(e,t){if(t>=(s-1)*j&&t<s*j)return a.a.createElement(on,{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(v.toLowerCase()?v:"")&&r.cards[e].startDate&&O()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=O()(new Date(o)).tz("America/Sao_Paulo").format()})).length/j)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",maxHeight:"30px"}},a.a.createElement(bd.a,{page:s,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(v.toLowerCase()?v:"")&&r.cards[e].startDate&&O()(new Date(1e3*r.cards[e].startDate)).tz("America/Sao_Paulo").format()>=O()(new Date(o)).tz("America/Sao_Paulo").format()})).length/j),onChange:function(e,t){u(t)}})))))},kd=r(410),Sd=function(e){var t=l.a.getState().db,r=Object(n.useState)({index:0,showQuantity:10,number:10,finalIndex:10}),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useState)({}),u=Object(m.a)(s,2),d=u[0],f=u[1],g=(Object(n.useRef)(0),window.location.hash.split("/"));g[0]=g[0].replace("#","");var b={};Object(n.useEffect)((function(){e.filter&&c(e.filter)}),[e.filter]),Object(n.useEffect)((function(){e.planCards&&!e.load&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).forEach((function(e){var r;Object.keys(null===(r=t.cards[e])||void 0===r?void 0:r._users).forEach((function(r){var n,a;if(!((null===i||void 0===i||null===(n=i.users)||void 0===n?void 0:n.length)>0)||i.users.includes(null===(a=t.cards[e])||void 0===a?void 0:a._users[r]._id)){var o,c,l,s,u;if(!b[r])b=Object(p.a)(Object(p.a)({},b),{},Object(h.a)({},r,Object(p.a)(Object(p.a)({},b[r]),{},(u={},Object(h.a)(u,t.cards[e].status,0),Object(h.a)(u,"allTask",0),Object(h.a)(u,"user",null===(c=t.cards[e])||void 0===c?void 0:c._users[r].name.match(/\b(\w)/g).join("")),Object(h.a)(u,"id",r),Object(h.a)(u,"image",null===(l=t.cards[e])||void 0===l?void 0:l._users[r].image),Object(h.a)(u,"name",null===(s=t.cards[e])||void 0===s?void 0:s._users[r].name),u))));if(null===(o=t.cards[e])||void 0===o?void 0:o._users[r].isResponsible){var d,f,m,g,y,v=O()(1e3*t.cards[e].created_at).format("YYYYMMDD"),x=i.startDate?O()(1e3*i.startDate).format("YYYYMMDD"):O()().subtract(1,"month").format("YYYYMMDD"),_=i.endDate?O()(1e3*i.endDate).format("YYYYMMDD"):O()().format("YYYYMMDD");if(v>=x&&v<=_)b=Object(p.a)(Object(p.a)({},b),{},Object(h.a)({},r,Object(p.a)(Object(p.a)({},b[r]),{},(y={},Object(h.a)(y,t.cards[e].status,(null===(d=b[r])||void 0===d?void 0:d[t.cards[e].status])?(null===(f=b[r])||void 0===f?void 0:f[t.cards[e].status])+1:1),Object(h.a)(y,"allTask",(null===(m=b[r])||void 0===m?void 0:m.allTask)?(null===(g=b[r])||void 0===g?void 0:g.allTask)+1:1),y))))}}}))})),d!==b&&f(b))}),[e.planCards,e.load,i]);return a.a.createElement("div",{className:"box",style:{width:"100%",height:"100%",alignSelf:"center",borderRadius:"5px",backgroundColor:"transparent",display:"flex",flexFlow:"column",overflow:"visible"}},a.a.createElement(id,{handleSetSelected:function(t){c(Object(p.a)(Object(p.a)({},i),t)),e.handleSetFilter(Object(p.a)(Object(p.a)(Object(p.a)({},i),t),{},{id:e.id}))},filterConfig:{filterSelect:Object.keys(d).length>0&&Object.values(d).length},tittle:Object(S.s)("$__"+e.tittle),icon:e.icon,styles:e.styles,datafilter:!0,handleRemoveObject:function(){return e.handleRemoveObject(e.id)},edit:e.edit,handleSetoption:function(t){c(Object(p.a)(Object(p.a)({},i),t)),e.handleSetFilter(Object(p.a)(Object(p.a)(Object(p.a)({},i),t),{},{id:e.id}))}}),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"}},!e.load&&a.a.createElement("div",{style:{position:"absolute",right:"2%",top:"2%",padding:"5px",display:"flex",zIndex:"9",justifyContent:"center",alignContent:"center"}},a.a.createElement("div",{style:{marginTop:"2px",marginRight:"4px"}},i.startDate?O()(1e3*i.startDate).format("DD/MM/YYYY")+" ~ ":O()().subtract(1,"month").format("DD/MM/YYYY")+" ~ ",i.endDate?O()(1e3*i.endDate).format("DD/MM/YYYY")+" - ":O()().format("DD/MM/YYYY")+" - ",i.showQuantity<Object.keys(d).length?i.showQuantity+"/":Object.keys(d).length+"/",Object.keys(d).length>0&&a.a.createElement("span",null,Object.keys(d).length)),a.a.createElement(Z.a,null,"person")),0!==i.index&&a.a.createElement(Z.a,{onClick:function(){return c(Object(p.a)(Object(p.a)({},i),{},{index:i.index-1,finalIndex:i.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),Object.keys(d).length!==i.index+i.number&&Object.keys(d).length>i.showQuantity&&a.a.createElement(Z.a,{onClick:function(){return c(Object(p.a)(Object(p.a)({},i),{},{index:i.index+1,finalIndex:i.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter",backgroundColor:"#f5f5f5"}},Object.keys(d).length>0&&!e.load?a.a.createElement("div",{className:"component",style:{width:"100%",height:"100%"}},a.a.createElement(kd.a,{data:Object.values(d).sort((function(e,t){return e.allTask>t.allTask?-1:e.allTask<t.allTask?1:0})).slice(i.index,i.finalIndex),keys:["inProgress","completed","notStarted","paused","awaitAction"],colors:["#011E41","#5A7F71","#929497","#EBA900","pink"],tooltip:function(e){return a.a.createElement("div",{style:{fontSize:"12px",width:"200px",marginBottom:"10px",zIndex:"99999"}},a.a.createElement("div",{style:{display:"flex",marginLeft:"5px",marginTop:"10px",textOverflow:"ellipsis",overflow:"hidden"}},a.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"}}),a.a.createElement("p",{style:{margin:"0px",marginLeft:"12px",fontSize:"20px",alignSelf:"center",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.data.name)),a.a.createElement("div",{style:{borderBottom:"1px solid #d1d1cf",marginTop:"10px"}}),a.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(m.a)(t,2),n=r[0],o=r[1];if(["inProgress","completed","notStarted","paused","awaitAction"].includes(n)){var i="";switch(n){case"inProgress":i="#011E41";break;case"completed":i="#5A7F71";break;case"notStarted":i="#929497";break;case"paused":i="#EBA900";break;case"awaitAction":i="pink";break;default:i="white"}return a.a.createElement("div",{style:{display:"flex",marginBottom:"8px"},key:n},a.a.createElement("div",{style:{borderRadius:"50%",backgroundColor:i,height:"20px",width:"20px",alignSelf:"center",marginRight:"10px"}}," "),a.a.createElement("div",{style:{marginLeft:"14x"}}," ",Object(S.s)("$__"+n)," : ",a.a.createElement("span",{style:{fontWeight:"bolder"}},o)))}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(d).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"})," "):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"}))))),a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:Object(ge.a)(t.status.map((function(e,t){return{key:t,color:e.color,label:e.label}})))})))},Ld=r(628),Cd=function(e){var t=l.a.getState().db,r=Object(n.useState)({}),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useRef)(0),u=window.location.hash.split("/");u[0]=u[0].replace("#","");var d=[{x:"",y:0},{x:" ",y:0}];return Object(n.useEffect)((function(){var r={},n={};!function(){for(var e=O()().startOf("week"),t=1;t<7;t++){var a=O()(e).add(t,"days").format("YYYYMMDD");r=Object(p.a)(Object(p.a)({},r),{},{id:"now",data:Object(p.a)(Object(p.a)({},r.data),{},Object(h.a)({},a,{x:Object(S.s)("$__"+O()(a).format("dddd")),y:0}))}),n=Object(p.a)(Object(p.a)({},n),{},{id:"past",data:Object(p.a)(Object(p.a)({},n.data),{},Object(h.a)({},a,{x:Object(S.s)("$__"+O()(a).format("dddd")),y:0}))})}}(),e.planCards&&(Object.keys(e.planCards).length>0&&Object.keys(e.planCards).forEach((function(e){var a,o,i,c,l,s,u,d=O()(1e3*(null===(a=t.cards[e].completed_at)||void 0===a?void 0:a.low)).format("YYYYMMDD"),f=O()().startOf("week").add(1,"day").format("YYYYMMDD"),m=O()().endOf("week").format("YYYYMMDD"),g=O()().subtract(1,"weeks").startOf("week").add(1,"day").format("YYYYMMDD"),b=O()().subtract(1,"weeks").endOf("week").format("YYYYMMDD");d>=f&&d<=m&&(r=Object(p.a)(Object(p.a)({},r),{},{id:"now",data:Object(p.a)(Object(p.a)({},r.data),{},Object(h.a)({},d,{x:Object(S.s)("$__"+O()(d).format("dddd")),y:(null===(o=r)||void 0===o||null===(i=o.data)||void 0===i||null===(c=i[d])||void 0===c?void 0:c.y)?(null===(l=r)||void 0===l||null===(s=l.data)||void 0===s||null===(u=s[d])||void 0===u?void 0:u.y)+1:1}))}));if(d>=g&&d<=b){var y,v,x,_,w,j,E=O()(d).add(1,"week").format("YYYYMMDD");n=Object(p.a)(Object(p.a)({},n),{},{id:"past",data:Object(p.a)(Object(p.a)({},n.data),{},Object(h.a)({},E,{x:Object(S.s)("$__"+O()(d).format("dddd")),y:(null===(y=n)||void 0===y||null===(v=y.data)||void 0===v||null===(x=v[E])||void 0===x?void 0:x.y)?(null===(_=n)||void 0===_||null===(w=_.data)||void 0===w||null===(j=w[E])||void 0===j?void 0:j.y)+1:1}))})}})),r.data&&(r=Object(p.a)(Object(p.a)({},r),{},{data:[d[0]].concat(Object(ge.a)(Object.values(r.data)),[d[1]])}),Object.keys(r).length>0&&(r=[r]),r.forEach((function(e){e.data.forEach((function(e){e.y>s.current&&(s.current=e.y)}))}))),n.data&&(n=Object(p.a)(Object(p.a)({},n),{},{data:[d[0]].concat(Object(ge.a)(Object.values(n.data)),[d[1]])}),Object.keys(n).length>0&&(r=[].concat(Object(ge.a)(r),[n])),r.forEach((function(e){e.data.forEach((function(e){e.y>s.current&&(s.current=e.y)}))}))),c(r))}),[e.planCards]),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(id,{styles:e.styles,tittle:Object(S.s)("$__"+e.tittle),icon:e.icon,edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),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",{className:"component",style:{position:"absolute",width:"100%",height:"100%",marginBottom:"25px",backgroundColor:"#f5f5f5"}},i.length>0&&!e.load?a.a.createElement(Ld.a,{data:i,responsive:!0,margin:{top:20,right:-15,bottom:40,left:30},xScale:{type:"point"},yScale:{type:"linear",min:0!==s.current?-.1:"auto",max:s.current+s.current/2,stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:10,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:-12,useMesh:!0,curve:"monotoneX",colors:["#24acdc","#525252"],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}}}}}):a.a.createElement("div",{style:{wdith:"100%",height:"100%",display:"flex",justifyContent:"center"}},a.a.createElement("div",{style:{alignSelf:"center"}},"  ",a.a.createElement("div",{className:"loader"}))))),a.a.createElement("div",{style:{height:"15%",maxHeight:"60px",display:"flex",backgroundColor:"white"}},a.a.createElement(cd,{legend:[{id:Object(S.s)("lastWeek"),color:"#525252",number:"",key:1},{id:Object(S.s)("thisWeek"),color:"#24acdc",number:"",key:2}]})))},Id=function(e){var t,r,n,o,i,c=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=l.a.getState().db,d={};return(null===(t=u.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(d=JSON.parse(u.cards[s[0]].customColumns)),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(Li,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"flag"),a.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(S.s)("$__goals",1)),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(Z.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(Z.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"))):a.a.createElement(Ke,{title:(null===(r=d)||void 0===r||null===(n=r.goals)||void 0===n?void 0:n.name)?d.goals.name:Object(S.s)("$__goals",1),icon:(null===(o=d)||void 0===o||null===(i=o.goals)||void 0===i?void 0:i.icon)?d.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"}}),a.a.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&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"}))),a.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&a.a.createElement(_i.a,{data:[].concat(Object(ge.a)(u.status.map((function(t,r){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&"goal"===u.cards[e].type&&!u.cards[e].checklist&&!u.cards[e].deleted&&u.cards[e].status&&u.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&"goal"===u.cards[e].type&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(ge.a)(u.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&&a.a.createElement(Fi,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},a.a.createElement("h3",null,a.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(S.s)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"goal"===u.cards[e].type})).length)),u.status.map((function(t,r){return a.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%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:t.color},t.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)(t.label,1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&"goal"===u.cards[e].type&&!u.cards[e].checklist&&!u.cards[e].deleted&&u.cards[e].status&&u.cards[e].status===t.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",alignItems:"center",fontSize:"14px",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)("$__late",1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&"goal"===u.cards[e].type&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length)))))},Td=function(e){var t,r,n,o,i,c=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=l.a.getState().db,d={};return(null===(t=u.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(d=JSON.parse(u.cards[s[0]].customColumns)),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(Li,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",borderBottom:"1px solid #D3D3D3",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white"}},a.a.createElement("div",{style:{width:"40px",height:"40px",alignSelf:"center",display:"flex"}},a.a.createElement(Z.a,{size:28,icon:No.a,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey",maxWidth:"30px"}})),a.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(S.s)("$__guidelines",1)),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(Z.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(Z.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"))):a.a.createElement(Ke,{title:(null===(r=d)||void 0===r||null===(n=r.guidelines)||void 0===n?void 0:n.name)?d.guidelines.name:Object(S.s)("$__guidelines",1),icon:(null===(o=d)||void 0===o||null===(i=o.guidelines)||void 0===i?void 0:i.icon)?d.guidelines.icon:No.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"}}),a.a.createElement(Pi,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&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"}))),a.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&a.a.createElement(_i.a,{data:[].concat(Object(ge.a)(u.status.map((function(e,t){return{id:Object(S.s)(e.label,1),label:Object(S.s)(e.label,1),value:Object.keys(u.cards).filter((function(t){return u.cards[t]._planId===s[0]&&!u.cards[t].deleted&&u.cards[t].type.indexOf("guideline")>-1&&u.cards[t].status&&u.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(u.cards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&u.cards[e].type.indexOf("guideline")>-1&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(ge.a)(u.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&&a.a.createElement(Fi,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},a.a.createElement("h3",null,a.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(S.s)("$__total",1),": ",Object.keys(u.cards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&u.cards[e].type.indexOf("guideline")>-1})).length)),u.status.map((function(e,t){return a.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%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)(e.label,1))),a.a.createElement("div",null,Object.keys(u.cards).filter((function(t){return u.cards[t]._planId===s[0]&&!u.cards[t].deleted&&u.cards[t].type.indexOf("guideline")>-1&&u.cards[t].status&&u.cards[t].status===e.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)("$__late",1))),a.a.createElement("div",null,Object.keys(u.cards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&u.cards[e].type.indexOf("guideline")>-1&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length)))))},Fd=function(e){var t,r,n,o,i,c=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),s=window.location.hash.split("/");s[0]=s[0].replace("#","");var u=l.a.getState().db,d={};return(null===(t=u.cards[s[0]])||void 0===t?void 0:t.customColumns)&&(d=JSON.parse(u.cards[s[0]].customColumns)),a.a.createElement("div",{style:{height:"100%"}},a.a.createElement(Li,{style:{height:"100%",marginTop:"0",display:"flex"}},e.edit?a.a.createElement("div",{style:{width:"100%",height:"50px",display:"flex",backgroundColor:e.styles.backgroundColor?e.styles.backgroundColor:"white",borderBottom:"1px solid #D3D3D3"}},a.a.createElement(Z.a,{size:24,style:{alignSelf:"center",marginLeft:"12.5px",color:e.styles.color?e.styles.color:"grey"}},"gps_fixed"),a.a.createElement("p",{style:{margin:"0px",marginLeft:"7px",alignSelf:"center",fontWeight:"bold",color:e.styles.color?e.styles.color:"grey"}},Object(S.s)("$__objectives",1)),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(Z.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(Z.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"))):a.a.createElement(Ke,{title:(null===(r=d)||void 0===r||null===(n=r.objectives)||void 0===n?void 0:n.name)?d.objectives.name:Object(S.s)("$__objectives",1),icon:(null===(o=d)||void 0===o||null===(i=o.objectives)||void 0===i?void 0:i.icon)?d.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"}}),a.a.createElement(Pi,{style:{display:"flex",width:"100%",borderBottom:"1px solid #D3D3D3",position:"relative",flex:"1 1 auto",backgroundColor:"#f5f5f5"}},e.load&&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"}))),a.a.createElement("div",{className:"componentCircle",style:{position:"absolute",width:"100%",height:"100%"}},!e.load&&a.a.createElement(_i.a,{data:[].concat(Object(ge.a)(u.status.map((function(t,r){return{id:Object(S.s)(t.label,1),label:Object(S.s)(t.label,1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"objective"===u.cards[e].type&&u.cards[e].status&&u.cards[e].status===t.value})).length,color:t.color}}))),[{id:Object(S.s)("$__late",1),label:Object(S.s)("$__late",1),value:Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&"objective"===u.cards[e].type&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(ge.a)(u.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&&a.a.createElement(Fi,{style:{height:"15%",maxHeight:"280px",backgroundColor:"white"}},a.a.createElement("h3",null,a.a.createElement("p",{style:{fontSize:"22px",fontWeight:"bolder"}},Object(S.s)("$__total",1),": ",Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].deleted&&!u.cards[e].checklist&&"objective"===u.cards[e].type})).length)),u.status.map((function(t,r){return a.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%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:t.color},t.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)(t.label,1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&"objective"===u.cards[e].type&&u.cards[e].status&&!u.cards[e].checklist&&u.cards[e].status===t.value})).length))})),a.a.createElement("div",{style:{color:"black",display:"flex",justifyContent:"space-between",height:"30px",fontSize:"14px",alignItems:"center",width:"100%"}},a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(Z.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)("$__late",1))),a.a.createElement("div",null,Object.keys(e.planCards).filter((function(e){return u.cards[e]._planId===s[0]&&!u.cards[e].checklist&&!u.cards[e].deleted&&"completed"!==u.cards[e].status&&"objective"===u.cards[e].type&&u.cards[e].endDate&&O()(new Date(1e3*u.cards[e].endDate)).tz("America/Sao_Paulo").format()<=O()(new Date(c)).tz("America/Sao_Paulo").format()})).length)))))},Dd=r(630),Nd=function(e){var t=window.location.hash.split("/");t[0]=t[0].replace("#","");var r=Object(n.useState)({index:0,showQuantity:8,number:8,finalIndex:8}),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object.keys(e.planCards).filter((function(e){return l.a.getState().db.cards[e]._parent===t[0]&&"step"===l.a.getState().db.cards[e].type})).map((function(e,t){return l.a.getState().db.cards[e]})),u=s.sort((function(e,t){return e.step-t.step})).map((function(e,r){return{id:e._id,value:Object.keys(l.a.getState().db.cards).filter((function(n){return!l.a.getState().db.cards[n].deleted&&(l.a.getState().db.cards[n]._parent===e._id||0===r&&l.a.getState().db.cards[n]._parent===t[0]&&"step"!==l.a.getState().db.cards[n].type)})).length,label:e.name,name:e.name}}));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(id,{filterConfig:{filterName:"etapas",filterItems:[],filterSelect:u.length},styles:e.styles,handleSetSelected:function(e){return c(Object(p.a)(Object(p.a)({},i),e))},tittle:Object(S.s)("$__"+e.tittle),icon:e.icon,datafilter:!0,handleSetoption:function(e){return c(Object(p.a)(Object(p.a)({},i),e))},edit:e.edit,id:e.id,handleRemoveObject:function(t){return e.handleRemoveObject(t)}}),a.a.createElement("div",{style:{borderBottom:"1px solid #D3D3D3",width:"100%"}}),a.a.createElement("div",{style:{position:"relative",flex:"1 1 auto",fontSize:"16px"}},0!==i.index&&a.a.createElement(Z.a,{onClick:function(){return c(Object(p.a)(Object(p.a)({},i),{},{index:i.index-1,finalIndex:i.finalIndex-1}))},style:{position:"absolute",zIndex:"999",top:"48%",left:"10px"}},"arrow_back_ios"),s.length!==i.index+i.number&&s.length>i.showQuantity&&a.a.createElement(Z.a,{onClick:function(){return c(Object(p.a)(Object(p.a)({},i),{},{index:i.index+1,finalIndex:i.finalIndex+1}))},style:{position:"absolute",zIndex:"999",top:"48%",right:"10px"}},"arrow_forward_ios"),a.a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",fontWeight:"lighter"}},a.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:16}},s.sort((function(e,t){return e.step-t.step})).map((function(e){return a.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/i.showQuantity,"%"),textAlign:"center",wordWrap:" break-word ",maxHeight:"60px",overflow:"scroll",minHeight:"50px",alignSelf:"center"}},e.name)})).slice(i.index,i.finalIndex)),a.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(S.d)("menu"),fontWeight:"bold",fontSize:16}},s.sort((function(e,t){return e.step-t.step})).map((function(e){var t=0,r=e,n=Object.keys(l.a.getState().db.cards).filter((function(t){return e&&e._id&&l.a.getState().db.cards[t]._parent===e._id&&!l.a.getState().db.cards[t].deleted&&l.a.getState().db.cards[t].value})).map((function(e){return l.a.getState().db.cards[e].value}))||[];return r.showSumValues&&n.length>0&&n.forEach((function(e){t+=parseFloat(e)})),a.a.createElement("div",{key:e._id,style:{width:"".concat(1e4/i.showQuantity,"%"),textAlign:"center",fontSize:12,alignSelf:"center"}},t?"R$ ".concat(t):"")})).slice(i.index,i.finalIndex)),u&&u.length>0?a.a.createElement(Dd.a,{data:u.slice(i.index,i.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"}):a.a.createElement(a.a.Fragment,null))))},Ad=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(id,{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(kd.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%)"}],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,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"}))))},Pd=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(id,{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(Ld.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}}}}}))))},$d=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(id,{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(_i.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(Z.a,{size:65,style:{alignSelf:"center",marginLeft:"-20px"}},"list_alt"))))},Md=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(id,{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(_i.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}))))},zd=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(id,{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(Dd.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"}))))},Yd=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.s)("$__all"),type:"all"},{name:Object(S.s)("$__charts"),type:"charts"},{name:Object(S.s)("$__tasks"),type:"tasks"},{name:Object(S.s)("$__others"),type:"others"}],g=[{Component:Sd,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:Ad,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:Cd,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:Pd},{Component:Ku,widget:"AboutPlan",type:"others",name:"planResume",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:4},icon:"info",Preview:_d},{Component:nd,widget:"Notes",name:"Notes",type:"others",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:4},icon:"note",Preview:_d},{Component:ad,widget:"TimeLine",name:"TimeLine",type:"others",datagrid:{x:0,y:0,w:4,h:4,minW:6,maxW:12,minH:4},icon:"chat",Preview:_d},{Component:od,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:$d,plan:"flow"},{Component:Id,widget:"GoalsDetailed",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:"flag",Preview:$d,plan:"flow"},{Component:Td,widget:"MatrixDoughDetailed",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:7,minW:2,maxW:12,minH:7},icon:No.a,Preview:$d,plan:"flow"},{Component:Fd,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:$d,plan:"flow"},{Component:ld,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:Md,plan:"flow"},{Component:sd,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:Md,plan:"flow"},{Component:ud,widget:"MatrixDough",name:"guidelines",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:No.a,Preview:Md,plan:"flow"},{Component:dd,widget:"GoalsDough",name:"goals",type:"charts",datagrid:{x:0,y:0,w:4,h:4,minW:2,maxW:12,minH:2},icon:"flag",Preview:Md,plan:"flow"},{Component:fd,widget:"Goal",name:"goals",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"flag",Preview:pd,plan:"flow"},{Component:hd,widget:"Objective",name:"objectives",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"gps_fixed",Preview:pd,plan:"flow"},{Component:md,widget:"Guideline",name:"guidelines",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:No.a,Preview:pd,plan:"flow"},{Component:gd,widget:"Actions",name:"actions",datagrid:{x:0,y:0,w:2,h:4,minW:2,maxW:12,minH:4},icon:"play_arrow",Preview:pd,plan:"flow"},{Component:yd,widget:"LastCompleted",type:"tasks",name:"lastCompletedCards",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:_d},{Component:vd,widget:"DayTasks",type:"tasks",name:"todayTasks",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:_d},{Component:xd,widget:"LateTask",type:"tasks",name:"lateActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:_d},{Component:Ed,widget:"NextTask",type:"tasks",name:"nextActivities",datagrid:{x:0,y:0,w:3,h:6,minW:2,maxW:12,minH:4},icon:"today",Preview:_d},{Component:jd,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:0,w:6,h:8,minW:3,maxW:12,minH:8},icon:"update",Preview:_d},{Component:Nd,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:zd}],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(Z.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"analytics"),t),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(Z.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(Z.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(mn,null,a.a.createElement(ed,{className:"grid",xs:12},a.a.createElement(b,{name:Object(S.s)("$__addCharts")})),a.a.createElement(ed,{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(ed,{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(ed,{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.s)("$__".concat(n),1),title:Object(S.s)("$__".concat(n),1),preview:!0,data:1,type:l,icon:s}))):null})))))))},Bd=Object(Ju.WidthProvider)(Ju.Responsive),Rd=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)([]),r=Object(m.a)(t,2),o=r[0],c=r[1],s=Object(n.useState)(!1),u=Object(m.a)(s,2),d=u[0],f=u[1],g=Object(n.useState)({}),b=Object(m.a)(g,2),y=b[0],v=b[1],x=Object(n.useState)(!1),_=Object(m.a)(x,2),O=_[0],w=_[1],j=Object(n.useState)(0),E=Object(m.a)(j,2),k=E[0],L=E[1],C=Object(n.useState)([]),I=Object(m.a)(C,2),T=I[0],F=I[1],D=Object(n.useState)(!0),N=Object(m.a)(D,2),A=N[0],P=N[1],$=Object(n.useRef)([{}]),M=Object(n.useRef)(!1),z=Object(n.useRef)({}),B=window.location.hash.split("/");B[0]=B[0].replace("#","");var G=Object(S.j)(),H=Object(at.t)(B[0]),W={backgroundColor:"white",color:"rgba(0, 0, 0, 0.80)"},U=JSON.stringify(e.cards),V=function(e,t,r,n,a,o,i,l){var s={component:e,name:t,type:n,datagrid:r,chart:a,icon:o,widget:i,key:Object(Y.a)(),filter:l||!1};O?F((function(e){return[].concat(Object(ge.a)(e),[s])})):c((function(e){return[].concat(Object(ge.a)(e),[s])}))};Object(n.useEffect)((function(){if(!O){var e=Object(at.s)(B[0]);JSON.stringify(y)!==JSON.stringify(e)&&v(e)}}),[U]),Object(n.useEffect)((function(){o.length>0&&0===T.length&&F(o)}),[o]),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!==A&&P(!0):P(!1)}),[e.loaders]),Object(n.useEffect)((function(){var e=[],t=l.a.getState().db;o.length<=0&&!O&&function(){var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=l.a.getState().db.cards[r[0]].customDashboard?Object.values(JSON.parse(l.a.getState().db.cards[r[0]].customDashboard)):null;n?(e=[{Component:Sd,widget:"taskByPerson"},{Component:Cd,widget:"taskDoneByTime"},{Component:Ku,widget:"AboutPlan"},{Component:nd,widget:"Notes"},{Component:ad,widget:"TimeLine"},{Component:od,widget:"ActionsDetailed"},{Component:Id,widget:"GoalsDetailed"},{Component:Td,widget:"MatrixDoughDetailed"},{Component:Fd,widget:"ObjectiveDetailed"},{Component:ld,widget:"ObjetiveDough"},{Component:sd,widget:"ActionsDough"},{Component:ud,widget:"MatrixDough"},{Component:dd,widget:"GoalsDough"},{Component:fd,widget:"Goal"},{Component:hd,widget:"Objective"},{Component:md,widget:"Guideline"},{Component:gd,widget:"Actions"},{Component:yd,widget:"LastCompleted"},{Component:vd,widget:"DayTasks"},{Component:xd,widget:"LateTask"},{Component:Ed,widget:"NextTask"},{Component:jd,widget:"Timesheet"},{Component:Nd,widget:"Funnel"}],n.map((function(t){var r=t.widget,n=e.find((function(e){return e.widget===r}));return Object(p.a)(Object(p.a)({},t),{},{component:n?n.Component:t.component})})).forEach((function(e){"Funnel"===e.widget&&"operational"!==t.cards[r[0]].planType||V(e.component,e.name,e.datagrid,e.name,e.name,e.icon,e.widget,e.filter)}))):("operational"!==t.cards[r[0]].planType?[{Component:Ku,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:ad,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:nd,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:Sd,widget:"taskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:Cd,widget:"taskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:ld,widget:"ObjetiveDough",name:"objectives",datagrid:{x:0,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:sd,widget:"ActionsDough",name:"actions",datagrid:{x:3,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"play_arrow"},{Component:ud,widget:"MatrixDough",name:"guidelines",datagrid:{x:6,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"MatrixIcon"},{Component:dd,widget:"GoalsDough",name:"goals",datagrid:{x:9,y:7,w:3,h:5,minW:2,maxW:12,minH:3},icon:"gps_fixed"},{Component:yd,widget:"LastCompleted",name:"lastCompletedCards",datagrid:{x:0,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:vd,widget:"DayTasks",name:"todayTasks",datagrid:{x:3,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:xd,widget:"LateTask",name:"lateActivities",datagrid:{x:6,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:Ed,widget:"NextTask",name:"nextActivities",datagrid:{x:9,y:12,w:3,h:6,minW:2,maxW:12,minH:4},icon:"flag"},{Component:jd,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:18,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}]:[{Component:Ku,widget:"AboutPlan",name:"planResume",datagrid:{x:0,y:0,w:6,h:3,minW:2,maxW:12,minH:3},icon:"close"},{Component:ad,widget:"TimeLine",name:"TimeLine",datagrid:{x:6,y:0,w:6,h:7,minW:6,maxW:12,minH:4},icon:"close"},{Component:nd,widget:"Notes",name:"Notes",datagrid:{x:0,y:4,w:6,h:4,minW:2,maxW:12,minH:4},icon:"close"},{Component:Sd,widget:"taskByPerson",name:"taskByPerson",datagrid:{x:0,y:18,w:6,h:6,minW:3,maxW:12,minH:4},icon:"stacked_bar_chart"},{Component:Cd,widget:"taskDoneByTime",name:"taskDoneInWeek",datagrid:{x:6,y:18,w:6,h:6,minW:4,maxW:12,minH:4},icon:"area_chart"},{Component:Nd,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:jd,widget:"Timesheet",type:"charts",name:"Timesheet",datagrid:{x:0,y:27,w:4,h:8,minW:3,maxW:12,minH:8},icon:"update"}]).forEach((function(e){V(e.Component,e.name,e.datagrid,e.name,e.name,e.icon,e.widget)}))}()}),[o,O]);var q=Object(n.useRef)(null);var X=function(){M.current=!0,f(!0),M.current?i.a.render(a.a.createElement(Yd,{category:"plan",filter:d,onClose:function(){return i.a.unmountComponentAtNode(document.getElementById("render-container"))},addWidget:function(e,t,r,n,a,o,i,c){return V(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:k,style:{width:"100%",marginTop:"8px",marginBottom:"8%",fontSize:"19px",color:"grey",overflowX:"hidden",overflowY:"hidden",paddingBottom:"80px"}},a.a.createElement("div",{id:"render-container"}),a.a.createElement("div",{style:{display:"flex"}},O&&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(ts,{text:Object(S.s)("$__addCharts"),icon:"add",onClick:function(){return X()}})),O&&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(ts,{text:Object(S.s)("$__save"),icon:"save",onClick:function(){return function(){var t={};T.forEach((function(e){$.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(M).length>0&&T.forEach((function(e){Object.values(z.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(at.N)(e,{_id:B[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)({},B[0],Object(p.a)(Object(p.a)({},l.a.getState().db.cards[B[0]]),{},{customDashboard:JSON.stringify(t)})))})),Object(S.c)({message:"Dados salvos",variant:"info",persist:!1,horizontal:"right",confirm:null}),c(T),w(!1)}()}})),(G.plan&&G.planAdmin||H>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(ts,{text:O?Object(S.s)("$__cancel"):Object(S.s)("$__editMode"),icon:O?"close":"edit",onClick:function(){O?(w((function(e){return!e})),F(o),L((function(e){return e+1}))):w((function(e){return!e}))},style:{backgroundColor:O&&"white",color:O&&"black "}}))),o.length>0&&a.a.createElement(Bd,{breakpoints:{lg:1200},cols:{lg:12,ll:4},rowHeight:80,isResizable:O,onLayoutChange:function(e,t){var r;(null===t||void 0===t||null===(r=t.lg)||void 0===r?void 0:r.length)>0&&($.current=null===t||void 0===t?void 0:t.lg)},style:{zIndex:"0"},draggableHandle:".drag-handle"},(O?T:o).filter((function(e){var t=e.component,r=e.key,n=e.name,a=e.datagrid,o=e.type,i=e.icon;e.filter;return t&&r&&n&&a&&o&&i})).map((function(e){var t=e.component,r=e.key,n=e.name,o=e.datagrid,i=e.type,c=e.icon,l=e.filter,s=t;return a.a.createElement("div",{key:r,"data-grid":o,className:"box"},a.a.createElement(R,null,Object.keys(y).length>0&&a.a.createElement(s,{styles:W,handleRemoveObject:function(e){return function(e){F((function(t){return t.filter((function(t){return t.key!==e}))}))}(e)},edit:O,handleSetFilter:function(e){return function(e){z.current=Object(p.a)(Object(p.a)({},z.current),{},Object(h.a)({},e.id,Object(p.a)(Object(p.a)({},z.current[e.id]),e)))}(e)},tittle:n,preview:!1,type:i,icon:c,datagrid:o,planCards:y,id:r,filter:l||!1,load:A})))}))))})),Gd=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(R,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.s)("$__changeGroupMode")),text:"".concat(Object(S.s)("$__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.s)("$__changeLayout")),text:"".concat(Object(S.s)("$__changeLayout"))})),a.a.createElement(kd.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}}))};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 Wd=Object(G.a)(Pr),Ud=j.b.div(wd||(wd=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;"):""})),Vd=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=Wd(),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],M[1]),Y=a.a.useState(!1),B=Object(m.a)(Y,2),R=B[0],G=B[1],H=a.a.useState(t.cardColorPicker?Object(at.r)(_):{}),W=Object(m.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(m.a)(q,2),J=X[0],K=X[1],Z=Object(n.useRef)({});Object(n.useEffect)((function(){if(Z.current&&t.onResize){var e=Z.current.clientHeight;t.separator&&(e+=55),t.onResize(e,E),Z&&Z.current&&Z.current.addEventListener("DOMNodeInserted",(function(){var e=Z.current.clientHeight;t.separator&&(e+=55),t.onResize(e,E)})),console.log(Z.current.event)}return function(){Z&&Z.current&&Z.current.event&&Z.current.removeEventListener("DOMNodeInserted")}}),[Z,E,t.manualExpanded,J]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&K(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&J&&K(!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)&&R&&G(!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 Q=window.location.hash.split("/");if(Q[0]=Q[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&Q&&"overview"===Q[1]&&(V(Object(at.r)(_)),e=!1),function(){e=!1}}),[t.cards]),_==={}||!_)return a.a.createElement(a.a.Fragment,null);var ee=Object(S.j)(),te=Object(at.t)(_._id);if(!_||!t.data||!t.data._id)return null;var re=function(){var e=Object(f.a)(Hd().mark((function e(){var r,n,a;return Hd().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===Q[0]||v.cards[e]._parent===Q[0])})).map((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})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),_.type.indexOf("guideline")>-1?Object.keys(r).map((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")})).map((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")})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):Object.keys(r).map((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(at.H)(t),a&&"matrix"===l.a.getState().db.dataType.filter((function(e){return e.name===_.type}))[0].module&&Object(at.I)(t,_._id);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=Object(f.a)(Hd().mark((function e(){var r,n=arguments;return Hd().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)}}(),ae=function(){var e=Object(f.a)(Hd().mark((function e(t){return Hd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(te)>2||ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate)?c.a.push("sp#".concat(t,"/dashboard")):ne("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=Object(f.a)(Hd().mark((function e(){return Hd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(at.F)(t,{_id:_._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=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,ce=!t.noExpanded&&(E||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||_._expanded||t.cardsExpanded)),le=!!(ee&&(ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate))||te>2);if(_&&_._users&&Object.keys(_._users).filter((function(e){return e===x._id})).length>0&&v.dataType.filter((function(e){return e.name===_.type})).length>0&&v.dataType.filter((function(e){return e.name===_.type}))[0].modules.indexOf("myDay")>-1?_._users[Object.keys(_._users).filter((function(e){return e===x._id}))[0]].myDay?{button:!0,date:_._users[Object.keys(_._users).filter((function(e){return e===x._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},_&&_.private&&(!_._users||_._users&&!_._users[x._id]))return a.a.createElement(a.a.Fragment,null);if(A)return a.a.createElement(tn,{cardId:_._id,toTemplate:!_.isTemplate,onComplete:function(){P(!1)}});var se={title:(null===_||void 0===_?void 0:_.name)||Object(S.s)("$__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 ue=JSON.parse(l.a.getState().db.cards[_._planId].customColumns),de=_.type.indexOf("guideline")>-1?"guideline":_.type;ue["".concat(de,"s")]&&(se=Object(p.a)(Object(p.a)(Object(p.a)({},se),ue["".concat(de,"s")].name?{iconTitle:ue["".concat(de,"s")].name}:{}),ue["".concat(de,"s")].icon?{icon:ue["".concat(de,"s")].icon}:{}))}return a.a.createElement(Ud,{ref:Z,separator:t.separator||!1,plan:!(!ce||"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),onMouseOver:function(){z(!0)},onMouseLeave:function(){setTimeout((function(){z(!1)}),100)},onClick:function(e){t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&ie||t.selectable)?re():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==_.type?t.locked||ne():ae(_._id):t.onClick(),t.onOpen&&t.onOpen())},onContextMenu:function(e){}},("completed"===_.status||t.cardColorPicker&&U.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&&U.color?U.color:"rgba(0,0,0,1)",opacity:U.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.s)("$__dropHereToLink")),a.a.createElement(Ke,{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})),G(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:se.title,tooltipText:"".concat(_._parent&&l.a.getState().db.cards[_._parent]?"".concat(l.a.getState().db.cards[_._parent].name," / "):"").concat(se.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:se.icon,iconTitle:se.iconTitle,color:Object(S.d)("medium"),editable:!(_.name||t.onlyOption&&!t.editable),_id:_._id,locked:!("link"!==_.type&&!t.locked),colorPicker:le&&t.cardColorPicker&&U&&!U.parent?function(e){(!U.color&&e||U.color&&U.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&&te&&parseInt(te)>1||ee&&ee.plan&&(ee.owner||ee.planAdmin||ee.planEdit||ee.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&&ce,noExpanding:t.expanded||l.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!ce),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(we.a,{title:_._createdBy.name||v.users[_._createdBy._id].name},a.a.createElement(Ie.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.s)("$__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(Ht,{data:_})),!t.noExpanded&&ce&&(!_.private||_.private&&(R||l.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(Hr,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)))):ce?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ut,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%"},ce?{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(Se.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(Se.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||ce?{marginBottom:33}:{}},a.a.createElement(Le.a,{options:_._tags,expanded:!!(t.showTags||ce&&"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(Se.a,{overlap:"rectangular",className:b.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(S.s)("$__recurrence")).concat(_.recurrenceCreatedDate?": ".concat(O()(_.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(S.s)("$__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:ce?37:7}},a.a.createElement("div",{className:b.usersContent},a.a.createElement("div",{className:b.users},a.a.createElement(tt.a,{_id:_._id,data:_,permission:le,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(et,{text:Object(S.s)("$__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.s)("$__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.s)("$__restoreThis",1),text:Object(S.s)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){oe()},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 qd(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(na,{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(Fi,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.s)("$__workedHours"),": ").concat(m),text:"".concat(Object(S.s)("$__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.s)("$__viewActivities","*"),text:Object(S.s)("$__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(Ie.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(at.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(Vd,{db:"cards",data:l.a.getState().db.cards[e],noShadow:!0,resume:!0}))}))}))):a.a.createElement(a.a.Fragment,null)))}))))}function Xd(e){var t,r=e.type,n=e.text,o=e.tags,i=(e.cards,e.statusFilter,e.search,e.tagsChartMount),c=l.a.getState().db,s=a.a.useState(!0),u=Object(m.a)(s,2);u[0],u[1];a.a.useEffect((function(){}),[]);var d=window.location.hash.split("/");d[0]=d[0].replace("#",""),36!==d[0].length&&(d[0]=null);var f={};return(null===(t=c.cards[d[0]])||void 0===t?void 0:t.customColumns)&&(f=JSON.parse(c.cards[d[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(yn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement(Li,null,a.a.createElement(Ke,{title:f[r]&&f[r].name?f[r].name:Object(S.s)("$__".concat(r),1),color:Object(S.d)("colorText"),style:{background:Object(S.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Pi,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})).map((function(e){var t,r,n={};c.status.map((function(e){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},e.value,0))}));if(Object.keys({}).length,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.r)(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 Jd(){Jd=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 Kd=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,r=a.a.useState(!0),n=Object(m.a)(r,2),o=(n[0],n[1]);O()().tz("America/Sao_Paulo").format("YYYY/MM/DD");a.a.useEffect((function(){i()}),[]);var i=function(){var t=Object(f.a)(Jd().mark((function t(){return Jd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,jr(Object(p.a)(Object(p.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[c[0]],db:"cards",type:"timer",reqChildrens:!0});case 2:t.sent&&o(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),c=window.location.hash.split("/");c[0]=c[0].replace("#",""),36!==c[0].length&&(c[0]=null);var s=Object(at.s)(c[0]),u={guidelines:{},objectives:{},goals:{},actions:{}},d={};Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===c[0])&&t.cards[e].type.indexOf("guideline")>-1&&!t.cards[e].deleted})).map((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).map((function(t){var r;u=Object(p.a)(Object(p.a)({},u),{},{guidelines:Object(p.a)(Object(p.a)({},u.guidelines||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),d=Object(p.a)(Object(p.a)({},d),{},{guidelines:Object(p.a)(Object(p.a)({},(null===(r=d)||void 0===r?void 0:r.guidelines)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===c[0])&&"objective"===t.cards[e].type&&!t.cards[e].deleted})).map((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).map((function(t){var r;u=Object(p.a)(Object(p.a)({},u),{},{objectives:Object(p.a)(Object(p.a)({},u.objectives||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),d=Object(p.a)(Object(p.a)({},d),{},{objectives:Object(p.a)(Object(p.a)({},(null===(r=d)||void 0===r?void 0:r.objectives)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===c[0])&&t.cards[e].type.indexOf("goal")>-1&&!t.cards[e].deleted})).map((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).map((function(t){var r;u=Object(p.a)(Object(p.a)({},u),{},{goals:Object(p.a)(Object(p.a)({},u.goals||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),d=Object(p.a)(Object(p.a)({},d),{},{goals:Object(p.a)(Object(p.a)({},(null===(r=d)||void 0===r?void 0:r.goals)||{}),{},Object(h.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===c[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)})).map((function(e){t.cards[e]._tags&&t.cards[e]._tags.filter((function(e){return e.value})).map((function(t){var r;u=Object(p.a)(Object(p.a)({},u),{},{actions:Object(p.a)(Object(p.a)({},u.actions||{}),{},Object(h.a)({},t.value,Object(p.a)({},t)))}),d=Object(p.a)(Object(p.a)({},d),{},{actions:Object(p.a)(Object(p.a)({},(null===(r=d)||void 0===r?void 0:r.actions)||{}),{},Object(h.a)({},e,!0))})}))}));var g={},b=[],y=[],v=[],x={};Object.keys(d).map((function(e){x=Object(p.a)(Object(p.a)({},x),d[e])}));var _=new Date,w=new Date,j=O()(_).unix("X");_=_.toISOString().split("T")[0],w.setDate(w.getDate()-30);var E=O()(w).unix("X");w=w.toISOString().split("T")[0];var k=e.searchs["tagsStatistics_".concat(c[0])]||{text:"#4",startDate:E,endDate:j},L=new Date(1e3*k.startDate||k.startDate),C=new Date(1e3*k.endDate||k.endDate),I="completed";k&&k.status&&Object.keys(k.status).length>0&&Object.keys(k.status).map((function(e){k.status[e]&&(I=e)}));for(var T,F=function(){var e=L.toISOString().split("T")[0],r={};Object.keys(s).filter((function(r){return t.cards[r].status===I&&Object(S.k)(t.cards[r]["completed"===I?"completed_at":"updated_at"],"YYYY-MM-DD")===e})).map((function(e){var n=t.cards[e],a=Object(at.s)(e);Object.keys(a).filter((function(e){return"completed"===I&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD")})).map((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&&(!k.text||k.text&&e.label.indexOf(k.text)>-1)})).map((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===v.indexOf(e.label)&&v.push(e.label)})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.filter((function(e){return e.value&&(!k.text||k.text&&e.label.indexOf(k.text)>-1)})).map((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===v.indexOf(e.label)&&v.push(e.label)}))}))})),Object.keys(r).length>0&&y.push(Object(p.a)({date:e},r)),T=L.setDate(L.getDate()+1),L=new Date(T)};L<=C;)F();Object.keys(s).filter((function(e){return t.cards[e].status===I&&("completed"===I&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD"))})).map((function(e){var r=Object(at.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"===I&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD"))})).map((function(r){t.cards[e]._tags.map((function(e){var n,a,o,i;g=Object(p.a)(Object(p.a)({},g),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},g[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===I?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===I?(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.map((function(e){var n,a,o,i;g=Object(p.a)(Object(p.a)({},g),{},Object(h.a)({},e.value,Object(p.a)(Object(p.a)({},g[e.value]||{}),{},Object(h.a)({},r,{date:"completed"===I?Object(S.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(S.k)(t.cards[r].updated_at,"YYYY-MM-DD"),dateStamp:"completed"===I?(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(g).map((function(e){var r=[],n={},a={};Object.keys(g[e]).map((function(t){n=Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},"".concat(g[e][t].date," "),n["".concat(g[e][t].date," ")]+1||1)),a=Object(p.a)(Object(p.a)({},a),{},Object(h.a)({},e,a[e]+1||1))})),Object.keys(n).map((function(e){r.push({x:e,y:n[e]})}));for(var o,i=new Date(w),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(_);)c();t.tag.filter((function(t){return t.value===e})).length>0&&(b=[].concat(Object(ge.a)(b),[{id:t.tag.filter((function(t){return t.value===e})).map((function(e){return e}))[0].label,data:Array.from(Object(ge.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 D=0;return Object.keys(g).filter((function(e){return t.tag.filter((function(t){return t.value===e})).length>0})).sort((function(e,t){return Object.keys(g[e]).length>Object.keys(g[t]).length?-1:Object.keys(g[e]).length<Object.keys(g[t]).length?1:0})).map((function(e,r){var n=0,a={},o=g[e].total||0;Object.keys(g[e]).map((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>=k.startDate&&r[e].fin<=k.endDate})).map((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})).map((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(at.s)(e);o+=Object.keys(i).filter((function(e){return t.cards[e]&&!t.cards[e].deleted&&t.cards[e].status===I&&(!t.cards[e].checklist||t.cards[e].checklist&&t.cards[e].showCard)&&("completed"===I&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=O()(1e3*k.startDate).format("YYYY-MM-DD")&&Object(S.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=O()(1e3*k.endDate).format("YYYY-MM-DD"))})).length})),D+=n,g[e]=Object(p.a)(Object(p.a)({},g[e]),{},{times:Object(S.l)(n),timesInt:n,TotalCards:o,timesByUser:a})})),a.a.createElement(R,null,a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12},a.a.createElement(au,{nodeId:"tagsStatistics_".concat(c[0]),defaultValues:{startDate:E,endDate:j,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(yn,{xs:12,sm:12,md:12,lg:12,style:{minHeight:300,height:35*y.length}},a.a.createElement(Gd,{data:y,keys:v}))),a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12},a.a.createElement(Li,null,a.a.createElement(qd,{data:g,statusFilter:I,startDate:E,search:k,totalTimes:D})))),a.a.createElement(mn,null,a.a.createElement(Xd,{tagsChartMount:g,tags:u.guidelines,cards:d.guidelines,type:"guidelines",text:"#1"}),a.a.createElement(Xd,{tagsChartMount:g,tags:u.objectives,cards:d.objectives,type:"objectives",text:"#2"}),a.a.createElement(Xd,{tagsChartMount:g,tags:u.goals,cards:d.goals,type:"goals",text:"#3"}),a.a.createElement(Xd,{tagsChartMount:g,tags:u.actions,cards:d.actions,type:"actions",text:"#4"})))})),Zd=function(e){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};var Qd,ep=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Zd)((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.s)("$__page")," ",i+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.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.s)("$__insightsPerPage")}))),a.a.createElement(mn,null,Object.keys(h).map((function(e,t){if(t<=(i+1)*d&&t>=i*d)return a.a.createElement(yn,{key:h[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,{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.s)("$__page")," ",i+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(h).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.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.s)("$__insightsPerPage")}))))}))),tp=r(1811),rp=r(1920),np=r(1921),ap=r(1919),op=r(641),ip=Object(G.a)({avatar:{backgroundColor:op.a[100],color:op.a[600]}});function cp(e){ip();var t=e.open,r=(e.selectedValue,e.onClose);return a.a.createElement(st.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&a.a.createElement(ap.a,{id:"simple-dialog-title"},e.title),a.a.createElement(q.a,null,e.options.map((function(e,t){return a.a.createElement(tp.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},a.a.createElement(rp.a,null,a.a.createElement(Z.a,{icon:e.icon})),a.a.createElement(np.a,{primary:Object(S.s)(e.name,1)}))}))))}function lp(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(et,{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(cp,{selectedValue:l,open:n,onClose:function(){var e;o(!1),s(e)},options:e.options}))}function sp(){sp=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 up,dp=j.b.div(Qd||(Qd=Object(d.a)(["\n                    background-color:none;\n                    "]))),pp=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)(sp().mark((function t(){var r;return sp().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)(sp().mark((function e(t){return sp().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)(sp().mark((function t(n){var a,i,c,s,u;return sp().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),B.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)(sp().mark((function e(t){return sp().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)(sp().mark((function e(t){return sp().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(Vt.a,{onDragEnd:_,onDragStart:O,onDragUpdate:w},a.a.createElement(Vt.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,r){return a.a.createElement(dp,Object.assign({},t.droppableProps,{isDraggingOver:r.isDraggingOver,ref:t.innerRef}),e.cards.map((function(e,t){return a.a.createElement(Vt.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(on,{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(et,{text:Object(S.s)("$__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(ye,{label:Object(S.s)("$__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.s)("$__titleOfCard_placeholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return x()}},a.a.createElement(Z.a,{color:"green",icon:"save",title:Object(S.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){y(!b),u("")}},a.a.createElement(Z.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.s)("$__cancel","*"),size:e.actionsSize||"25px"}))))))}));function fp(){fp=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 hp=j.b.div(up||(up=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                ")})),mp=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,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){o||(i(!0),Object(at.I)(e))}));var c=function(){var r=Object(f.a)(fp().mark((function r(n){var a,o,i,c,s,u,d,f,m,g,b,y,v;return fp().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.map((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}))),console.log(b),b.splice(o.index,0,c),y=Object(p.a)({},t.cards),d.map((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.map((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 31:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement(Vt.a,{onDragEnd:c},a.a.createElement(Vt.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return a.a.createElement(hp,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(Wu,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 gp,bp=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=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=r.cards,d=window.location.hash.split("/");d[0]=d[0].replace("#",""),d[0]&&36!==d[0].length&&(d[0]=null),a.a.useEffect((function(){c||(s(!0),j())}));var f={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===d[0]||r.cards[e]._parent===d[0])})).map((function(e){f=Object(p.a)(Object(p.a)({},f),{},Object(h.a)({},e,r.cards[e]))}));var g,b=Object.keys(f).filter((function(e){return!0===f[e]._selected&&f[e].type&&f[e].type.indexOf("guideline")>-1&&f[e]._parent===d[0]}))[0]||null,y=Object.keys(f).filter((function(e){return!0===f[e]._selected&&f[e].type&&"objective"===f[e].type}))[0]||null,v=Object.keys(f).filter((function(e){return!0===f[e]._selected&&f[e].type&&"goal"===f[e].type}))[0]||null,x=Object.keys(f).filter((function(e){return"guidelineR"===f[e].type&&f[e]._parent===d[0]&&!f[e].deleted})).sort((function(e,t){return f[e].order&&String(f[e].order.low)&&f[t].order&&String(f[t].order.low)&&parseInt(f[e].order.low)>parseInt(f[t].order.low)?1:-1})),_=Object.keys(f).filter((function(e){return"guidelineC"===f[e].type&&f[e]._parent===d[0]&&!f[e].deleted})).sort((function(e,t){return f[e].order&&String(f[e].order.low)&&f[t].order&&String(f[t].order.low)&&parseInt(f[e].order.low)>parseInt(f[t].order.low)?1:-1})),O=Object.keys(f).filter((function(e){return"guidelineE"===f[e].type&&f[e]._parent===d[0]&&!f[e].deleted})).sort((function(e,t){return f[e].order&&String(f[e].order.low)&&f[t].order&&String(f[t].order.low)&&parseInt(f[e].order.low)>parseInt(f[t].order.low)?1:-1})),w=Object.keys(f).filter((function(e){return"guidelineD"===f[e].type&&f[e]._parent===d[0]&&!f[e].deleted})).sort((function(e,t){return f[e].order&&String(f[e].order.low)&&f[t].order&&String(f[t].order.low)&&parseInt(f[e].order.low)>parseInt(f[t].order.low)?1:-1})),j=function(){var t=Object(p.a)({},l.a.getState().db.cards);Object.keys(f).map((function(e){f[e]&&f[e]._selected&&(f[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),f)}))};v?g=Object.keys(f).filter((function(e){return f[e]._parent===v&&!f[e].checklist})):y?g=Object.keys(f).filter((function(e){return f[e]._parent===y&&!f[e].checklist})):b&&(g=Object.keys(f).filter((function(e){return f[e]._parent===b&&!f[e].checklist})));var E=Object.keys(f).filter((function(e){return f[e]._parent===d[0]})),k=f&&Object.keys(f).filter((function(e){return f[e]&&f[e]._selected&&f[e].type&&f[e].type.indexOf("guideline")>-1}));return a.a.createElement("div",{style:{width:"inherit"}},!y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(H.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.s)("$__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.s)("$__externalAspects",1))),a.a.createElement(H.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.s)("$__s.W.O.T","*"))),a.a.createElement(mp,{cards:E.map((function(e){return f[e]})),showSelected:Object.keys(f).filter((function(e){return!0===f[e]._selected})).length>0,lockColumns:k.length>0&&"guidelineD"===f[k[0]].type?["strength","threat"]:k.length>0&&"guidelineR"===f[k[0]].type?["strength","opportunity"]:k.length>0&&"guidelineE"===f[k[0]].type?["weakness","threat"]:k.length>0&&"guidelineC"===f[k[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0,inLineAdd:!0})),a.a.createElement(mn,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(Z.a,{icon:No.a,color:Object(S.d)("textColor"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},b?Object(S.s)("$__planning",1):"MATRIX SWOT"))),b?a.a.createElement(a.a.Fragment,null,a.a.createElement(yn,{md:3,sm:12,xs:12},a.a.createElement("div",null,a.a.createElement(na,{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&&u[b]&&u[b].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(on,{data:u[b],db:"cards",selectOption:!0,expanded:!0}),a.a.createElement(et,{icon:"undo",text:Object(S.s)("$__backToMatrix","*"),onClick:function(){j("guideline")}})),y&&a.a.createElement("div",null,a.a.createElement(na,{title:Object(S.s)("$__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&&u[y]&&u[y].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(on,{data:u[y],db:"cards",selectOption:!0,expanded:!0})),v&&a.a.createElement("div",null,a.a.createElement(na,{title:Object(S.s)("$__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:y,status:"notStarted"}}))}}]}),e.hidePrivate&&u[v]&&u[v].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(on,{data:u[v],db:"cards",selectOption:!0,expanded:!0}))),a.a.createElement(yn,{md:9,sm:12,xs:12},a.a.createElement(na,{title:y&&!v?Object(S.s)("$__goals",1):y?Object(S.s)("$__actions",1):Object(S.s)("$__objectives",1),icon:y&&!v?n.filter((function(e){return"goal"===e.name}))[0].icon:y?"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:[v?{component:a.a.createElement(lp,{iconColor:Object(S.d)("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Object(S.s)("$__".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:v,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:y?{type:"goal",_parent:y,status:"notStarted"}:{type:"objective",_parent:b,status:"notStarted"}}))}}]}),a.a.createElement(qu,{cards:(null===(t=g)||void 0===t?void 0:t.map((function(e){return f[e]})))||[],viewButton:!0}))):a.a.createElement(yn,{md:12},a.a.createElement(mn,{style:{paddingBottom:"33px"}},a.a.createElement(yn,{md:3,sm:12,xs:12},a.a.createElement(na,{title:Object(S.s)("$__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.s)("$__guidelineRtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.s)("$__guidelineRdetails",1))),a.a.createElement(pp,{cards:x,cardType:"guidelineR"})),a.a.createElement(yn,{md:3,sm:12,xs:12},a.a.createElement(na,{title:Object(S.s)("$__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.s)("$__guidelineDtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.s)("$__guidelineDdetails",1))),a.a.createElement(pp,{cards:w,cardType:"guidelineD"})),a.a.createElement(yn,{md:3,sm:12,xs:12},a.a.createElement(na,{title:Object(S.s)("$__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.s)("$__guidelineCtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.s)("$__guidelineCdetails",1))),a.a.createElement(pp,{cards:_,cardType:"guidelineC"})),a.a.createElement(yn,{md:3,sm:12,xs:12},a.a.createElement(na,{title:Object(S.s)("$__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.s)("$__guidelineEtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(S.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(S.s)("$__guidelineEdetails",1))),a.a.createElement(pp,{cards:O,cardType:"guidelineE"}))))))}));function yp(){yp=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 vp=j.b.div(gp||(gp=Object(d.a)(["\nposition:absolute;\nheight:100%;\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                ")})),xp=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(at.j)(t);return!(!g.cards[t]||!(!g.cards[t].private||g.cards[t].private&&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)(yp().mark((function t(r){var n,a,o,i,c,s,u,d,f,m,b,y,v;return yp().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.s)("$__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(){Object(at.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(at.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.s)("$__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.s)("$__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.s)("$__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.s)("$__confirmTransformIn",1),": ").concat(Object(S.s)("$__".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(at.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)(yp().mark((function t(r){var n;return yp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,L&&L._id&&(n=L),t.next=4,Object(at.N)(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)(yp().mark((function t(r){var n;return yp().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)(yp().mark((function t(a,o){return yp().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(at.N)(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)(yp().mark((function t(){return yp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(at.N)(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(Vt.a,{onDragEnd:R},a.a.createElement(Vt.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(vp,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(eu,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(st.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(Ke,{title:Object(S.s)("$__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.s)("$__YouHaveLinkedGoals"),a.a.createElement("p",{style:{color:"red"}},Object(S.s)("$__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(on,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(Fe.a,{onClick:function(){Object(at.N)(e,{_id:t._id,type:"task"})}},a.a.createElement(Z.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.s)("$__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.s)("$__skipAll"),text:Object(S.s)("$__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.s)("$__changeAllInTasks"),text:Object(S.s)("$__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.s)("$__YouHaveLinkedObjectives"),a.a.createElement("p",{style:{color:"red"}},Object(S.s)("$__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(on,{db:"cards",cardId:t._id,noShadow:!0}),a.a.createElement(Fe.a,{onClick:function(){Object(at.N)(e,{_id:t._id,type:"goal"})}},a.a.createElement(Z.a,{icon:"change_circle",color:Object(S.d)("menu"),title:Object(S.s)("$__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.s)("$__skipAll"),text:Object(S.s)("$__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.s)("$__changeAllInGoal"),text:Object(S.s)("$__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.s)("$__cancel"),text:Object(S.s)("$__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.s)("$__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.s)("$__cancel"),text:Object(S.s)("$__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.s)("$__save"),text:Object(S.s)("$__save"),icon:"done_all",size:"25px",onClick:function(){W()}})))))))}));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 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 Op=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)(_p().mark((function t(){var r;return _p().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(We.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(at.j)(e);if(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)return!0})).map((function(e){var t=Object(at.j)(e);T+=t.total})),a.a.createElement("div",null,a.a.createElement(yn,{md:12,sm:12,xs:12},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement(au,{style:{marginRight:"7px"},fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0}),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(Ye,{text:Object(S.s)("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Object(S.s)("$__orderByAsc"):Object(S.s)("$__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.s)("$__manualOrder"):Object(S.s)("$__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.s)("$__hideCatenationColors"):Object(S.s)("$__showCatenationColors"),icon:"palette",color:u?"lightGray":Object(S.d)("menu"),onClick:function(){d((function(e){return!e}))}},{name:Object(S.s)("$__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.s)("$__hideCompleted","*"):Object(S.s)("$__showCompleted","*"),text:o?Object(S.s)("$__hideCompleted","*"):Object(S.s)("$__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.s)("$__hideUnreaded","*"):Object(S.s)("$__showUnreaded","*"),text:b?Object(S.s)("$__hideUnreaded","*"):Object(S.s)("$__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.s)("$__hideDeleted"):Object(S.s)("$__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(yn,{md:12,style:{marginLeft:"-30px"}},a.a.createElement(xp,{nodeId:C[0]||null,showCompleted:o,showColors:u,onlyUnReaded:b,styles:{discountHeight:140}})))}));var wp=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Zd)((function(e){e.classes;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=a.a.useState(!1),g=Object(m.a)(h,2),b=(g[0],g[1],window.location.hash.split("/"));b[0]=b[0].replace("#","");var y={};return y=36===b[0].length?(y=Object.keys(r.cards).filter((function(e){return r.cards[e]._parent&&r.cards[e]._parent===b[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})):(y=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(y).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.s)("$__page")," ",c+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(y).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.a,{component:"div",count:Object.keys(y).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.s)("$__cardsPerPage")}))),a.a.createElement(mn,null,Object.keys(y).map((function(e,t){if(t<=(c+1)*p&&t>=c*p)return a.a.createElement(yn,{key:y[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,{db:"cards",data:y[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(y).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.s)("$__page")," ",c+1," ",Object(S.s)("$__of")," ",Math.ceil(Object.keys(y).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(tl.a,{component:"div",count:Object.keys(y).length,page:c,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(S.s)("$__cardsPerPage")}))))}))),jp=r(625),Ep=r.n(jp);var kp=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).filter((function(e){c.users.indexOf(e)>-1&&(t=!0)})),t})).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)||void 0)})).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.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement(mn,{style:{marginTop:"7px"}},u&&u.length>0&&u.filter((function(e){if((!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))return!0})).sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0})).map((function(e){var t;return a.a.createElement(yn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,(t={db:"cards",data:e},Object(h.a)(t,"db","cards"),Object(h.a)(t,"Avatar",!0),Object(h.a)(t,"expanded",!0),Object(h.a)(t,"ignoreList",!0),t)))})),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:Ep.a})))}))),Sp=r(649),Lp=r.n(Sp),Cp=r(650),Ip=r.n(Cp);function Tp(){Tp=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 Fp=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.s)("$__users",1),":"),a.a.createElement(lt.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(we.a,{title:t[e].name,key:e},a.a.createElement(Ie.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(on,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},Dp=Object(u.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(oo)((function(e){var t,r,n=e.data,o=(e.classes,l.a.getState()),i=o.db,s=o.session,u=(o.usersStatus,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()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a.a.useEffect((function(){g||(b(!0),w())}));var w=function(){var e=Object(f.a)(Tp().mark((function e(){return Tp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=window.location.hash.split("/");j[0]=j[0].replace("#","");var E=[],k={};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)})).map((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,r;if(i.cards[e]&&i.cards[e].status&&"completed"!==i.cards[e].status)k=Object(p.a)(Object(p.a)({},k),{},(t={},Object(h.a)(t,i.cards[e].status,k&&k[i.cards[e].status]?k[i.cards[e].status]+1:1),Object(h.a)(t,"total",k.total?k.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()?k.late?k.late+1:1:k.late?k.late:0),t));else k=Object(p.a)(Object(p.a)({},k),{},(r={},Object(h.a)(r,"completed",k&&k.completed?k.completed+1:1),Object(h.a)(r,"total",k.total?k.total+1:1),r));E[i.cards[e].type]=E[i.cards[e].type]?E[i.cards[e].type]+1:1}else E.swot=null==E.swot?1:E.swot+1})),E=[],k={},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(Z.a,{color:Object(S.d)("color"),icon:"close",onClick:function(){c.a.push("c#tab/".concat(j[1]))}})))),!x&&n.image?a.a.createElement("img",{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?Ip.a:Lp.a),onError:function(e){_(null)},onLoad:function(e){_("".concat(n.image?n.image:n.type&&"user"!==n.type?Ip.a:Lp.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(x,'")'),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(Z.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(Z.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(Z.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(Z.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(Z.a,{color:Object(S.d)("color"),icon:"badge",onClick:function(){c.a.push("c#tab/units/".concat(n._id))}})))),n.image&&(!x||n.image&&n.image!==x)?a.a.createElement("img",{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?Ip.a:Lp.a),onError:function(e){},onLoad:function(e){_("".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(x,'")'),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(Z.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(Z.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(Z.a,{color:Object(S.d)("medium"),size:"12px"},"supervisor_account"),a.a.createElement("span",null,Object(S.s)("$__supervisorAccount"))):a.a.createElement(a.a.Fragment,null,a.a.createElement(Z.a,{color:Object(S.d)("medium"),size:"12px"},"supervised_user_circle"),a.a.createElement("span",null,Object(S.s)("$__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.s)("$__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.s)("$__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(Fp,Object.assign({id:n._id},e))),"user"===n.type&&Object.keys(E).length>0?a.a.createElement("div",{style:{display:"flex",width:"100%",paddingLeft:"15px",paddingRight:"15px",flexFlow:"wrap",paddingTop:15,paddingBottom:15}},Object.keys(E).map((function(e,t){return"null"!==String(e)&&"undefined"!==String(e)?a.a.createElement(Se.a,{overlap:"rectangular",key:t,style:{padding:3},icon:i.dataType.filter((function(t){return t.name===e}))[0].icon,title:Object(S.s)("$__".concat(e),1),size:"16px",count:E[e],disabled:!0}):null}))):a.a.createElement(a.a.Fragment,null),"user"===n.type&&k&&k.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.s)("$__openActivities")),a.a.createElement("h3",null,a.a.createElement("small",null,Object(S.s)("$__total",1),": ",k.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(Z.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)(e.label,1))),a.a.createElement("div",null,k[e.value]?k[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(Z.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(S.s)("$__late",1))),a.a.createElement("div",null,k.late)))):a.a.createElement(a.a.Fragment,null),!e.resume&&a.a.createElement(Le.a,{options:n.tags,showOptions:!1}),e.resume&&a.a.createElement("div",null,a.a.createElement(un,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},userId:n._id},a.a.createElement(Z.a,{size:"27px"},"chat")))))})));var Np=function(e){var t=l.a.getState().db,r=[];return e.plans.map((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(yn,{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(Dp,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},Ap=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(yn,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(on,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},Pp=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){i.users.indexOf(e)>-1&&(t=!0)})),t})).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)||void 0)})).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.map((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(na,{title:Object(S.s)("$__myFavoritePlans",1),icon:"favorite",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Ap,{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(na,{title:Object(S.s)("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Ap,{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(na,{title:Object(S.s)("$__customerPlanning",1),icon:"business",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Np,{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(na,{title:Object(S.s)("$__accountPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Ap,{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(na,{title:Object(S.s)("$__consultingPlanning",1),icon:"work",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Ap,{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(na,{title:Object(S.s)("$__privatePlanning",1),icon:"private_connectivity",color:Object(S.d)("menu")}),a.a.createElement(mn,null,a.a.createElement(Ap,{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:Ep.a})))}));var $p=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;return 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(at.B)(r[0])&&(o=Object(at.B)(r[0])),o?36===r[0].length&&l.a.getState().db.cards[r[0].replace("#","")]&&r[1]&&"board"===r[1]?a.a.createElement($u,{nodeId:r[0]||null}):a.a.createElement("div",{style:{height:"-webkit-fill-available"}},a.a.createElement(dl,null),Kf.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)||void 0)})).length>0?a.a.createElement("div",{style:{position:"fixed",top:50,zIndex:1}},a.a.createElement(au,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0,nodeId:n})):a.a.createElement(a.a.Fragment,null),(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"home"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Pp,null)):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"completed"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Pp,{completed:!0})):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&a.a.createElement(kp,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(bp,null),r[1]&&("actions"===r[1]||"guidelines"===r[1]||"objectives"===r[1]||"goals"===r[1])&&a.a.createElement(Xu,{type:r[1]}),r[1]&&"dashboard"===r[1]&&a.a.createElement(Rd,null),r[1]&&"statistics"===r[1]&&a.a.createElement(Kd,null),r[1]&&"overview"===r[1]&&a.a.createElement(Op,null),r[1]&&"bright-and-connected"===r[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Jl,null)),r[1]&&"insight-boards"===r[1]&&a.a.createElement(ep,null),r[1]&&"radar"===r[1]&&a.a.createElement(wp,null),r[1]&&"library"===r[1]&&a.a.createElement(Ts,null),r[1]&&"planningBoard"===r[1]&&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)):(c.a.push("/deniedAccess"),a.a.createElement(a.a.Fragment,null))})));function Mp(){Mp=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 zp=Object(u.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},history:e.history,hidePrivate:e.controls.hidePrivate,searchs:e.searchs}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((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(){return function(){}}),[]),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]);var F=function(){console.log(x[0]),Object(We.b)(e,{cardLoad:"tags",idRel:x[0],adminView:!0})},D=function(){var t=Object(f.a)(Mp().mark((function t(){var r,n;return Mp().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(br,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.r)(C.tag.filter((function(e){return e.value===x[0]}))[0].color,!0):Object(S.d)("menu")}:{})},a.a.createElement(Z.a,{size:"22px",color:C.tag.filter((function(e){return e.value===x[0]}))[0].color?Object(S.r)(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.s)("$__adminMode"),text:Object(S.s)("$__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(mn,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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__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(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__guidelines",1),icon:I.filter((function(e){return"guideline"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__objectives",1),icon:I.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__goals",1),icon:I.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__actions",1),icon:"double_arrow",color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:"BRIGHT & CONNECTED",icon:Rr.a,color:Object(S.d)("menu"),style:{padding:"7px"}}),a.a.createElement(mn,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(yn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(on,{db:"cards",cardId:t,showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))})));var Yp=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")})),Bp={root:{}};var Rp=r(795),Gp=function(e){var t,r=e.handleData,o=Object(n.useState)(!1),i=Object(m.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)([]),u=Object(m.a)(s,2),d=(u[0],u[1]),f=Object(n.useState)(!1),g=Object(m.a)(f,2),b=g[0],y=g[1],v=Object(n.useState)(null),x=Object(m.a)(v,2),_=x[0],O=x[1],w={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"}},j=a.a.useRef(null),E=function(e){y(!0);var t=new FileReader;t.onload=function(e){var t=e.target.result,n=Rp.a(t,{type:"binary"}),a=n.SheetNames[0],o=n.Sheets[a],i=Rp.b.sheet_to_json(o);setTimeout((function(){y(!1),r(i)}),0),d(i)},e instanceof File?(t.readAsBinaryString(e),O(e)):(t.readAsBinaryString(e.target.files[0]),O(e.target.files[0]))},k=function(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?l(!0):"dragleave"===e.type&&l(!1)};return a.a.createElement("form",{style:w.formFileUpload,onDragEnter:k,onSubmit:function(e){return e.preventDefault()}},a.a.createElement("input",{ref:j,type:"file",style:w.inputFileUpload,multiple:!0,onChange:function(e){e.preventDefault(),e.target.files&&e.target.files[0]}}),a.a.createElement("label",{className:c?"label-file-upload drag-active":"label-file-upload",style:c?Object(p.a)(Object(p.a)({},w.labelFileUpload),w.labelFileUploadDragActive):w.labelFileUpload},a.a.createElement("div",null,_?a.a.createElement("p",null,Object(S.s)("$__youSendedArchive"),' "',_.name,'"'):a.a.createElement("p",null,Object(S.s)("$__putAnArchive")),b&&a.a.createElement(fe,null),a.a.createElement("input",{type:"file",style:{alignSelf:"center",display:"none"},accept:".xlsx, .xls",id:"selectedFile",onChange:E}),a.a.createElement("input",{style:(t={marginTop:"10px",backgroundColor:"#0095ff",color:"white",border:"1px solid grey",cursor:"pointer"},Object(h.a)(t,"border","none"),Object(h.a)(t,"borderRadius","5px"),Object(h.a)(t,"padding"," 10px 20px"),t),type:"button",value:Object(S.s)("$__search..."),onClick:function(){document.getElementById("selectedFile").click()}}))),c&&a.a.createElement("div",{style:w.dragFileElement,onDragEnter:k,onDragLeave:k,onDragOver:k,onDrop:function(e){e.preventDefault(),e.stopPropagation(),l(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&(console.log(e.dataTransfer.files[0]),E(e.dataTransfer.files[0]))}}))},Hp=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(Z.a,{style:{color:"green",alignSelf:"center"}},"done")):a.a.createElement("div",null,a.a.createElement(El.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(aa.a,null):0===r&&!1===o&&Object.keys(h).length||!1===o&&Object.keys(h).length>=r&&0!==r||s?a.a.createElement(Z.a,{style:{color:"red",alignSelf:"center"}},"warning"):void 0))))))},Wp=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(ed,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex",padding:"0px"}},a.a.createElement(Z.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(ed,{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(ed,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"30px"}},a.a.createElement(s,{handleEvent:t,name:Object(S.s)("$__back"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",backgroundColor:"none",color:"black"}})))))};function Up(){Up=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 Vp=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),N=D[0],A=D[1],P=Object(n.useState)({}),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=Object(n.useState)(!1),G=Object(m.a)(Y,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(ge.a)(new Set(t.flatMap((function(e){return Object.keys(e)}))))).map((function(e){return e.toLowerCase()}))).filter((function(e){return r.includes(e)})),A(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(ge.a)(t),[e])}))},V=function(e,t,r){var n=Object(ge.a)(g);n[e][r]=t,n&&b(n)},q=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(){X(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(ge.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}),{}),z(e),_({})}var r,n}()}}),[x]);var X=function(){var t=Object(f.a)(Up().mark((function t(){var r,n,a,o,i,c,u,d=arguments;return Up().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.t)(g[r].email),t.next=7,Ot(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.s)("$__emailAlreadyInUse")}),(null===(o=g[r])||void 0===o?void 0:o.nomecompleto.split("").length)<3&&{sended:!1,nameError:Object(S.s)("$__minimalNameField")}),!n&&{sended:!1,emailErrorInv:Object(S.s)("$__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,B.a.post("user/addImport",c);case 16:(u=t.sent)&&(B.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.s)("$__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)}}(),J={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.s)("$__completeName");break;case"nomedeexibi\xe7\xe3o":t=Object(S.s)("$__showName");break;case"email":t=Object(S.s)("$__email");break;case"departamento/grupo":t=Object(S.s)("$__department/group");break;case"ramal":t=Object(S.s)("$__branchLine");break;case"observa\xe7\xf5es":t=Object(S.s)("$__observation");break;case"celular":t=Object(S.s)("$__phone")}return a.a.createElement("div",{style:J},a.a.createElement("p",{style:{width:"100%",alignSelf:"center",padding:"0px",overflow:"hidden",margin:"0px 0px 0px 10px"}},t))};return a.a.createElement(R,null,a.a.createElement(ed,{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(Wp,{message:Object(S.s)("$__finalMsgUserImportConcluded"),title:Object(S.s)("$__concluded"),icon:"done",color:"green",resetComponent:r}),H?a.a.createElement(Wp,{message:Object(S.s)("$__finalMsgUserImportError"),title:Object(S.s)("$__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)({},J),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",justifyContent:"center",display:"flex"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px"}},Object(S.s)("$__remove"))),N.length>0&&N.map((function(e,t){return a.a.createElement(K,{name:e,key:t})})),a.a.createElement("div",{style:Object(p.a)(Object(p.a)({},J),{},{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.s)("$__stats"))))),g.length>0&&a.a.createElement(ua.a,null,(function(e){var t=e.height,r=e.width;return a.a.createElement(sa.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(Hp,{selected:!(!j||!j.includes(n)),column:N,handleDataChange:function(e,t,r){return V(e,t,r)},handleCheckboxChange:U,style:o,add:c,data:r,data1:x,dataError:M[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(ed,{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(q,{handleEvent:function(){b(g.filter((function(e,t){return!j.includes(t)}))),E([])},name:Object(S.s)("$__removeSelected"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black",justifySelf:"left"}}),a.a.createElement(q,{handleEvent:function(){X(0),s(!0)},name:Object(S.s)("$__add"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black"}})," ")))},qp=r(1090),Xp=r.n(qp),Jp=r(1091),Kp=r.n(Jp),Zp=Object(u.b)((function(e){return{importUsers:e.controls.importUsers}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,o=Object(n.useState)([]),i=Object(m.a)(o,2),c=i[0],s=i[1],u=Object(n.useState)(!1),d=Object(m.a)(u,2),f=(d[0],d[1]),g=Object(n.useState)(!1),b=Object(m.a)(g,2),y=b[0],v=b[1],x={padding:"5px 10px"},_={borderBottom:"1px solid #dddddd"},O={padding:"5px 25px",fontWeight:"bold",backgroundColor:"#f2f2f2"};return Object(n.useEffect)((function(){c.length>0&&f(!0)}),[c]),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(mn,{style:{maxWidth:"1400px",backgroundColor:"#ffffff",borderRadius:"5px",border:"2px solid #dedede",position:"relative",margin:"auto"}},a.a.createElement(yn,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex"}},c.length>0&&!y&&a.a.createElement(Z.a,{onClick:function(){return s([])},style:{alignSelf:"left",color:Object(S.d)("menu"),left:"25px",top:"25px",position:"absolute"},size:"30px"},"arrow_back"),!y&&a.a.createElement(Z.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(Z.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.s)("$__importUsers"))),!c.length>0?a.a.createElement(a.a.Fragment,null," ",a.a.createElement(yn,{item:!0,xs:6,style:{}},a.a.createElement(yn,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(Z.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.s)("$__beforeImportUser"))),a.a.createElement(yn,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginBottom:"10px"}},Object(S.s)("$__importUsersDescp"),a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.s)("$__email"),'" '),Object(S.s)("$__and")," ",a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(S.s)("$__completeName"),'"'),"."),a.a.createElement("a",(t={href:Xp.a,style:{fontSize:"17px"},target:"_blank",rel:"noopener noreferrer"},Object(h.a)(t,"rel","noopener noreferrer"),Object(h.a)(t,"download","Arquivo-Amostra"),t),a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.s)("$__clickToDownloadXLSX")))),a.a.createElement(yn,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginTop:"10px"}},Object(S.s)("$__importUsersSecondDescp")),a.a.createElement("a",(r={href:Kp.a,style:{fontSize:"16px"},target:"_blank",rel:"noopener noreferrer"},Object(h.a)(r,"rel","noopener noreferrer"),Object(h.a)(r,"download","Arquivo-Amostra-Completo"),r),a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(S.s)("$__clickToDownloadXLSXOptions")))),a.a.createElement(yn,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(Z.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.s)("$__fieldOptions"))),a.a.createElement(yn,{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:_},a.a.createElement("th",{style:x},Object(S.s)("$__phone")),a.a.createElement("td",{style:O}," ",Object(S.s)("$__phoneDescpImportUsers"))),a.a.createElement("tr",{style:_},a.a.createElement("th",{style:x},Object(S.s)("$__branchLine")),a.a.createElement("td",{style:O},Object(S.s)("$__branchLineDescp"))),a.a.createElement("tr",{style:_},a.a.createElement("th",{style:x},Object(S.s)("$__observation")),a.a.createElement("td",{style:O},Object(S.s)("$__observationImportDescp"))),a.a.createElement("tr",{style:_},a.a.createElement("th",{style:x},Object(S.s)("$__department/group")),a.a.createElement("td",{style:O},Object(S.s)("$__department/groupDescp"))),a.a.createElement("tr",{style:_},a.a.createElement("th",{style:x},Object(S.s)("$__showName")),a.a.createElement("td",{style:O}," ",Object(S.s)("$__showNameDescp"))))))),a.a.createElement(yn,{item:!0,xs:6,style:{border:"1px solid #ebebeb",display:"flex",justifyContent:"center"}},a.a.createElement(Gp,{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(ge.a)(e),[r])}),[]);s(t)}}))):a.a.createElement(Vp,{dataUser:c,resetComponent:function(){s([]),v(!1)},onAdding:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];v(e)}}))):a.a.createElement(a.a.Fragment,null)}));var Qp=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(ae.a)(Bp)((function(e){var t,r,n=a.a.useState([]),o=Object(m.a)(n,2),i=o[0],s=o[1],u=a.a.useState(!1),d=Object(m.a)(u,2),p=d[0],f=(d[1],a.a.useState(!1)),h=Object(m.a)(f,2),g=h[0],b=(h[1],l.a.getState()),v=b.db,x=b.session,_=(b.searchs,v.users),O=Object(S.j)();a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(i)&&s(e)}));var w=Object.keys(_).filter((function(e){return!_[e].deleted})).map((function(e){return _[e]})),j=e.nodeId?e.nodeId:y()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),E=e.searchs&&e.searchs[j]?e.searchs[j]:{};E.text&&(w=w.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(E.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(E.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(E.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===i[0]&&"users"===i[1]&&(w=w.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===i[0]&&"units"===i[1]&&(w=w.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),(null===E||void 0===E||null===(t=E.userGroups)||void 0===t?void 0:t.length)>0&&(w=w.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return E.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var k=Object.keys(_).map((function(e){return _[e]}));if("tab"===i[0]&&"units"===i[1]&&i[2]&&36===i[2].length&&(k=k.filter((function(e){return"user"===e.type&&e._parent===i[2]})).map((function(e){return e}))),(null===E||void 0===E?void 0:E.users)&&(null===E||void 0===E?void 0:E.userGroup.length)>0&&(k=k.filter((function(e){return e.groups.filter((function(e){return e.value===E.users.userGroup[0].value})).length>0})).map((function(e){return e}))),E.text&&(k=k.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(E.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(E.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(E.text.toLowerCase())>-1)})).map((function(e){return e}))),(null===E||void 0===E||null===(r=E.tags)||void 0===r?void 0:r.length)>0&&(k=k.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return E.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),O&&!O.owner&&!O.user)return a.a.createElement(Yp,null);window.location.hash.split("/")[0].replace("#","")||c.a.push("c#tab/units");var L=function(e,t){var r,n,a,o;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&&(!E.text||E.text&&(l.a.getState().db.users[t].name.toLowerCase().indexOf(E.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(E.text.toLowerCase()))>-1))&&(!E.tags||(null===(a=l.a.getState().db.users[t])||void 0===a||null===(o=a.tags)||void 0===o?void 0:o.filter((function(e){return E.tags.filter((function(t){return t.value===e.value})).length>0})).length)>0)&&(!p&&(!l.a.getState().db.users[t]._parent||l.a.getState().db.users[t]._parent===x.account)||p&&l.a.getState().db.users[t]._parent&&l.a.getState().db.users[t]._parent!==x.account)&&(!g&&!l.a.getState().db.users[t].deleted||g&&l.a.getState().db.users[t].deleted))};return a.a.createElement("div",null,a.a.createElement(dl,null),a.a.createElement("div",null,a.a.createElement(au,Object.assign({},"tab"!==i[0]||"departments"!==i[1]?{fields:["text","tags","userGroups"]}:{fields:["text","tags"]},{nodeId:j,showFilters:!0,style:{marginLeft:7},onChange:function(e){},title:{text:Object(S.s)("$__name")}})),a.a.createElement(mn,null,"tab"===i[0]&&"departments"===i[1]?a.a.createElement("div",null,a.a.createElement("div",null,l.a.getState().db.userGroup.filter((function(e){if(Object.keys(l.a.getState().db.users).filter((function(t){return L(e,t)})).length>0)return!0})).map((function(e){var t=Object.keys(l.a.getState().db.users).filter((function(t){return L(e,t)}));return a.a.createElement("div",{key:e.value,style:{width:"100%",padding:7,marginBottom:77}},a.a.createElement(na,Object.assign({title:e.label,icon:e.icon||null,color:Object(S.d)("menu"),style:{padding:"7px"}},O&&(O.userAdmin||O.userModerate)?{iconOnEditable:!0,editable:!0,onEdit:function(e){},placeholder:Object(S.s)("$__groupName")}:{})),a.a.createElement(mn,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(yn,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(Dp,{data:l.a.getState().db.users[t]}))}))))})))):a.a.createElement(a.a.Fragment,null,w.sort((function(e,t){return e&&e.name&&e.name<t.name||_&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!i[2]||i[2]&&e._id===i[2]?a.a.createElement(yn,{key:e._id,xs:12,sm:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:6,md:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:4,lg:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:4,xl:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:3,style:{minWidth:"300px"}},a.a.createElement(Dp,{data:e,expanded:!!(i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]])})):!i[2]&&a.a.createElement(yn,{key:e._id,xs:12,sm:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:6,md:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:4,lg:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:3,xl:i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]]?12:3},a.a.createElement(Dp,{data:e,expanded:!!(i[1]&&i[2]&&"units"===i[1]&&36===i[2].length&&v.users[i[2]])}))})),"tab"===i[0]&&"units"===i[1]&&i[2]&&36===i[2].length&&k.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||_&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return a.a.createElement(yn,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(Dp,{data:e}))}))))),a.a.createElement(Zp,null))}))),ef=r(1834),tf=["label","icon","defaultChecked"];function rf(){rf=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 nf=Object(G.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"}}),af=function(e){var t=e.label,r=(e.icon,e.defaultChecked),o=Object(dn.a)(e,tf),i=Object(n.useState)(r),c=Object(m.a)(i,2),l=c[0],s=c[1],u=nf();return a.a.createElement(Yi.a,{control:a.a.createElement(lr.a,Object.assign({className:u.switch,color:"default",checked:l,onChange:function(e){s(e.target.checked)}},o)),label:t})},of=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))((function(e){var t,r,o=nf(),i=Object(n.useState)((null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t._id)||Object(Y.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],A=D[1];function P(e,t){var r=Object(ge.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(Y.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 $=function(){var t=Object(f.a)(rf().mark((function t(r){return rf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,B.a.post("forms/add",{_id:s,name:b,elements:JSON.stringify(E)});case 2:t.sent,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 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement(De.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(mn,{style:{height:"100%",justifyContent:"flex-end",margin:"0px",width:"100%"}},a.a.createElement(yn,{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(Z.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"},onClick:function(){return P(t,t-1)}},"arrow_drop_up"),t===E.length-1?null:a.a.createElement(Z.a,{style:{cursor:"pointer",backgroundColor:"#eee",borderRadius:"50%"},onClick:function(){return P(t,t+1)}},"arrow_drop_down"),a.a.createElement(Z.a,{style:{cursor:"pointer"},onClick:function(){return function(e){k(E.filter((function(t){return t.label!==e})))}(e.id)}},"delete"),a.a.createElement(Z.a,{style:{cursor:"pointer"},onClick:function(){return A(e)}},"edit")):a.a.createElement(a.a.Fragment,null))))))})))),a.a.createElement(yn,{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(Z.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.s)("$__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(){$()}},a.a.createElement(Z.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(){$(!0)}},a.a.createElement(Z.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(Z.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($s.a,{className:o.formControl,variant:"standard"},a.a.createElement(Ms.a,{htmlFor:"titleForm",className:o.formControl},Object(S.s)("$__formName")),a.a.createElement(Ys.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.s)("$__field")),a.a.createElement("form",{id:"adicionar",onSubmit:function(e){e.preventDefault()}},a.a.createElement($s.a,{className:o.formControl,variant:"standard"},a.a.createElement(Ms.a,{htmlFor:"title",className:o.formControl},Object(S.s)("$__title")),a.a.createElement(Ys.a,{id:"title",type:"text",onChange:function(e){A(Object(p.a)(Object(p.a)({},N),{},{name:e.target.value}))},value:N.name||""})),a.a.createElement("div",null,a.a.createElement($s.a,{variant:"standard",fullWidth:!0,className:o.formControl},a.a.createElement(Ms.a,{id:"typeField",className:o.formControl},Object(S.s)("$__type")),a.a.createElement(ef.a,{value:N.type||"text",onChange:function(e){A((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(Ae.a,{value:"text"},Object(S.s)("$__shortText")),a.a.createElement(Ae.a,{value:"textarea"},Object(S.s)("$__longText")),a.a.createElement(Ae.a,{value:"radio"},Object(S.s)("$__selection")),a.a.createElement(Ae.a,{value:"checkbox"},Object(S.s)("$__multiSelection")),a.a.createElement(Ae.a,{value:"date"},Object(S.s)("$__date")),a.a.createElement(Ae.a,{value:"number"},Object(S.s)("$__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.s)("$__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(ye,{id:"sideModule_user_fullName",label:"".concat(Object(S.s)("$__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(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"delete",color:"red",onClick:function(){var e=Array.from(N.items);1===e.length?e[0]="":e.splice(t,1),A(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(""),A(Object(p.a)(Object(p.a)({},N),{},{items:r}))}},value:N.items[t],placeholder:Object(S.s)("$__optionText",1),autoFocus:0===t}))})))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(af,{label:Object(S.s)("$__required"),defaultChecked:!0,onClick:function(){A(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(af,{label:Object(S.s)("$__dependsOnAnotherAnswew"),onClick:function(){A(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(){A(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)),A(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 A(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 A(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.s)("$__formWarningOptionsListRequire")),void setTimeout((function(){O("")}),4e3);if(!r.type||!r.name)return O(Object(S.s)("$__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.s)("$__formWarningFieldNameUsed")),void setTimeout((function(){O("")}),4e3);if(0===E.filter((function(e){return e.id===t})).length)k([].concat(Object(ge.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(ge.a)(n))}A({})}()},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.s)("$__save"):Object(S.s)("$__add"))))))),a.a.createElement("p",{style:{color:"red",fontSize:"0.8rem",textAlign:"center"}},_))))))))}));var cf=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(au,{nodeId:u,fields:["text"],showFilters:!0,style:{marginLeft:7},onChange:function(e){o(e)},title:{text:Object(S.s)("$__formName")}}),a.a.createElement(ts,{text:Object(S.s)("$__newForm"),icon:"add",onClick:function(){s({new:!0})}})),a.a.createElement(mn,{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(yn,{xs:12,sm:12,md:3,lg:3,xl:2,key:"".concat(t,"-").concat(r)},a.a.createElement($e.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.s)("$__items"),": ",JSON.parse(e.forms[t].elements).length))))}))),Object.keys(l).length>0?a.a.createElement(of,{data:l,onClose:function(){s({})}}):a.a.createElement(a.a.Fragment,null))})),lf=Object(G.a)({clearfix:{"&:after,&:before":{display:"table",content:'" "'},"&:after":{clear:"both"}}});function sf(){var e=lf();return a.a.createElement("div",{className:e.clearfix})}var uf={cardAvatar:{"&$cardAvatarProfile img,&$cardAvatarTestimonial img":{width:"100%",height:"auto"}},cardAvatarProfile:{maxWidth:"130px",maxHeight:"130px",margin:"-50px auto 0",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Object(U.r)(U.b)+", 0.56), 0 4px 25px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.b)+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarPlain:{},cardAvatarTestimonial:{margin:"-50px auto 0",maxWidth:"100px",maxHeight:"100px",borderRadius:"50%",overflow:"hidden",padding:"0",boxShadow:"0 16px 38px -12px rgba("+Object(U.r)(U.b)+", 0.56), 0 4px 25px 0px rgba("+Object(U.r)(U.b)+", 0.12), 0 8px 10px -5px rgba("+Object(U.r)(U.b)+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarTestimonialFooter:{marginBottom:"-50px",marginTop:"10px"}},df=["children","className","plain","profile","testimonial","testimonialFooter"],pf=Object(G.a)(uf);function ff(e){var t,r=pf(),n=e.children,o=e.className,i=e.plain,c=e.profile,l=e.testimonial,s=e.testimonialFooter,u=Object(dn.a)(e,df),d=x()((t={},Object(h.a)(t,r.cardAvatar,!0),Object(h.a)(t,r.cardAvatarProfile,c),Object(h.a)(t,r.cardAvatarPlain,i),Object(h.a)(t,r.cardAvatarTestimonial,l),Object(h.a)(t,r.cardAvatarTestimonialFooter,s),Object(h.a)(t,o,void 0!==o),t));return a.a.createElement("div",Object.assign({className:d},u),n)}var hf={cardTitle:U.d,cardIconTitle:Object(p.a)(Object(p.a)({},U.d),{},{marginTop:"15px",marginBottom:0,"& small":{fontSize:"80%",fontWeight:"400"}}),cardCategory:{marginTop:"10px",color:U.q[0]+" !important",textAlign:"center"},description:{color:U.q[0]},updateProfileButton:{float:"right"}},mf=Object(G.a)(hf);Object(u.b)((function(e){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=mf();return a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 7px)"}},a.a.createElement(mn,null,a.a.createElement("div",{style:{position:"relative",width:"100%",boxShadow:"0px -2px 5px 2px rgba(0,0,0,0.1)",height:150,backgroundColor:"black",borderTopRightRadius:11,borderTopLeftRadius:11,backgroundPosition:"center center",backgroundSize:"cover",marginBottom:"-15px"}}),a.a.createElement(yn,{xs:12,sm:12,md:8},a.a.createElement(Li,null,a.a.createElement(Fi,null,a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:5},a.a.createElement(Gs,{labelText:"Company (disabled)",id:"company-disabled",formControlProps:{fullWidth:!0},inputProps:{disabled:!0}})),a.a.createElement(yn,{xs:12,sm:12,md:3},a.a.createElement(Gs,{labelText:"Username",id:"username",formControlProps:{fullWidth:!0}})),a.a.createElement(yn,{xs:12,sm:12,md:4},a.a.createElement(Gs,{labelText:"Email address",id:"email-address",formControlProps:{fullWidth:!0}}))),a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:6},a.a.createElement(Gs,{labelText:"First Name",id:"first-name",formControlProps:{fullWidth:!0}})),a.a.createElement(yn,{xs:12,sm:12,md:6},a.a.createElement(Gs,{labelText:"Last Name",id:"last-name",formControlProps:{fullWidth:!0}}))),a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:4},a.a.createElement(Gs,{labelText:"City",id:"city",formControlProps:{fullWidth:!0}})),a.a.createElement(yn,{xs:12,sm:12,md:4},a.a.createElement(Gs,{labelText:"Country",id:"country",formControlProps:{fullWidth:!0}})),a.a.createElement(yn,{xs:12,sm:12,md:4},a.a.createElement(Gs,{labelText:"Postal Code",id:"postal-code",formControlProps:{fullWidth:!0}}))),a.a.createElement(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:12},a.a.createElement(Ms.a,{style:{color:"#AAAAAA"}},"About me"),a.a.createElement(Gs,{labelText:"Lamborghini Mercy, Your chick she so thirsty, I'm in that two seat Lambo.",id:"about-me",formControlProps:{fullWidth:!0},inputProps:{multiline:!0,rows:5}}))),a.a.createElement(Nn,{color:"rose",className:t.updateProfileButton},"Update Profile"),a.a.createElement(sf,null)))),a.a.createElement(yn,{xs:12,sm:12,md:4},a.a.createElement(Li,{db:"cards",profile:!0},a.a.createElement(ff,{profile:!0},a.a.createElement("a",{href:"#pablo",onClick:function(e){return e.preventDefault()}})),a.a.createElement(Fi,{profile:!0},a.a.createElement("h6",{className:t.cardCategory},"CEO / CO-FOUNDER"),a.a.createElement("h4",{className:t.cardTitle},"Alec Thompson"),a.a.createElement("p",{className:t.description},"Don","'","t be scared of the truth because we need to restart the human foundation in truth And I love you like Kanye loves Kanye I love Rick Owens\u2019 bed design but the back is..."),a.a.createElement(Nn,{color:"rose",round:!0},"Follow"))))))}));var gf=r(1092);r(987);var bf=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(za)((function(e){l.a.getState().functions.socket;var t=a.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(m.a)(t,2),n=r[0],o=r[1];return Object(S.j)(),a.a.createElement("div",null,a.a.createElement(gf.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.s)("$__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(ye,{id:"sideModule_user_displayName",label:Object(S.s)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_comfy_ind"})),onChange:function(e){o(Object(p.a)(Object(p.a)({},n),{},Object(h.a)({},"number",e.target.value)))}},value:n&&n.number?n.number:"",placeholder:Object(S.s)("$__cardNumber",1)})),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(S.s)("$__forceChangePassword")),a.a.createElement(sr,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(S.s)("$__forceChangePasswordDescription")))})));function yf(){yf=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 vf=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)(yf().mark((function e(){return yf().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(bf,null),a.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));function xf(){xf=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 _f=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)(xf().mark((function e(){var t,r,n,a,i,c=arguments;return xf().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,dt.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,B.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(mn,null,a.a.createElement(yn,{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(R,null,p?a.a.createElement(br,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginTop:50}},a.a.createElement("legend",null,Object(S.s)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(ye,{label:Object(S.s)("$__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(ut.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(n.secretKey)}},a.a.createElement(Z.a,{icon:"content_copy"})),a.a.createElement(Z.a,{icon:l?"visibility_off":"visibility",onClick:function(){s((function(e){return!e}))}}))},value:"".concat(n&&n.secretKey?n.secretKey:""),placeholder:Object(S.s)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(S.s)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.s)("$__newToken"),text:Object(S.s)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(S.c)({message:Object(S.s)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),Of=r(346),wf=r(101),jf=r(347),Ef=r.n(jf),kf=r(348),Sf=r.n(kf);r(1680);function Lf(){Lf=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(207).config();var Cf=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(),r=t.session,n=(t.db,a.a.useState({})),o=Object(m.a)(n,2),i=o[0],c=o[1],s=a.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(m.a)(s,2),d=u[0],g=u[1],b=a.a.useState({historyEditor:null}),y=Object(m.a)(b,2),v=y[0],x=y[1];a.a.useEffect((function(){c(r.GlobalData?r.GlobalData:{}),g(r.GlobalData?r.GlobalData:{});var e=wf.EditorState.createEmpty(),t=wf.EditorState.createEmpty(),n=wf.EditorState.createEmpty(),a=wf.EditorState.createEmpty(),o=wf.EditorState.createEmpty(),i=wf.EditorState.createEmpty();r.GlobalData.history&&(e=Sf()("<div>".concat(r.GlobalData.history,"</div>")),e=wf.ContentState.createFromBlockArray(e.contentBlocks),e=wf.EditorState.createWithContent(e)),r.GlobalData.strategicStatement&&(o=Sf()("<div>".concat(r.GlobalData.strategicStatement,"</div>")),o=wf.ContentState.createFromBlockArray(o.contentBlocks),o=wf.EditorState.createWithContent(o)),r.GlobalData.values&&(i=Sf()("<div>".concat(r.GlobalData.values,"</div>")),i=wf.ContentState.createFromBlockArray(i.contentBlocks),i=wf.EditorState.createWithContent(i)),r.GlobalData.vocation&&(t=Sf()("<div>".concat(r.GlobalData.vocation,"</div>")),t=wf.ContentState.createFromBlockArray(t.contentBlocks),t=wf.EditorState.createWithContent(t)),r.GlobalData.legacy&&(n=Sf()("<div>".concat(r.GlobalData.legacy,"</div>")),n=wf.ContentState.createFromBlockArray(n.contentBlocks),n=wf.EditorState.createWithContent(n)),r.GlobalData.message&&(a=Sf()("<div>".concat(r.GlobalData.message,"</div>")),a=wf.ContentState.createFromBlockArray(a.contentBlocks),a=wf.EditorState.createWithContent(a)),x({history:e,vocation:t,legacy:n,message:a,values:i,strategicStatement:o})}),[]);var _=function(){var t=Object(f.a)(Lf().mark((function t(){var r;return Lf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(i).map((function(e){!i[e]||d[e]&&JSON.stringify({a:i[e]})===JSON.stringify({a:d[e]})||(r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,i[e]&&"string"===typeof i[e]?i[e].trim():i[e])))})),console.log(r),t.prev=3,t.next=6,B.a.post("account/save",r);case 6:t.sent&&(c(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)),g(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(mn,{style:{marginTop:15}},a.a.createElement(yn,{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.s)("$__adminMessage")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.message,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{message:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(yn,{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.s)("$__strategicStatement")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.strategicStatement,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{strategicStatement:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(yn,{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.s)("$__vocation")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.vocation,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{vocation:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(yn,{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.s)("$__history")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.history,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{history:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(yn,{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.s)("$__values")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.values,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{values:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(yn,{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.s)("$__legacy")),a.a.createElement(R,null,a.a.createElement(Of.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:v.legacy,onEditorStateChange:function(e){c(Object(p.a)(Object(p.a)({},i),{},{legacy:Ef()(Object(wf.convertToRaw)(e.getCurrentContent()))})),x(Object(p.a)(Object(p.a)({},v),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(i)!==JSON.stringify(d)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.s)("$__save"),text:Object(S.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){_()}})):a.a.createElement(a.a.Fragment,null))}));function If(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 Tf=r(796);function Ff(){Ff=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 Df=Object(u.b)((function(e){return{session:e.session}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Aa)((function(e){e.classes;var t=l.a.getState(),r=t.db,n=t.session,o=(r.users,r.dataType,a.a.useState(n.GlobalData?n.GlobalData:{})),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useState(n.GlobalData?n.GlobalData:{}),d=Object(m.a)(u,2),g=d[0],b=d[1],y=a.a.useState(!Object(S.t)(c&&c.email?c.email:"")),v=Object(m.a)(y,2),x=(v[0],v[1],a.a.useState(!1)),_=Object(m.a)(x,2),O=(_[0],_[1],Object(S.j)()),w=function(){var t=Object(f.a)(Ff().mark((function t(){var r,a,o,i;return Ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},Object.keys(c).map((function(e){if("file"===e)a=c[e];else if("document"===e){var t=!1;11===c[e].length&&Tf.b.isValid(c[e])&&(t=!0),14===c[e].length&&Tf.a.isValid(c[e])&&(t=!0),t?r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e])):Object(S.c)({message:"".concat(Object(S.s)("$__".concat(e)),": ").concat(Object(S.s)("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!c[e]||g[e]&&JSON.stringify({a:c[e]})===JSON.stringify({a:g[e]})?c[e]||"_id"===e||Object(S.c)({message:"".concat(Object(S.s)("$__".concat(e)),": ").concat(Object(S.s)("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,c[e]&&"string"===typeof c[e]?c[e].trim():c[e]))})),t.prev=2,o=l.a.getState().functions.socket,!a){t.next=10;break}return t.next=7,Object(pt.a)(n.account,a);case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=!0;case 11:(i=t.t0)&&("true"!==String(i)&&(r=Object(p.a)(Object(p.a)({},r),{},{image:i})),o.emit("data",{module:"account",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)})),b(Object(p.a)(Object(p.a)({},l.a.getState().session.GlobalData),r)))}))),t.next=18;break;case 15:t.prev=15,t.t1=t.catch(2),console.log(t.t1);case 18:case"end":return t.stop()}}),t,null,[[2,15]])})));return function(){return t.apply(this,arguments)}}();return(c._id===n._id||O&&O.user&&(O.userAdmin||O.userEdit))&&!0,c.independentAccount&&!1,a.a.createElement("div",null,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(Zr,{maxWidthOrHeight:600,img:c&&c.image?c.image:null,onChange:function(e,t){s(Object(p.a)(Object(p.a)({},c),{},{file:t}))},avatar:!0,avatarIcon:"business"})),a.a.createElement(ye,{id:"sideModule_user_fullName",label:Object(S.s)("$__fullCompanyName",1),variant:Object(S.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"business"})),onChange:function(e){s(Object(p.a)(Object(p.a)({},c),{},{fullName:e.target.value}))},onBlur:function(e){if(c&&!c.fullName){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";s(Object(p.a)(Object(p.a)({},c),{},{fullName:t}))}}},value:c&&c.fullName?c.fullName:"",placeholder:Object(S.s)("$__fullName",1),autoFocus:!0,disabled:!0}),a.a.createElement(ye,{id:"sideModule_user_displayName",label:Object(S.s)("$__displayName",1),variant:Object(S.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(p.a)(Object(p.a)({},c),{},{name:e.target.value}))}},value:c&&c.name?c.name:"",placeholder:Object(S.s)("$__displayName",1),disabled:!0}),a.a.createElement(ye,{id:"customURL",label:Object(S.s)("$__customURL",1),variant:Object(S.d)("fieldVariant"),name:"customURL",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement("span",{style:{color:"gray",fontSize:12}},".machen.ai")),onChange:function(e){s(Object(p.a)(Object(p.a)({},c),{},{customURL:e.target.value.trim()}))},onBlur:function(e){c&&!c.fullName&&s(Object(p.a)(Object(p.a)({},c),{},{customURL:e.target.value.trim()}))}},value:c&&c.customURL?c.customURL:"",placeholder:Object(S.s)("$__customURL",1),autoFocus:!0}),a.a.createElement(ye,{id:"__documentCPForCNPJ",label:Object(S.s)("$__documentCPForCNPJ",1),variant:Object(S.d)("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(p.a)(Object(p.a)({},c),{},{document:e.target.value}))}},value:c&&c.document?c.document:"",placeholder:Object(S.s)("$__displayName",1),disabled:!!g.document}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__accountResponsible")),a.a.createElement(R,null,a.a.createElement(zt,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:c.accountResponsible?[c.accountResponsible]:null,onSelect:function(e){s(Object(p.a)(Object(p.a)({},c),{},{accountResponsible:e[0]}))}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__invoiceResponsible")),a.a.createElement(R,null,a.a.createElement(zt,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:c.invoiceResponsible?[c.invoiceResponsible]:null,onSelect:function(e){s(Object(p.a)(Object(p.a)({},c),{},{invoiceResponsible:e[0]}))}}))),a.a.createElement("ul",{style:{color:Object(S.d)("color")}},a.a.createElement("li",null,Object(S.s)("$__createdAt"),": ",Object(S.k)(c.created_at)),c.expire_at?a.a.createElement("li",{style:{color:Object(S.d)("menu")}},Object(S.s)("$__expireDate"),": ",Object(S.k)(c.expire_at)):a.a.createElement(a.a.Fragment,null)),JSON.stringify(c)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(k.a,{title:Object(S.s)("$__save"),text:Object(S.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){w()}})):a.a.createElement(a.a.Fragment,null))})));function Nf(){Nf=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 Af=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)(Nf().mark((function t(){var r;return Nf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Object.keys(c).map((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,B.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.s)("$__hideDeletedUsersInTimelines")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(sr,{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.s)("$__required")),a.a.createElement("i",null,Object(S.s)("$__hideDeletedUsersDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.s)("$__2FactorTokenRequired")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(sr,{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.s)("$__required")),a.a.createElement("i",null,Object(S.s)("$__2FactorTokenRequiredDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginBottom:15}},a.a.createElement("legend",null,Object(S.s)("$__forceChangePassword")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(sr,{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.s)("$__required")),a.a.createElement("i",null,Object(S.s)("$__forceChangePasswordDescription")),c.requireExpirePassword?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__sessionDuration",1)),a.a.createElement(ja,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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.s)("$__language",1)),a.a.createElement(ja,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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.s)("$__sessionExpire",1)),a.a.createElement(ja,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return Object(S.s)(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(ye,Object.assign({},e,{label:Object(S.s)("$__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.s)("$__save"),text:Object(S.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){y()}})):a.a.createElement(a.a.Fragment,null))})),Pf=Object(G.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var $f=Object(u.b)((function(e,t){return{}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=l.a.getState(),r=t.functions,n=(t.session,r.socket,e.planDetails),o=e.data,i=Pf(),s=(Object(S.j)(),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.s)("$__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.s)("$__subscription"),": ",a.a.createElement("span",{style:{fontWeight:"bold"}},Object(S.s)(n.label))),a.a.createElement("ul",{className:i.list},a.a.createElement("li",null,Object(S.s)("$__adminLimit",1),": ",o&&o.customAdminsLimit?o.customAdminsLimit:n.settings.admins),a.a.createElement("li",null,Object(S.s)("$__storageSpace",1),": ",o&&o.customStorageSpace?Object(S.a)(o.customStorageSpace):Object(S.a)(n.settings.space)),a.a.createElement("li",null,Object(S.s)("$__BrightAndConnected",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:i.item},Object(S.s)("$__feed",1),": ",n.settings.brightAndConnected.feed?a.a.createElement(Z.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),n.settings.brightAndConnected.feed?a.a.createElement("li",{className:i.item},Object(S.s)("$__feedDays",1),":",n.settings.brightAndConnected.feedDays?"".concat(n.settings.brightAndConnected.feedDays," ").concat(Object(S.s)("$__days")):Object(S.s)("$__unlimited")):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:i.item},Object(S.s)("$__radarLimit",1),": ",n.settings.brightAndConnected.radarLimit?n.settings.brightAndConnected.radarLimit:Object(S.s)("$__unlimited")),a.a.createElement("li",{className:i.item},Object(S.s)("$__insights",1),": ",n.settings.brightAndConnected.insight?a.a.createElement(Z.a,{icon:"check",color:Object(S.d)("color"),size:18}):s))),a.a.createElement("li",null,Object(S.s)("$__plannings",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:i.item},Object(S.s)("$__limit",1),": ",n.settings.plan.limit?n.settings.brightAndConnected.radarLimit:Object(S.s)("$__unlimited")),a.a.createElement("li",{className:i.item},Object(S.s)("$__clientPlannings",1),": ",n.settings.plan.planClient?a.a.createElement(Z.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),n.settings.plan.planClient?a.a.createElement("li",{className:i.item},Object(S.s)("$__clientUserAdmins",1),": ",n.settings.plan.clientAdmin?n.settings.plan.clientAdmin:s):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:i.item},Object(S.s)("$__externalPlanning",1),": ",n.settings.plan.machenPlan?a.a.createElement(Z.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),a.a.createElement("li",{className:i.item},Object(S.s)("$__professionalTemplates",1),": ",n.settings.plan.templates?a.a.createElement(Z.a,{icon:"check",color:Object(S.d)("color"),size:18}):s),a.a.createElement("li",{className:i.item},Object(S.s)("$__guidelineLimit",1),": ",n.settings.plan.guidelineLimit?n.settings.plan.guidelineLimit:Object(S.s)("$__unlimited")),a.a.createElement("li",{className:i.item},Object(S.s)("$__feedLimit",1),": ",n.settings.plan.feedLimit?n.settings.plan.feedLimit:Object(S.s)("$__unlimited")),a.a.createElement("li",{className:i.item},Object(S.s)("$__radarLimit",1),": ",n.settings.plan.radarLimit?n.settings.plan.radarLimit:Object(S.s)("$__unlimited")),a.a.createElement("li",{className:i.item},Object(S.s)("$__insightLimit",1),": ",n.settings.plan.insightLimit?n.settings.plan.insightLimit:Object(S.s)("$__unlimited")))),a.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",style:{fontWeight:"bold",color:Object(S.d)("menu"),marginTop:33}},Object(S.s)("$__viewMoreDetails")))))}));function Mf(){Mf=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(207).config();var zf=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)(Mf().mark((function e(){var t;return Mf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt.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(mn,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement(yn,{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(Z.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.s)("$__subscriptionPlan","*"),": ",Object(S.s)(g.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(S.s)("$__adminLimit",1),": ",g.settings.admins),a.a.createElement("a",{href:"#",style:{position:"relative",top:"-7px",color:Object(S.d)("color"),fontSize:10,fontWeight:"bold"}},Object(S.s)("$__viewContract"))))),a.a.createElement(yn,{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(Z.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.s)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){c.a.push("#tab/subscriptionUpgrade")}},Object(S.s)("$__upgradeSubscription"))),a.a.createElement(If,{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.s)("$__used",1),": ",Object(S.a)(s))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(S.s)("$__of")," ",Object(S.s)("$__accountSpace",1),": ",Object(S.a)(h))))))),a.a.createElement(mn,{style:{}},a.a.createElement(yn,{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(R,null,a.a.createElement(Df,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(yn,{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(R,null,a.a.createElement(Af,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(yn,{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.s)("$__subscriptionDetails"),a.a.createElement(R,null,a.a.createElement($f,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:g}))))))}))),Yf=r(179),Bf=r.n(Yf),Rf=r(1098),Gf=(r(1039),r(1040),["onSelect"]),Hf=function(e){var t=e.onSelect,r=Object(dn.a)(e,Gf);return a.a.createElement(Yf.Panel,Object.assign({},r,{onChange:function(e){t(e.color,e.alpha/100)},animation:"slide-up"}))};var Wf=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.map((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],", ").concat(n[1],", ").concat(n[2],")"),offset:"".concat(a),opacity:"".concat(n[3])})}})),r}(e.value.css):(null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.color)||[];return a.a.createElement(Rf.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.map((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(Hf,null))};function Uf(){Uf=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 Vf=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(Aa)((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],N=F[1],A=a.a.useState(!1),P=Object(m.a)(A,2),$=P[0],M=P[1];a.a.useEffect((function(){g(t.custom||{})}),[]),a.a.useEffect((function(){D&&setTimeout((function(){N(!1)}),500)}),[D]);var z=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)))},Y=function(){var t=Object(f.a)(Uf().mark((function t(){return Uf().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)}}(),B=function(){var e=Object(f.a)(Uf().mark((function e(){var n,a,o;return Uf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!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(pt.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(pt.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){M(!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(mn,null,a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__logo")),a.a.createElement(Zr,{maxWidthOrHeight:600,img:r.customLogo,onChange:function(e,t){j(t),z({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0})))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__loginBackground")),a.a.createElement(Zr,{maxWidthOrHeight:2e3,img:r.loginBackground,onChange:function(e,t){I(t),z({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__backgroundColumnsTitle")),a.a.createElement(Ke,{title:Object(S.s)("$__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(R,null,a.a.createElement(Wf,{value:{css:r.ColumnTitleColor},onChange:function(e){z({name:"ColumnTitleColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.colorText||null,mode:"RGB",onChange:function(e){z({name:"colorText",value:e.color})}}),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__text")))))))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__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(R,null,a.a.createElement(Wf,{value:{css:r.menuColor},onChange:function(e){z({name:"menuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.menuButtonColor,mode:"RGB",onChange:function(e){z({name:"menuButtonColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__menuText"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.active,mode:"RGB",onChange:function(e){z({name:"active",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__menuActiveText"))))))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__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(R,null,a.a.createElement(Wf,{value:{css:r.subMenuColor},onChange:function(e){z({name:"subMenuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__background"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColor,mode:"RGB",onChange:function(e){z({name:"subMenuTextColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__menuTextIconColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColorActive,mode:"RGB",onChange:function(e){z({name:"subMenuTextColorActive",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__subMenuActiveText"))))))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__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(R,null,a.a.createElement(Wf,{value:{css:r.linearProgress},onChange:function(e){z({name:"linearProgress",value:e.css})}})),a.a.createElement(br,{customColor:r.linearProgress}),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__progress"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.color,mode:"RGB",onChange:function(e){z({name:"color",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__borderColor"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.menu,mode:"RGB",onChange:function(e){z({name:"menu",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(S.d)("menu")}},Object(S.s)("$__primaryText"))))))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.s)("$__cardImageCover"),a.a.createElement(Wf,{value:{css:r.AvatarBackground},onChange:function(e){z({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.avatarIconColor,mode:"RGB",onChange:function(e){z({name:"avatarIconColor",value:e.color})}})),a.a.createElement(Ut,{backgroundColor:r.AvatarBackground,avatarIconColor:r.avatarIconColor,responsive:!0})))),a.a.createElement(yn,{md:4},a.a.createElement($e.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(S.s)("$__fields")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.line,mode:"RGB",onChange:function(e){z({name:"line",value:e.color}),N(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__line"))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}},a.a.createElement(R,null,a.a.createElement(Bf.a,{enableAlpha:!1,animation:"slide-up",color:r.medium,mode:"RGB",onChange:function(e){z({name:"medium",value:e.color}),N(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(S.s)("$__inputAdorment"))),D?a.a.createElement(ye,{label:Object(S.s)("$__field",1),variant:r.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"format_color_fill"}))}}):a.a.createElement(ye,{label:Object(S.s)("$__field",1),variant:r.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__reset"),text:Object(S.s)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){Y()},load:$})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(k.a,{title:Object(S.s)("$__save"),text:Object(S.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){B()},load:$}))):a.a.createElement(a.a.Fragment,null))})));var qf=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(R,null,a.a.createElement(zf,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"profile"===t[1]?a.a.createElement(R,null,a.a.createElement(Cf,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"whiteLabel"===t[1]?a.a.createElement(R,null,a.a.createElement(Vf,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"integrations"===t[1]?a.a.createElement(R,null,a.a.createElement(_f,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"invoicing"===t[1]?a.a.createElement(R,null,a.a.createElement(vf,null)):a.a.createElement(a.a.Fragment,null))}))),Xf=Object(G.a)(Ls);var Jf=Object(G.a)(Ls);var Kf=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:Ss,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:Rr.a,component:Jl,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:vs.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:Qp,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:cf,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:$p,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:No.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:vs.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,searchFields:["text"],hashId:!0}]},{path:"/t",name:"Tasks",alias:"tasks",component:ou,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:zp,icon:"turned_in",show:!0,auth:!0,search:!0,subMenu:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:ul,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:pu,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:Ou,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=Wc();t.get("token")&&36===t.get("token").length||c.a.push("/");var s=function(){var r=Object(f.a)(Hc().mark((function r(){var n;return Hc().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,B.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.s)("$__invalidRequest",1)," | ").concat(Object(S.s)("$__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(mn,null,a.a.createElement(yn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement("form",null,a.a.createElement(Li,{db:"cards",login:!0},a.a.createElement(Pi,{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.s)("$__createPassword",1))),a.a.createElement(Fi,null,a.a.createElement(Ma,{onConfirmed:function(e){i(Object(p.a)(Object(p.a)({},o),{},{password:e}))}})),a.a.createElement(Rc,{className:l.justifyContentCenter},o&&o.password&&a.a.createElement(Nn,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return s()}},Object(S.s)("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:Vs,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),A=Object(m.a)(N,2),P=A[0],$=A[1],M=a.a.useState(!1),z=Object(m.a)(M,2),Y=z[0],R=z[1],G=a.a.useState(0),H=Object(m.a)(G,2),W=H[0],U=H[1],V=a.a.useState(null),q=Object(m.a)(V,2),X=q[0],J=q[1],K=function(e,t){var r=n.indexOf(e),a=Object(ge.a)(n);-1===r?a.push(e):a.splice(r,1),o(a)},Q=Cu(),ee=function(){var e=Object(f.a)(Lu().mark((function e(t){return Lu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Object(S.t)(t)){e.next=8;break}return e.next=4,jt(t);case 4:e.sent?(C(Object(S.s)("$__emailAlreadyExists",1)),x(""),j(!1)):(C(null),j(!0),Lt(h,t)),e.next=10;break;case 8:C(Object(S.s)("$__invalidEmail",1)),x("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(){var e=Object(f.a)(Lu().mark((function e(){return Lu().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,kt(F,v);case 4:e.sent?(R(!0),$(!1)):$(!0),u(!1),e.next=10;break;case 9:$(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var t=Object(f.a)(Lu().mark((function t(){var r;return Lu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,B.a.post("user/register-final-step/",{name:h,email:v,token:F,password:X,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:Q.container,style:{overflow:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",overflow:"auto"}},a.a.createElement(yn,{xs:12,sm:10,md:6},a.a.createElement(Li,{db:"cards",className:Q.cardSignup},a.a.createElement("h2",{className:Q.cardTitle},Object(S.s)("$__register",1)),a.a.createElement(Fi,null,a.a.createElement("div",null,a.a.createElement(ye,{className:Q.textFields,label:Object(S.s)("$__fullName",1),variant:"standard",name:Object(S.s)("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{className:Q.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){g(e.target.value)}},value:h||"Cristofer Odair",disabled:w}),a.a.createElement(ye,{label:Object(S.s)("$__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.t)(v)?"":"invalid",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"alternate_email"})),onChange:function(e){j(!1),C(null),x(e.target.value)},onBlur:function(){var e=Object(f.a)(Lu().mark((function e(t){return Lu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ee(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(et,{icon:"navigate_next",text:Object(S.s)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){ee(v)}}),w&&v&&a.a.createElement(a.a.Fragment,null,a.a.createElement(ye,{label:Object(S.s)("$__emailToken",1),variant:Object(S.d)("fieldVariant"),helperText:Object(S.s)(P?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:P?"invalid":"",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"keyboard"})),onChange:function(e){C(null),D(e.target.value)}},value:F,placeholder:"****"}),a.a.createElement(et,{icon:"reply_all",text:Object(S.s)("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){Lt(h,v)}}),!Y&&a.a.createElement(et,{icon:"navigate_next",text:Object(S.s)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){te()}})),w&&Y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ma,{onConfirmed:function(e){J(e)}}),a.a.createElement(Eu.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(Nn,{round:!0,color:"custom_color",onClick:function(){return U(0)}},"J\xe1 li"))))),a.a.createElement(Yi.a,{classes:{root:Q.checkboxLabelControl,label:Q.checkboxLabel},control:a.a.createElement(wo.a,{tabIndex:-1,onClick:function(){return K(1)},checkedIcon:a.a.createElement("div",{className:Q.checkedIcon},a.a.createElement(Z.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Q.uncheckedIcon},a.a.createElement(Z.a,{size:"16px",color:"red"},"remove")),classes:{checked:Q.checked,root:Q.checkRoot}}),label:a.a.createElement("span",null,Object(S.s)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(1)},style:{color:"blue"}},Object(S.s)("$__privacyPolicy")),".")}),a.a.createElement(Yi.a,{classes:{root:Q.checkboxLabelControl,label:Q.checkboxLabel},control:a.a.createElement(wo.a,{tabIndex:-1,onClick:function(){return K(2)},checkedIcon:a.a.createElement("div",{className:Q.checkedIcon},a.a.createElement(Z.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:Q.uncheckedIcon},a.a.createElement(Z.a,{size:"16px",color:"red"},"remove")),classes:{checked:Q.checked,root:Q.checkRoot}}),label:a.a.createElement("span",null,Object(S.s)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return U(2)},style:{color:"blue"}},Object(S.s)("$__servicesTerms")),".")}),a.a.createElement("div",{className:Q.center},n.indexOf(1)>-1&&X&&a.a.createElement(Nn,{round:!0,color:"custom_color",onClick:function(){return re()}},Object(S.s)("$__completeRegistration")))))),s&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},a.a.createElement(ju,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=Cs();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(mn,null,a.a.createElement(yn,{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=qs();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(mn,null,a.a.createElement(yn,{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=Xs();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(mn,null,a.a.createElement(yn,{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:cs,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:qf,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:Ts,icon:"folder",show:!0,auth:!0,permission:1,hashId:!1,search:!0,subMenu:!0,searchFields:["text"]},{path:"/subscriptionUpgrade",name:"subscriptionUpgrade",alias:"subscriptionUpgrade",component:function(){var e=Xf();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(mn,null,a.a.createElement(yn,{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=Jf();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(mn,null,a.a.createElement(yn,{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.s)("$__accessDenied","*")),a.a.createElement("h4",{className:e.description,style:{color:Object(S.d)("menu")}},Object(S.s)("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],Zf=function(e){return Object(p.a)(Object(p.a)({},U.l),{},{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 Qf(){Qf=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 eh=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(at.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:Mr.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})).map((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(El.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(Ye,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:s})))))},th=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(G.a)(Zf)(),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=(w[0]&&36===w[0].length&&r.cards[w[0]]&&"plan"===r.cards[w[0]].type&&Object(at.t)(w[0]),function(t){d(t);var r=l.a.getState().db.cards;Object.keys(r).map((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)(Qf().mark((function t(r){var n;return Qf().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(We.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(et,{icon:O?"menu_open":"read_more",text:O?Object(S.s)("$__collapsingMenu",1):null,title:O?null:Object(S.s)("$__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(et,{text:O?Object(S.s)("$__collapseCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.s)("$__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(et,{text:O?Object(S.s)("$__expandingCards",1):null,textColor:Object(S.d)("subMenuTextColor"),title:O?null:Object(S.s)("$__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(ne.a,{size:25,style:{margin:"auto",display:"flex"}}):a.a.createElement(et,{text:O?Object(S.s)("$__adminViewDescription",1):null,title:O?null:Object(S.s)("$__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(et,{text:O?Object(S.s)("$__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.s)("$__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(et,{text:O?Object(S.s)("$__viewInList",1):null,title:O?null:Object(S.s)("$__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(eh,Object.assign({expanded:O},e))),Kf.filter((function(e){return e.path===_})).length>0&&Kf.filter((function(e){return e.path===_}))[0].tabs&&Kf.filter((function(e){return e.path===_}))[0].tabs.length>0&&(Kf.filter((function(e){return e.path===_}))[0].hashId&&w[0]&&36===w[0].length||!Kf.filter((function(e){return e.path===_}))[0].hashId)&&a.a.createElement(a.a.Fragment,null,Kf.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})).map((function(e,t){var n=!1,i=w[0]&&36===w[0].length?r.cards[w[0]]:null;if(e&&e.AppAccess&&e.AppAccess.length>0?e.AppAccess.map((function(e){E[e]&&(n=!0)})):e&&!e.AppAccess&&(n=!0),i&&i.isTemplate&&!e.templates&&(n=!1),e&&e.AppAccess&&e.AppAccess.planAdmin&&!(E&&E.plan&&E.planAdmin)&&(n=!1),i&&i.planType&&("matrix"===e.alias||"guidelines"===e.alias||"objectives"===e.alias||"goals"===e.alias)&&(n=!1),i&&"board"===e.alias&&(!i.planType||i.planType&&"operational"!==i.planType)&&(n=!1),i&&"matrix"===e.alias&&i.planType&&(n=!1),i&&"operational"===i.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)return a.a.createElement("div",{className:O?v.buttonExpanded:v.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},a.a.createElement(et,{text:O?"matrix"===e.alias?"MATRIX SWOT":Object(S.s)("$__".concat(e.alias),1):null,title:O?null:"matrix"===e.alias?"MATRIX SWOT":Object(S.s)("$__".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(et,{text:O?Object(S.s)("$__planningBoard",1):null,title:O?null:Object(S.s)("$__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(et,{text:O?Object(S.s)("$__lateTasks",1):null,title:O?null:Object(S.s)("$__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(et,{text:O?Object(S.s)("$__nextTasks",1):null,title:O?null:Object(S.s)("$__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"}))))))})),rh=r(575);function nh(){nh=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(207).config();var ah=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(xu)((function(e){var t=e.classes,r=a.a.useState(!1),n=Object(m.a)(r,2),o=n[0],i=(n[1],a.a.useState(null)),s=Object(m.a)(i,2),u=s[0],d=s[1],h=window.location.hash.split("/");h[0]=h[0].replace("#","");var g=function(){var t=Object(f.a)(nh().mark((function t(r,n){return nh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"tags"===n||e.setSubMenuExpanded(o),!r||window.location.pathname===r&&n!==u||c.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},l.a.getState().chat),{},{open:!0})):(d(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(R,{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(){g("/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(Z.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(){g("/d#tab/resume","dashboard")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(){g("/bright-and-connected#tab/home","bright-and-connected")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:Rr.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(){g("/sp#tab/home","StrategyAndPlans")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(){g("/t#tab/myTasks","myTasks")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(){g("/library","library")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(){g("/tags","tags")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(){g("/calendar","calendar")},style:{color:Object(S.d)("menuButtonColor")}},a.a.createElement(Z.a,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__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(Mc,null,a.a.createElement(Z.a,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Object(S.s)("$__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(Z.a,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(S.s)("$__support","*")))),"myDay"!==u&&"timer"!==u&&"chat"!==u&&("/t"===window.location.pathname||"/sp"===window.location.pathname||"/forms"===window.location.pathname||"/c"===window.location.pathname||"/d"===window.location.pathname||"/p"===window.location.pathname||"/acc"===window.location.pathname||"/bright-and-connected"===window.location.pathname||"/library"===window.location.pathname||"/notifications"===window.location.pathname||"/calendar"===window.location.pathname||"/masterAdmin"===window.location.pathname)&&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(th,{hashs:h,subMenuExpanded:function(t){e.setSubMenuExpanded(t)},expanded:e.subMenuExpanded})),"myDay"!==u&&"timer"!==u&&"chat"!==u&&"/tags"===window.location.pathname&&a.a.createElement("div",{className:t.moduleExpanded,id:"sideBar_session_tags"},a.a.createElement($c,{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:",rh.version))))})));var oh=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(Fe.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},t),{},{open:!t.open}))}},a.a.createElement(Mc,null,a.a.createElement(Z.a,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));var ih=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.timeline,t.session),o=a.a.useState(!1),i=Object(m.a)(o,2),c=i[0],s=i[1],u=a.a.useRef(null),d=O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),p=(Object(S.j)(),function(e){u.current&&u.current.contains(e.target)||s(!1)}),f=Object.keys(r.cards).filter((function(e){return!r.cards[e].deleted&&!r.cards[e].checklist&&r.cards[e]._users&&r.cards[e]._users[n._id]&&r.cards[e]._users[n._id].myDay&&O()(new Date(1e3*r.cards[e]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===d})).map((function(e){return r.cards[e]}));return 0===f.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(Fe.a,{ref:u,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:f.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(Z.a,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),f.length>0&&a.a.createElement(Me.a,{open:c,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Ne.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:p},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.s)("$__myDay")),a.a.createElement(pr,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));var ch=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)})).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(Fe.a,{ref:h,"aria-controls":c?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Te.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(Z.a,{icon:"approval",color:"parent",title:"$__forApproval"}))),g.length>0&&a.a.createElement(Me.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(Ne.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom",padding:11}}),a.a.createElement($e.a,null,a.a.createElement(De.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.s)("$__attention",1),": ",a.a.createElement("span",{style:{color:Object(S.d)("menu")}},Object(S.s)("$__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(on,{db:"cards",cardId:e._id,onlyOption:!0}),a.a.createElement(uo,{nodeId:e._id,onAction:function(){var t=Array.from(p);-1===t.indexOf(e._id)&&t.push(e._id),f(t)}}))}))))))})))})),lh=Object(G.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 sh=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=lh();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(at.j)(c.cardId);e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(p.a)(Object(p.a)({},l.a.getState().notifications),{},{total:l.a.getState().notifications.total-t.total})),_r(e,{readedBy:o._id,id:e.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s}),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(){})),l.a.getState().db&&l.a.getState().db.cards&&l.a.getState().db.cards[c.cardId]&&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)({},c.cardId,Object(p.a)(Object(p.a)({},l.a.getState().db.cards[c.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),e.onRead&&setTimeout((function(){e.onRead()}),1e3)},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||"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(on,{setPrivate:function(e){g(e)},db:"cards",cardId: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(Hn,{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.s)("$__open",1),text:Object(S.s)("$__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.s)("$__markAsRead",1),text:Object(S.s)("$__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 uh(){uh=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 dh=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.notifications,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)(uh().mark((function t(){var r,n,a,o,i,c,s,u,d,f=arguments;return uh().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,dt.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.map((function(t,r){i=t.total,d.push(t.card),t.timeline&&t.timeline.length>0&&t.timeline.map((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.map((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.map((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(We.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)(uh().mark((function t(){return uh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(S.c)({message:Object(S.s)("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){y(!1);var t=Object(p.a)({},l.a.getState().timeline);Object.keys(t).map((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])})).map((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];if("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)return!0})).map((function(e,t){n[e]&&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])})).map((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="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(Fe.a,{ref:w,"aria-controls":b?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){y((function(e){return!e}))}},a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:C,color:"secondary"},a.a.createElement(Z.a,{icon:0===C?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),a.a.createElement(Me.a,{open:b,anchorEl:w.current,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,o=e.placement;return a.a.createElement(Ne.a,Object.assign({},t,{style:{transformOrigin:"bottom"===o?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.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.s)("$__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.s)("$__timeline","*"),text:Object(S.s)("$__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.s)("$__mentioned","*"),text:Object(S.s)("$__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.log?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(k.a,{title:Object(S.s)("$__update","*"),text:Object(S.s)("$__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.s)("$__completed","*"),text:Object(S.s)("$__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.s)("$__deletedItems","*"),text:Object(S.s)("$__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.s)("$__all","*"),text:Object(S.s)("$__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.s)("$__clearNotifications",1),text:Object(S.s)("$__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];if("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)return!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])})).map((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])})).map((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(sh,{type:T,data:{cardId:e},onClick:function(){y(!1)}}))}))))))))})))})),ph=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(Z.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"view_comfy"),r),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(Z.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(Z.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},onClick:t,size:"30px"},"arrow_back")))},fh=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)},hh=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)},mh=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)},gh=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(Z.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))},bh=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(Z.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.s)(t.label)))},yh=[{label:"$__strategic",value:null,gif:"https://machen.ai/img/PlanType/gif.gif",description:"$__planStrategicDescription",icon:No.a,id:"SelectPlan",index:0},{label:"$__tacticAndOrOperational",value:"flow",gif:"https://machen.ai/img/PlanType/gifEstrategico.gif",description:"$__planTaticAndOperationalDescription",icon:"account_tree",id:"c"},{label:"$__flowOrProcess",value:"operational",gif:"https://machen.ai/img/PlanType/gif2.gif",description:"$__planFlowOrProcessDescription",icon:"view_week",id:"a"},{label:"$__crm",value:"crm",gif:"https://machen.ai/img/PlanType/gif3.gif",description:"$__planCrmDescription",icon:"filter_alt",id:"b"}],vh=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(ph,{prev:!1,name:Object(S.s)("$__insertThePlanName"),handleClose:o}),a.a.createElement(mn,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(yn,{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.s)("$__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.s)("$__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(yn,{item:!0,xs:12,style:{marginTop:"45px"}},a.a.createElement(fh,{handleEvent:t,id:"intro_45",name:Object(S.s)("$__next"),disabled:l,style:{width:"40%",marginLeft:"30%",marginBottom:"45px",border:"2px solid #ebebeb"}}))))};function xh(){xh=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 _h=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).map((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.map((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)(xh().mark((function e(t,r){var a,c;return xh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.trim()&&(c=Object(Y.a)(),m.push(c),B.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 Oh(){Oh=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 wh=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)(yh[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"}},yh.map((function(e,t){return a.a.createElement(bh,{key:e.id,item:e,index:t,handleItemClick:O,selectedPlan:s})})))},j=function(){var n=Object(f.a)(Oh().mark((function n(){var a,o;return Oh().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return _(!0),a=Object(Y.a)(),n.next=4,_h({_id:a,name:s.name,type:"plan",planType:s.value,users:[r._id]},0);case 4:if(!n.sent){n.next=15;break}return o=Object(Y.a)(),n.next=9,_h({_id:o,name:s.name,type:"plan",planType:s.value,users:[r._id]},0);case 9:if(!n.sent){n.next=15;break}return n.next=13,Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:o});case 13:n.sent&&(c.a.push("sp#".concat(o,"/dashboard")),_(!1),t());case 15:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return a.a.createElement(hh,null,g.intro&&a.a.createElement(a.a.Fragment,null,a.a.createElement(mh,{id:"Plantype_67",widthSize:"700px"},a.a.createElement(vh,{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(mh,null,g.type&&a.a.createElement("div",{id:"Plantype_672"},a.a.createElement(ph,{prev:!0,name:Object(S.s)("$__selectPlanType"),handlePrevScreen:function(){return b(Object(p.a)(Object(p.a)({},g),{},{type:!1,intro:!0}))},handleClose:t}),a.a.createElement(mn,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(yn,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",overflow:"hidden"}},a.a.createElement(yn,{item:!0,xs:5,style:{marginBottom:"10px",marginTop:"10px"}},a.a.createElement(w,{style:{transition:"0.7s"}})),a.a.createElement(yn,{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(gh,{tittle:s.type,text:Object(S.s)(s.description?s.description:yh[0].description,1)}))),a.a.createElement(yn,{item:!0,xs:12},x?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(fe,null)):a.a.createElement(fh,{id:"Plantype_110",name:Object(S.s)("$__create"),handleEvent:function(){j()},style:{width:"50%",marginLeft:"25%",marginTop:"35px",marginBottom:"45px",border:"2px solid #ebebeb"}}))),"  ")))}));var jh=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=(f.users,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){if(("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))return e})),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(Fe.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(Z.a,{usePropagation:!0,size:"27px",color:Object(S.d)("menu")},"add_box")),n&&a.a.createElement(wh,{handleClose:function(){return o(!1)}}),a.a.createElement(Me.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(Ne.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:function(e){var t;t=e,d.current&&d.current.contains(t.target)||u(!1)}},a.a.createElement(Pe.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(Ae.a,{key:t,style:{color:Object(S.d)("menu")},onClick:function(){e.onClick?e.onClick():x(e),u(!1)}},a.a.createElement(Z.a,{icon:e.icon,style:{margin:"none !important"},color:Object(S.d)("menu")}),a.a.createElement("span",{style:{marginLeft:"7px"}},Object(S.s)("$__".concat(e.name),1)))}))))))})))}));function Eh(){Eh=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 kh=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.timeline,o=t.session,i=(t.chat,a.a.useState(!1)),c=Object(m.a)(i,2),s=(c[0],c[1]),u=a.a.useState(!1),d=Object(m.a)(u,2),p=d[0],h=d[1],g=a.a.useState({}),b=Object(m.a)(g,2),y=b[0],v=b[1],x=a.a.useState("users"),_=Object(m.a)(x,2),w=_[0],j=_[1],E=a.a.useRef(null);O()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Object(S.j)(),a.a.useEffect((function(){s(!0),k()}),[n]);var k=function(){var e=Object(f.a)(Eh().mark((function e(){var t;return Eh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Er(),v(t),y.total>0&&0===y.users&&j("groups"),"groups"===w&&y.total>0&&0===y.groups&&j("users");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(e){E.current&&E.current.contains(e.target)||h(!1)},C=Object.keys(r.cards).filter((function(e){return r.cards[e]&&r.cards[e]._kpiTimer&&r.cards[e]&&r.cards[e]._users&&Object.keys(r.cards[e]._kpiTimer).filter((function(t){return r.cards[e]._kpiTimer&&r.cards[e]._kpiTimer[t]&&r.cards[e]._kpiTimer[t].userId&&o&&o._id&&r.cards[e]._kpiTimer[t].userId===o._id})).length>0&&Object.keys(r.cards[e]._users).filter((function(e){return o&&o._id&&e===o._id})).length>0})).map((function(e){return r.cards[e]}));return 0===C.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(Fe.a,{ref:E,"aria-controls":p?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){h((function(e){return!e}))}},a.a.createElement(Te.a,{badgeContent:C.length,color:"secondary",overlap:"rectangular"},a.a.createElement(Z.a,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),C.length>0&&a.a.createElement(Me.a,{open:p,anchorEl:E.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Ne.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:L},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.s)("$__timersInProgress")),C.map((function(e,t){return a.a.createElement(on,{db:"cards",key:t,cardId:e._id,notGlobalExpanded:!0,viewTimer:!0})}))))))})))}));function Sh(){Sh=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 Lh=Object(u.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((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)(Sh().mark((function t(){var r;return Sh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.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)(Sh().mark((function t(r){var n,a,o,i;return Sh().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(at.B)(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(mn,null,a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(br,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.s)("$__allResults","*"),text:Object(S.s)("$__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.s)("".concat(e.label),"*"),text:Object(S.s)("".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(mn,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(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)(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(yn,{key:t,md:12,style:{minWidth:"300px"}},a.a.createElement(on,{cardId:t,db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));function Ch(){Ch=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 Ih=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.s)("$__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)(Ch().mark((function e(t){return Ch().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)(Ch().mark((function e(){return Ch().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.s)("$__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(Z.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(lt.a,{max:7},a.a.createElement(we.a,{title:o.users[g.createdBy].displayName?o.users[g.createdBy].displayName:o.users[g.createdBy].name},a.a.createElement(li,{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(Hn,{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(on,{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(ye,{label:Object(S.s)("$__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.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return F({name:"".concat(L,".").concat(v)})}},a.a.createElement(Z.a,{color:"green",icon:"save",title:Object(S.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){j(!w),C("")}},a.a.createElement(Z.a,{color:Object(S.d)("medium"),icon:"cancel",title:Object(S.s)("$__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(we.a,{title:g.in.name},a.a.createElement(li,{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(Ke,{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(Z.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(li,{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(we.a,{title:o.users[g.createdBy].name},a.a.createElement(a.a.Fragment,null,a.a.createElement(li,{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(we.a,{title:Object(S.s)("$__showFile")},a.a.createElement(Z.a,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(g.timelineId||g.message)&&a.a.createElement(we.a,{title:Object(S.s)("$__viewMessage")},a.a.createElement(Z.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(Hn,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:D,db:"cards",nodeId:g.cardId})))}));function Th(){Th=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 Fh=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((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(),x=v.db,_=v.functions,O=x.dataType,w=(_.socket,setTimeout((function(){}),1e3),[]),j=window.location.hash.split("/");j[0]=j[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return E()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var E=function(){var t=Object(f.a)(Th().mark((function t(){var r,n;return Th().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dt.a.get("/Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(console.log(r.data),n=Object(p.a)({},b),r.data.map((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(br,null)),a.a.createElement(mn,null,Object.keys(b).length>0&&a.a.createElement(yn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(na,{title:Object(S.s)("$__files",1),icon:O.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 w.push(b[t]),a.a.createElement(yn,{key:t,md:12},a.a.createElement(Ih,{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:w,file:r}),e.onAction&&e.onAction()}}))}))))))}))),Dh=r(1099),Nh=r.n(Dh),Ah=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 Ph(){Ph=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 $h=Object(u.b)(null,(function(e){return Object(T.b)(I,e)}))(Nh()(Ah)((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)(Ph().mark((function e(){return Ph().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(El.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(Z.a,{icon:"user",color:Object(S.d)("menu")})))))),a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(Me.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(Ne.a,Object.assign({},o,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),a.a.createElement($e.a,null,a.a.createElement(De.a,{onClickAway:h},a.a.createElement(Pe.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:g},a.a.createElement(Ae.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.s)("$__myProfile",1)),a.a.createElement(Ae.a,{onClick:function(){return y()}},Object(S.s)("$__logout",1))))))})))):null})));var Mh=Object(u.b)((function(e){return{controls:e.controls,chatNotifications:e.chat.notifications}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(ha)((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),N=D[0],A=D[1],P=Object(S.j)(),$=a.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),M=Object(m.a)($,2),z=M[0],Y=M[1],B=a.a.useRef(null),G=window.location.hash.split("/");G[0]=G[0].replace("#",""),a.a.useEffect((function(){return H(),function(){}}),[e]);var H=function(){var e={};Kf.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=Kf.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Object(S.s)("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&G[0]&&r.cards[G[0]]&&(t="".concat(Object(S.s)("$__".concat(e.alias),1),": ").concat(r.cards[G[0]].name)),e.tabs&&e.tabs.length>0&&e.tabs.filter((function(e){return e.path===G[1]})).length>0&&(a=Object(S.s)("$__".concat(e.tabs.filter((function(e){return e.path===G[1]}))[0].alias),1),n=e.tabs.filter((function(e){return e.path===G[1]}))[0].icon),Y({title:t,icon:n,sTitle:a,sIcon:null})};return a.a.createElement("div",{style:{position:"absolute",top:"-4px",right:0,left:0,display:"flex",alignItems:"center",zIndex:"10 !important"},id:"top_"},a.a.createElement(mn,null,a.a.createElement(yn,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&a.a.createElement(Fe.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},a.a.createElement(Z.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"}},z.sTitle?"".concat(z.title," - ").concat("matrix"===z.sTitle.toLowerCase()?"MATRIX SWOT":z.sTitle):z.title)),a.a.createElement(R,null,a.a.createElement(yn,{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(ye,{ref:B,label:Object(S.s)("$__search",1),variant:Object(S.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==u?a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.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.s)("$__searchInMachen")}),""!==u&&u.length>1&&a.a.createElement(De.a,{onClickAway:function(){d(""),E(!1),T(!1)}},a.a.createElement(Me.a,{open:!!u,anchorEl:B.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(Ne.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),a.a.createElement($e.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"===N?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.s)("$__asset","*"),text:Object(S.s)("$__asset","*"),color:"asset"===N?Object(S.d)("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){A("asset"),E(!0),T(!0),b(0),_(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"completed"===N?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.s)("$__completed","*"),text:Object(S.s)("$__completed","*"),color:"completed"===N?Object(S.d)("menu"):"lightGray",icon:"verified",onClick:function(){A("completed"),E(!0),T(!0),b(0),_(0)},size:"17px",style:{padding:"0px 3px !important"},transparent:!0})),a.a.createElement("div",{style:{backgroundColor:"deleted"===N?"rgba(0,0,0,0.08)":"",padding:"0 3px"}},a.a.createElement(k.a,{title:Object(S.s)("$__deleted","*"),text:Object(S.s)("$__deleted","*"),color:"deleted"===N?Object(S.d)("menu"):"lightGray",icon:"delete_forever",onClick:function(){A("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.s)("$__noResultsFound")),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(R,null,a.a.createElement(Lh,{text:u||"",onFinish:function(e){b(e),E(!1)},onAction:function(){d(""),E(!1),b(0),_(0)},completed:"completed"===N,deleted:"deleted"===N})),a.a.createElement(R,null,a.a.createElement(Fh,{text:u||"",onFinish:function(e){_(e),T(!1)},onAction:function(){d(""),b(0),_(0)}}))):a.a.createElement(a.a.Fragment,null))))})))))),a.a.createElement(yn,{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(R,null,a.a.createElement(jh,{hashs:G}))),a.a.createElement(R,null,a.a.createElement(oh,null)),a.a.createElement("div",{id:"top_notifications"},a.a.createElement(R,null,a.a.createElement(dh,{loader:!(!e.loaders||!e.loaders.notifications)}))),a.a.createElement("div",{id:"top_timers"},a.a.createElement(R,null,a.a.createElement(kh,null))),a.a.createElement("div",{id:"top_requireApproval"},a.a.createElement(R,null,a.a.createElement(ch,null))),a.a.createElement("div",{id:"top_myDay"},a.a.createElement(R,null,a.a.createElement(ih,null))),a.a.createElement("div",{id:"top_moreOptions"},a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:l.a.getState().controls.unlockedPrivates,color:"secondary"},a.a.createElement(Ye,{transparent:!0,count:50,size:"27px",icon:"settings",title:Object(S.s)("$__settings"),btColor:"lightgray",options:[].concat(Object(ge.a)(P&&P.user&&(P.userAdmin||P.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(ge.a)(P&&P.user&&P.userAdmin&&P.plan&&P.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(ge.a)(l.a.getState().controls.hidePrivate?[]:[{name:Object(S.s)(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.s)(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(ge.a)(l.a.getState().controls.unlockedPrivates>0?[{name:Object(S.s)("$__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(ge.a)(l.a.getState().session&&l.a.getState().session._access&&l.a.getState().session._access.masterAdmin>0?[{name:Object(S.s)("$__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($h,null)))))}))),zh=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:Object(h.a)({display:"inherit",height:"37px",alignItems:"center",justifyContent:"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"}}}};var Yh=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(ae.a)(zh)((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(ge.a)(r),Object(ge.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){if(e._users&&e._users[o._id])return!0})).map((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],n=[];return n[e]=0,i[r._id]&&(n[e]=n[e]+Object.keys(i[r._id]).filter((function(e){return i[r._id]&&i[r._id][e]&&!i[r._id][e].deleted&&i[r._id][e].user&&i[r._id][e].user._id&&o&&o._id&&i[r._id][e].user._id!==o._id&&"comment"===i[r._id][e].type&&(!i[r._id][e].readedBy||!i[r._id][e].readedBy[o._id])})).length),i[o._id]&&(n+=Object.keys(i[o._id]).filter((function(e){return i[o._id]&&i[o._id][e]&&!i[o._id][e].deleted&&i[o._id][e].user&&r._id!==o._id&&i[o._id][e].user._id===r._id&&"comment"===i[o._id][e].type&&(!i[o._id][e].readedBy||!i[o._id][e].readedBy[o._id])})).length),{_id:e,name:r.name,image:r.image||null,countMessages:n[e],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(El.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(Te.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{width:"37px",display:"flex",alignItems:"center"}},a.a.createElement(un,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement(Ie.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(Te.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{display:"flex",alignItems:"center",padding:0,width:"80%",marginTop:"16px"}},a.a.createElement(un,{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(ua.a,{style:{width:"100%",height:"100%"}},(function(e){var t=e.height;e.width;return a.a.createElement(sa.a,{height:t,itemCount:g.length,itemSize:55,width:s?295:58,itemData:g,style:{height:"100%"}},b)}))}))),Bh=function(e){return Object(p.a)(Object(p.a)({},U.l),{},{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 Rh(){Rh=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 Gh=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(G.a)(Bh)(),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)(Rh().mark((function r(n,a){var o;return Rh().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(et,{text:b?Object(S.s)("$__newGroup","*"):null,title:b?null:Object(S.s)("$__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(ye,{className:v.noLabelLight,label:Object(S.s)("$__search","*"),variant:"standard",autoFocus:!0,value:u,InputProps:{endAdornment:a.a.createElement(ut.a,{position:"start"},a.a.createElement(Z.a,{color:Object(S.d)("colorText")},"search")),onChange:function(e){d(e.target.value)}}})):a.a.createElement(et,{title:b?null:Object(S.s)("$__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(Yh,{expanded:b,openChat:function(e){return _(e,"cards")},find:u,onLine:e.onLine}))))}));var Hh=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.s)("$__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(we.a,{title:n,key:t},a.a.createElement(Ie.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.s)("$__typing"),"...")):a.a.createElement(a.a.Fragment,null)}));r(1751),r(1780);var Wh=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)})),Uh=r(1100),Vh=r.n(Uh),qh=function(e){return Object(p.a)(Object(p.a)({},U.l),{},{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 Xh=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.s)("$__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.s)("$__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 Jh(){Jh=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 Kh=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(ae.a)(qh)((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(Vh.a),w=Object(S.j)();a.a.useEffect((function(){(function(){var t=Object(f.a)(Jh().mark((function t(){var r,n;return Jh().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)(Jh().mark((function t(r){var n,o,i,c,s;return Jh().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]&&ht(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)),wr(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.s)("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:Object(S.s)("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),s.close()},Object(S.c)({message:Object(S.s)("$__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(Hn,{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(),n=(r.timeline,r.session),a=l.a.getState().timeline[t.idRel]&&l.a.getState().timeline[t.idRel][t.id]?t.idRel:n._id;l.a.getState().timeline&&l.a.getState().timeline[a]&&l.a.getState().timeline[a][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(p.a)(Object(p.a)({},l.a.getState().timeline),{},Object(h.a)({},a,Object(p.a)(Object(p.a)({},l.a.getState().timeline[a]),{},Object(h.a)({},t.id,Object(p.a)(Object(p.a)({},l.a.getState().timeline[a][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;jr(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)(Jh().mark((function t(r,n){return Jh().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(De.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.s)("$__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.s)("$__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(Xh,{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(un,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:r},a.a.createElement(Ie.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.s)("$__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(lt.a,{max:150},Object.keys(l.a.getState().db.cards[r]._users).length>0&&Object.keys(l.a.getState().db.cards[r]._users).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(we.a,{title:n,key:t},a.a.createElement(Ie.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(we.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(l.a.getState().db.cards[r]._users).map((function(e,t){if(t>16&&l.a.getState().db.cards[r]._users[e]&&l.a.getState().db.cards[r]._users[e].name)return a.a.createElement("li",null,l.a.getState().db.cards[r]._users[e].name)}))),key:t},a.a.createElement(Ie.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}})))),a.a.createElement(Hh,{nodeId:r})):a.a.createElement("div",null,Object(S.s)("$__chats",1))),a.a.createElement("div",{style:{position:"absolute",right:5,display:"flex"}},r?a.a.createElement(a.a.Fragment,null,"701bbca1-e1e4-4ea0-ada8-30f74ae74894"===l.a.getState().session._id?a.a.createElement(Wh,{nodeId:r}):a.a.createElement(a.a.Fragment,null),a.a.createElement(k.a,{id:"chat_files",title:Object(S.s)("$__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.s)(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.s)("$__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.s)("$__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(Gh,{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(_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(hi,{nodeId:r,dark:!1})):a.a.createElement(a.a.Fragment,null)))))}))),Zh=r(465),Qh=r.n(Zh),em=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 tm(){tm=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(207).config();var rm=Object(u.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(T.b)(I,e)}))(Object(ae.a)(em)((function(e){var t,r,n=l.a.getState(),o=n.chat,i=n.notifications,s=e.classes,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=window.location.hash.split("/");O[0]=O[0].replace("#",""),a.a.useEffect((function(){g||b(!0)}),[i]);var w=function(){var t=Object(f.a)(tm().mark((function t(r,n,a){var i,l=arguments;return tm().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&&n!==x||c.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},o),{},{open:!0,db:i,nodeId:a})):(_(n),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},o),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),j=Er();return e.expanded?a.a.createElement("div",{className:s.root},a.a.createElement("div",{className:s.bar},a.a.createElement("div",{className:s.topLogo,id:"sideBar_logoMini"},a.a.createElement("img",(r={alt:"MACHEN_IMAGE",src:Qh.a},Object(h.a)(r,"alt","logo"),Object(h.a)(r,"className",s.logoImg),Object(h.a)(r,"style",{width:"111px",marginLeft:"15px"}),r)),a.a.createElement(k.a,{title:Object(S.s)("$__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:s.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?s.itemButtomActive:s.itemButtom,onClick:function(){w("/d","dashboard")}},a.a.createElement(Z.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.s)("$__dashboard","*"))),a.a.createElement("div",{className:s.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:o.open?s.itemButtomActive:s.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(p.a)(Object(p.a)({},o),{},{open:!o.open}))}},a.a.createElement(Te.a,{overlap:"rectangular",badgeContent:j&&j.total?j.total:0,color:"secondary"},a.a.createElement(Z.a,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Object(S.s)("$__chat","*"))),a.a.createElement("div",{className:s.separator}),a.a.createElement("div",{className:s.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?s.itemButtomActive:s.itemButtom,onClick:function(){w("/sp","StrategyAndPlans")}},a.a.createElement(Z.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.s)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:s.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?s.itemButtomActive:s.itemButtom,onClick:function(){w("/t","myTasks")}},a.a.createElement(Z.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.s)("$__mytasks","*"))),a.a.createElement("div",{className:s.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?s.itemButtomActive:s.itemButtom,onClick:function(){w("/library","library")}},a.a.createElement(Z.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(S.s)("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(S.s)("$__library","*"))),a.a.createElement("div",{className:s.item,id:"sideBar_button_brightandconnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?s.itemButtomActive:s.itemButtom,onClick:function(){w("/bright-and-connected","bright-and-connected")}},a.a.createElement(Z.a,{icon:Rr.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):a.a.createElement("div",{className:s.rootHide},a.a.createElement("div",{className:s.mainButton,id:"sideBar_logoMini"},a.a.createElement("img",(t={alt:"MACHEN_IMAGE",src:Qh.a},Object(h.a)(t,"alt","logo"),Object(h.a)(t,"className",s.logoImg),Object(h.a)(t,"style",{width:"111px",marginLeft:"15px"}),Object(h.a)(t,"onClick",(function(){e.menuExpand()})),t)),a.a.createElement(k.a,{title:Object(S.s)("$__showMenu",1),color:Object(S.d)("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));var nm=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(st.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(Ke,{title:Object(S.s)("$__".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)}))}})))}));r(756);function am(){am=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 om=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)(am().mark((function t(){return am().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(We.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)("color"),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(Ke,{title:"".concat((null===u||void 0===u?void 0:u.name)||Object(S.s)("$__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)("textColor"),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(Z.a,{icon:"navigate_next",color:Object(S.d)("textColor")}))),a.a.createElement("div",null,a.a.createElement(Ke,{title:"".concat((null===c||void 0===c?void 0:c.name)||Object(S.s)("$__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.s)("$__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(R,null,a.a.createElement($u,{nodeId:e.board}))))))}));function im(){im=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 cm=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.s)("$__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)(im().mark((function t(){var r,a;return im().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(at.G)(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(at.i)(e,n._id,a._id,T);case 13:t.sent&&setTimeout(Object(f.a)(im().mark((function t(){return im().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:a._id});case 2:return t.next=4,Object(We.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(Eu.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(De.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.s)("$__duplicate")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(k.a,{id:"close_duplicate",title:Object(S.s)("$__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(ri,{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.s)("$__selectTarget",1),text:Object(S.s)("$__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.s)("$__youAreDuplicating"),": ",Object(S.s)("$__".concat(b.type))," ",Object(S.s)("$__for"),": ",Object(S.s)("$__".concat(b.type)),".",Object(S.s)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null),a.a.createElement(ye,{label:Object(S.s)("$__copyAs",1),variant:Object(S.d)("fieldVariant"),name:"copyAs",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"clear",onClick:function(){u(n.name)}})),onChange:function(e){u(e.target.value)}},value:s,placeholder:Object(S.s)("$__copyAs_placeholder",1)}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(S.s)("$__options")),a.a.createElement("div",null,a.a.createElement(sr,{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.s)("$__copyUsersAccess")),a.a.createElement("div",null,a.a.createElement(sr,{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.s)("$__copyTimelineIfExists")),a.a.createElement("div",null,a.a.createElement(sr,{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.s)("$__copyTagsIfExists")))),E?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(br,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(k.a,{title:Object(S.s)("$__cancel",1),text:Object(S.s)("$__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.s)("$__duplicateAllLinkedItems",1),text:Object(S.s)("$__duplicateAllLinkedItems",1),color:Object(S.d)("menu"),icon:"dynamic_feed",onClick:function(){D(!0)},size:"12px",textSize:"12px",transparent:!0}))))))))})),lm=r(1111);function sm(){sm=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 um=Object(u.b)((function(e){return{addCard:e.controls.addCard}}),(function(e){return Object(T.b)(I,e)}))((function(e){var t=[],r=a.a.useState({}),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],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),w=_[0],j=_[1];if(a.a.useEffect((function(){return"{}"!==JSON.stringify(e.addCard)&&e.addCard._parent&&l.a.getState().db.cards[e.addCard._parent]?i(l.a.getState().db.cards[e.addCard._parent]):(i({}),v(!1),d(!1)),function(){i({}),v(!1),d(!1)}}),[e.addCard]),o.automationUsers&&"doNotChange"!==o.automationUsers&&"remove"!==o.automationUsers&&o._users&&Object.keys(o._users).length>0){var E=l.a.getState().db.users[l.a.getState().session._id]||{},L=Object(p.a)(Object(p.a)({},"add"===o.automationUsers?Object(h.a)({},E._id,{_id:E._id,name:E.name,image:E.image||null}):{}),o._users);Object.keys(L).sort((function(e,t){return L[e].isResponsible?-1:1})).forEach((function(e,r){-1===t.indexOf(e)&&t.push(e)}))}var C=a.a.useState(t.length>0?t:[l.a.getState().session._id]),I=Object(m.a)(C,2),T=I[0],F=I[1],D=a.a.createRef(),N=a.a.createRef(),A=a.a.createRef(),P=a.a.createRef(),$=a.a.createRef({}),M=function(){var t=Object(f.a)(sm().mark((function t(r){var n,a,i,c,s,u,d,f;return sm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(A&&A.current&&A.current.error)){t.next=3;break}return j(A.current.error),t.abrupt("return");case 3:(n=A.current||{}).error&&delete n.error,Object.keys(n).length>0&&(n.formId=o.form),v(!0),$&&(!$.current||$.current&&!$.current.loading)&&($.current=Object(p.a)(Object(p.a)({},$.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:D.current.value,_parent:o._id,myDay:!!(e.myDay||(null===(a=e.initialData)||void 0===a?void 0:a.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:T},n),r?{checklist:!0}:{}),N&&N.current&&N.current.value?{description:N.current.value}:{}),P&&P.current&&P.current.getValue()?{value:P.current.getValue()}:{}),e.initialData?e.initialData:{}),(null===o||void 0===o?void 0:o.childrenAutoTag)&&(null===o||void 0===o?void 0:o._tags)&&(null===o||void 0===o?void 0:o._tags.length)>0?{_tags:o._tags}:{}),(null===o||void 0===o?void 0:o.setIcon)?{icon:null===o||void 0===o?void 0:o.setIcon}:{}),o&&o.automationDueDateType&&"add"===o.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===o||void 0===o?void 0:o.automationDueDate)||1,"days").unix("X")})),o&&o.automationStatusType&&"replace"===o.automationStatusType&&(d=Object(p.a)(Object(p.a)({},d),{},{status:o.automationStatus||"notStarted"},o.automationStatus&&"completed"===o.automationStatus?{completed_at:O()().unix("x")}:{})),(f=_h(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:{}})))),$.current=Object(p.a)(Object(p.a)({},$.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(Eu.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")}},o.shortCutTitle?o.shortCutTitle:Object(S.s)("$__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.s)("$__selectTarget","*"),color:Object(S.d)("colorText"),icon:"assistant_navigation",onClick:function(){d((function(e){return!e}))},size:"20px",transparent:!0}),a.a.createElement(k.a,{id:"close_addCard",title:Object(S.s)("$__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"}},u?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(ri,{onSelect:function(e){i(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}},o.shortCutTitle?o.shortCutTitle:e.placeHolder?e.placeHolder:Object(S.s)(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(lm.a,{ref:D,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&&D.current&&D.current.value&&0===D.current.value.trim().length?(t.preventDefault(),void(D.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(D.current&&D.current.value&&D.current.value.trim().length>0&&M(!((!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}),o.requireDescription&&a.a.createElement(ye,{inputRef:N,label:Object(S.s)("$__description",1),variant:Object(S.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(ut.a,{position:"end"},a.a.createElement(Z.a,{icon:"description",color:"lightgray"}))},placeholder:Object(S.s)("$__description",1)}),o&&o.form&&l.a.getState().forms[o.form]?a.a.createElement("div",{style:Object(p.a)({},w?{border:"solid 1px red",padding:7}:{})},a.a.createElement(yo,{formId:o.form,onChange:function(e,t){console.log(t),A.current=Object(p.a)(Object(p.a)({},e),{},{error:t}),j(null)}}),w?a.a.createElement("span",{style:{color:"red"}},Object(S.s)(w)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),o.requireValue&&a.a.createElement(bo,{label:Object(S.s)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:P,ref:P}),!o.showInPanel&&a.a.createElement(zt,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:o,noLimit:!0,multiple:!0,onSelect:function(e){F(e)},selected:T,transparent:!0})),y?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(br,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.s)("$__cancel",1),text:e.placeHolder||Object(S.s)("$__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:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(S.s)("$__save",1),text:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(S.s)("$__save",1),color:"green",icon:"save",onClick:function(){var t,r;!D.current.value||D.current.value&&""===D.current.value.trim()?D.current.focus():M(!((!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)})),dm=[{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}],pm=[{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}],fm=[{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}],hm=r(1107),mm=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.s)("$__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.s)("$__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.s)("$__letsStart")))))})),gm=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.s)("$__tourTitleIntro")),a.a.createElement("p",{style:{width:"240px",fontWeight:"bolder",textAlign:"center",fontSize:"19px",marginBottom:"30px"}},Object(S.s)("$__tourIntro")),a.a.createElement("button",{onMouseEnter:function(){l(!0)},onMouseLeave:function(){l(!1)},onClick:t,style:h},Object(S.s)("$__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.s)("$__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.s)("$__skipTour","*"))))))},bm=(r(1786),function(e){Object(g.a)(e);var t=l.a.getState().session,r=Object(n.useState)([]),o=Object(m.a)(r,2),i=o[0],c=o[1],s=Object(n.useState)(!0),u=Object(m.a)(s,2),d=u[0],f=u[1],h=Object(n.useState)([]),b=Object(m.a)(h,2),y=b[0],v=b[1],x=Object(n.useState)(0),_=Object(m.a)(x,2),O=_[0],w=_[1],j=Object(n.useState)(!1),E=Object(m.a)(j,2),k=E[0],L=E[1],C=Object(n.useState)(!0),I=Object(m.a)(C,2),T=I[0],F=I[1],D=Object(n.useState)(!0),N=Object(m.a)(D,2),A=N[0],P=N[1],$=Object(n.useState)(0),M=Object(m.a)($,2),z=M[0],Y=M[1],R=Object(n.useState)(!1),G=Object(m.a)(R,2),H=G[0],W=G[1],U=Object(n.useState)(""),V=Object(m.a)(U,2),q=V[0],X=V[1],J=Object(n.useState)("mask"),K=Object(m.a)(J,2),Z=K[0],Q=K[1],ee=a.a.useRef({});Object(n.useEffect)((function(){t.disabledTour&&-1===window.location.hostname.indexOf("a1b2c")&&(ee.current={disabledTour:!0});var e=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");e?(c(pm),L(!0)):r?(c(fm),L(!0)):c(dm)}),[]);var te=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.s)(n,1)),void 0!==t&&t.map((function(e,t){return a.a.createElement("div",{key:t},console.log(e,Object(S.s)(e)),a.a.createElement("h1",{style:{fontSize:"18px",display:"flex",fontWeight:"bolder",marginTop:"25px",color:"grey"}},Object(S.s)(e.trim(),1)),r)})))},re=a.a.useCallback((function(){var e;!function(){var e=document.getElementById(i[O].id);e&&e.removeEventListener("click",re),e&&e.removeEventListener("change",re)}();var t=document.getElementById(null===(e=i[O+1])||void 0===e?void 0:e.id),r=i[O+1];if(t)ae(r),w((function(e){return e+1}));else{if(O===i.length-1)return;setTimeout((function(){re(O)}),300)}}),[O,i]),ne=function(){var e=setInterval((function(){var t=document.getElementById("sideBar_subMenu_plan_overview"),r=document.getElementById("sideBar_subMenu_plan_board");t?(w(0),c(pm),clearInterval(e)):r&&(w(0),c(fm),clearInterval(e))}),200)};function ae(e){"undefined"!==typeof e.show||"undefined"!==typeof e.fake?f(!1):(f(!0),Y(0)),"undefined"!==typeof e.maskValue&&Y(e.maskValue),"undefined"!==typeof e.click&&P(!1)}Object(n.useEffect)((function(){ee.current.disabledTour||i&&function e(){if(i.length>0){var t=document.getElementById(i[0].id);if(t&&0===O)ae(i[O]),t.addEventListener("click",re);else setTimeout((function(){e()}),300)}}()}),[i]),Object(n.useEffect)((function(){if(!ee.current.disabledTour){if(0===O)return;if(O<i.length)document.getElementById(i[O].id)&&function(){if(i.length>0){var e,t=document.getElementById(i[O].id);if(void 0!==(null===(e=i[O])||void 0===e?void 0:e.input))t.addEventListener("change",re);else{var r,n,a,o,c,l;if(void 0!==(null===(r=i[O])||void 0===r?void 0:r.show))t.addEventListener("click",re);else if(void 0!==(null===(n=i[O])||void 0===n?void 0:n.fake)){var s=document.getElementById(i[O].buttonId);s&&s.addEventListener("click",re)}else t.addEventListener("click",re);if(void 0!==(null===(a=i[O])||void 0===a?void 0:a.last)&&t.addEventListener("click",(function(){return oe(!0)})),void 0!==(null===(o=i[O])||void 0===o?void 0:o.change)){var u=document.getElementById(i[O].buttonId);u&&u.addEventListener("click",ne),u&&u.addEventListener("click",Q("maskHide"))}if(void 0!==(null===(c=i[O])||void 0===c?void 0:c.handleClose)){var d=document.getElementById(i[O].handleClose);d&&d.addEventListener("click",(function(){return oe()}))}if(void 0!==(null===(l=i[O])||void 0===l?void 0:l.handleBack)){var p=document.getElementById(i[O].handleBack);p&&p.addEventListener("click",(function(){return oe()}))}}}}()}}),[O]);var oe=function(e){F(!1),e&&W(!0),B.a.post("/user/preffers",{disabledTour:!0})};return Object(n.useEffect)((function(){if(!ee.current.disabledTour){var e;if(0===O&&"quick_388"===(null===(e=i[O])||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(){Q("mask"),X("upd")}),900))}),100);clearInterval(t)}),1e3);i&&v(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"===Z?null:a.a.createElement(a.a.Fragment,null,a.a.createElement(te,{text:Object(S.s)(i),tittle:l}),a.a.createElement("div",{style:{paddingTop:i?"50px":"25px"}},t&&a.a.createElement("button",{id:"Tour_173",onClick:function(){return re()},style:n},"  ",Object(S.s)("$__next")," "),a.a.createElement("button",{onClick:function(){return oe()},style:o},a.a.createElement("p",{style:{borderBottom:"1px solid black",marginTop:"20px"}},Object(S.s)("$__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"===Z||window.innerWidth<1480&&11==r?"none":"block"},position:u||"bottom"}}))}(i,d,O))}}),[i,d,O,Z]),ee.current.disabledTour?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,k?a.a.createElement(hm.a,{maskClassName:Z,disableFocusLock:!0,rounded:5,update:q,disableDotsNavigation:!0,showNavigation:!1,showNumber:!1,disableInteraction:A,closeWithMask:!1,goToStep:O,steps:y,isOpen:T,showButtons:!1,maskSpace:z,onRequestClose:function(){return oe()}}):a.a.createElement(gm,{handleEnd:function(){L(!0),oe()},handleStart:function(){return L(!0)}}),H&&a.a.createElement(mm,{handleEnd:function(){oe(),W(!1)}}))});function ym(){ym=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(207).config();var vm,xm=function(){var e=Object(f.a)(ym().mark((function e(t,r){var n,a,o;return ym().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)}}(),_m=r(1108),Om=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)({},U.f),{},{height:"-webkit-fill-available",overflowY:"auto"}),map:{marginTop:"0px"},mainPanelSidebarMini:Object(h.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},wm=function(){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{position:"relative",minHeight:"100vh",display:"flex !important",margin:"0",border:"0",color:U.O,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(U.r)(U.b)+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}};r(1787);function jm(){jm=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(207).config();var Em=Object(j.b)(w.a)(vm||(vm=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"]))),km=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),N=F[0],A=F[1],P=a.a.useState(!1),$=Object(m.a)(P,2),M=$[0],z=$[1],Y=a.a.useState(!0),B=Object(m.a)(Y,2),W=B[0],U=B[1],V=a.a.useState(!1),q=Object(m.a)(V,2),X=q[0],J=q[1],Q=a.a.useState(null),ee=Object(m.a)(Q,2),te=ee[0],re=ee[1],ne=Object(G.a)(_?Om:wm),ae=a.a.useRef({}),oe=ne(),ie=a.a.createRef(),ce=oe.mainPanel+" "+x()((t={},Object(h.a)(t,oe.mainPanelSidebarMini,!0),Object(h.a)(t,oe.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),le=a.a.createRef(),se=a.a.createRef();a.a.useEffect((function(){se.current={offline:!1};var t=function(){var t=Object(f.a)(jm().mark((function t(r){var a;return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dt.a.post("/WhiteLabel",{url:r});case 2:(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)}))),ge());case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r=(localStorage.getItem("TOKEN"),window.location.hostname);(r=r.replace(".machen.ai",""))&&-1===r.indexOf("software")&&-1===r.indexOf("hom2022")&&-1===r.indexOf("localhost")?t(r):ge(),re(we(Kf))}),[]),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)})),ve(t)})),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),_&&(ve(e),ye(),de(!0),re(we(Kf)))}),[_]);var de=function(){var e=Object(f.a)(jm().mark((function e(t){var r,n,a,o;return jm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:se.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(){ge(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(n),clearInterval(o),n=0,r=O()().tz("America/Sao_Paulo").unix("X"),a=setTimeout((function(){fe("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(f.a)(jm().mark((function e(t){var i;return jm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===se||void 0===se||null===(i=se.current)||void 0===i?void 0:i.offline)||(ge(!0),clearInterval(o),o=setInterval((function(){ge(!0)}),36e4),clearTimeout(a),n||(n=setInterval((function(){1}),1e3)),fe("online"),r&&O()().tz("America/Sao_Paulo").unix("X")-r>30&&pe());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)}}(),pe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;jr(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})},fe=function(){var e=Object(f.a)(jm().mark((function e(t){return jm().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)}}(),ge=function(){var t=Object(f.a)(jm().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,P,$,M=arguments;return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=M.length>1&&void 0!==M[1]?M[1]:0,!se.current||se.current.offline){t.next=75;break}if(r){t.next=50;break}return t.prev=3,t.next=6,dt.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,dt.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.map((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!==Kf.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||c.a.push("/d#tab/resume"),_e(),be(),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)),N&&A(!1);case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(3),console.log(t.t0),5===a?(z(!0),_&&w(!1),N&&A(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):ge(r,a+1);case 48:t.next=73;break;case 50:return t.prev=50,t.next=53,dt.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===(P=D.user)||void 0===P||null===($=P.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(){ge(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)}}(),be=function(){var t=Object(f.a)(jm().mark((function t(){var r,n;return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return mt(e),t.prev=1,t.next=4,dt.a.get("/Tags_List");case 4:(r=t.sent)&&r.data&&(r.data.map((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,dt.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)}}(),ye=function(){var t=Object(f.a)(jm().mark((function t(){return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.b)(e,{cardLoad:"chat"});case 2:return t.next=4,jr(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,jr(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)}}(),ve=function(){var t=Object(f.a)(jm().mark((function t(r){var n,a,o=arguments;return jm().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(!ae||!ae.current||ae.current.initialLoader){t.next=24;break}return ae.current={initialLoader:!0},t.next=6,Object(dt.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})).map((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(We.b)(e,{cardLoad:"myDay"});case 10:return t.next=12,Object(We.b)(e,{cardLoad:"favorites"});case 12:return t.next=14,Object(We.b)(Object(p.a)({},e),{cardLoad:"plans"});case 14:return t.next=16,Object(We.b)(Object(p.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 16:return t.next=18,Object(We.b)(Object(p.a)({},e),{cardLoad:"steps"});case 18:return t.next=20,Object(We.b)(Object(p.a)({},e),{cardLoad:"approval",ignoreLoader:!0});case 20:return t.next=22,Object(We.b)(e,{cardLoad:"links",limit:9,skip:0});case 22:return t.next=24,Object(We.b)(e,{cardLoad:"insights",limit:9,skip:0});case 24:return t.next=26,Object(We.d)(e);case 26:if(!t.sent){t.next=30;break}return A(!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)}}(),xe=function(){},_e=function(){var t=Object(f.a)(jm().mark((function t(){var r;return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(_m.a)("https://ws.machen.ai",{transports:["websocket","polling"],auth:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(Ee(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)}}(),Oe=function(){var e=Object(f.a)(jm().mark((function e(t){return jm().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)}}(),we=function t(r){var n=_;return r.map((function(r,o){if(r.auth&&(!r.AppAccess||r&&r.AppAccess&&n&&n._access)){var i;i=r.component;var c=!r.access&&!r.AppAccess;if(r.access&&r.access.map((function(e){n&&n[e]&&(c=!0)})),r.AppAccess&&r.AppAccess.map((function(e){n&&n._access&&n._access[e]&&(c=!0)})),c)return r.views&&r.views.length>0&&t(r.views),a.a.createElement(s.b,{path:r.path,component:function(){return a.a.createElement(i,null)},key:o,expanded:W,subMenu:!!e.subMenu})}}))},je=function(){var t=Object(f.a)(jm().mark((function t(r){return jm().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)}}(),Ee=function(t){t.on("global",(function(e){"version"===e.fn&&Object(S.c)({message:Object(S.s)("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&je(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){Object(at.l)(Object(p.a)(Object(p.a)({},e),{},{store:l.a.getState(),_sessionId:n._id}),t)})),t.on("copy.LOAD",(function(t){Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:t._id})})),t.on("card.ADD",(function(t){t._id&&Object(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){Object(at.k)(e,t)})),t.on("card.MYDAY",(function(t){Object(at.A)(e,t)})),t.on("card.TIMER",(function(t){t&&t.type&&"stop"===t.type&&(console.log("card.TIMER",t),Object(at.m)(e,t))})),t.on("card.UPDATE",(function(t){Object(at.n)(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(f.a)(jm().mark((function t(r){return jm().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(at.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(at.a)(e,t)})),t.on("card.ACCESS_REMOVE",(function(t){Object(at.b)(e,t)})),t.on("card.REORDER",(function(t){Object(at.D)(e,t)})),t.on("card.DELETE",(function(t){Object(at.o)(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){Object(at.L)(e,t)})),t.on("kanban.REORDER",(function(t){!function(e,t){var r=Object(p.a)({},l.a.getState().db.cards);t.cards&&t.cards.length>0&&t.cards.map((function(e,t){r=Object(p.a)(Object(p.a)({},r),{},Object(h.a)({},e,Object(p.a)(Object(p.a)({},r[e]),{},{step:"".concat(t+1)})))})),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),r)}))}(e,t)})),t.on("unlinkChildrens",(function(t){Object(at.L)(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(We.b)(Object(p.a)(Object(p.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):Object(at.f)(e,t)})),t.on("node.UPDATE",(function(t){xm(e,t)})),t.on("column.UPD",(function(t){Object(at.Q)(e,t)})),t.on("column.DELETE",(function(t){Object(at.p)(e,t)})),t.on("column.REORDER",(function(t){Object(at.E)(e,t)})),t.on("column.CARDS",(function(t){Object(at.g)(e,t)})),t.on("user.UPD",(function(t){vt(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){vt(e,t)})),t.on("userGroup.UPD",(function(t){Sc(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){Sc(e,t)})),t.on("tag.DEL",(function(t){Cc(e,t,!0)})),t.on("tag.UNLINK",(function(t){Fc(e,t,!0)})),t.on("logout",(function(e){e.user===l.a.getState().session._id&&je()})),t.on("notifications.ADD",function(){var t=Object(f.a)(jm().mark((function t(r){return jm().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])&&_r(e,t)})),t.on("chat.INTERACT",(function(t){Or(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(){se.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===se||void 0===se||null===(e=se.current)||void 0===e?void 0:e.offline)&&(se.current={offline:!1},pe()),ge(!0),clearTimeout(r),I(!1)}))};return N||!te?a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},a.a.createElement(he,null)):(M&&"/offline-detect"!==window.location.pathname&&c.a.push("offline-detect"),M||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||c.a.push("login"),a.a.createElement("div",{style:Object(p.a)({position:"fixed",top:"0px",bottom:"0px",left:_&&W?"calc(198px + ".concat(X?"264px":"0px",")"):"0px",right:"0px"},_?{}:{overflow:"auto"}),onContextMenu:function(){}},_?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:oe.wrapper},a.a.createElement(R,{info:{path:"layouts/index",component:"Sidebar"}},a.a.createElement(H.a,{xsDown:!0},W&&a.a.createElement(ah,Object.assign({routes:Kf,handleDrawerToggle:xe,menuExpand:function(){U((function(e){return!e}))},setSubMenuExpanded:function(e){J(e)},subMenuExpanded:X},r)))),a.a.createElement(R,null,a.a.createElement(H.a,{smUp:!0},a.a.createElement(rm,Object.assign({routes:Kf,handleDrawerToggle:xe,menuExpand:function(){U((function(e){return!e}))},setSubMenuExpanded:function(e){J(e)},subMenuExpanded:X,expanded:W},r)))),a.a.createElement("div",{className:ce,ref:le,id:"mainPannel"},a.a.createElement("div",{className:oe.container},a.a.createElement(R,null,a.a.createElement(s.d,null,te,a.a.createElement(s.a,{from:"/",to:"/d#tab/resume"}))))),a.a.createElement(R,null,a.a.createElement(om,null)),a.a.createElement(R,null,a.a.createElement(mc,null))),a.a.createElement(H.a,{smDown:!0},a.a.createElement(Mh,{menuExpand:function(){U((function(e){return!e}))},expanded:W})),a.a.createElement(R,null,a.a.createElement(ue,null)),a.a.createElement(me,null),a.a.createElement(R,null,a.a.createElement(D,null)),a.a.createElement(R,null,a.a.createElement(E.a,{open:L,className:oe.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(Z.a,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Object(S.s)("$__noInternetConnection","*"))))),a.a.createElement("div",null),a.a.createElement(R,null,a.a.createElement(Kh,{expanded:W,subMenuExpanded:X})),a.a.createElement(R,null,a.a.createElement(nm,null)),a.a.createElement(R,null,a.a.createElement(um,null)),a.a.createElement(R,null,a.a.createElement(cm,null)),a.a.createElement(R,null,a.a.createElement(C,null)),a.a.createElement(R,null,a.a.createElement(bm,null)),a.a.createElement(Wh,null)):a.a.createElement("div",null,a.a.createElement("div",{className:oe.wrapper,ref:ie},a.a.createElement("div",{className:oe.fullPage,style:{backgroundImage:'url("'.concat((null===u||void 0===u?void 0:u.loginBackground)?u.loginBackground:Object(S.d)("loginBackground"),'")')}},a.a.createElement(R,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){Oe(e)}})},key:r}):void 0);var n}))}(Kf),a.a.createElement(s.a,{from:"*",to:M?"/offline-detect":"/login"}))),a.a.createElement(R,null,a.a.createElement(K,{white:!0}))))),a.a.createElement(R,null,a.a.createElement(Em,{pauseOnFocusLoss:!0}))))})),Sm=(r(1791),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:km})))});r(207).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(Sm,{store:l.a,history:c.a}),document.getElementById("root"))},20:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(10),c=r(147),l=r(104),s=r(806),u=r(1117),d=r(805),p=r(478),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.s)("$__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")})},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"}))))))}},209:function(e,t,r){},22:function(e,t,r){"use strict";r.d(t,"k",(function(){return T})),r.d(t,"O",(function(){return oe})),r.d(t,"q",(function(){return pe})),r.d(t,"a",(function(){return U})),r.d(t,"b",(function(){return V})),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 J})),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 Y})),r.d(t,"A",(function(){return B})),r.d(t,"B",(function(){return se})),r.d(t,"C",(function(){return ue})),r.d(t,"D",(function(){return $})),r.d(t,"E",(function(){return M})),r.d(t,"F",(function(){return S})),r.d(t,"G",(function(){return v})),r.d(t,"H",(function(){return w})),r.d(t,"I",(function(){return N})),r.d(t,"J",(function(){return de})),r.d(t,"K",(function(){return R})),r.d(t,"L",(function(){return X})),r.d(t,"M",(function(){return q})),r.d(t,"N",(function(){return E})),r.d(t,"P",(function(){return ae})),r.d(t,"Q",(function(){return A})),r.d(t,"R",(function(){return te}));var n=r(25),a=r(7),o=r(2),i=r(8),c=r(3),l=r(63),s=r.n(l),u=r(34),d=r(49),p=r(162),f=r(9),h=r.n(f),m=r(56),g=r(566),b=r(1);r(1833);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.s)("$__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)))}))},V=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)))}))},q=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)}}(),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: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)}}(),J=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.s)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(b.s)("$__concludeAll"),text:Object(b.s)("$__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.s)("$__cancel"),text:Object(b.s)("$__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.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})))),r}},265: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}}},288: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(1106),s=r(1810),u=r(20),d=r(1115),p=r(807),f=r(1114),h=r(478),m=r(1),g=r(34);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}Object(h.a)((function(e){return{iconButtonStyleTransaparent:{padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},iconButtonStyleWhite:{padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));t.a=function(e){var t=c.a.useState(!1),r=Object(o.a)(t,2),i=r[0],h=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)||(h(!1),e.onClose&&e.onClose())},j=function(){var t=Object(a.a)(b().mark((function t(r){return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.onChange&&e.onChange(r),h(!i),!e._id){t.next=5;break}return t.next=5,g.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){h((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(m.r)(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(){h((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(m.s)("$__cancel",1),color:"lightgrey",icon:"close",onClick:function(){_(e.color?e.color:"rgba(200,200,200,1)"),h(!i)},size:"30px"}),e.color?c.a.createElement(u.a,{title:Object(m.s)("$__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(m.s)("$__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"}})))))})))}},295: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(813),u=r(652),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.s)("$__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.s)("$__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)}))))}},299:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},3:function(e,t,r){"use strict";var n=r(13),a=r(1112),o=r(1051),i=r(43),c=r(25),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=r(756),y=r(566),v={},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,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},_=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},O={},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},j={open:!1,miro:!1,files:[],file:0},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,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)({},j):e},k={total:0,lastNotification:0,firstNotification:0},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,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},L={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},I=r(265),T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I.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?I.a:e},F=r(465),D=r.n(F),N=r(1057),A=r.n(N),P={custom:{ColumnTitleColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",customLogo:D.a,loginBackground:A.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},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,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},M={cards:{load:{}},timeline:{load:{}}},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M,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},Y={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,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)({},Y):e},R={},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R,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},H={},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,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},U={cards:{},timeline:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,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},q={users:{}},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,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},J={typing:{}},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,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)({},J):e},Z={},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,t=arguments.length>1?arguments[1]:void 0;return"SET_SEARCH"===t.action&&t.value?Object(l.a)({},t.value):e},ee={},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0;return"SET_OVERVIEW_NAV"===t.action&&t.value?Object(l.a)({},t.value):e},re=r(425);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=ne().mark(ce),oe=ne().mark(le);function ie(e){return e.next&&e.next(),!0}function ce(e){return ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(re.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(re.b)(ie,e);case 4:case"end":return t.stop()}}),ae)}function le(){return ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(re.a)([Object(re.e)("ASYNC",ce),Object(re.d)("IMMEDIATE",ce)]);case 2:case"end":return e.stop()}}),oe)}var se=Object(a.a)(),ue=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:K,chats:g,controls:b.a,db:y.a,functions:x,languages:w,lightBox:E,notifications:S,overviewNav:te,preLoader:C,search:T,searchs:Q,session:$,sessionLoads:z,sideModule:B,timeline:G,timelineLoader:W,toLoad:V,usersStatus:X,forms:_}),Object(n.a)(se,Object(o.routerMiddleware)(i.a)));se.run(le);t.a=ue},34:function(e,t,r){"use strict";var n=r(8),a=r(342),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},385: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="},43:function(e,t,r){"use strict";var n=r(249),a=Object(n.a)();t.a=a},465:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},49:function(e,t,r){"use strict";var n=r(8),a=r(342),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},56: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(63),c=r.n(i),l=r(9),s=r.n(l),u=r(3),d=r(49);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,V,q,X;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),V=c()("".concat(JSON.stringify(r))).toString(),!(Object.keys(U).length>0&&U[V])){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)({},V,G?"completed":"loading"))})})),q=(q=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||q}:{}),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)({},V,"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(!(X=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",X);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)})).map((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})).map((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)({},e),r?{myDay:r}:{})))})),"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})).map((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||!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),"/bright-and-connected"===window.location.pathname&&a(!0),"/c"!==window.location.pathname){e.next=72;break}if("tab"!==n[0]||"users"===n[1]){e.next=71;break}return e.next=71,f(t,{cardLoad:"plans"});case 71:a(!0);case 72:if("/t"!==window.location.pathname){e.next=89;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=77;break}return e.next=76,f(t,{cardLoad:"myResponsible"});case 76:a(!0);case 77:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=81;break}return e.next=80,f(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 80:a(!0);case 81:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=89;break}return e.next=84,f(t,{cardLoad:"in"});case 84:return e.next=86,f(t,{cardLoad:"in",completed:!0,completedDays:r});case 86:return e.next=88,f(t,{cardLoad:"myResponsible"});case 88:a(!0);case 89:if("/tags"!==window.location.pathname){e.next=94;break}if(36!==n[0].length&&!u.a.getState().searchs.tagsView){e.next=93;break}return e.next=93,f(t,{cardLoad:"tags",idRel:n[0],searchParams:u.a.getState().searchs.tagsView});case 93:a(!0);case 94:"/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);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)}}()},566:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(767),i=r.n(o),c=r(768),l=r.n(c),s=r(769),u=r.n(s),d=r(770),p=r.n(d),f=r(1052),h=r.n(f),m=r(1053),g=r.n(m),b=r(1054),y=r.n(b),v=r(1055),x=r.n(v),_=r(106),O=r.n(_),w=r(1056),j=r.n(w),E=r(131),k=r.n(E),S=r(575),L={version:S.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:Object(a.a)({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}},"onBoarding",{technician:!1,custom:!1})},{value:"p1",label:"$__saasPlanName1",settings:Object(a.a)({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}},"onBoarding",{technician:1e3,custom:4990})},{value:"p2",label:"$__saasPlanName2",settings:Object(a.a)({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}},"onBoarding",{technician:1e3,custom:4990})},{value:"p3",label:"$__saasPlanName3",settings:Object(a.a)({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}},"onBoarding",{technician:1e3,custom:4990})},{value:"p4",label:"$__saasPlanName4",settings:Object(a.a)({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}},"onBoarding",{technician:1e3,custom:4990})},{value:"p5",label:"$__saasPlanName5",settings:Object(a.a)({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}},"onBoarding",{technician:!0,custom:4990})}],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:O.a,color:null,calendar:!0},{value:"guidelineD",label:"$__guidelineD",icon:i.a,color:null,calendar:!0},{value:"guidelineR",label:"$__guidelineR",icon:u.a,color:null,calendar:!0},{value:"guidelineC",label:"$__guidelineC",icon:l.a,color:null,calendar:!0},{value:"guidelineE",label:"$__guidelineE",icon:p.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:k.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"}],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:h.a,title:"Microsoft Word",viewer:"microsoft"},{ext:["xls","xlt","ooxml","xlsx"],icon:g.a,title:"Microsoft Excel",viewer:"microsoft"},{ext:["ppt","pptx","ppsx","sldx"],icon:y.a,title:"Microsoft PowerPoint",viewer:"microsoft"},{ext:["pdf"],icon:j.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:k.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:O.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:i.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:u.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:p.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:l.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:x.a,db:"cards",hash:["matrix"]},{name:"matrix",icon:O.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]:L,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}},575:function(e){e.exports=JSON.parse('{"name":"machen","version":"3.1.217","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","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 && gulp licenses && npm version patch","test":"react-scripts test --env=jsdom","eject":"react-scripts eject","deploy":"npm run build ","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","compile-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css","minify-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.min.css --output-style compressed","map-sass":"node-sass src/assets/scss/material-dashboard-pro-react.scss src/assets/css/material-dashboard-pro-react.css --source-map true"},"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":[]}}')},592: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(478),u=r(1),d=r(22),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}))}))},593:function(e,t,r){var n=r(323),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"}}}},594:function(e,t,r){"use strict";var n,a=r(7),o=r(2),i=r(6),c=r(1),l={container:Object(o.a)(Object(o.a)({},i.l),{},(n={position:"relative",border:"0.5px solid ".concat(Object(c.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)"},Object(a.a)(n,"padding","3px"),Object(a.a)(n,"minWidth","150px"),Object(a.a)(n,"display","flow-root"),n)),cardContainer:Object(o.a)(Object(o.a)({},i.l),{},{position:"relative",minWidth:"150px",display:"flow-root"}),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:"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(c.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=l},6:function(e,t,r){"use strict";r.d(t,"r",(function(){return a})),r.d(t,"m",(function(){return o})),r.d(t,"I",(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,"l",(function(){return s})),r.d(t,"z",(function(){return u})),r.d(t,"N",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"G",(function(){return f})),r.d(t,"u",(function(){return h})),r.d(t,"D",(function(){return m})),r.d(t,"q",(function(){return g})),r.d(t,"b",(function(){return b})),r.d(t,"O",(function(){return y})),r.d(t,"K",(function(){return v})),r.d(t,"o",(function(){return x})),r.d(t,"p",(function(){return _})),r.d(t,"v",(function(){return O})),r.d(t,"w",(function(){return w})),r.d(t,"P",(function(){return j})),r.d(t,"J",(function(){return E})),r.d(t,"a",(function(){return k})),r.d(t,"n",(function(){return S})),r.d(t,"A",(function(){return L})),r.d(t,"x",(function(){return I})),r.d(t,"s",(function(){return T})),r.d(t,"E",(function(){return F})),r.d(t,"L",(function(){return D})),r.d(t,"h",(function(){return N})),r.d(t,"B",(function(){return A})),r.d(t,"M",(function(){return P})),r.d(t,"F",(function(){return $})),r.d(t,"i",(function(){return M})),r.d(t,"t",(function(){return z})),r.d(t,"y",(function(){return Y})),r.d(t,"C",(function(){return B})),r.d(t,"g",(function(){return R})),r.d(t,"k",(function(){return G})),r.d(t,"H",(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"})})},625:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},648:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},688:function(e,t,r){},690:function(e,t,r){},756:function(e,t,r){"use strict";var n=r(2),a={sideModuleWindow:!1,period:"$__last7Days",users:{},showDeleted:!1,hidePrivate:!1,lockPrivate:!1,unlockedPrivates:0,board:null,toCopyMove:null,addCard:{},importUsers:!1,agileOrderBy:"name",agileOrderDesc:"DESC"};t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;return"SET_CONTROL"===t.action&&t.value?Object(n.a)(Object(n.a)({},e),t.value):"RESET_CONTROLS"===t.action?Object(n.a)({},e):e}},764: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="},767:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},768:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},769:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},770:function(e,t,r){var n=r(70);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(129)).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},771:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},85: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(804),l=r(652),s=r(478),u=r(31),d=r(805),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.s)(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)}))))}},969:function(e,t,r){},976:function(e,t,r){}},[[1156,1,2]]]);
//# sourceMappingURL=main.9edb2da5.chunk.js.map