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/WC/static/js/main.7ede8fd0.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.7ede8fd0.chunk.js.LICENSE.txt */
(this.webpackJsonpmachen=this.webpackJsonpmachen||[]).push([[0],{1:function(e,t,r){"use strict";r.d(t,"l",(function(){return A})),r.d(t,"a",(function(){return z})),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 P})),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 y})),r.d(t,"q",(function(){return L})),r.d(t,"r",(function(){return N})),r.d(t,"s",(function(){return v})),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(151),s=r(68),u=r.n(s),d=r(10),p=r.n(d),f=r(3),h=r(18),m=r(30);function g(){g=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(S([])));v&&v!==t&&r.call(v,o)&&(m=v);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),E(r),d}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var b=window.location.hostname.indexOf("a1b2c3d4")>-1||window.location.hostname.indexOf("localhost")>-1,v=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 y(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:v("$__confirm"),text:v("$__confirm"),color:"green",icon:"check",size:"25px",onClick:function(){e.confirm(),l.b.dismiss(t)}}),c.a.createElement(h.a,{shadow:!0,title:v("$__cancel"),text:v("$__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:y(e)}});var n=y(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:y(e)}})}))," ")},I=function(e){var t=y(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 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 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">').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 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">').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))},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;return r=(null===e||void 0===e?void 0:e.low)?parseInt(e.low):parseInt(e),t?p()(1e3*r).tz("America/Sao_Paulo").format(t):p()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("H:mm"):p()(new Date).tz("America/Sao_Paulo").format("YYYY")===p()(1e3*r).tz("America/Sao_Paulo").format("YYYY")?p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM H:mm"):p()(1e3*r).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm")};function A(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 z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var r=1024,n=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,o)).toFixed(n))+" "+a[o]}},1006:function(e,t,r){},104:function(e,t,r){e.exports=r.p+"static/media/fundo-sonne.6de93583.png"},107:function(e,t,r){"use strict";var n=r(26),a=r(813),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},1072:function(e,t,r){e.exports=r.p+"static/media/microsoftWord.113ac212.svg"},1073:function(e,t,r){e.exports=r.p+"static/media/microsoftExcel.c59164de.svg"},1074:function(e,t,r){e.exports=r.p+"static/media/microsoftPowerpoint.0e97c564.svg"},1075:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},1076:function(e,t,r){e.exports=r.p+"static/media/pdf.3d17c449.svg"},1077:function(e,t,r){e.exports=r.p+"static/media/fundoLogin.a16e608c.jpg"},1094:function(e,t,r){e.exports=r.p+"static/media/googlePlay-ptBR.6583181e.png"},1095:function(e,t,r){e.exports=r.p+"static/media/appleStore-ptBR.2049e321.png"},11: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(814),c=r(107),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}))}},1110:function(e,t,r){"use strict";(function(e){var n,a=r(2),o=r(66),i=r(0),c=r.n(i),l=r(10),s=r.n(l),u=r(45),d=r(14),p=r(3),f=r(12),h=r(13),m=r(79),g=r(149),b=r(590),v=r(107),y=r(11),x=r(1162),_=r(1853),O=r(813),w=r(26),j=r(592),E=r(104),k=r.n(E),S=r(1),L=u.default.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(S.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(w.a)(j.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(L,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(S.s)("$__new",1),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(S.s)("$__step","*")," ",u.findIndex((function(e){return e._id===l._parent}))+1," ",Object(S.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(v.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(S.s)("$__completed"):u.findIndex((function(e){return e._id===l._parent}))===t?Object(S.s)("$__".concat(l.status)):Object(S.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(v.a,{arrow:!0,title:c.a.createElement("div",null,Object(S.s)("$__".concat(l.status),"*"))},c.a.createElement("div",null,c.a.createElement(y.a,{color:p.a.getState().db.status.filter((function(e){return e.value===l.status}))[0].color},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(_.a,{max:4},Object.keys(l._users).map((function(e,t){if(l._users[e]&&l._users[e].name)return c.a.createElement(O.a,{title:l._users[e].name,key:e},c.a.createElement(x.a,{alt:l._users[e].name,src:l._users[e].image||k.a},l._users[e].name.substr(0,1)))})))))),c.a.createElement(g.a,{options:l._tags,showOptions:!1}))))})))}).call(this,r(523)(e))},1111:function(e,t,r){e.exports=r.p+"static/media/Mockup_App_WEB.0ed158a4.png"},1112:function(e,t,r){e.exports=r.p+"static/media/supportMockup.ec51b4aa.png"},1114:function(e,t,r){e.exports=r.p+"static/media/sample.ab31b41d.xlsx"},1115:function(e,t,r){e.exports=r.p+"static/media/sampleoptions.65339041.xlsx"},1124:function(e,t,r){e.exports=r.p+"static/media/notification.d7241ff2.mp3"},1189:function(e,t,r){e.exports=r(1833)},1198:function(e,t){},125:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},1271:function(e,t){},1272:function(e,t){},1273:function(e,t){},1274:function(e,t){},1275:function(e,t){},129:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},1377:function(e,t,r){},14: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}))},142:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(475),i=r(1142),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)))}},1478:function(e,t){},1480:function(e,t){},149:function(e,t,r){"use strict";var n=r(2),a=r(6),o=r(5),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(11),p=r(279),f=r(816),h=r(813),m=r(475),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),v=b[0],y=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([]),y(!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(){y(!0)},onMouseLeave:function(){setTimeout((function(){y(!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&&v&&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"})))))))}},1490:function(e,t){},1492:function(e,t){},1517:function(e,t){},1519:function(e,t){},1520:function(e,t){},1525:function(e,t){},1527:function(e,t){},1533:function(e,t){},1535:function(e,t){},1554:function(e,t){},1566:function(e,t){},1569:function(e,t){},160:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),a=(r(1087),r(30));function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.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(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,i,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(S([])));v&&v!==t&&r.call(v,i)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(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&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,p):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),p},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),E(r),p}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}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)}}()},1628:function(e,t,r){},1629:function(e,t,r){},18:function(e,t,r){"use strict";var n=r(2),a=r(0),o=r.n(a),i=r(11),c=r(142),l=r(107),s=r(816),u=r(1143),d=r(815),p=r(475),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)+" "+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"}))))))}},1814:function(e,t){},1816:function(e,t){},1823:function(e,t,r){},1829:function(e,t,r){},1832:function(e,t,r){},1833:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(43),i=r(32),c=r(3),l=r(1961),s=r(13),u=r(66),d=r(2),p=r(8),f=r(7),h=r(6),m=r(379),g=r(68),b=r.n(g),v=r(65),y=r.n(v),x=r(10),_=r.n(x),O=r(151),w=(r(1201),r(45)),j=r(1844),E=r(18),k=r(1);function S(){S=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function L(e){var t=a.a.useState(!!c.a.getState().session.consent),r=Object(h.a)(t,2),n=r[0],o=(r[1],a.a.useState(!1)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){setTimeout((function(){x(!1)}),6e3)}),[l]);var O=function(){var e=Object(p.a)(S().mark((function e(){var t;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x(!0),g(!0),t={accepted_at:"".concat(_()().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"},c.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 m?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"policyAndTermsConsent"},a.a.createElement(j.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(d.a)(Object(d.a)(Object(d.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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(k.d)("color"),fontWeight:"bold"}},Object(k.s)("$__TermsOfUseAndPrivacyPolicy")),a.a.createElement("div",{style:{position:"absolute",top:40,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}},l?a.a.createElement("iframe",{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",{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(E.a,{id:"policyButtonConsent",title:Object(k.s)(l?"$__accepted":"$__IReadAndIAgree","*"),text:l?null:Object(k.s)("$__IReadAndIAgree","*"),color:l?"green":Object(k.d)("menu"),icon:"verified",onClick:l?null:function(){s(!0)},size:"25px"}),l?Object(k.s)("$__PrivacyPolicy","*"):a.a.createElement(a.a.Fragment,null)),l&&!y?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(E.a,{id:"termsofuseButtonConsent",title:Object(k.s)("$__IReadAndIAgreeTheTermsOfUse","*"),text:Object(k.s)("$__IReadAndIAgreeTheTermsOfUse","*"),color:Object(k.d)("menu"),icon:"verified",onClick:function(){O()},size:"25px"})):a.a.createElement(a.a.Fragment,null)))))}var C=r(14),I=r(12);function T(){T=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var F=Object(s.b)((function(e){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(!0),n=Object(h.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 l=function(){var e=Object(p.a)(T().mark((function e(){var t;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(!0),t={accepted_at:"".concat(_()().unix("X")),version:"2022-10-24"},c.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(j.a,{style:{zIndex:3e4,backdropFilter:"blur(7px) sepia(90%)",display:"flex",alignItems:"center",justifyContent:"center"},open:!0},a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"center",color:Object(k.d)("color"),fontWeight:"bold"}},Object(k.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",{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(E.a,{id:"agreementButtonConsent",title:Object(k.s)("$__IReadAndIAgree","*"),text:Object(k.s)("$__IReadAndIAgree","*"),color:Object(k.d)("menu"),icon:"verified",onClick:function(){l()},size:"25px"}))))))})),D=r(35),N=r(36),P=r(47),A=r(48),$=r(461),z=r.n($),M=r(1878),Y=r(30),B=function(e){Object(P.a)(r,e);var t=Object(A.a)(r);function r(e){var n;return Object(D.a)(this,r),(n=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},n}return Object(N.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};Y.a.post("/ErrorBoundary/add",{_id:Object(M.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(k.s)("$__ComponentErrorRefreshOrSupportMessage")):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),r}(a.a.Component),R=r(475),G=r(1965),H=r(1937),W=r(1938),U=r(1845),V=r(67),q=r(1143),X=r(5),J={button:{minHeight:"auto",minWidth:"auto",backgroundColor:X.q[0],color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.q[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.q[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.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:X.O,backgroundColor:X.q[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.q[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.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(k.d)("color"),boxShadow:"0 2px 2px 0 "+Object(k.d)("color",.14)+", 0 3px 1px -2px "+Object(k.d)("color",.2)+", 0 1px 5px 0 rgba("+Object(k.d)("color",.12),"&:hover,&:focus":{backgroundColor:Object(k.d)("color"),boxShadow:"0 14px 26px -12px "+Object(k.d)("color",.42)+", 0 4px 23px 0px "+Object(k.d)("color",.12)+", 0 8px 10px -5px rgba("+Object(k.d)("color",.2)}},custom_menuColor:{backgroundColor:Object(k.d)("menu"),boxShadow:"0 2px 2px 0 "+Object(k.d)("menu",.14)+", 0 3px 1px -2px "+Object(k.d)("menu",.2)+", 0 1px 5px 0 rgba("+Object(k.d)("menu",.12),"&:hover,&:focus":{backgroundColor:Object(k.d)("menu"),boxShadow:"0 14px 26px -12px "+Object(k.d)("menu",.42)+", 0 4px 23px 0px "+Object(k.d)("menu",.12)+", 0 8px 10px -5px rgba("+Object(k.d)("menu",.2)}},custom_mediumColor:{backgroundColor:Object(k.d)("medium"),boxShadow:"0 2px 2px 0 "+Object(k.d)("medium",.14)+", 0 3px 1px -2px "+Object(k.d)("medium",.2)+", 0 1px 5px 0 rgba("+Object(k.d)("medium",.12),"&:hover,&:focus":{backgroundColor:Object(k.d)("medium"),boxShadow:"0 14px 26px -12px "+Object(k.d)("medium",.42)+", 0 4px 23px 0px "+Object(k.d)("medium",.12)+", 0 8px 10px -5px rgba("+Object(k.d)("medium",.2)}},primary:{backgroundColor:X.z[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.z[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.z[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.z[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.z[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.z[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.z[0])+", 0.2)"}},info:{backgroundColor:X.u[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.u[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.u[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.u[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.u[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.u[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.2)"}},success:{backgroundColor:X.G[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.G[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.G[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.G[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.G[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.G[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.2)"}},warning:{backgroundColor:X.N[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.N[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.N[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.N[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.N[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.N[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.2)"}},danger:{backgroundColor:X.j[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.j[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.j[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.j[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.j[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.j[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.2)"}},rose:{backgroundColor:X.D[0],boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.D[0])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.D[0])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.D[0])+", 0.12)","&:hover,&:focus":{backgroundColor:X.D[0],boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.D[0])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.D[0])+", 0.2)"}},white:{"&,&:focus,&:hover":{backgroundColor:X.O,color:X.q[0]}},twitter:{backgroundColor:X.K,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.K)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.K)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.K)+", 0.12)","&:hover,&:focus,&:visited":{backgroundColor:X.K,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.K)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.K)+", 0.2)"}},facebook:{backgroundColor:X.o,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.o)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.o)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.o)+", 0.12)","&:hover,&:focus":{backgroundColor:X.o,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.o)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.o)+", 0.2)"}},google:{backgroundColor:X.p,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.p)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.p)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.p)+", 0.12)","&:hover,&:focus":{backgroundColor:X.p,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.p)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.p)+", 0.2)"}},linkedin:{backgroundColor:X.v,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.v)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.v)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.v)+", 0.12)","&:hover,&:focus":{backgroundColor:X.v,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.v)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.v)+", 0.2)"}},pinterest:{backgroundColor:X.w,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.w)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.w)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.w)+", 0.12)","&:hover,&:focus":{backgroundColor:X.w,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.w)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.w)+", 0.2)"}},youtube:{backgroundColor:X.P,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.P)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.P)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.P)+", 0.12)","&:hover,&:focus":{backgroundColor:X.P,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.P)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.P)+", 0.2)"}},tumblr:{backgroundColor:X.J,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.J)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.J)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.J)+", 0.12)","&:hover,&:focus":{backgroundColor:X.J,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.J)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.J)+", 0.2)"}},github:{backgroundColor:X.q[7],color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.q[6])+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.q[6])+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.q[6])+", 0.12)","&:hover,&:focus":{backgroundColor:X.q[7],color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.q[6])+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.q[6])+", 0.2)"}},behance:{backgroundColor:X.a,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.a)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.a)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.a)+", 0.12)","&:hover,&:focus":{backgroundColor:X.a,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.a)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.a)+", 0.2)"}},dribbble:{backgroundColor:X.n,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.n)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.n)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.n)+", 0.12)","&:hover,&:focus":{backgroundColor:X.n,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.n)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.n)+", 0.2)"}},reddit:{backgroundColor:X.A,color:X.O,boxShadow:"0 2px 2px 0 rgba("+Object(X.r)(X.A)+", 0.14), 0 3px 1px -2px rgba("+Object(X.r)(X.A)+", 0.2), 0 1px 5px 0 rgba("+Object(X.r)(X.A)+", 0.12)","&:hover,&:focus":{backgroundColor:X.A,color:X.O,boxShadow:"0 14px 26px -12px rgba("+Object(X.r)(X.A)+", 0.42), 0 4px 23px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.A)+", 0.2)"}},simple:{"&,&:focus,&:hover":{color:X.O,background:"transparent",boxShadow:"none"},"&$primary":{"&,&:focus,&:hover,&:visited":{color:X.z[0]}},"&$info":{"&,&:focus,&:hover,&:visited":{color:X.u[0]}},"&$success":{"&,&:focus,&:hover,&:visited":{color:X.G[0]}},"&$warning":{"&,&:focus,&:hover,&:visited":{color:X.N[0]}},"&$rose":{"&,&:focus,&:hover,&:visited":{color:X.D[0]}},"&$danger":{"&,&:focus,&:hover,&:visited":{color:X.j[0]}},"&$twitter":{"&,&:focus,&:hover,&:visited":{color:X.K}},"&$facebook":{"&,&:focus,&:hover,&:visited":{color:X.o}},"&$google":{"&,&:focus,&:hover,&:visited":{color:X.p}},"&$linkedin":{"&,&:focus,&:hover,&:visited":{color:X.v}},"&$pinterest":{"&,&:focus,&:hover,&:visited":{color:X.w}},"&$youtube":{"&,&:focus,&:hover,&:visited":{color:X.P}},"&$tumblr":{"&,&:focus,&:hover,&:visited":{color:X.J}},"&$github":{"&,&:focus,&:hover,&:visited":{color:X.q[7]}},"&$behance":{"&,&:focus,&:hover,&:visited":{color:X.a}},"&$dribbble":{"&,&:focus,&:hover,&:visited":{color:X.n}},"&$reddit":{"&,&:focus,&:hover,&:visited":{color:X.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:X.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"}}}},K=["color","round","children","fullWidth","disabled","simple","size","block","link","justIcon","className","muiClasses"],Z=Object(R.a)(J),Q=a.a.forwardRef((function(e,t){var r,n=Z(),o=e.color,i=e.round,c=e.children,l=e.fullWidth,s=e.disabled,u=e.simple,d=e.size,p=e.block,h=e.link,m=e.justIcon,g=e.className,b=e.muiClasses,v=Object(V.a)(e,K),x=y()((r={},Object(f.a)(r,n.button,!0),Object(f.a)(r,n[d],d),Object(f.a)(r,n[o],o),Object(f.a)(r,n.round,i),Object(f.a)(r,n.fullWidth,l),Object(f.a)(r,n.disabled,s),Object(f.a)(r,n.simple,u),Object(f.a)(r,n.block,p),Object(f.a)(r,n.link,h),Object(f.a)(r,n.justIcon,m),Object(f.a)(r,g,g),r));return a.a.createElement(q.a,Object.assign({},v,{ref:t,classes:b,className:x}),c)})),ee=function(e){return{appBar:{backgroundColor:"transparent",boxShadow:"none",borderBottom:"0",marginBottom:"0",position:"absolute",width:"100%",paddingTop:"10px",zIndex:"1029",color:X.q[6],border:"0",borderRadius:"3px",padding:"10px 0",transition:"all 150ms ease 0s",minHeight:"50px",display:"block"},container:Object(d.a)(Object(d.a)({},X.e),{},{minHeight:"50px"}),flex:{flex:1},title:Object(d.a)(Object(d.a)({},X.l),{},{lineHeight:"30px",fontSize:"18px",borderRadius:"3px",textTransform:"none",color:X.O,letterSpacing:"unset","&:hover,&:focus":{background:"transparent",color:X.O}}),appResponsive:{top:"8px"},primary:Object(d.a)({backgroundColor:X.z[0],color:X.O},X.k),info:Object(d.a)({backgroundColor:X.u[0],color:X.O},X.k),success:Object(d.a)({backgroundColor:X.G[0],color:X.O},X.k),warning:Object(d.a)({backgroundColor:X.N[0],color:X.O},X.k),danger:Object(d.a)({backgroundColor:X.j[0],color:X.O},X.k),list:Object(d.a)(Object(d.a)({},X.l),{},{fontSize:"12px",margin:0,marginRight:"-15px",paddingLeft:"0",listStyle:"none",color:X.O,paddingTop:"0",paddingBottom:"0"}),listItem:Object(f.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:X.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:X.O,background:"rgba("+Object(X.r)(X.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(X.r)(X.O)+", 0.1)"},drawerPaper:Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({border:"none",bottom:"0",transitionProperty:"top, bottom, width",transitionDuration:".2s, .2s, .35s",transitionTimingFunction:"linear, linear, ease"},X.c),{},{width:X.m},X.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"},X.I),{},{"&:before,&:after":{position:"absolute",zIndex:"3",width:"100%",height:"100%",content:'""',display:"block",top:"0"},"&:after":{background:X.b,opacity:".8"}}),sidebarButton:{"&,&:hover,&:focus":{color:X.O},top:"-2px"}}},te=r(378),re=r.n(te),ne=Object(R.a)(ee);function ae(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=(r[0],r[1],ne()),o=e.color,i=(e.brandText,y()(Object(f.a)({}," "+n[o],o)));U.a,n.list;return a.a.createElement(H.a,{position:"static",className:n.appBar+i},a.a.createElement(W.a,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},a.a.createElement("div",{style:{maxWidth:"222px"}},a.a.createElement("img",{src:Object(k.d)("customLogo"),alt:"logo",style:{width:"100%"}})))))}var oe={block:{},left:{float:"left!important",display:"block"},right:{margin:"0",fontSize:"12px",float:"right!important",padding:"15px"},footer:Object(d.a)(Object(d.a)({bottom:"0",borderTop:"1px solid "+X.q[15],padding:"15px 0"},X.l),{},{zIndex:4}),container:Object(d.a)(Object(d.a)({zIndex:3},X.e),{},{position:"relative"}),containerFluid:Object(d.a)(Object(d.a)({zIndex:3},X.f),{},{position:"relative"}),a:{color:X.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:X.O}}},ie=Object(R.a)(oe);function ce(e){var t,r,n=ie(),o=e.fluid,i=e.white,c=(e.rtlActive,y()((t={},Object(f.a)(t,n.container,!o),Object(f.a)(t,n.containerFluid,o),Object(f.a)(t,n.whiteColor,i),t))),l=n.a+y()(Object(f.a)({}," "+n.whiteColor,i));y()((r={},Object(f.a)(r,n.block,!0),Object(f.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(U.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"},"SONNE GLOBAL")," | ".concat("$__footerDescription"!==Object(k.s)("$__footerDescription",1)?Object(k.s)("$__footerDescription",1):""))))}var le=r(11),se=r(765),ue=r.n(se),de=(r(851),r(278)),pe=r.n(de),fe=r(331),he=(r(1246),r(1142)),me=r(26),ge=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(k.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"}}},be=r(381),ve=r.n(be);var ye,xe,_e=Object(s.b)((function(e){return{store:{lightbox:e.lightBox}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(ge)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.lightBox,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],p=a.a.useState(!1),f=Object(h.a)(p,2),m=f[0],g=f[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(null),O=Object(h.a)(_,2),w=O[0],E=O[1],S=a.a.useState(null),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState(null),F=Object(h.a)(T,2),D=(F[0],F[1]),N=a.a.useState(!0),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState(.5),M=Object(h.a)(z,2),Y=M[0];M[1],a.a.useEffect((function(){s||(u(!0),window.addEventListener("keydown",(function(e){R(e)}),!1))})),a.a.useEffect((function(){if(o.open&&o.files.length>0&&o.file&&o.file!==w){g(!0),E(o.file);var e=c.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 R=function(e){if(39!==e.keyCode&&40!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&27!==e.keyCode||1===c.a.getState().lightBox.files.length&&27!==e.keyCode)return!1;if(c.a.getState().lightBox.open){var t;if(c.a.getState().lightBox.files.map((function(e,r){e._id===c.a.getState().lightBox.file&&(t=r)})),39===e.keyCode||40===e.keyCode)t+1===c.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=c.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){R(e)}),!1)},H=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.a.getState().lightBox.open&&(g(!0),c.a.getState().lightBox.files.map((function(e,r){e._id===c.a.getState().lightBox.file&&(t=r)})),"R"===y||"R"===r?t+1===c.a.getState().lightBox.files.length?t=0:t+=1:"L"!==y&&"L"!==r||(0===t?t=c.a.getState().lightBox.files.length-1:t-=1),c.a.getState().lightBox.files.length>0&&c.a.getState().lightBox.files[t]&&e.reduxFunction("ASYNC","LIGHTBOX",Object(d.a)(Object(d.a)({},c.a.getState().lightBox),{},{file:c.a.getState().lightBox.files[t]._id})),setTimeout((function(){g(!1),x(!1)}),700))};if(!c.a.getState().lightBox.open&&0===c.a.getState().lightBox.files.length)return null;var W=c.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=(W.file,W.name,"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(ue.a,{onSwipeMove:function(e,t){e.x>100?x("L"):e.x<-100?x("R"):e.y<-100&&G()},onSwipeEnd:function(e){!1!==y&&H()}},a.a.createElement(j.a,{className:t.backdrop,open:c.a.getState().lightBox.open,onClick:function(e){G()}},a.a.createElement("div",{id:"lightBox",className:t.header,onClick:function(e){G(),e.stopPropagation()}},a.a.createElement("div",{className:t.btClose},a.a.createElement(le.a,{title:Object(k.s)("$__close","*"),color:Object(k.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()}},m?a.a.createElement("div",{className:t.loader},a.a.createElement(he.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:ve.a,style:{borderRadius:"15px",boxShadow:"0 1px 2px 2px rgba(0,0,0,0.1)",maxWidth:"100%",height:"100%",maxHeight:"100px"}}),Object(k.s)("$__clickHereToDownload",1)))):a.a.createElement("img",{src:"".concat(X),onError:function(e){return e.target.src=X}})):m||"movie"!==q?m||"microsoft"!==q?m||"text"!==q?!m&&"pdf"===q&&C?a.a.createElement("div",{className:t.embed},A&&a.a.createElement("div",{className:t.loader},a.a.createElement(he.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(B,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})))))):m||"audio"!==q?m||"file"!==q?m?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(k.s)("$__clickHereToDownload",1))):a.a.createElement(pe.a,{src:C,autoPlay:!0,controls:!0}):a.a.createElement(a.a.Fragment,null,a.a.createElement(B,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(B,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})),c.a.getState().lightBox.files.length>1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.leftButtom},a.a.createElement(le.a,{title:Object(k.s)("$__previous","*"),color:Object(k.d)("light"),size:"33px",onClick:function(){H("L")}},"keyboard_arrow_left")),a.a.createElement("div",{className:t.rightButtom},a.a.createElement(le.a,{title:Object(k.s)("$__next","*"),color:Object(k.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(le.a,{title:Object(k.s)("$__download","*"),color:Object(k.d)("light"),size:"33px"},"get_app"))))))}))),Oe=w.default.div(ye||(ye=Object(u.a)(["\n  position: relative;\n  width: 100%;\n  height: 100%;\n  padding-top: 20px;\n  padding-bottom: 20px;\n"]))),we=w.default.div(xe||(xe=Object(u.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 je(e){return a.a.createElement("div",{id:"preloaderComponent"},e.fullScreen?a.a.createElement(we,null,a.a.createElement(he.a,{size:50|e.size})):a.a.createElement(Oe,null,a.a.createElement(he.a,null)))}var Ee=function(e){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(je,null)))};var ke=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(ge)((function(e){var t=e.classes,r=c.a.getState(),n=(r.db,r.lightBox,a.a.useState(!1)),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=(u[1],a.a.useState(!1)),f=Object(h.a)(p,2),m=(f[0],f[1],a.a.useState(null)),g=Object(h.a)(m,2),b=(g[0],g[1],a.a.useState(null)),v=Object(h.a)(b,2),y=(v[0],v[1],a.a.useState(!0)),x=Object(h.a)(y,2),_=(x[0],x[1],a.a.useState(.5)),O=Object(h.a)(_,2);return O[0],O[1],a.a.useEffect((function(){i||l(!0)})),c.a.getState().lightBox.miro||c.a.getState().lightBox.miroBoard?c.a.getState().lightBox.miro||c.a.getState().lightBox.miroBoard?a.a.createElement(j.a,{className:t.backdrop,open:c.a.getState().lightBox.miro},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.btClose},a.a.createElement(le.a,{title:Object(k.s)("$__close","*"),color:Object(k.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(he.a,null)):a.a.createElement("iframe",{style:{position:"absolute",width:"100%",height:"100%"},src:"https://miro.com/app/live-embed/".concat(c.a.getState().lightBox.miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")}))):null:a.a.createElement(a.a.Fragment,null)}))),Se=r(31),Le=r(1939),Ce=a.a.forwardRef((function(e,t){var r={root:Object(d.a)(Object(d.a)({},X.l),{},{color:Object(k.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(k.d)("mediumText"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(k.d)("mediumText"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(k.d)("fieldVariant")?0:"filled"===Object(k.d)("fieldVariant")?"-15px":0,borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}})},n=Object(R.a)(r)();return a.a.createElement(Le.a,Object.assign({},e,{ref:t,className:n.root}))})),Ie=r(575),Te=r(414),Fe=r(576),De=r.n(Fe),Ne=r(813),Pe=r(816),Ae=Object(R.a)((function(e){return{iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}}}}));function $e(e){var t=Ae();return a.a.createElement(Ne.a,{title:e.title?e.title:""},a.a.createElement(Pe.a,{onClick:e.onClick?function(t){e.onClick()}:null,className:t.iconButtonStyle,style:e.style||{}},a.a.createElement(le.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.color?e.color:Object(k.d)("menu"),icon:e.icon?e.icon:"circle"})))}var ze=r(79),Me={button:Object(d.a)(Object(d.a)({},X.l),{},{alignItems:"center",justifyContent:"center",cursor:"pointer",userSelect:"none","&$reverse":{}}),buttonText:Object(d.a)(Object(d.a)({},X.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"}},Ye=Object(R.a)(Me),Be=a.a.forwardRef((function(e,t){var r,n,o=Ye(),i=(e.reverse,e.text),c=y()((r={},Object(f.a)(r,o.button,!0),Object(f.a)(r,o.reverse,!!e.reverse),r)),l=y()((n={},Object(f.a)(n,o.buttonText,!0),Object(f.a)(n,o.reverse,!!e.reverse),n));return a.a.createElement("div",{className:e.text?l:c,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style)},a.a.createElement("div",{className:o.iconButton,style:{color:e.iconColor?Object(k.d)(e.iconColor):Object(k.d)("color"),backgroundColor:e.iconBackground?Object(k.d)(e.iconBackground):"none"}},e.icon?a.a.createElement(ze.a,{className:e.iconBackground?o.icon:o.onlyIcon,size:e.size?e.size:null,icon:e.icon,color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style?e.style:{})}):a.a.createElement(ze.a,{className:e.iconBackground?o.icon:o.onlyIcon,icon:"stop_circle",color:e.iconColor,title:e.title||null,onClick:function(){return e.onClick?e.onClick():null},style:Object(d.a)({},e.style?e.style:{})})),i&&a.a.createElement("div",{className:o.text,style:{color:e.textColor?Object(k.d)(e.textColor):Object(k.d)("medium")}},i))})),Re=r(1162),Ge=r(104),He=r.n(Ge);function We(){We=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ue=Object(R.a)({users:{position:"relative",bottom:"0px",right:"2px",fontSize:"10px","& .MuiAvatarGroup-root":{justifyContent:"flex-end"},"& .MuiAvatar-root":{width:"25px",height:"25px",fontSize:"10px"}}}),Ve=function(e){var t=c.a.getState(),r=t.session,n=t.functions.socket,o=a.a.useState(e.data),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Ue();a.a.useEffect((function(){s(e.data)}),[e.data]);var m=function(){var t=Object(p.a)(We().mark((function t(a,o){var i,c;return We().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=l)&&i._reactions&&Object.keys(i._reactions).length>0&&Object.keys(i._reactions).filter((function(e){return e!==a})).map((function(e){i._reactions[e][r._id]&&delete i._reactions[e][r._id]})),o&&l&&l._reactions&&l._reactions[a]&&l._reactions[a][r._id]?(delete(c=l)._reactions[a][r._id],s(c)):s(Object(d.a)(Object(d.a)({},l),{},{_reactions:Object(d.a)(Object(d.a)({},l._reactions),{},Object(f.a)({},a,Object(f.a)({},r._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},r.displayName?{displayName:r.displayName}:{}),r.name?{name:r.name}:{}),r.image?{image:r.image}:{}),{},{reactDate:{low:_()().tz("America/Sao_Paulo").unix("X")}}))))}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();l._reactions&&Object.keys(l._reactions).length>0&&Object.keys(l._reactions).map((function(e){Object.keys(l._reactions[e]).length>0&&Object.keys(l._reactions[e]).map((function(t){t===r._id&&e}))}));var g=function(t){var n=t.react,o=t.color,i=t.primaryIcon,c=t.secondaryIcon;return e.hideDisables&&l&&n&&l._reactions&&(!l._reactions[n]||l._reactions[n]&&0===Object.keys(l._reactions[n]).length)?a.a.createElement(a.a.Fragment,null):a.a.createElement(Be,{icon:l._reactions&&l._reactions[n]&&l._reactions[n][r._id]?i:c||i,iconColor:l._reactions&&l._reactions[n]&&l._reactions[n][r._id]?o||Object(k.d)("menu"):"lightgray",size:"18px",onClick:function(){m(n,!!(l._reactions&&l._reactions[n]&&l._reactions[n][r._id]))},title:l._reactions&&l._reactions[n]&&Object.keys(l._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(k.s)("$__".concat(n),1)),a.a.createElement("div",{className:u.users},Object.keys(l._reactions[n]).sort((function(e,t){return l._reactions[n][e].reactDate&&String(l._reactions[n][e].reactDate.low)&&l._reactions[n][t].reactDate&&String(l._reactions[n][t].reactDate.low)&&parseInt(l._reactions[n][e].reactDate.low)<parseInt(l._reactions[n][t].reactDate.low)?-1:l._reactions[n][e].reactDate&&String(l._reactions[n][e].reactDate.low)&&l._reactions[n][t].reactDate&&String(l._reactions[n][t].reactDate.low)&&parseInt(l._reactions[n][e].reactDate.low)>parseInt(l._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(Re.a,{alt:l._reactions[n][e].name,src:l._reactions[n][e].image||He.a}),a.a.createElement("span",{style:{paddingLeft:"7px"}},l._reactions[n][e].displayName?l._reactions[n][e].displayName:l._reactions[n][e].name,l._reactions[n][e].reactDate&&l._reactions[n][e].reactDate.low&&" (".concat(_()(1e3*l._reactions[n][e].reactDate.low).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"),")")))})))):Object(k.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)))},qe=r(149),Xe=r(279),Je=r(815),Ke=r(1851),Ze=r(1141),Qe=r(1941),et=r(1940),tt=r(817),rt=r(1140),nt=Object(R.a)((function(e){return{iconButtonStyleTransaparent:Object(d.a)({padding:"3px",margin:0,"&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{}),iconButtonStyleWhite:Object(d.a)({padding:"3px",margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"}},e.buttonStyle?e.buttonStyle:{})}}));var at=Object(n.memo)((function(e){var t=nt(),r=a.a.useState(!1),o=Object(h.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 p(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(d.a)({zIndex:"100 !important"},e.style?e.style:{}),className:i?"ignoreCardClickAway":""},a.a.createElement(Ne.a,{title:e.title?e.title:Object(k.s)("$__options",1)},e.text?a.a.createElement(q.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(k.d)("menu"),overflow:"hidden",textOverflow:"ellipsis",width:"90%",maxWidth:e.maxWidth?e.maxWidth:"90%",whiteSpace:"nowrap"}},e.text),a.a.createElement(le.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(k.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))):a.a.createElement(Pe.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(le.a,{count:e.count?e.count:null,usePropagation:!0,size:e.size?e.size:"20px",color:e.btColor?e.btColor:Object(k.d)("menu"),icon:e.icon?e.icon:e.horizontalButton?"more_horiz":"more_vert"}))),a.a.createElement(rt.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(Ze.a,Object.assign({},r,{style:{transformOrigin:"right center",zIndex:"100 !important"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:u},a.a.createElement(et.a,{autoFocusItem:i,id:"menu-list-grow",onKeyDown:p,style:{zIndex:"100 !important"}},e.options.filter((function(e){return e&&!e.hide})).map((function(t,r){return a.a.createElement(Qe.a,{key:r,style:{color:t&&t.color?t.color:Object(k.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(Re.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(Je.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},a.a.createElement(le.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(k.d)("menu")})),!t.render&&a.a.createElement("span",{style:{marginLeft:"7px"}},Object(k.s)(t.name,1))))}))))))}))):a.a.createElement(a.a.Fragment,null)})),ot=r(590),it=r(1139),ct=r(1088),lt=r.n(ct),st=r(53);function ut(){ut=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var dt=["$__last7Days","$__last15Days","$__last30Days","$__last60Days","$__last90Days","$__last180Days","$__last365Days"];var pt=Object(s.b)((function(e){return{store:{session:e.session}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(null),n=Object(h.a)(r,2),o=n[0],i=n[1],l=Boolean(o);a.a.useEffect((function(){return function(){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:"$__last7Days",dashboard:Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:"$__last7Days"})}))}}),[]);var s=function(){var t=Object(p.a)(ut().mark((function t(r){var n;return ut().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(d.a)(Object(d.a)({},c.a.getState().session),{},{period:r,dashboard:Object(d.a)(Object(d.a)({},c.a.getState().session),{},{period:r})})),n=(n=String(r).replace("$__last","")).replace("Days",""),t.next=7,Object(st.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(Pe.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){i(e.currentTarget)},style:Object(d.a)({},e.style?e.style:{})},a.a.createElement(lt.a,null)),a.a.createElement(it.a,{id:"long-menu",anchorEl:o,keepMounted:!0,open:l,onClose:s,PaperProps:{style:{maxHeight:216,width:"20ch"}}},dt.map((function(e){return a.a.createElement(Qe.a,{key:e,selected:e===t.dashboard.period,onClick:function(t){return s(e)}},Object(k.s)(e,1))}))))}));function ft(){ft=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ht=Object(R.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(k.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(k.d)("colorText"),fontWeight:"500",alignItems:"center"}},iconButtonStyle:{margin:0,backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"rgba(250,250,250,0.9)"},padding:"3px"}}}));var mt=function(e){var t,r=c.a.getState(),n=r.session,o=r.functions,i=r.db,l=o.socket,s=ht(),u=a.a.useState((null===(t=e.title)||void 0===t?void 0:t.trim())||null),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.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 S=function(){var t=Object(p.a)(ft().mark((function t(r){return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{e._id&&l.emit("data",{module:"node",method:"put",action:"update",noLog:!0},Object(d.a)({_id:e._id},r)),e.onEdit&&e.onEdit(m,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(d.a)(Object(d.a)({minHeight:e.style&&e.style.minHeight?e.style.minHeight:"30px"},e.style),e.backClick?{cursor:"pointer"}:{})},a.a.createElement("div",{className:!e.onExpanding||y?s.content:s.contentWithExpand},a.a.createElement("div",{className:s.info},!e.private||c.a.getState().controls.lockPrivate||w?a.a.createElement(a.a.Fragment,null,e.icon&&a.a.createElement("div",{className:s.headerIcon,style:Object(d.a)({color:e.color?e.color:Object(k.d)("colorText")},e.backClick?{cursor:"pointer"}:{})},a.a.createElement(ze.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(d.a)({marginLeft:"7px"},e.searchTextStyle?e.searchTextStyle:{})},Object(k.b)(e.title?e.title:"",e.searchText,!!e.dark)):a.a.createElement("div",{className:s.headerTitle,style:Object(d.a)(Object(d.a)({fontSize:e.fontSize?e.fontSize:"14px",color:e.color?e.color:Object(k.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},y?a.a.createElement("div",{style:Object(d.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(Ce,{style:{width:"calc(100% - 60px)"},label:e.fieldName?e.fieldName:Object(k.s)("$__nameOfCard",1),variant:Object(k.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&&m&&S({name:m}),27===t.keyCode)&&(x(!1),g(e.value?e.value:e.title?null===(r=e.title)||void 0===r?void 0:r.trim():""))}},value:m,placeholder:Object(k.s)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),a.a.createElement(ze.a,{color:Object(k.d)("medium"),onClick:function(){return y?x(!1):e.onCancel()},icon:"cancel",title:Object(k.s)("$__close","*"),size:e.actionsSize||"25px"}),a.a.createElement(ze.a,{overlap:"rectangular",color:"green",icon:"save",onClick:function(){y?S({name:m}):e.onSave()},title:Object(k.s)("$__save"," * "),size:e.actionsSize||"25px"})):a.a.createElement(Ne.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},a.a.createElement("div",{style:Object(d.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(k.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(ze.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(k.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(k.s)(n.period),a.a.createElement(pt,{style:{color:"#FFFFFF",height:"20px",width:"20px"}}))),!y&&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(ot.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||c.a.getState().controls.lockPrivate||w?a.a.createElement(a.a.Fragment,null,e.colorPicker&&a.a.createElement("div",{style:{zIndex:1e3}},a.a.createElement(Xe.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(Ne.a,{title:Object(k.s)(e.options.filter((function(e){if(e&&e.name&&("$__removeSelection"===e.name||"$__selectThis"===e.name))return!0}))[0].name)},a.a.createElement(Pe.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(le.a,{size:"22px",color:Object(k.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(Ne.a,{key:"opt".concat(t),title:Object(k.s)(e.name)},a.a.createElement(Pe.a,{onClick:function(){return e.onClick()},className:s.iconButtonStyle},a.a.createElement(le.a,{size:"22px",color:e.color||Object(k.d)("menu"),icon:e.icon,usePropagation:!0})))})):a.a.createElement(a.a.Fragment,null),!e.noExpanding&&e.onExpanding&&a.a.createElement(Ne.a,{title:Object(k.s)(e.isExpanded?"$__collapse":"$__expand")},a.a.createElement(Pe.a,{onClick:function(t){e.onExpanding()},className:s.iconButtonStyle},a.a.createElement(le.a,{size:"22px",color:Object(k.d)("menu"),icon:e.isExpanded?"expand_less":"expand_more",usePropagation:!0}))),e.options&&e.options.length>0&&a.a.createElement(at,Object.assign({noButton:!0,options:[].concat(Object(Se.a)(e.options),Object(Se.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(E.a,{title:Object(k.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"}})))))};var gt=function(e){var t=e.data;return t&&t._users&&Object.keys(t._users).length>0?a.a.createElement("div",null,(null===t||void 0===t?void 0:t._users)&&Object.keys(t._users).length>0&&0===Object.keys(t._users).filter((function(r){return"null"!==String(r)&&(!e.customDefine||e.customDefine&&t._users[r][e.customDefine.name])})).length?Object(k.s)("$__selectUsers"):a.a.createElement("div",{style:{display:"flex"}},Object.keys(t._users).filter((function(r){return"null"!==String(r)&&(!e.customDefine||e.customDefine&&t._users[r][e.customDefine.name])})).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){var o=!1,i=!!(Object.keys(t._users).length>1&&t._users[r].isResponsible),c=!(!e.customDefine||!e.customDefine.name)&&!!(Object.keys(t._users).length>1&&t._users[r][e.customDefine.name]);if(t._users[r].myDay&&t._users[r].myDay&&_()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0),t._users[r]&&t._users[r].name){var l=e.noLimit?7:e.limit?e.limit:7;if(n<l)return a.a.createElement("div",{key:r,style:{marginLeft:-7,position:"relative"}},a.a.createElement(Ne.a,{title:"".concat(t._users[r].name).concat(o?" (".concat(Object(k.s)("$__inMyDay"),")"):""),key:r},a.a.createElement("div",{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:Object(d.a)(Object(d.a)({width:o||i?"30px":e.avatarSize?e.avatarSize:"24px",height:o||i?"30px":e.avatarSize?e.avatarSize:"24px",borderRadius:"50%"},e.customDefine?{border:c?e.customDefine.avatarBorder||"3px green solid":"none"}:{border:i?"3px deepskyblue solid":o?"2px #ff8800 solid":"none"}),{},{backgroundImage:t._users[r].image?'url("'.concat(t._users[r].image,'")'):"null",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundColor:"lightgray",textAlign:"center"})},t._users[r].image?"":t._users[r].name.substr(0,1))),o&&a.a.createElement("div",{style:{position:"absolute",backgroundColor:"#ff8800",width:"14px",height:"14px",borderRadius:"14px",display:"flex",alignItems:"center",justifyContent:"center",right:"7px",bottom:0}},a.a.createElement(le.a,{icon:"hourglass_top",size:"10px",color:"#FFFFFF"})));if(n===l){var s=Object.keys(t._users).length-l;return a.a.createElement(Ne.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(t._users).sort((function(e,r){return t._users[e].isResponsible?-1:t._users[r].isResponsible?1:t._users[e].name<t._users[r].name?-1:t._users[e].name>t._users[r].name?1:0})).map((function(r,n){if(t._users[r].myDay&&t._users[r].myDay&&_()(1e3*parseInt(t._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&!0,n>=l&&t._users[r]&&t._users[r].name)return a.a.createElement("li",{key:r,style:{display:"flex",alignItems:"center"}},a.a.createElement(Re.a,{overlap:"circular",alt:t._users[r].name,src:t._users[r].image||null,style:Object(d.a)(Object(d.a)({width:e.avatarSize?e.avatarSize:"22px",height:e.avatarSize?e.avatarSize:"22px",border:t._users[r].isResponsible?"3px deepskyblue solid":t._users[r].myDay?"2px #ff8800 solid":"none"},e.customDefine?{border:t._users[r][e.customDefine.name]?"3px green solid":"none"}:{border:t._users[r].isResponsible?"3px deepskyblue solid":t._users[r].myDay?"2px #ff8800 solid":"none"}),{},{marginRight:7})},t._users[r].name.substr(0,1)),t._users[r].name)}))),key:n},a.a.createElement(Re.a,{style:{width:e.avatarSize?e.avatarSize:27,height:e.avatarSize?e.avatarSize:27,border:"none"},alt:"+".concat(s)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(s))))}}})))):a.a.createElement(a.a.Fragment,null)},bt=r(313),vt=r.n(bt),yt=r(22),xt=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(697);function _t(){_t=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(698);var Ot=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(xt)((function(e){var t=e.classes,r=(c.a.getState().functions.socket,a.a.useState(!1)),n=Object(h.a)(r,2),o=(n[0],n[1]),i=a.a.useState(""),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=e.timer||{},y=e.data||{},x=function(){var e=Object(p.a)(_t().mark((function e(t,r){var n;return _t().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(!y)return null;var _=function(){var t=Object(p.a)(_t().mark((function t(){var r,n;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.timer||s?(r=isNaN(g)?g.replace(",","."):g,n=Object(d.a)(Object(d.a)({_id:Object(M.a)(),cardId:y._id,idRel:y._id,value:e.PositiveValue?r:"-".concat(r),type:"kpi"},e.manualEntry?{manualEntry:!0}:{}),{},{kpi_type:y.kpi_type?y.kpi_type:null,message:s||""}),e.timer&&(n=Object(d.a)(Object(d.a)({},n),{},{value:v.diff,ini:v.created_at,fin:v.updated_at,type:"timer",kpi_type:"timer",to:v.to})),Y.a.post("timeline/add",Object(d.a)({},n)),e.callBack&&e.callBack(),e.timer&&!e.manualAdd&&Object(yt.w)(e,y._id,v._id),b(0),u("")):Object(k.c)({message:Object(k.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(k.d)("color")}},Object(k.s)("$__new",1)),!e.timer&&a.a.createElement(Ce,{placeholder:Object(k.s)("$__value",1),value:Object(k.h)(g||0,"time"===y.kpi_type?"number":y.kpi_type,y.kpi_currency?y.kpi_currency:null),InputLabelProps:{shrink:!0},InputProps:{onKeyDown:function(e){x(e,"ini")}}}),a.a.createElement(Ce,{multiline:!0,placeholder:Object(k.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(E.a,{title:Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(){return _()},size:"25px",transparent:!0}),(!e.timer||e.manualAdd)&&a.a.createElement(E.a,{title:Object(k.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")}))),wt=r(1853),jt=r(1942),Et=r(1943),kt=r(39),St=r(160);function Lt(){Lt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ct=function(){var e=Object(p.a)(Lt().mark((function e(t,r){var n,a;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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(p.a)(Lt().mark((function e(t,r){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},t.data._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.users&&c.a.getState().db.users[t.data._id]?c.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!==c.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(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.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)}}(),It=function(){var e=Object(p.a)(Lt().mark((function e(t,r){var n,a;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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(p.a)(Lt().mark((function e(t,r){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},t.data._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.users&&c.a.getState().db.users[t.data._id]?c.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!==c.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(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.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)}}(),Tt=function(){var e=Object(p.a)(Lt().mark((function e(t){var r,n,a,o,i,l,s,u;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),n=c.a.getState(),a=n.sideModule,o=a.data,i=c.a.getState().db[a.db][a.id]||{},!1,!1,console.log(o),(l=window.location.hash.split("/"))[0]=l[0].replace("#",""),JSON.stringify(i)!==JSON.stringify(o)&&!0,"user"===o.type&&l&&l.length>2&&l[2]&&36===l[2].length&&(o.type="user",o._parent=l[2]),Object.keys(o).map((function(e){"file"===e&&(!0,!0),(i&&i[e]&&o[e]!==i[e]||!i&&o)&&!0,(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=25;break}return e.prev=15,r.emit("data",{module:"user",method:"post",action:"add"},Object(d.a)(Object(d.a)({},o),{},{oldData:i}),function(){var e=Object(p.a)(Lt().mark((function e(n){var a;return Lt().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(St.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,r.emit("data",{module:"user",method:"put",action:"update"},Object(d.a)(Object(d.a)({},o),{},{image:a,oldData:i})),t.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:n.id,data:Object(d.a)(Object(d.a)({},c.a.getState().sideModule.data),{},{_id:n.id})}));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",!0);case 20:e.prev=20,e.t0=e.catch(15),console.log(e.t0);case 23:e.next=35;break;case 25:if(!s){e.next=31;break}return e.next=28,Object(St.a)(o._id,s);case 28:e.t1=e.sent,e.next=32;break;case 31:e.t1=o.image;case 32:return u=e.t1,(s&&u||!s)&&r.emit("data",{module:"user",method:"put",action:"update"},Object(d.a)(Object(d.a)({},o),{},{image:u,oldData:i}),function(){var e=Object(p.a)(Lt().mark((function e(t){return Lt().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 35:case"end":return e.stop()}}),e,null,[[15,20]])})));return function(t){return e.apply(this,arguments)}}(),Ft=function(){var e=Object(p.a)(Lt().mark((function e(t){var r,n,a,o;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),n=c.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(p.a)(Lt().mark((function e(t){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("user.ACCESS",Object(f.a)({_id:o._id},o._id,Object(d.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)}}(),Dt=function(e,t){var r=Object(d.a)({},t[t._id]?t[t._id]:{});c.a.getState().db.users[t._id]&&(r=Object(d.a)(Object(d.a)({},c.a.getState().db.users[t._id]),r)),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().db.users),{},Object(f.a)({},t._id,Object(d.a)({},r)))}))};function Nt(e){return Pt.apply(this,arguments)}function Pt(){return(Pt=Object(p.a)(Lt().mark((function e(t){var r;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.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,kt.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:return e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[5,11]])})))).apply(this,arguments)}function At(e){return $t.apply(this,arguments)}function $t(){return($t=Object(p.a)(Lt().mark((function e(t){var r;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.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,kt.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 zt(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(p.a)(Lt().mark((function e(t){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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 Yt(e,t){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(p.a)(Lt().mark((function e(t,r){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Y.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 Rt(e,t){return Gt.apply(this,arguments)}function Gt(){return(Gt=Object(p.a)(Lt().mark((function e(t,r){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Y.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 Ht=function(e,t,r,n,a){var o,i=c.a.getState().db.users[t]?c.a.getState().db.users[t]:a;o=(e&&e.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket);var l=c.a.getState().db;return Object(yt.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:l.cards[n].type,cardId:n,parentUser:l.cards[n]._parent,userId:t,access:r,userData:{_id:t,name:i.name,image:i.image?i.image:null}},function(){var e=Object(p.a)(Lt().mark((function e(t){return Lt().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},Wt=function(){var e=Object(p.a)(Lt().mark((function e(t,r,n){return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.a.post("/card/groupAccess",{groupId:r,cardId:n}),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n]),{},{_groups:Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n]._groups||{}),{},Object(f.a)({},r,{_id:r}))})))}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Ut=function(){var e=Object(p.a)(Lt().mark((function e(t,r,n){var a;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.a.post("/card/groupAccessRemove",{groupId:r,cardId:n}),delete(a=c.a.getState().db.cards[n]._groups)[r],t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.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)}}(),Vt=function(){var e=Object(p.a)(Lt().mark((function e(t,r){var n,a;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),a=c.a.getState(),a.db,n.emit("data",{module:"cards",method:"post",action:"userResponsible"},Object(d.a)({},r),function(){var e=Object(p.a)(Lt().mark((function e(t){return Lt().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 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),qt=function(){var e=Object(p.a)(Lt().mark((function e(t,r){var n,a;return Lt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),a=c.a.getState(),a.db,n.emit("data",{module:"cards",method:"post",action:"userParam"},Object(d.a)({},r),function(){var e=Object(p.a)(Lt().mark((function e(t){return Lt().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 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();var Xt=function(e){var t=c.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)},Jt=function(e){try{return Y.a.delete("/user/unique/".concat(e)),!0}catch(t){return console.log(t),!1}};function Kt(){Kt=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Zt=Object(R.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 Qt=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t,r,n,o,i,l,s=Zt(),u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useRef(null),y=e.data,x=c.a.getState(),_=x.db,O=x.session,w=x.sideModule,j=a.a.useState(e.selected?e.selected:[]),E=Object(h.a)(j,2),S=E[0],L=E[1],C=a.a.useState(""),I=Object(h.a)(C,2),T=I[0],F=I[1],D=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)),N=Object(h.a)(D,2),P=N[0],A=N[1],$=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)),z=Object(h.a)($,2),M=z[0],Y=z[1];a.a.useEffect((function(){e.selected&&JSON.stringify(e.selected)!==JSON.stringify(S)&&L(e.selected)}),[e.selected]),a.a.useEffect((function(){console.log("MOUNTED")}),[]);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=c.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(d.a)(Object(d.a)({},a),{},Object(f.a)({},e,n.users[e]))})),(!e||e&&!e.isArray)&&a){var o={};return Object.keys(a).map((function(e){(!t||t&&t.indexOf(a[e].type)>-1)&&(o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e,a[e])))})),o}if(e&&e.isArray&&a){var i=[];return Object.keys(a).map((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(yt.v)(y&&y._id?y._id:null,{onlyCard:!(!y||!y._id),all:!0,allPlataform:e.allPlataform||!1}),R=w&&w.id?Object(yt.u)(w.id):0,G=function(){var t=Object(p.a)(Kt().mark((function t(r){var n;return Kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=Array.from(S),e.multiple?0===n.filter((function(e){return e===r})).length?n.push(r):n.splice(n.indexOf(r),1):n=[r],L(n),e.onSelect&&e.onSelect(n),e.multiple||(console.log("XXX"),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(Qe.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(Re.a,{alt:o.name||null,src:o.image||null,style:Object(d.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&&_.users[o._parent]&&_.users[o._parent].image?a.a.createElement("div",{style:{position:"relative",bottom:-4,right:-7,width:17,height:17,borderRadius:"50%",backgroundImage:"url(".concat(_.users[o._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null),o._parent&&_.users[o._parent]&&_.users[o._parent].name?a.a.createElement("div",{style:{position:"relative",float:"left",fontSize:11,color:"lightgray",marginLeft:7}},_.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===S.indexOf(o._id)?a.a.createElement("div",null,a.a.createElement(le.a,{icon:"admin_panel_settings",color:"lightgray"})):a.a.createElement(a.a.Fragment,null),a.a.createElement(le.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(q.a,{ref:v,"aria-controls":g?"menu-list-grow":void 0,"aria-haspopup":"true","aria-label":"menu",onClick:function(t){(!y||e.permission||y&&B&&B[O._id]&&B[O._id].access&&parseInt(B[O._id].access)>2||R>3)&&(console.log("sd65f4ds6f54d89f732"),b(!0))},className:e.transparent?s.iconButtonStyleTransaparent:s.iconButtonStyleWhite},S&&0===S.length?Object(k.s)(e.text||"$__selectUser"):a.a.createElement("div",null,a.a.createElement(wt.a,{max:e.noLimit?300:4,style:{flexWrap:"wrap",display:"inline-flex"}},null===S||void 0===S||null===(i=S.filter((function(e){return e&&c.a.getState().db.users[e]})))||void 0===i?void 0:i.map((function(t){var r,n,o,i;return a.a.createElement(Ne.a,{key:t,title:c.a.getState().db.users[t]&&c.a.getState().db.users[t].displayName?c.a.getState().db.users[t].displayName:(null===(r=c.a.getState().db.users[t])||void 0===r?void 0:r.name)||""},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Re.a,{alt:c.a.getState().db.users[t].name||"",src:c.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=c.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}},c.a.getState().db.users[t].displayName?c.a.getState().db.users[t].displayName:(null===(i=c.a.getState().db.users[t])||void 0===i?void 0:i.name)||"")))})),e.multiple&&a.a.createElement(Ne.a,{title:Object(k.s)(e.text||"$__selectUser")},a.a.createElement(Re.a,{style:{width:e&&e.avatarSize?e&&e.avatarSize:"none",height:e&&e.avatarSize?e.avatarSize:"none"},alt:"ADD",src:null},"+"))))),a.a.createElement(jt.a,{open:g},a.a.createElement("div",{style:(l={position:"relative",width:"100%"},Object(f.a)(l,"width","100%"),Object(f.a)(l,"display","flex"),Object(f.a)(l,"justifyContent","space-between"),l)},a.a.createElement(Ke.a,{onClickAway:function(e){v.current&&v.current.contains(e.target)||(console.log("SDSD"),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(Ce,{id:"quickUser_Search",label:Object(k.s)("$__searchByName",1),variant:Object(k.d)("fieldVariant"),name:"searchValue",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end",style:{cursor:"pointer"},onClick:function(){F(""),console.log("XSXCXVC"),b(!1)}},a.a.createElement(le.a,{icon:"close"})),onChange:function(e){F(e.target.value)}},value:T,placeholder:Object(k.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(P?"#585858":"lightGray"),padding:"3px 7px",cursor:"pointer",borderRadius:10,backgroundColor:"".concat(P?"#585858":"lightGray"),color:Object(k.r)(P?"#585858":"#d3d3d3",!0)},onClick:function(){A((function(e){return!e}))}},Object(k.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(k.r)(M?"#585858":"#d3d3d3",!0)},onClick:function(){Y((function(e){return!e}))}},Object(k.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(et.a,{id:"menu-list-grow",autoFocusItem:!1,autoFocus:!1,onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),console.log(121),b(!1))}},Object.keys(B).filter((function(e){if(!B[e].deleted&&(""===T||T&&B[e].name&&B[e].name.toLowerCase().indexOf(T.toLowerCase())>-1)&&(!M&&"external"!==B[e].type||M&&"external"===B[e].type||!P&&"user"!==B[e].type||P&&"user"===B[e].type))return!0})).sort((function(e,t){return B[e].name<B[t].name?-1:B[e].name>B[t].name?1:0})).map((function(e){return B&&B[e]&&B[e]._id&&a.a.createElement(H,{pr:e,key:e,selected:-1!==S.indexOf(B[e]._id)})})))))))))})),er=r(591);function tr(){tr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(698);var rr,nr,ar=Object(s.b)((function(e,t){return{card:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(xt)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.db,i=n.session,l=o.cards,s=a.a.useState(!1),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState({}),O=Object(h.a)(x,2),w=O[0],j=O[1],S=e.data,L=a.a.useState([]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT06:00")),D=Object(h.a)(F,2),N=D[0],P=D[1],A=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT07:00")),$=Object(h.a)(A,2),z=$[0],M=$[1],Y=a.a.useState(!1),R=Object(h.a)(Y,2),G=R[0],H=R[1],W=a.a.useState(0),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(1),J=Object(h.a)(X,2),K=J[0],Z=J[1],Q=a.a.useState(0),ee=Object(h.a)(Q,2),te=(ee[0],ee[1],"time"===S.kpi_type&&S.kpi_ini?parseFloat(S.kpi_ini):0),re="time"===S.kpi_type&&S.kpi_fin?parseFloat(S.kpi_fin):0;a.a.useEffect((function(){t&&clearTimeout(t),oe(),ae(e.data._id)}),[v]),a.a.useEffect((function(){t&&clearTimeout(t),oe(),ae(e.data._id)}),[JSON.stringify(e.card[e.data._id])]);var ne=[e.data._id],ae=function e(t,r){var n=Object.keys(l).filter((function(e){return l[e].kpi_useParent&&l[e]._parent===t}));return n.length>0?n.map((function(t){e(t,!0),ne.push(t),T(Array.from(new Set(ne)))})):r||T(ne),n},oe=function(){var t=Object(d.a)({},c.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(d.a)({},t._kpiTimer[Object.keys(t._kpiTimer).filter((function(e){return t._kpiTimer[e].userId===i._id}))[0]]);r.diff=_()().tz("America/Sao_Paulo").unix("x")-r.created_at,r&&r.updated_at&&(r.diff=parseInt(r.updated_at)-parseInt(r.created_at)),ie(r,!!r.updated_at)}else m(!1),j({}),y(!1);0===Object.keys(w).length&&e.manualAdd&&(j({created_at:_()(N).tz("America/Sao_Paulo").unix("X"),updated_at:_()(z).tz("America/Sao_Paulo").unix("X")}),ie({created_at:_()(N).tz("America/Sao_Paulo").unix("X"),updated_at:_()(z).tz("America/Sao_Paulo").unix("X")},!!w.updated_at))},ie=function(e,r){var n,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object(d.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(k.s)("$__seconds",1)),a||Z(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(k.s)("$__minutes",1)," ").concat(s," ").concat(Object(k.s)("$__seconds",1)),a||(Z(c),q(l))}else{var u=Math.trunc(n/60)>0?Math.trunc(n/60):0,p=(n-=60*u)>0?n:0;o.diffText="".concat(u," ").concat(Object(k.s)("$__minutes",1)," ").concat(p," ").concat(Object(k.s)("$__seconds",1)),a||(Z(0),q(u))}else o.diffText=Object(k.s)("$__theEndMustBeGreaterThanTheBeginning");j(Object(d.a)(Object(d.a)({},w),o)),e.updated_at?(o.diff=parseInt(e.updated_at)-parseInt(e.created_at),f||m(!0)):(o.diff=_()().tz("America/Sao_Paulo").unix("x")-parseInt(e.created_at),v||(y(!0),i=!0)),r||e.updated_at||!i||(t=setTimeout((function(){oe()}),1e3))};if(!S)return null;var ce=function(){var t=Object(p.a)(tr().mark((function t(){var r;return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(yt.x)(e,S._id);case 2:(r=t.sent)&&(ie(r),y(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),se=function(){var t=Object(p.a)(tr().mark((function t(){var r;return tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!1),t.next=3,Object(yt.y)(e,S._id);case 3:(r=t.sent)&&j(Object(d.a)(Object(d.a)({},w),r));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ue=Object(d.a)({},er.model),de=[],pe=[],fe={};I.map((function(e){fe=Object(d.a)(Object(d.a)({},fe),o.cards[e]._timeline||{})})),fe=Object.keys(fe).filter((function(e){return"kpi"===fe[e].type})).map((function(e){return fe[e]}));var he="time"!==S.kpi_type?parseFloat(te):0,me=parseFloat(te)-parseFloat(re);me<0&&(me*=-1),fe&&Object.keys(fe).length>0&&Object.keys(fe).sort((function(e,t){return fe[e].created_at<fe[t].created_at?-1:1})).map((function(e,t){he=parseFloat(he)+parseFloat(fe[e].value),de.push({meta:fe[e].value,total:he,value:parseFloat(te)>parseFloat(re)?100-Math.floor(100*he/me):Math.floor(100*he/me)}),pe.push(t+1),t+1===Object.keys(fe).length&&(ue=Object(d.a)(Object(d.a)({},ue),{},{data:{labels:pe,series:[[].concat(de)]},options:Object(d.a)(Object(d.a)({},ue.options),{},{low:0,high:100,plugins:[vt.a.plugins.tooltip({tooltipFnc:function(e,t){return"".concat(e>0?"+":"")+Object(k.h)(e,"time"===S.kpi_type?"number":S.kpi_type)+"<br>"+Object(k.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var ge=te<re?re-te:te-re;fe&&Object.keys(fe).length>0&&Object.keys(fe).map((function(e){ge=parseFloat(ge)+parseFloat(fe[e].value)}));var be=Math.ceil(te<re?re-te:te-re);return(be=100*Math.ceil(ge)/be-100)<0&&(be*=-1),e.data?a.a.createElement("div",{className:r.root},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(k.d)("color")}},e.manualAdd?Object(k.s)("$__timerLog",1):Object(k.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(le.a,{color:"color",icon:"schedule"}),a.a.createElement(Ce,{label:Object(k.s)("$__initialDate",1),variant:Object(k.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"date",inputProps:{max:_()().format("YYYY-MM-DD"),autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&P(e.target.value);var t=w.updated_at-w.created_at;ie(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(e.target.value," 00:00:00")).unix("X"),updated_at:_()("".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(le.a,{color:"color",icon:"schedule"}),a.a.createElement(Ce,{label:Object(k.s)("$__initialDate",1),variant:Object(k.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{max:z,autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&(P(e.target.value),ie(Object(d.a)(Object(d.a)({},w),{},{created_at:_()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:N})),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",icon:"watch_later"}),a.a.createElement(Ce,{label:Object(k.s)("$__finalDate",1),variant:Object(k.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:N,autoComplete:"new-password",onChange:function(e){_()(e.target.value).isValid()&&(M(e.target.value),ie(Object(d.a)(Object(d.a)({},w),{},{updated_at:_()(e.target.value).tz("America/Sao_Paulo").unix("X")}),!0))}},value:z}))),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",icon:"more_time"}),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Ce,{label:Object(k.s)("$__hours",1),variant:Object(k.d)("fieldVariant",1),name:"hours",InputLabelProps:{shrink:!0},type:"number",inputProps:{min:0,autoComplete:"hours",onChange:function(e){Z(e.target.value),H(!0),N.indexOf("T")>-1&&P(N.substring(0,10)),ie(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(N.substring(0,10)," 00:00:00")).unix("X"),updated_at:_()("".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(Ce,{label:Object(k.s)("$__minutes",1),variant:Object(k.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&&P(N.substring(0,10)),ie(Object(d.a)(Object(d.a)({},w),{},{created_at:_()("".concat(N.substring(0,10)," 00:00:00")).unix("X"),updated_at:_()("".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(E.a,{title:Object(k.s)("$__reset",1),icon:"update_disabled",color:Object(k.d)("menu"),onClick:function(){H(!1),P("".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(le.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText)),parseInt(o.cards[S._id]._users[i._id].access)>=3?a.a.createElement(B,null,a.a.createElement(Qt,{includeMe:!0,data:o.cards[S._id],avatarSize:"33px",permission:e.permission,noLimit:!0,multiple:!0,onSelect:function(e){ie(Object(d.a)(Object(d.a)({},w),{},{to:e}),!0)}})):a.a.createElement(a.a.Fragment,null)),f||e.manualAdd?a.a.createElement("div",null,!e.manualAdd&&w&&w.created_at&&w.updated_at&&w.diffText&&_()(1e3*w.created_at).isValid()&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(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(le.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},_()(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(le.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},w.diffText))),w.created_at<w.updated_at?a.a.createElement(B,null,a.a.createElement(Ot,{manualAdd:!!e.manualAdd,data:S,timer:w,manualEntry:G,callBack:function(){m(!1),e.callBack&&e.callBack()}})):a.a.createElement(a.a.Fragment,null)):a.a.createElement("div",{className:r.time},v?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmStopTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){se()}})}},"pause_circle_filled"),a.a.createElement("div",{className:"text"},w.diffText)):a.a.createElement(a.a.Fragment,null,re&&he?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:60*re<he?"red":"color",icon:"schedule"}),a.a.createElement("div",{className:"text",style:{color:60*re<he?"red":"grey"}},Object(k.s)("$__timeLeft",1),": ",60*re-he>-60&&60*re-he<60?"".concat(60*re-he," ").concat(Object(k.s)("$__seconds",1)," "):"".concat(Math.trunc((60*re-he)/60)," ").concat(Object(k.s)("$__minutes",1)," ").concat(60*re-he-60*Math.trunc((60*re-he)/60)," ").concat(Object(k.s)("$__seconds",1)," "))):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",onClick:function(){ce()},title:Object(k.s)("$__playRegisterLogWork")},"play_circle_outline"),a.a.createElement("span",{style:{marginLeft:7,color:Object(k.d)("color")}},Object(k.s)("$__startStopWatch"))))))):a.a.createElement("div",null,"NO DATA RECEIVED")}))),or={containerNoShadow:Object(d.a)(Object(d.a)({},X.l),{},(rr={position:"relative",border:"0.5px solid ".concat(Object(k.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(rr,"padding","3px"),Object(f.a)(rr,"display","flow-root"),rr)),container:Object(d.a)(Object(d.a)({},X.l),{},(nr={position:"relative",border:"0.5px solid ".concat(Object(k.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(nr,"padding","3px"),Object(f.a)(nr,"display","flow-root"),Object(f.a)(nr,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),nr)),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(k.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(k.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(k.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 ir=Object(me.a)(or)((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(k.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(le.a,{icon:"lock",size:"39px",color:e.avatarIconColor?e.avatarIconColor:Object(k.d)("AvatarIconColor")})))))})),cr=r(59),lr=r(592);function sr(){sr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ur,dr=function(){var e=Object(p.a)(sr().mark((function e(t){var r,n,a,o,i;return sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(d.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=c.a.getState().db.users[e];o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e,Object(d.a)({_id:e,name:r.name,image:r.image||null},0===t?{isResponsible:!0}:{})))})),i=Object(M.a)(),Y.a.post("card/add",Object(d.a)({_id:i},n)),a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},i,Object(d.a)(Object(d.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)}}(),pr=function(){var e=Object(p.a)(sr().mark((function e(t){var r,n,a=arguments;return sr().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,Y.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(){pr(t,r,n+1)}),3e3);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(t){return e.apply(this,arguments)}}(),fr=function(){var e=Object(p.a)(sr().mark((function e(t){return sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Y.a.put("card/link",t);case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),setTimeout((function(){fr(t)}),3e3);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),hr=function(e,t,r,n){var a=c.a.getState().db.cards[r],o=c.a.getState().db.cards[t],i={};a&&a.automationDueDateType&&"add"===a.automationDueDateType&&(i=Object(d.a)({endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===a||void 0===a?void 0:a.automationDueDate)||1,"days").unix("X")},o.startDate?{}:{startDate:_()().unix("X")})),a&&a.automationStatusType&&"replace"===a.automationStatusType&&(i=Object(d.a)(Object(d.a)({},i),{},{status:a.automationStatus||"notStarted"},a.automationStatus&&"completed"===a.automationStatus?{completed_at:_()().unix("x")}:{}));var l,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&&(l=t),o&&(!o._users||o._users&&!o._users[t])){var r=!(!o._users||!o._users[t]);Ht(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 p=[],f=[];a._tags.map((function(e){u.findIndex((function(t){return t.value===e.value}))>-1&&(p.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(d.a)(Object(d.a)(Object(d.a)({},i),p.length>0?{removeTags:p}:{}),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(d.a)(Object(d.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(d.a)(Object(d.a)({},i),{},{removeTags:m})}i=Object(d.a)(Object(d.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&&(l=t),o&&(!o._users||o._users&&!o._users[t])){var r=!(!o._users||!o._users[t]);Ht(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&&Y.a.put("cards/removeAccess/",{cardId:o._id,userIds:s}),l&&Vt(e,{cardId:o._id,userId:l}),"{}"!==JSON.stringify(i)&&mr(Object(d.a)({_id:t},i)),t&&r&&fr({idRel:t,destination:r}),i&&i.status&&"completed"===i.status&&!i.completed_at&&(i=Object(d.a)(Object(d.a)({},i),{},{completed_at:_()().unix("x")})),i},mr=function(){var e=Object(p.a)(sr().mark((function e(t){var r,n;return sr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(d.a)({},t),e.next=3,Y.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)}}(),gr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.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(d.a)(Object(d.a)({},r[e]),{},{order:String(t)}))})),n=Object(d.a)(Object(d.a)({},n),{},Object(f.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}},br=function(){var e=Object(p.a)(sr().mark((function e(t){var r,n,a,o,i,l,s,u,p,h,m,g,b;return sr().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,l=t.approved,s=void 0!==l&&l,u=c.a.getState().db.cards[r],p=c.a.getState().db.cards[u._parent],h=p.onConcludedStepMoveTo?p.onConcludedStepMoveTo:Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===p._parent&&"step"===c.a.getState().db.cards[e].type&&parseInt(c.a.getState().db.cards[e].step)===parseInt(p.step)+1}))[0],m=c.a.getState().db.cards[h],!i){e.next=10;break}return g={_id:Object(M.a)(),idRel:r,cardId:p._id,message:"".concat(s?"$__approved":"$__rejected"," - ").concat(a?"$__reason: ".concat(a):""),type:"log",filesCount:0,approval:!0,db:"cards"},e.next=9,Y.a.post("timeline/add",g);case 9:s||(fr({idRel:r,destination:p._parent}),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r]),{},{_parent:p._parent,requireApproval:null})))})));case 10:(!i||i&&s)&&(b=hr(t,r,h,c.a.getState().db.cards[r]._createdBy._id),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r]),b),{},{_parent:p.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 vr(){vr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var yr,xr=w.default.div(ur||(ur=Object(u.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(k.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            "})),_r=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(lr.a)((function(e){var t=e.classes,r=c.a.getState().db,n=e.data&&e.data._id?c.a.getState().db.cards[e.data._id]:{},o=a.a.useState(n.name?n.name:""),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],_=function(){var t=Object(p.a)(vr().mark((function t(r){return vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(yt.P)(Object(d.a)(Object(d.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(p.a)(vr().mark((function e(){return vr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.c)({message:Object(k.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(xr,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,m?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(Ce,{label:Object(k.s)("$__taskTitle"),variant:Object(k.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(!m)},onKeyDown:function(e){13===e.keyCode&&l&&_({name:l}),27===e.keyCode&&(g(!m),s())}},autoFocus:!0,value:l,placeholder:Object(k.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return _({name:l})}},a.a.createElement(le.a,{color:"green",icon:"save",title:Object(k.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){g(!m),s("")}},a.a.createElement(le.a,{color:Object(k.d)("medium"),icon:"cancel",title:Object(k.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(!m)}},e.provided?{provided:e.provided}:{},e.snapshot?{snapshot:e.snapshot}:{}),e.showCard?a.a.createElement(vn,{db:"cards",data:e.data,viewTimer:!0,viewAllName:!0}):n.name?n.name:Object(k.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(k.k)(n.completed_at)):a.a.createElement(a.a.Fragment,null)),y&&e.permission&&!e.noDelete&&(!e.showCard||!e.dragStatus&&e.showCard)&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(E.a,{title:Object(k.s)("$__undoConclude",1),color:"lightgrey",icon:"delete_forever",onClick:function(){return O()},transparent:!0}),n.checklist?a.a.createElement(E.a,{title:Object(k.s)("$__turnIntoActivity",1),color:"lightgrey",icon:"change_circle",onClick:function(){Object(k.c)({message:Object(k.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(E.a,{title:"completed"!==n.status?Object(k.s)("$__conclude",1):Object(k.s)("$__undoConclude",1),color:"completed"!==n.status?"lightgrey":"grey",icon:"completed"!==n.status?"radio_button_unchecked":"check_circle",onClick:function(){n._hasStep?br(Object(d.a)(Object(d.a)({},e),{},{nodeId:n._id})):Object(yt.K)(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(le.a,{color:"lightgray",icon:"lock",size:"22px"}))):a.a.createElement(a.a.Fragment,null))}))),Or=r(1944),wr=Object(me.a)({switchBase:{color:Object(k.d)("medium"),"&$checked":{color:Object(k.d)("color")},"&$checked + $track":{backgroundColor:Object(k.d)("color")}},checked:{},track:{}})(Or.a);function jr(){jr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Er=w.default.div(yr||(yr=Object(u.a)(["\n            background-color:none\n            ","\n            "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""})),kr=Object(s.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(e.name?e.name:""),l=Object(h.a)(i,2),s=(l[0],l[1],a.a.useState(!1)),u=Object(h.a)(s,2),m=u[0],g=u[1],b=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),v=window.location.hash.split("/");v[0]=v[0].replace("#",""),36!==v[0].length&&(v[0]=null);var y={};c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&(y=c.a.getState().db[e.db][e.nodeId]);var x=Object.keys(c.a.getState().db.cards).filter((function(t){return!(e.myDay||"step"===c.a.getState().db.cards[t].type||!(!e.noChecklist&&c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].deleted&&c.a.getState().db.cards[t]._parent===e.nodeId||e.noChecklist&&!c.a.getState().db.cards[t].deleted&&c.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&&_()(new Date(1e3*r.cards[t]._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===b&&c.a.getState().db.cards[t])||c.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})),O=function(){var t=Object(p.a)(jr().mark((function t(n){var a,i,l,s,u;return jr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),a=n.destination,i=n.source,l=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,l),t.next=13,setTimeout(500);case 13:return o.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:s}),u=Object(d.a)({},c.a.getState().db.cards),t.next=17,new Promise((function(e,t){s.map((function(t,r){u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},u[t]),{},{order:"".concat(r+1)}))),r+1===s.length&&e(!0)}))}));case 17:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.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(p.a)(jr().mark((function e(t){return jr().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(p.a)(jr().mark((function e(t){return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=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(k.s)("$__requireConcludedByStep")),a.a.createElement(wr,{checked:!!y.listStepLock,onChange:function(){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:y._id}}),{listStepLock:!y.listStepLock})},name:"listStepLock",inputProps:{"aria-label":"secondary checkbox"}}),a.a.createElement(E.a,{title:Object(k.s)("$__openBoard"),text:Object(k.s)("$__openBoard"),color:"lightgrey",textColor:"lightgrey",icon:"open_in_new",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.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(k.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(k.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(cr.a,{onDragEnd:O,onDragStart:w,onDragUpdate:j},a.a.createElement(cr.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(t,n){return a.a.createElement(Er,Object.assign({ref:t.innerRef},t.droppableProps,{isDraggingOver:n.isDraggingOver}),S.map((function(t,n){return a.a.createElement(cr.b,{draggableId:t,index:n,key:"".concat(t).concat(n)},(function(o,i){return a.a.createElement(_r,{dragStatus:m,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:y.listStepLock&&n>0&&"completed"!==r.cards[S[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(Be,{text:Object(k.s)("$__new","*"),icon:"add_box",iconColor:Object(k.d)("color"),onClick:function(){var t,r,n,a,o;e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{myDay:!!e.myDay,addCard:{myDay:!!e.myDay,_parent:(null===(t=y)||void 0===t?void 0:t._id)||null,rows:x.length,type:y&&y.type&&(null===(r=y)||void 0===r||null===(n=r.type)||void 0===n?void 0:n.indexOf("guideline"))>-1?"objective":"objective"===(null===(a=y)||void 0===a?void 0:a.type)?"goal":(null===(o=y)||void 0===o||o.type,"task")}}))},style:{padding:7}}),e.myDay?a.a.createElement(a.a.Fragment,null):a.a.createElement(Be,{text:Object(k.s)("$__newSimpleTask","*"),icon:"playlist_add",iconColor:Object(k.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{myDay:e.myDay||!1,checklist:!0,addCard:{_parent:y._id,rows:x.length,type:y.type.indexOf("guideline")>-1?"objective":"objective"===y.type?"goal":(y.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(_r,{dragStatus:m,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:y.listStepLock&&n>0&&S[n-1]&&r.cards[S[n-1]]&&"completed"!==r.cards[S[n-1]].status}))}))):a.a.createElement(a.a.Fragment,null))}));function Sr(e){var t=c.a.getState(),r=t.db,n=t.session,o=Object(yt.i)(e.id),i=Object(k.j)();if(0===Object.keys(o).length)return a.a.createElement(a.a.Fragment,null);var l=Object.keys(o).map((function(t,c){var l=Object(yt.u)(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(yt.C)(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(ze.a,{overlap:"rectangular",icon:o[t].icon,title:"".concat(Object(k.s)("$__".concat(o[t].type),"*"),": ").concat(o[t].name),size:"16px",color:Object(k.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(k.s)(e.legend||"$__connectedIn",1)),l):l,a.a.createElement("div",{style:{clear:"both"}}))}var Lr=r(1089),Cr=r.n(Lr),Ir=r(1945);var Tr=function(e){var t={root:{position:"relative",width:"100%",background:"transparent !important","& .MuiLinearProgress-indeterminate":{background:"transparent !important"},"& .MuiLinearProgress-bar":{background:"".concat(Object(k.d)("linearProgress")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(k.d)("color")}},bar:{borderRadius:7}},r=Object(R.a)(t)(),n=Object(d.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(Ir.a,n),e.showText&&a.a.createElement("div",{className:"text"},Math.floor(e.value),"%"))},Fr=Object(R.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 Dr=function(e){var t=Fr(),r=a.a.useState(!1),n=Object(h.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(Ne.a,{title:Object(k.s)("$__options",1)},a.a.createElement(Pe.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(le.a,{usePropagation:!0,size:e.size?e.size:"20px",color:e.iconColor?e.iconColor:Object(k.d)("menu"),icon:e.icon?e.icon:"design_services",title:e.title?e.title:"NO_ALIAS"}))),a.a.createElement(rt.a,{open:o,anchorEl:c.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ze.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.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 Nr(){Nr=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var Pr=function(){var e=Object(p.a)(Nr().mark((function e(t,r){var n,a,o,i,l,s;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n={},a=c.a.getState(),o=a.db,i=a.session,(c.a.getState().timeline[r.id]||c.a.getState().timeline[r.readedBy])&&(n=c.a.getState().timeline,l=r.id,s={},"cards"!==r.db?(l=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[l]&&Object.keys(n[l]).filter((function(e){if(r&&r.type&&("all"!==r.type&&n[l][e].type===r.type||"all"===r.type)&&n[l][e].user._id!==r.readedBy&&(!n[l][e].readedBy||i&&i._id&&n[l][e].readedBy&&!n[l][e].readedBy[i._id]))return!0})).map((function(e,t){n[l][e]=Object(d.a)(Object(d.a)({},n[l][e]),{},{readedBy:Object(d.a)(Object(d.a)({},n[l][e]&&n[l][e].readedBy?n[l][e].readedBy:{}),{},Object(f.a)({},r.readedBy,Object(d.a)(Object(d.a)(Object(d.a)({},n[l][e]&&n[l][e].readedBy&&n[l][e].readedBy[r.readedBy]?n[l][e].readedBy[r.readedBy]:{}),s),{},{readedDate:{low:_()().unix("x")}})))})}))),t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)({},n)),c.a.getState().db.cards[r.id]&&r.type&&c.a.getState().db.cards[r.id]._notifications&&(c.a.getState().db.cards[r.id]._notifications[r.type]||"all"===r.type)&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},r.id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r.id]),"all"===r.type?{notifications:{}}:{_notifications:Object(d.a)(Object(d.a)({},c.a.getState().db.cards[r.id]&&c.a.getState().db.cards[r.id]._notifications?c.a.getState().db.cards[r.id]._notifications:{}),{},Object(f.a)({},r.type,0))})))}));case 5:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Ar=function(){var e=Object(p.a)(Nr().mark((function e(t,r){var n,a,o,i,l,s,u,p;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),a=n.db,o=n.timeline,i=n.session,l={},s=r.nodeId!==i._id?s=r.nodeId:r.user,a.users[r.user]?l=a.users[r.user]:r.user&&a[r.db]&&o[s]&&o[s]._users&&o[s]._users[r.user]&&(l=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(d.a)(Object(d.a)({},o[s][r.message]&&o[s][r.message]._reactions?o[s][r.message]._reactions:{}),{},Object(f.a)({},r.react,Object(d.a)(Object(d.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(f.a)({},r.user,Object(d.a)(Object(d.a)({},l),{},{reactDate:{low:_()().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]}))})),p=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},s,Object(d.a)(Object(d.a)({},o[s]),{},Object(f.a)({},r.message,Object(d.a)(Object(d.a)({},o[s][r.message]),{},{_reactions:u}))))),t.reduxFunction("ASYNC","SET_TIMELINE",p));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),$r=function(){var e=Object(p.a)(Nr().mark((function e(t,r){var n,a,o,i;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(p.a)(Nr().mark((function e(n,a){return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||"cards"!==r.db||c.a.getState().db.cards[r.idRel]){e.next=7;break}return e.next=3,Object(st.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=c.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=c.a.getState().db.users[e];n._toUser=Object(d.a)(Object(d.a)({},n._toUser?n._toUser:{}),{},Object(f.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(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},i,Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]),{},Object(f.a)({},n.comment._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]?c.a.getState().timeline[i][n.comment._id]:{}),n.comment),n._toUser?{_toUser:n._toUser}:{}),{},{type:c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i][n.comment._id].type?c.a.getState().timeline[i][n.comment._id].type:n&&n.comment&&n.comment.type?n.comment.type:c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id].type?c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id].type:"comment",readedBy:Object(d.a)(Object(d.a)({},c.a.getState().timeline[i]&&c.a.getState().timeline[i][n.comment._id]&&c.a.getState().timeline[i][n.comment._id].readedBy?c.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)}}(),zr=function(){var e=Object(p.a)(Nr().mark((function e(t,r){var n,a,o,i,l,s,u,h,m,g,v,y,x,_,O,w,j,E,k,S,L,C,I,T,F;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=(null===(n=c.a.getState().chat)||void 0===n?void 0:n.lastMessageDate)||0,o=c.a.getState().timelineLoader,!r.type||"kpi"!==r.type){e.next=7;break}if(i=b()("".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(d.a)(Object(d.a)({},o),{},Object(f.a)({},i,!0)));case 7:if(l=r.ids,s=r.db,u=r.type,h=r.limit,m=void 0===h?0:h,g=r.skip,v=void 0===g?0:g,y=r.toId,x=void 0===y?null:y,_=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=c.a.getState(),C=L.session,I=[],T=[],"string"===typeof l?T.push(l):T=l,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(p.a)(Nr().mark((function e(n,o){var i,l,p;return Nr().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,kt.a.post("/M_Timeline_Get_V3",{nodesIds:I,db:s,type:u||"comment",skip:parseInt(v),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?(l=Object(d.a)({},c.a.getState().timeline),p=null,i.data.map((function(e){var t=l&&l[o]&&l[o][e.data._id]&&l[o][e.data._id].readedBy?l[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(d.a)(Object(d.a)({},t),{},Object(f.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(d.a)(Object(d.a)({},n),{},Object(f.a)({},e.type,Object(d.a)(Object(d.a)({},n[e.type]),{},Object(f.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(d.a)(Object(d.a)({},i),{},Object(f.a)({},e._id,e))})),C&&C._id&&t&&!t[C._id]&&l[o]&&Object.keys(l[o]).filter((function(r){l[o][r]&&l[o][r].readedBy&&l[o][r].readedBy[C._id]&&parseInt(l[o][r].created_at)>parseInt(e.data.created_at)&&(t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},C._id,Object(d.a)({},l[o][r].readedBy[C._id]))))})),(r.ini||r.newUpdates)&&parseInt(e.data.created_at)>parseInt(a)&&(a=parseInt(e.data.created_at),p=o),l=Object(d.a)(Object(d.a)({},l),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},l&&l[o]?l[o]:{}),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.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(d.a)(Object(d.a)({},c.a.getState().timeline),l)),n({result:!0,total:i.data.length,timelines:l,chatOpenId:p,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(d.a)(Object(d.a)(Object(d.a)({},c.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)}}(),Mr=function(){var e=c.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}},Yr=function(){var e=Object(p.a)(Nr().mark((function e(t,r){var n,a;return Nr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket),e.next=3,new Promise(function(){var e=Object(p.a)(Nr().mark((function e(a,o){return Nr().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=c.a.getState().session;c.a.getState().timeline[o._id]&&c.a.getState().timeline[o._id][r.id]&&(n=o._id),t.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},n,Object(d.a)(Object(d.a)({},c.a.getState().timeline[n]),{},Object(f.a)({},r.id,Object(d.a)(Object(d.a)({},c.a.getState().timeline&&c.a.getState().timeline[n]&&c.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 Br(){Br=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(698);var Rr=Object(n.memo)((function(e){var t=e.classes,r=e.data,n=c.a.getState(),o=n.db,i=n.timeline,l=o.cards,s=a.a.useState(!1),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),v=Object(h.a)(g,2),y=v[0],x=v[1],_=a.a.useState([]),O=Object(h.a)(_,2),w=O[0],j=O[1],E=parseFloat(r.kpi_ini),S=parseFloat(r.kpi_fin);a.a.useEffect((function(){f||(m(!0),I(e.data._id),L())}),[]),a.a.useEffect((function(){I(e.data._id)}),[l]);var L=function(){var t=Object(p.a)(Br().mark((function t(){var n,a;return Br().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=b()("".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)||c.a.getState().timelineLoader&&(!c.a.getState().timelineLoader||c.a.getState().timelineLoader[a])){t.next=10;break}return x(!0),t.next=6,zr(Object(d.a)(Object(d.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(p.a)(Br().mark((function e(t,r){var n;return Br().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=Object.keys(l).filter((function(e){return l[e].kpi_useParent&&l[e]._parent===t}))).length>0?n.map(function(){var e=Object(p.a)(Br().mark((function e(t){return Br().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(d.a)({},er.model),F=[],D=[],N={};w.map((function(e){N=Object(d.a)(Object(d.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 P="time"!==r.kpi_type?parseFloat(E):0,A=parseFloat(E)-parseFloat(S),$=0;A<0&&(A*=-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})).map((function(e,t){P=parseFloat(P)+parseFloat(N[e].value),$+=parseFloat(N[e].value),F.push({meta:N[e].value,total:P,value:parseFloat(E)>parseFloat(S)?100-Math.floor(100*P/A):Math.floor(100*P/A)}),D.push(t+1),t+1===Object.keys(N).length&&(T=Object(d.a)(Object(d.a)({},T),{},{data:{labels:D,series:[[].concat(F)]},options:Object(d.a)(Object(d.a)({},T.options),{},{low:0,high:100,plugins:[vt.a.plugins.tooltip({tooltipFnc:function(e,t,n){return"".concat(e>0?"+":"")+Object(k.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)+"<br>"+Object(k.h)(t,"percent")}})],axisX:{showGrid:!1},axisY:{showGrid:!1},onlyInteger:!0})}))}));var z=E<S?S-E:E-S,M=z;N&&Object.keys(N).length>0&&Object.keys(N).map((function(e){z=parseFloat(z)+parseFloat(N[e].value)}));var Y=M-(z-M),B=M-(M-z),R=Math.ceil(E<S?S-E:E-S);if((R=100*Math.ceil(z)/R-100)<0&&(R*=-1),!e.data)return a.a.createElement("div",null,"NO DATA RECEIVED");if(y)return a.a.createElement("div",{style:{position:"absolute",bottom:0,left:"7px",right:"7px"}},a.a.createElement(Tr,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(k.d)("color")}},a.a.createElement(Cr.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(k.d)("color")}},Object(k.s)("$__progress",1)),a.a.createElement("div",{className:t.progress},a.a.createElement(Tr,{variant:"determinate",size:100,value:R,showText:!0,onClick:function(){}})),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:Object(k.d)("color")}},function(){var e=E&&parseInt(E)?parseInt(E):0,t=S&&parseInt(S)?parseInt(S):0;r&&"time"===r.kpi_type&&({},parseInt(e)<parseInt(t)&&Object(k.s)("$__maxTime",1),parseInt(e)>parseInt(t)&&Object(k.s)("$__minTime",1)),e>0&&"".concat(Object(k.s)("$__initial",1),": ").concat(Object(k.h)(e,"time"===r.kpi_type?"number":r.kpi_type,r.kpi_currency?r.kpi_currency:null)," / ");return["decimal","currency","percentage"].indexOf(r.kpi_type)>-1&&Object(k.s)("$__targetValue",1),a.a.createElement(a.a.Fragment,null,Object(k.s)("".concat(e>t?"$__balance":"$__targetValue"),1),": ",Object(k.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(k.s)("$__minutes")):"")}()),a.a.createElement("div",{style:{position:"relative",textSize:"11px",fontWeight:"bold",color:$>0?Object(k.d)("green"):"red"}},Object(k.s)("$__accomplished",1),": ",$&&parseInt($)>0?Object(k.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&&S>E||R>0&&R<=100&&S<E)&&a.a.createElement(Dr,{icon:"add_circle",title:Object(k.s)("$__increase"),iconColor:Object(k.d)("blue"),onClick:function(){},transparent:!0},a.a.createElement(Ot,{data:r,PositiveValue:!0,callBack:function(){}})),(R>=0&&R<100&&S<E||R>0&&R<=100&&S>E)&&a.a.createElement(Dr,{icon:"remove_circle",iconColor:"orange",title:Object(k.s)("$__decrease"),onClick:function(){},transparent:!0},a.a.createElement(Ot,{data:r,PositiveValue:!1,callBack:function(){}})))),"task"===r.kpi_type&&a.a.createElement("div",{className:t.time},"TASK")))})),Gr=Object(s.b)((function(e){return{store:{timeline:e.timeline,cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(xt)(Rr)),Hr=r(1972),Wr={root:Object(d.a)({},X.l),aspectsTitle:{width:"100%",fontWeight:"bold",padding:"3px",color:Object(k.d)("color"),display:"flex",alignItems:"center"}},Ur=Object(R.a)(Wr);var Vr,qr,Xr=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=Ur(),n=a.a.useState([]),o=Object(h.a)(n,2),i=o[0],l=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])})),l(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",m="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(le.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(k.d)("color"),title:Object(k.s)(d,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(k.s)("$__internalAspects",1)," - ",Object(k.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(Hr.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(le.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(k.d)("color"),title:Object(k.s)(p,1)}),a.a.createElement("span",{style:{marginLeft:"5px"}},Object(k.s)("$__externalAspects",1)," - ",Object(k.s)("$__".concat(m),1))),u&&u.length>0&&u.sort((function(e,t){return e.name-t.name})).map((function(e,t){return a.a.createElement(Hr.a,{size:"small",label:e.name,title:e.name,style:{margin:"3px",maxWidth:"100%",overflow:"hidden"},key:e._id})})))})),Jr={containerNoShadow:Object(d.a)(Object(d.a)({},X.l),{},(Vr={position:"relative",border:"0.5px solid ".concat(Object(k.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(Vr,"padding","3px"),Object(f.a)(Vr,"minWidth","150px"),Object(f.a)(Vr,"display","flow-root"),Vr)),container:Object(d.a)(Object(d.a)({},X.l),{},(qr={position:"relative",border:"0.5px solid ".concat(Object(k.d)("light")),borderRadius:"2px",padding:"0px",backgroundColor:"#FFFFFF"},Object(f.a)(qr,"padding","3px"),Object(f.a)(qr,"minWidth","150px"),Object(f.a)(qr,"display","flow-root"),Object(f.a)(qr,"boxShadow","0px 0px 10px rgba(0,0,0,0.1)"),qr)),parent:{width:"100%",padding:"0 5px","& .title":{color:Object(k.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(k.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(k.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"}}},Kr=r(781),Zr=r.n(Kr),Qr=r(125),en=r.n(Qr);function tn(){tn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var rn=Object(s.b)((function(e,t){return{card:e.db.cards[t.data._id]}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Jr)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=(r.timeline,a.a.useState(null)),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(!0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=(y[1],a.a.useState(!1)),w=Object(h.a)(O,2),j=w[0],E=w[1],S=e.data&&e.data._id?c.a.getState().db.cards[e.data._id]:{},L=window.location.hash.split("/");L[0]=L[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&(S._parent&&(!L[0]||L[0]&&36!==L[0].length)?C():E(!1)),function(){e=!1}}),[]);var C=function(){var t=Object(p.a)(tn().mark((function t(){var r;return tn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(!S._loadTimeline||S._loadTimeline&&!S._loadTimeline.kpi)&&S.kpi_type&&"task"!==S.kpiType&&"timer"!==S.kpiType&&"time"!==S.kpiType&&zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Card/index/init()"}),{ids:[S._id],db:"cards",type:"kpi"}),r=function(){var t=Object(p.a)(tn().mark((function t(a){return tn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.cards[a]){t.next=8;break}return E(!0),t.next=4,Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[a],cardLoad:"parents"});case 4:t.sent&&E(!1),t.next=9;break;case 8:n.cards[a]&&n.cards[a]._parent?r(n.cards[a]._parent)&&E(!1):E(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(p.a)(tn().mark((function e(){return tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(S._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(j)return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"}},a.a.createElement("span",{style:{color:Object(k.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(k.s)("$__loadingData")),a.a.createElement(Tr,null));if(!S||!e.data||!e.data._id)return null;var I=!1,T=a.a.createElement(a.a.Fragment,null);if(S&&S.url&&(S.url.indexOf(".youtube.com/watch?")>-1||S.url.indexOf("youtu.be")>-1)){var F=S.url.indexOf(".youtube.com/watch?")>-1?S.url.split("?")[1].split("v=")[1].split("&")[0]:S.url.split(".be/")[1];F&&(T=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(F),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),I=!0)}if(S&&S.url&&S.url.indexOf("https://vimeo.com")>-1){var D=S.url.replace("https://","").split("/")[1];D&&(T=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://player.vimeo.com/video/".concat(D),title:"Vimeo video player",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0}),I=!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"}},I||S.image&&(S.image||e.Avatar||S.image||e.Avatar)&&!o.cards.hide.image?a.a.createElement("div",{className:t.imagePreview,style:s?{backgroundImage:'url("'.concat(s||He.a,'")')}:{background:Object(k.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},I?T:S.image&&!s?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{marginTop:"calc(-48% - ".concat("insight"===S.type||"link"===S.type?"10px":"0px",")"),display:"flex",justifyContent:"center",alignItems:"center"}},"insight"===S.type||"link"===S.type?a.a.createElement(le.a,{icon:en.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{src:Zr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),!g&&a.a.createElement("div",{style:{position:"absolute",marginTop:"calc(-48% + 0px)",zIndex:1}},a.a.createElement(je,null),a.a.createElement("div",{style:{clear:"both"}}))):a.a.createElement(a.a.Fragment,null),!I&&(!s||e.Avatar||S.image!==s)&&a.a.createElement(a.a.Fragment,null,a.a.createElement("img",{className:t.image,src:"".concat(S.image?S.image:He.a),onError:function(e){S.image?u(null):b(!0)},onLoad:function(t){u("".concat(e.Avatar&&!S.image?He.a:S.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(k.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"===S.type||"link"===S.type?a.a.createElement(le.a,{icon:en.a,size:"39px",color:"rgba(250,250,250,0.77)"}):a.a.createElement("img",{src:Zr.a,style:{width:"25%"}}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}})),S.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}},"# ",S._cardCode):a.a.createElement(a.a.Fragment,null),(x||Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===S._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",zIndex:1},onClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:S._id})),t.preventDefault(),t.stopPropagation()}},a.a.createElement(le.a,{size:"10px",color:"#FFFFFF",icon:"open_in_new"}),Object(k.s)("$__openTaskList"))),"swot"!==n.dataType.filter((function(e){return e.name===S.type}))[0].module&&(S._parent&&S._parent!==S._id||S._planId&&S._planId!==S._id)&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",paddingTop:"7px"}},"SQUASH"===S.name&&console.log(S),n.cards[S._parent]?a.a.createElement(Sr,{id:S._parent&&c.a.getState().db.cards[S._parent]?S._parent:S._planId&&c.a.getState().db.cards[S._planId]?S._planId:null,loading:j,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%"}},S.type.indexOf("guideline")>-1&&(S._aspects&&S._aspects.length>0||S._aspects&&S._aspects.length>0)?a.a.createElement(Xr,{data:S._aspects,type:S.type}):a.a.createElement(a.a.Fragment,null),!e.searchText&&a.a.createElement(Ne.a,{title:S.description||""},e.Resume?a.a.createElement("div",{className:t.description,style:Object(d.a)({display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",height:90},S.description?{}:{color:"lightgray"})},S.description?"".concat(S.description):Object(k.s)("$__planDescriptionCardPlaceholder")):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:S.description?Object(k.p)(S.description):""}})),S.kpi_type&&!o.cards.hide.kpi&&a.a.createElement(Gr,{data:S,chartShow:!o.cards.hide.kpiChart}),("link"===S.type||"insight"===S.type)&&a.a.createElement("div",{className:t.dates},a.a.createElement("div",{className:t.dateInfo},a.a.createElement(ze.a,{overlap:"rectangular",className:t.dateIco,icon:"event_available",title:"$__pubDate",size:"14px",disabled:!0}),_()(1e3*S.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"}}))),(x||"plan"!==S.type&&Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._parent===S._id})).length>0&&0===Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===S._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(k.s)("$__list",1)),a.a.createElement(kr,{nodeId:S._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"}}))}))),nn=r(1090),an=r.n(nn),on=r(1091),cn=r.n(on),ln=(r(1376),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 sn(){sn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var un=a.a.createRef(null);var dn=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(ln)((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(null),d=Object(h.a)(u,2),f=d[0],m=d[1],g=a.a.useState([]),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useRef(null),_=e.classes;a.a.useEffect((function(){O()}),[]),a.a.useEffect((function(){O()}),[e.files,e.img]);var O=function(){var t=v;e.files&&(Object.keys(e.files).map((function(r){0===t.filter((function(e){return e._id===r})).length&&t.push(e.files[r])})),y(t))},w=function(){var t=Object(p.a)(sn().mark((function t(r){var n,a,i,c,l,u;return sn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=un.current.getCroppedCanvas().toDataURL(),o(n),m(null),s(!1),a=x.current.files[0].name,i=x.current.files[0].type,t.next=8,j(n,a,i);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 cn.a.imageFileResizer(c,e.maxWidthOrHeight?e.maxWidthOrHeight:600,e.maxWidthOrHeight?e.maxWidthOrHeight:600,c.type.replace("image/",""),50,0,(function(e){t(j(e,a,i))}))})),t.next=14,l.then((function(e){return e}));case 14:(u=t.sent)&&e.onChange&&e.onChange(n,u),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)}}(),j=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:_.root},a.a.createElement("div",{className:_.viewer,style:{}},!n&&!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(k.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(k.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(le.a,{size:"40px",color:"rgba(250,250,250,0.77)"},e.avatarIcon))),e.avatar||!n&&!e.img?e.avatar&&(n||e.img)?a.a.createElement("div",{style:{width:"133px",height:"133px",top:"-4px",left:"-13px",borderRadius:"50%",border:"solid 2px ".concat(Object(k.d)("color")),zIndex:"5 !important",background:e.transparent?"none":Object(k.d)("AvatarBackground"),backgroundImage:'url("'.concat(n||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",{className:e.avatar?_.avatarImage:_.image,src:"".concat(n||e.img),style:{cursor:"pointer"},onError:function(t){return t.target.src=n||e.img},width:"100%",alt:"",onClick:function(){!function(){if(v&&v.length>0){var t=v.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})}}()}})),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(){x.current.click()}},a.a.createElement(Be,{text:Object(k.s)(n||e.img?"$__changeImage":"$__addImage",1),icon:n||e.img?"image":"add_a_photo",textColor:"color",iconColor:"color"})),a.a.createElement("input",{type:"file",onChange:function(e){!function(e){s(!0);var t=new FileReader;if(null!=e.files[0]){var r=e.files[0];t.onloadend=function(){m(t.result),s(!0)},t.readAsDataURL(r)}else s(!1)}(e.target)},ref:x,id:"file-picker",name:"image",accept:e.accept||".jpg,.jpeg,.png,.gif",style:{display:"none"}})):a.a.createElement(a.a.Fragment,null),e.onDelete&&(n||e.img)?a.a.createElement("div",{style:{padding:"7px"},onClick:function(){e.onDelete()}},a.a.createElement(Be,{text:Object(k.s)("$__removeImage",1),icon:"hide_image",textColor:"color",iconColor:"color"})):a.a.createElement(a.a.Fragment,null)),a.a.createElement(jt.a,{fullWidth:!0,onClose:function(){return s(!1)},"aria-labelledby":"simple-dialog-title",open:l},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",width:"calc(100% - 10px)",height:"45px",display:"flex"}},a.a.createElement(ua,{title:Object(k.s)("$__cropImage",1),icon:"crop",onSave:function(){w()},onCancel:function(){s(!1)},actionsButtons:!0,actionButtonsStyle:{top:0,height:45,display:"flex",alignItems:"center"}})),a.a.createElement(an.a,{className:e.avatar?_.circleCropper:_.cropper,ref:un,src:f||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 pn(){pn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fn,hn=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Jr)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=(t.session,t.timeline,t.functions,a.a.useState({})),o=Object(h.a)(n,2),l=o[0],s=o[1];a.a.useEffect((function(){s(Object(d.a)(Object(d.a)(Object(d.a)({},e.toTemplate&&r.cards[e.cardId].name?{name:"".concat(Object(k.s)("$__template")," - ").concat(r.cards[e.cardId].name)}:{}),e.toTemplate&&r.cards[e.cardId].description?{description:r.cards[e.cardId].description}:{}),e.toTemplate&&r.cards[e.cardId].image?{image:r.cards[e.cardId].image}:{}))}),[]);var u=a.a.useState({}),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(0),v=Object(h.a)(b,2),y=v[0],x=v[1],_=c.a.getState().db.cards[e.cardId]&&c.a.getState().db.cards[e.cardId].type?r.dataType.filter((function(t){return t.name===c.a.getState().db.cards[e.cardId].type}))[0]:{},O=function(){var t=Object(p.a)(pn().mark((function t(){var n,a;return pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l||l.name){t.next=4;break}g(Object(d.a)(Object(d.a)({},m),{},{name:!0})),t.next=15;break;case 4:return x(1),t.prev=5,n=Object(d.a)(Object(d.a)(Object(d.a)({},r.cards[e.cardId]),l),{},{templateId:r.cards[e.cardId]._id,created_at:null,isTemplate:!!e.toTemplate||null,order:null,updated_at:null,_id:null,_planId:null}),t.next=9,Object(yt.H)(e,!0,n);case 9:(a=t.sent)&&a._id&&(x(2),setTimeout((function(){w(a._id)}),1500)),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(5);case 15:case"end":return t.stop()}}),t,null,[[5,13]])})));return function(){return t.apply(this,arguments)}}(),w=function(){var t=Object(p.a)(pn().mark((function t(r){return pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(yt.j)(e,e.cardId,r);case 3:t.sent&&(x(3),setTimeout((function(){j(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)}}(),j=function(){var t=Object(p.a)(pn().mark((function t(r){var n,a;return pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(e,{idRel:[r],cardLoad:"plans"});case 2:return n=t.sent,t.next=5,Object(st.b)(e,{idRel:[r],cardLoad:"plans",completed:!0});case 5:a=t.sent,n&&a&&(x(4),setTimeout((function(){e.onComplete&&e.onComplete(),e.toTemplate?i.a.push("sp#tab/templates"):i.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(tt.a,{style:{padding:"7px"}},a.a.createElement(mt,{title:"".concat(l.name?l.name:r.cards[e.cardId].name," "),icon:_&&_.icon?_.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Object(k.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(k.s)("$__installingTemplate")),a.a.createElement(Tr,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(k.s)("$__templateInstalled")),a.a.createElement(le.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(k.s)("$__copyingData")),a.a.createElement(Tr,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(k.s)("$__templateInstalled")),a.a.createElement(le.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(k.s)("$__copiedData")),a.a.createElement(le.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(k.s)("$__preparingToRedirect")),a.a.createElement(Tr,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(le.a,{icon:"done_all",color:"green",size:"50px"}))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(tt.a,{style:{padding:"7px"}},a.a.createElement(mt,{title:"".concat(Object(k.s)("$__template",1),": ").concat(r.cards[e.cardId].name),icon:_&&_.icon?_.icon:"help",iconTitle:"$__".concat(r.cards[e.cardId].type),color:Object(k.d)("medium"),fontSize:"16px"}),a.a.createElement("div",null,a.a.createElement(dn,{img:e.toTemplate&&r.cards[e.cardId].image?r.cards[e.cardId].image:null,onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{image:e,file:t}))},placeholder:""}),a.a.createElement(Ce,{error:m&&m.name,helperText:Object(k.s)("$__youMustDefineAName"),label:"".concat(Object(k.s)("$__customName",1)),variant:Object(k.d)("fieldVariant"),name:"name",defaultValue:e.toTemplate&&r.cards[e.cardId].name?"".concat(Object(k.s)("$__template")," - ").concat(r.cards[e.cardId].name):null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{name:e.target.value})),m&&m.name&&g(Object(d.a)(Object(d.a)({},m),{},{name:!1}))}},placeholder:Object(k.s)(e.toTemplate?"$__templateName_placeholder":"$__planName_placeholder",1)}),a.a.createElement(Ce,{label:"".concat(Object(k.s)("$__customDescription",1)),variant:Object(k.d)("fieldVariant"),name:"description",defaultValue:e.toTemplate&&r.cards[e.cardId].description?r.cards[e.cardId].description:null,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{icon:"toc"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{description:e.target.value}))}},placeholder:Object(k.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){O(),e.stopPropagation()}},a.a.createElement(Be,{text:Object(k.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(Be,{text:Object(k.s)("$__cancel","*"),icon:"close",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:e.onComplete?function(){e.onComplete()}:null})))})));function mn(){mn=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var gn=Object(R.a)(Jr),bn=w.default.div(fn||(fn=Object(u.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(k.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(k.d)("menu")," !important;"):""})),vn=Object(s.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(I.b)(C,e)}))((function e(t){var r,o,l,s,u,m,g,b=gn(),v=c.a.getState(),y=v.db,x=v.session,O=t.data,w=a.a.useState(!1),j=Object(h.a)(w,2),S=j[0],L=j[1],C=a.a.useState(t.cardsExpanded),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!1),N=Object(h.a)(D,2),P=N[0],A=N[1],$=a.a.useState(!1),z=Object(h.a)($,2),M=z[0],Y=z[1],B=a.a.useState(!1),R=Object(h.a)(B,2),G=R[0],H=R[1],W=a.a.useState(t.cardColorPicker?Object(yt.s)(O):{}),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(!1),J=Object(h.a)(X,2),K=J[0],Z=J[1],Q=Object(n.useRef)({});Object(n.useEffect)((function(){if(Q.current&&t.onResize){var e=Q.current.clientHeight;t.separator&&(e+=55),t.onResize(e,S),Q&&Q.current&&Q.current.addEventListener("DOMNodeInserted",(function(){var e=Q.current.clientHeight;t.separator&&(e+=55),t.onResize(e,S)}))}return function(){Q&&Q.current&&Q.current.event&&Q.current.removeEventListener("DOMNodeInserted")}}),[Q,S,t.manualExpanded,K]),Object(n.useEffect)((function(){var e,r;(null===t||void 0===t||null===(e=t.snapshot)||void 0===e?void 0:e.combineTargetFor)&&Z(!0),!(null===t||void 0===t||null===(r=t.snapshot)||void 0===r?void 0:r.combineTargetFor)&&K&&Z(!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)&&G&&H(!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 ee=window.location.hash.split("/");if(ee[0]=ee[0].replace("#",""),a.a.useEffect((function(){var e=!0;return e&&t.cardColorPicker&&ee&&"overview"===ee[1]&&(q(Object(yt.s)(O)),e=!1),function(){e=!1}}),[t.cards]),O==={}||!O)return a.a.createElement(a.a.Fragment,null);var te=Object(k.j)(),re=Object(yt.u)(O._id);if(!O||!t.data||!t.data._id)return null;var ne=!!(Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&!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})).length>0&&ee&&ee[1]&&"matrix"===ee[1]&&"swot"===y.dataType.filter((function(e){return e.name===O.type}))[0].module),ae=function(){var e=Object(p.a)(mn().mark((function e(){var r,n,a;return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ne){e.next=3;break}return oe(),e.abrupt("return");case 3:r={},Object.keys(y.cards).filter((function(e){return y.cards[e]&&!y.cards[e].deleted&&(y.cards[e]._planId===ee[0]||y.cards[e]._parent===ee[0])})).map((function(e){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,y.cards[e]))})),n=Object(d.a)({},c.a.getState().db.cards),a=!O._selected,"swot"!==y.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==O._id&&r[e].type&&r[e].type===O.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),O.type.indexOf("guideline")>-1&&Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),O.type.indexOf("objective")>-1&&Object.keys(r).filter((function(e){return"goal"===r[e].type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)(Object(d.a)({},n),r),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),r[O._id]),{},{_selected:a})))})),"swot"===c.a.getState().db.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object(yt.I)(t),a&&"matrix"===c.a.getState().db.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object(yt.J)(t,O._id);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=Object(p.a)(mn().mark((function e(){var r,n,a;return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(y.cards).filter((function(e){return y.cards[e]&&!y.cards[e].deleted&&(y.cards[e]._planId===ee[0]||y.cards[e]._parent===ee[0])})).map((function(e){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,y.cards[e]))})),n=Object(d.a)({},c.a.getState().db.cards),a=!O._selected,"swot"!==y.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==O._id&&r[e].type&&r[e].type===O.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),O.type.indexOf("guideline")>-1?Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):O.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)})):O.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(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)(Object(d.a)({},n),r),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),r[O._id]),{},{_selected:a})))}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=Object(p.a)(mn().mark((function e(){var r,n=arguments;return mn().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(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:t.db,id:O._id,module:"cardEdit",activeModule:r,data:O}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=Object(p.a)(mn().mark((function e(){var r,n,a=arguments;return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],O._hasStep&&!r&&br(Object(d.a)(Object(d.a)({},t),{},{nodeId:O._id})),O._hasStep&&!r){e.next=7;break}return e.next=5,kt.a.post("/Card_Count",{id:O._id});case 5:n=e.sent,parseInt(n.data)>0?Object(k.c)({message:Object(k.s)("$__concludeWithChildrensNotConcludedConfirm",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(k.s)("$__concludeAll"),text:Object(k.s)("$__concludeAll"),color:"green",icon:"close",size:"25px",onClick:function(){Object(yt.Q)(Object(d.a)(Object(d.a)({},t),{},{data:{_id:O._id}}),{status:"completed"===O.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object(yt.f)(t,O._id,"completed"===O.status?"inProgress":"completed")},style:{marginLeft:15}},{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"red",icon:"close",size:"25px",onClick:function(){},style:{marginLeft:15}}],variant:"warning",persist:!1,horizontal:"right"}):(Object(yt.Q)(Object(d.a)(Object(d.a)({},t),{},{data:{_id:O._id}}),{status:"completed"===O.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&Object(yt.f)(t,O._id,"completed"===O.status?"inProgress":"completed"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=Object(p.a)(mn().mark((function e(t){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(re)>2||te.owner||te.plan&&(te.planAdmin||te.planModerate)?i.a.push("sp#".concat(t,"/dashboard")):ie("timeline");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.p)(t,{_id:O._id},!1),t.directDeletion||t.reduxFunction("ASYNC","CLEAR_MODULE")}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.G)(t,{_id:O._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),de=!t.noExpanded&&(S||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||O._expanded||t.cardsExpanded)),pe=!!(te&&(te.owner||te.plan&&(te.planAdmin||te.planModerate))||re>2),fe={button:!1,date:null};if(fe=O&&O._users&&Object.keys(O._users).filter((function(e){return e===x._id})).length>0&&y.dataType.filter((function(e){return e.name===O.type})).length>0&&y.dataType.filter((function(e){return e.name===O.type}))[0].modules.indexOf("myDay")>-1?O._users[Object.keys(O._users).filter((function(e){return e===x._id}))[0]].myDay?{button:!0,date:O._users[Object.keys(O._users).filter((function(e){return e===x._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},O&&O.private&&(!O._users||O._users&&!O._users[x._id]))return a.a.createElement(a.a.Fragment,null);if(P)return a.a.createElement(hn,{cardId:O._id,toTemplate:!O.isTemplate,onComplete:function(){A(!1)}});var he={title:(null===O||void 0===O?void 0:O.name)||Object(k.s)("$__new",1),icon:(null===O||void 0===O?void 0:O.icon)||O.type&&y&&y.dataType&&y.dataType.filter((function(e){return e.name===O.type}))[0]&&y.dataType.filter((function(e){return e.name===O.type}))[0].icon||"$__topic",iconTitle:"$__".concat(O.type)};if(O._planId&&(null===(o=c.a.getState().db.cards[O._planId])||void 0===o?void 0:o.customColumns)&&(O.type.indexOf("guideline")>-1||O.type.indexOf("objective")||O.type.indexOf("goal"))){var me=JSON.parse(c.a.getState().db.cards[O._planId].customColumns),ge=O.type.indexOf("guideline")>-1?"guideline":O.type;me["".concat(ge,"s")]&&(he=Object(d.a)(Object(d.a)(Object(d.a)({},he),me["".concat(ge,"s")].name?{iconTitle:me["".concat(ge,"s")].name}:{}),me["".concat(ge,"s")].icon?{icon:me["".concat(ge,"s")].icon}:{}))}return a.a.createElement(bn,{ref:Q,separator:t.separator||!1,plan:!(!de||"plan"!==O.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:O.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===O.type||!t.inLine),className:t.noShadow?b.containerNoShadow:b.container,selectable:t.showSelected,selected:O._selected,priority:O.priority&&y.priority.filter((function(e){return String(e.value)===String(O.priority)})).length>0?y.priority.filter((function(e){return String(e.value)===String(O.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){Y(!0)},onMouseLeave:function(){setTimeout((function(){Y(!1)}),100)},onClick:function(e){t.disabled||(t.selectable||!t.onClick&&(!t.locked&&t.showSelected&&ne||t.selectable)?ae():!t.onClick||t.selectable||t.locked?t.locked||t.onlyOption||"plan"!==O.type?t.locked||ie():le(O._id):t.onClick(),t.onOpen&&t.onOpen())},onContextMenu:function(e){}},("completed"===O.status||t.cardColorPicker&&V.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&&V.color?V.color:"rgba(0,0,0,1)",opacity:V.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(k.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(k.s)("$__dropHereToLink")),a.a.createElement(mt,{private:!(!O.private&&!O.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r})),H(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:he.title,tooltipText:"".concat(O._parent&&c.a.getState().db.cards[O._parent]?"".concat(c.a.getState().db.cards[O._parent].name," / "):"").concat(he.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:he.icon,iconTitle:he.iconTitle,color:"#6d6d6d",editable:!(O.name||t.onlyOption&&!t.editable),_id:O._id,locked:!("link"!==O.type&&!t.locked),colorPicker:pe&&t.cardColorPicker&&V&&!V.parent?function(e){(!V.color&&e||V.color&&V.color!==e)&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),{},{color:e})))}))}:null,onEdit:"completed"!==O.status&&re&&parseInt(re)>1||te&&te.plan&&(te.owner||te.planAdmin||te.planEdit||te.planModerate)?function(e){t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),{},{name:e})))}))}:null,moreButton:M,options:O.deleted?[{name:Object(k.s)("$__restoreThis",1),icon:"restore_from_trash",onClick:function(){ue()},show:"hover",color:Object(k.d)("medium")}]:t.onlyOption||t.showSelected||t.locked?[]:[Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&"step"===c.a.getState().db.cards[e].type&&c.a.getState().db.cards[e]._parent===O._id})).length>0&&{name:"$__openTaskList",icon:"schema",show:"fixed",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:O._id}))}},O.url&&{name:"$__openLinkinNewTab",icon:"launch",onClick:function(){window.open(O.url,"_blank")}},!O.archived&&"completed"!==O.status&&fe&&fe.button&&{name:_()(new Date(1e3*fe.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",icon:_()(new Date(1e3*fe.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",color:_()(new Date(1e3*fe.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"red":"lightblue",show:"hover",onClick:function(){var e=!(fe&&fe.date&&(!fe||!fe.date||_()(new Date(1e3*fe.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")));Object(yt.L)(t,{_id:O._id,userId:x._id,option:e}),t.myDayClick&&t.myDayClick()}},t.suggestion&&{name:"$__removeFromMyDaySuggestions",icon:"playlist_remove",show:"hover",onClick:function(){Object(yt.L)(t,{_id:O._id,userId:x._id,option:!1,noLog:!0}),t.myDayClick&&t.myDayClick()}},!O.archived&&!t.onlyOption&&(re&&parseInt(re)>1||te.owner||te.planAdmin||te.planEdit||te.planModerate)&&{name:"$__edit",icon:"edit",onClick:function(){t.onAction&&t.onAction(),ie()},show:"hover"},!O.archived&&!O.isTemplate&&O._users&&"completed"!==O.status&&O._users[x._id]&&(!O._kpiTimer||0===Object.keys(O._kpiTimer).length||O._kpiTimer&&Object.keys(O._kpiTimer).length>0&&0===Object.keys(O._kpiTimer).filter((function(e){return x&&x._id&&e&&O._kpiTimer[e]&&O._kpiTimer[e].userId&&O._kpiTimer[e].userId===x._id})).length)&&{name:"$__timerStart",icon:"play_circle_outline",color:"blue",show:"hover",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmStartTimer",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.x)(t,O._id),!(fe&&fe.date&&(!fe||!fe.date||_()(new Date(1e3*fe.date)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")))&&Object(yt.L)(t,{_id:O._id,userId:x._id,option:!0}),t.myDayClick&&t.myDayClick()}})}},O._users&&"completed"!==O.status&&O._users[x._id]&&O._hasStep&&{name:"$__completeStep",icon:"playlist_add_check",color:"#6ab6c2",show:"hover",onClick:function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ce();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},O._users&&"completed"!==O.status&&O._users[x._id]&&{name:"$__complete",icon:"check_circle",color:"green",show:"hover",onClick:function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ce(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!O.archived&&!t.onlyOption&&(t.selectOption||t.viewButton)&&{name:O._selected?"$__removeSelection":"$__selectThis",icon:O._selected?"visibility_off":"visibility",hide:!0,onClick:function(){ae()}},{name:"$__duplicate",icon:"content_copy",onClick:function(){t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:O._id}))}},!O.isTemplate&&"plan"===O.type&&{name:"$__copyToTemplates",icon:"copy_all",onClick:function(){A(!0)}},O&&!O.isTemplate&&"plan"===O.type&&!O.archived&&(O._users&&O._users[x._id]&&O._users[x._id].access&&5===parseInt(O._users[x._id].access)||te&&te.planAdmin)&&{name:Object(k.s)("$__shelve"),icon:"archive",onClick:function(){Object(yt.O)(t,{_id:O._id,archived:!0})}},(re&&5===parseInt(re)||te.owner||te.planAdmin||te.planEdit)&&!t.disableDelete&&{name:"$__delete",icon:"delete_forever",color:"red",onClick:function(){t.directDeletion||O.archived||0===y.dataType.filter((function(e){return e.name===O.type})).length||y.dataType.filter((function(e){return e.name===O.type})).length>0&&"swot"===y.dataType.filter((function(e){return e.name===O.type}))[0].module?se():ie("delete"),t.onAction&&t.onAction()},show:"hover"},O&&!O.isTemplate&&"plan"===O.type&&O.archived&&(O._users&&O._users[x._id]&&O._users[x._id].access&&parseInt(5===O._users[x._id])||te&&te.planAdmin)&&{name:Object(k.s)("$__unarchive"),icon:"archive",onClick:function(){Object(yt.O)(t,{_id:O._id,archived:null})}},!O.archived&&!O.isTemplate&&{name:O._isFavorite?"$__removeFromFavorite":"$__addToFavorite",icon:O._isFavorite?"favorite":"favorite_border",color:Object(k.d)("medium"),onClick:function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.g)(t,O._id,!!O._isFavorite),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),{},{_isFavorite:!O._isFavorite})))}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},!O.isTemplate&&!O.archived&&(t.my||t.showCompleteOption)&&{name:"$__completed"!==O.status?"$__markasdone":"$__concluded",icon:"check_circle_outline",color:"completed"!==O.status?"lightgray":"green",onClick:function(){var e=Object(p.a)(mn().mark((function e(){return mn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ce();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],isExpanded:!t.noExpanded&&de,noExpanding:t.expanded||c.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!de),t.expanded||c.a.getState().db.cardsExpanded||L((function(e){return!e}))},onClick:function(e){}}),O&&(O._cardCode||O.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},O&&O._cardCode&&(!de||de&&!O.image)?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",O._cardCode):a.a.createElement(a.a.Fragment,null),O&&O.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",O.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===O.type||"link"===O.type)&&O._createdBy&&y.users[O._createdBy._id]||O._createdBy&&O._createdBy.channel&&O._createdBy._id&&O._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(Ne.a,{title:O._createdBy.name||y.users[O._createdBy._id].name},a.a.createElement(Re.a,{alt:O._createdBy.name||y.users[O._createdBy._id].name,src:(null===(l=y.users[O._createdBy._id])||void 0===l?void 0:l.image)||null,size:"12px",style:{width:16,height:16}},(null===(s=O._createdBy)||void 0===s||null===(u=s.name)||void 0===u?void 0:u.substr(0,1))||y.users[O._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(k.d)("menu"),fontWeight:"bold"}},a.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(k.s)("$__createdBy","*")),": ",(null===(m=O._createdBy)||void 0===m||null===(g=m.name)||void 0===g?void 0:g.split(" ")[0])||y.users[O._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*O.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))),O._kpiTimer&&Object.keys(O._kpiTimer).length>0&&0!==Object.keys(O._kpiTimer).filter((function(e){return O._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(ar,{data:O})),!t.noExpanded&&de&&(!O.private||O.private&&(G||c.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(rn,Object.assign({},t,{private:!!O.private,expanded:!0,Resume:!0})),a.a.createElement("div",null,t.searchText&&O.description&&a.a.createElement("div",{className:b.description},Object(k.b)(O.description,t.searchText)))):de?a.a.createElement(a.a.Fragment,null,a.a.createElement(ir,null)):a.a.createElement(a.a.Fragment,null),O.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",null,"completed"!==O.status&&(O.startDate&&_()(O.startDate).isValid()||O.endDate&&_()(O.endDate).isValid())?a.a.createElement("div",null,a.a.createElement("div",{className:O.endDate&&_()(new Date(1e3*O.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<_()().format("YYYY-MM-DD")&&"completed"!==O.status?b.lateDates:b.dates},O.startDate&&_()(O.startDate).isValid()&&a.a.createElement("div",{className:b.dateInfo},a.a.createElement(ze.a,{overlap:"rectangular",className:b.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*O.startDate)instanceof Date&&!isNaN(new Date(1e3*O.startDate))?_()(new Date(1e3*O.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(O.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),O.endDate&&_()(O.endDate).isValid()?a.a.createElement("div",{className:b.dateInfo},a.a.createElement(ze.a,{overlap:"rectangular",className:b.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*O.endDate)instanceof Date&&!isNaN(new Date(1e3*O.endDate))?_()(new Date(1e3*O.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)),O._tags&&O._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:t.showTags||de?{marginBottom:33}:{}},a.a.createElement(qe.a,{options:O._tags,expanded:!!(t.showTags||de&&"plan"!==O.type&&"link"!==O.type&&"insight"!==O.type)})):a.a.createElement(a.a.Fragment,null),O._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(ze.a,{overlap:"rectangular",className:b.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(k.s)("$__recurrence")).concat(O.recurrenceCreatedDate?": ".concat(_()(O.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(k.s)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",data:y.cards[O._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),O.recurrenceCreatedDate?_()(O.recurrenceCreatedDate).format("DD/MM/YYYY"):""),de||O._users&&Object.keys(O._users).filter((function(e){return null!==String(e)})).length>0&&(!O._users[x._id]||O._users[x._id]&&Object.keys(O._users).length>1)?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:de?37:7}},a.a.createElement("div",{className:b.usersContent},a.a.createElement("div",{className:b.users},a.a.createElement(gt,{_id:O._id,data:O,permission:pe,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),O.isTemplate&&a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(k.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),A(!0)}},a.a.createElement(Be,{text:Object(k.s)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),!M&&"completed"===O.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(k.s)("$__completeDate"),":",Object(k.k)(O.completed_at||O.updated_at))),"plan"!==O.type&&O.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(E.a,{title:Object(k.s)("$__restoreThis",1),text:Object(k.s)("$__restoreThis",1),color:"#FFFFFF",icon:"restore_from_trash",onClick:function(){ue()},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"}}))})),yn=Object(me.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}}}}))(Je.a),xn=Object(me.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}}}}))(Je.a),_n=Object(R.a)((function(e){return{root:{display:"flex","& > *":{margin:e.spacing(1)}}}}));var On=Object(s.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(I.b)(C,e)}))((function(e){var t=_n(),r=a.a.useState(e.status),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(e.userId),l=Object(h.a)(c,2);return l[0],l[1],a.a.useEffect((function(){return e.status!==o&&i(e.status),function(){}}),[e.status]),a.a.createElement("div",{className:t.root},e.status&&"online"!==e.status?a.a.createElement(xn,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children):a.a.createElement(yn,{overlap:"circular",anchorOrigin:e.anchorOrigin?e.anchorOrigin:{vertical:"bottom",horizontal:"left"},variant:e.status?"dot":"standard"},e.children))})),wn=r(1946),jn=["children","className"],En=Object(R.a)({grid:{margin:"0",width:"100%"}});function kn(e){var t=En(),r=e.children,n=e.className,o=Object(V.a)(e,jn);return a.a.createElement(wn.a,Object.assign({container:!0},o,{className:t.grid+" "+n}),r)}var Sn=["children","className"],Ln=Object(R.a)({grid:{padding:"0 15px !important"}});function Cn(e){var t=Ln(),r=e.children,n=e.className,o=Object(V.a)(e,Sn);return a.a.createElement(wn.a,Object.assign({item:!0},o,{className:t.grid+" "+n}),r)}var In=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:X.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:X.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(k.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.b)+", 0.4)"},info:{backgroundColor:X.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.4)"},success:{backgroundColor:X.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.4)"},danger:{backgroundColor:X.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.4)"},warning:{backgroundColor:X.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.4)"},primary:{backgroundColor:X.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.b)+", 0.87)",background:Object(k.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.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(k.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(f.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(k.d)("color")},progressBar:{backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.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"}}}},Tn=r(641),Fn=r.n(Tn),Dn=r(642),Nn=r.n(Dn),Pn=r(643),An=r.n(Pn),$n=r(1092),zn=r.n($n),Mn=r(644),Yn=r.n(Mn),Bn=r(1947),Rn=function(e){return{popperClose:{pointerEvents:"none",display:"none !important"},popperNav:Object(f.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:X.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(X.r)(X.b)+", 0.26)",top:"100%",zIndex:"1000",minWidth:"160px",padding:"5px 0",margin:"2px 0 0",fontSize:"12px",textAlign:"left",listStyle:"none",backgroundColor:X.O,backgroundClip:"padding-box"},menuList:{padding:"0"},popperResponsive:Object(f.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(d.a)(Object(d.a)({},X.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:X.q[7],whiteSpace:"nowrap",minHeight:"unset"}),darkHover:{"&:hover":{boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.q[16])+", 0.4)",backgroundColor:X.q[16],color:X.O}},primaryHover:{"&:hover":Object(d.a)({backgroundColor:X.z[0],color:X.O},X.x)},infoHover:{"&:hover":Object(d.a)({backgroundColor:X.u[0],color:X.O},X.s)},successHover:{"&:hover":Object(d.a)({backgroundColor:X.G[0],color:X.O},X.E)},warningHover:{"&:hover":Object(d.a)({backgroundColor:X.N[0],color:X.O},X.L)},dangerHover:{"&:hover":Object(d.a)({backgroundColor:X.j[0],color:X.O},X.h)},roseHover:{"&:hover":Object(d.a)({backgroundColor:X.D[0],color:X.O},X.B)},dropdownItemRTL:{textAlign:"right"},dropdownDividerItem:{margin:"5px 0",backgroundColor:"rgba("+Object(X.r)(X.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:X.q[1],whiteSpace:"nowrap",fontWeight:"inherit",marginTop:"10px",minHeight:"unset","&:hover,&:focus":{backgroundColor:"transparent",cursor:"auto"}},noLiPadding:{padding:"0"}}},Gn=Object(R.a)(Rn);function Hn(e){var t,r,n,o=a.a.useState(null),i=Object(h.a)(o,2),c=i[0],l=i[1],s=Gn(),u=function(e){c.contains(e.target)||l(null)},d=function(t){l(null),e&&e.onClick&&e.onClick(t)},p=e.buttonText,m=e.buttonIcon,g=e.dropdownList,b=e.buttonProps,v=e.dropup,x=e.dropdownHeader,_=e.caret,O=e.hoverColor,w=e.dropPlacement,j=e.rtlActive,E=e.noLiPadding,k=e.innerDropDown,S=e.navDropdown,L=y()((t={},Object(f.a)(t,s.caret,!0),Object(f.a)(t,s.caretDropup,v&&!c),Object(f.a)(t,s.caretActive,Boolean(c)&&!v),Object(f.a)(t,s.caretRTL,j),t)),C=y()((r={},Object(f.a)(r,s.dropdownItem,!0),Object(f.a)(r,s[O+"Hover"],!0),Object(f.a)(r,s.noLiPadding,E),Object(f.a)(r,s.dropdownItemRTL,j),r)),I=a.a.createElement(et.a,{role:"menu",className:s.menuList},void 0!==x?a.a.createElement(Qe.a,{onClick:function(){return d(x)},className:s.dropdownHeader},x):null,g.map((function(e,t){return e.divider?a.a.createElement(Bn.a,{key:t,onClick:function(){return d("divider")},className:s.dropdownDividerItem}):void 0!==e.props&&"multi"===e.props["data-ref"]?a.a.createElement(Qe.a,{key:t,className:C,style:{overflow:"visible",padding:0}},e):a.a.createElement(Qe.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(Q,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!==m?a.a.createElement(e.buttonIcon,{className:s.buttonIcon}):null,void 0!==p?p:null,_?a.a.createElement("b",{className:L}):null)),a.a.createElement(rt.a,{open:Boolean(c),anchorEl:c,transition:!0,disablePortal:!0,placement:w,className:y()((n={},Object(f.a)(n,s.popperClose,!c),Object(f.a)(n,s.popperResponsive,!0),Object(f.a)(n,s.popperNav,Boolean(c)&&S),n))},(function(){return a.a.createElement(Ze.a,{in:Boolean(c),id:"menu-list",style:v?{transformOrigin:"0 100% 0"}:{transformOrigin:"0 0 0"}},a.a.createElement(tt.a,{className:s.dropdown},k?I:a.a.createElement(Ke.a,{onClickAway:u},I)))})))}Hn.defaultProps={caret:!0,dropup:!1,hoverColor:"primary"};Fn.a,Nn.a,An.a,Yn.a,Fn.a,Nn.a,An.a,Yn.a;var Wn=[{inverted:!0,badgeColor:"danger",badgeIcon:Fn.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:Nn.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:An.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(Hn,{buttonIcon:Yn.a,buttonProps:{round:!0,style:{marginBottom:"0"},color:"info"},dropdownList:["Action","Another action","Something else here",{divider:!0},"Separated link"]})},{badgeColor:"warning",badgeIcon:zn.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")}],Un=new Date,Vn=Un.getFullYear(),qn=Un.getMonth(),Xn=Un.getDate(),Jn=(new Date(Vn,qn,1),new Date(Vn,qn,1),new Date(Vn,qn,Xn-1,10,30),new Date(Vn,qn,Xn-1,11,30),new Date(Vn,qn,Xn+7,12,0),new Date(Vn,qn,Xn+7,14,0),new Date(Vn,qn,Xn-2),new Date(Vn,qn,Xn-2),new Date(Vn,qn,Xn+1,19,0),new Date(Vn,qn,Xn+1,22,30),new Date(Vn,qn,21),new Date(Vn,qn,22),new Date(Vn,qn,21),new Date(Vn,qn,22),Object(R.a)(In)),Kn=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t,r=Jn(),o=c.a.getState(),i=o.db,l=o.session,s=o.functions,u=o.timeline,p=s.socket,m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState(null),S=Object(h.a)(j,2),L=S[0],C=S[1],I=a.a.useState(null),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState(!1),B=Object(h.a)(z,2),R=B[0],G=B[1],H=a.a.useState(null),W=Object(h.a)(H,2),U=W[0],V=W[1],q=e.storie,X=Object(n.useRef)(),J=Object(n.useRef)(),K=setTimeout((function(){}),1e4);Object(n.useEffect)((function(){return X.current={mounted:!0},function(){X&&X.current&&X.current.mounted&&(X.current.mounted=!1)}}),[]),Object(n.useEffect)((function(){return Z(),function(){clearTimeout(K)}}),[J]),Object(n.useLayoutEffect)((function(){return Z(),function(){clearTimeout(K)}}),[J]);var Z=function(){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&J.current&&e.onResize&&J.current.clientHeight&&(clearTimeout(K),e.onResize(J.current.clientHeight),K=setTimeout((function(){e.onResize(J.current.clientHeight)}),100))},Q=null;if(q&&q._parent&&i.cards[q._parent]?q._parent:q&&q.idRel&&i.cards[q.idRel]&&q.idRel,q.filesCount&&q.filesCount>0&&Wn.user&&Wn.user._id&&Wn.user._id!==l._id&&(!Wn.files||Wn.files&&Wn.files.length<q.filesCount))return a.a.createElement(a.a.Fragment,null);var ee=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&(w(!0),t&&clearTimeout(Q))},te=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&(Q=setTimeout((function(){w(!1)}),t))},re=function(t){var r=e.storie.idRel?e.storie.idRel:e.storie._parent?e.storie._parent:e.nodeId?e.nodeId:null,n={chatId:c.a.getState().chat.id,react:t,user:l._id,db:e.db,nodeId:r,message:e.storie._id};Ar(e,n),p.emit("data",{module:"timeline",method:"post",action:"interact"},n)};if(!q)return null;var ne="";"timer"===q.type&&String(q.ini)&&String(q.fin)&&(ne=q.fin-q.ini);var ae=null;q.urlPreview&&(ae=JSON.parse(q.urlPreview));var oe,ie=Object(k.s)(function(e,t){var r,n,a=c.a.getState().db;if(t&&t._parent&&a.cards[t._parent]?r=t._parent:t&&t.idRel&&a.cards[t.idRel]&&(r=t.idRel),n=e,e){var o=e.split("@[");o.length>0&&o.map((function(e){if(e){var t="@[".concat(e.split(")")[0],")"),o=e.split("](")[1];if(o)if((o=o.split(")")[0])&&36===o.length&&a.cards[r]&&a.cards[r]._users&&a.cards[r]._users[o]){var i=a.cards[r]._users&&a.cards[r]._users[o]&&a.cards[r]._users[o].name||a.cards[r]._users&&a.cards[r]._users[o]&&a.cards[r]._users[o].name?a.cards[r]._users[o].name:e.split("](")[0];n=n.replace(t,'<span style="color:'.concat(Object(k.d)("menu"),'"><b>').concat(i,"</b></span>"))}else if(o&&36===o.length&&a.users[o]){var c=a.users[o]&&a.users[o].name?a.users[o].name:e.split("](")[0];n=n.replace(t,'<span style="color:'.concat(Object(k.d)("menu"),'"><b>').concat(c,"</b></span>"))}else{var l=e.split("](")[0];n=n.replace(t,'<span style="color:'.concat(Object(k.d)("menu"),'"><b>').concat(l,"</b></span>"))}}return!0}))}return n}(q.message,q));q._reactions&&Object.keys(q._reactions).length>0&&Object.keys(q._reactions).map((function(e){Object.keys(q._reactions[e]).length>0&&Object.keys(q._reactions[e]).map((function(t){t===l._id&&(oe=e)}))}));var ce=!1;e.storie&&e.storie.user&&e.storie.user._id===l._id&&(ce=!0);var se=function(){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&Object(k.c)({message:Object(k.s)("$__confirmCancel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Yr(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&&!c.a.getState().db.cards[q.cardId])return a.a.createElement(a.a.Fragment,null);if(q.deleted&&q.user._id!==l._id)return a.a.createElement(a.a.Fragment,null);var ue=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(d.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(Ne.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(le.a,{icon:o,size:"50px"}),"img"===c&&"string"===typeof o&&o.indexOf("https")>-1&&-1===o.indexOf("svg")&&a.a.createElement("img",{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)>_()().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(le.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",{src:o,style:{width:"100%",height:"100%"}}),"img"===c&&o&&o.indexOf(".svg")>-1?a.a.createElement("img",{src:ve.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(pe.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(d.a)(Object(d.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(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(88% - 15px)",float:ce?"right":"left"},ce?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"auto",minWidth:"303px",marginBottom:"20px"}),onMouseLeave:function(){te(1e3)},onMouseOver:function(){e.isReply||ee(!0)},onClick:function(){e.isReply||ee(!0)}},e.showUserName&&!ce&&a.a.createElement("div",{style:{position:"relative",width:"100%",fontWeight:"bold",fontSize:"12px",color:Object(k.d)("menu")}},q.user.name?q.user.name:q.user.fullName),a.a.createElement("div",{style:Object(d.a)({position:"relative",float:ce?"right":"left",padding:"7px 15px",width:"100%",background:ce?"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===l._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(k.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),_()().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(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ce?"right":"left"},ce?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ce?"flex-end":"none",flexWrap:"wrap"})},Object.keys(q.files).map((function(e,t){return ue(q.files[e])}))):q.files&&q.files.length>0?a.a.createElement("div",{className:"files",style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"calc(100% - 15px)",float:ce?"right":"left"},ce?{marginRight:"15px"}:{marginLeft:"15px"}),{},{width:"100%",display:"flex",justifyContent:ce?"flex-end":"none",flexWrap:"wrap"})},q.files.map((function(e,t){return ue(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[l._id]&&u[l._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(Kn,{isReply:!0,storie:u[e.nodeId]&&u[e.nodeId][e.storie.reply]?u[e.nodeId][e.storie.reply]:u[l._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(k.s)("$__removed","*"),"*"):function(){if("comment"===q.type&&q.message)return a.a.createElement("div",null,q.urlPreview&&ae.img&&ae.title&&ae.contentSnippet?a.a.createElement(kn,{style:{marginBottom:15}},!b&&ae.img&&a.a.createElement(Cn,{xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement("img",{style:{width:"-webkit-fill-available"},src:"".concat(ae.img),onError:function(e){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&v(!0)},alt:ae.title||ae.link})),a.a.createElement(Cn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(k.d)("menu"),fontWeight:"bold"}},ae.title),ae.site&&a.a.createElement("div",{style:{fontSize:"12px"}},ae.site),ae.contentSnippet&&a.a.createElement("div",{style:{fontSize:"12px",color:"gray"}},ae.contentSnippet),a.a.createElement("a",{style:{marginTop:"15px",fontWeight:"bold",fontSize:"12px"},href:ae.link,target:"_blank"},Object(k.s)("$__openLink","*")))):a.a.createElement(a.a.Fragment,null),a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},Object(k.b)(Object(k.o)(ie),e.searchText)),a.a.createElement("div",{style:{clear:"both"}}));if("comment"===q.type&&!q.message&&q.cardId!==e.nodeId&&c.a.getState().db.cards[q.cardId])return a.a.createElement(vn,{db:"cards",data:c.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(le.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.message.indexOf("$__")>-1?Object(k.s)(q.message,1):q.message," "),a.a.createElement("ul",{style:{listStyle:"decimal"}},n.filter((function(e){return c.a.getState().db.cards[e]})).map((function(e){return a.a.createElement("li",null,c.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(le.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.message.indexOf("$__")>-1?Object(k.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(k.s)("$__icon",1),":",a.a.createElement(le.a,{icon:t[r],color:Object(k.d)("color"),size:"17px"}));if("customColumns"===r){var o=JSON.parse(t[r]);return a.a.createElement("li",{key:n},Object(k.s)("$__customColumns",1),":",a.a.createElement("ul",null,Object.keys(o).map((function(e,t){return a.a.createElement("li",{key:t},Object(k.s)("$__".concat(e)),"=>"," ",a.a.createElement("span",{style:{color:Object(k.d)("menu"),fontWeight:"bold"}},Object(k.s)("".concat(o[e].name))))}))))}if("_id"===r||"id"===r||"client"===r||"planId"===r||"_parent"===r||"owner"===r||"image"===r);else{if("status"===r)return a.a.createElement("li",{key:n},Object(k.s)("$__status",1),": ",Object(k.s)("$__".concat(t[r]),1));if("note"===r)return a.a.createElement("li",{key:n},Object(k.s)("$__note",1),": ",a.a.createElement("div",null,Object(k.b)(Object(k.o)(t[r]),e.searchText)));if("kpi_type"===r||"priority"===r||"risk"===r||"complexity"===r||"impact"===r)return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",Object(k.s)("$__".concat(t[r]),1));if("name"===r||"description"===r)return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",t[r]);if("url"===r)return a.a.createElement("li",{key:n},"url",":",a.a.createElement("a",{href:t[r],target:"blank",style:{}},Object(k.b)(Object(k.o)(t[r]),e.searchText)));if("_tags"!==r&&"string"===typeof t[r]&&"kpi_ini"!==r&&"kpi_fin"!==r&&"startDate"!==r&&"endDate"!==r&&"updated_at"!==r&&"created_at"!==r&&"content"!==r)return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",t[r].indexOf("$__")>-1?Object(k.s)("$__".concat(t[r]),1):t[r]);if("kpi_ini"===r||"kpi_fin"===r){t.kpi_type?t.kpi_type:i.cards[q.idRel]&&i.cards[q.idRel].kpi_type&&i.cards[q.idRel].kpi_type;return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",Object(k.h)(t[r],q.kpi_type?q.kpi_type:"decimal"))}if("startDate"===r||"endDate"===r||"updated_at"===r||"created_at"===r)return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",t[r]?_()(new Date(1e3*t[r])).tz("America/Sao_Paulo").format("DD/MM/YYYY HH:mm"):Object(k.s)("$__removed"));if("boolean"===typeof t[r])return a.a.createElement("li",{key:n},Object(k.s)("$__".concat(r),1),": ",t[r]?Object(k.s)("$__enable",1):Object(k.s)("$__disable",1));if("_tags"===r)return a.a.createElement("li",{key:n},"TAGS: ",a.a.createElement(qe.a,{options:t[r],showOptions:!0}))}})),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(le.a,{color:"color",icon:"history",style:{marginRight:"10px"}}),q.approval&&q.message.indexOf("$__approved")>-1?a.a.createElement(le.a,{icon:"verified",color:"green"}):q.approval&&q.message.indexOf("$__rejected")>-1?a.a.createElement(le.a,{icon:"gpp_bad",color:"red"}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{wordBreak:"break-word"}},Object(k.b)(Object(k.o)(ie),e.searchText)),a.a.createElement("div",{style:{clear:"both"}})),q.cardId?a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"relative",maxWidth:"285px"},e.boxStyle&&e.boxStyle.maxWidth?{maxWidth:e.boxStyle.maxWidth}:{}),{},{width:"100%",display:"block"})},a.a.createElement(vn,{db:"cards",data:c.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=ne,l="";if(ne<60)l="".concat(o," ").concat(Object(k.s)("$__seconds",1));else if(ne>3600){var s=Math.trunc(o/3600);o-=3600*s;var u=Math.trunc(o/60)>0?Math.trunc(o/60):0,p=(o-=60*u)>0?o:0;l="".concat(s," hora").concat(s>1?"s":""," ").concat(u," ").concat(Object(k.s)("$__minutes",1)," ").concat(p," ").concat(Object(k.s)("$__seconds",1))}else{var f=Math.trunc(o/60)>0?Math.trunc(o/60):0,h=(o-=60*f)>0?o:0;l="".concat(f," ").concat(Object(k.s)("$__minutes",1)," ").concat(h," ").concat(Object(k.s)("$__seconds",1))}return F?a.a.createElement("div",null,a.a.createElement("div",{style:{position:"relative",width:"100%",marginTop:"33px"}},a.a.createElement(Ce,{label:Object(k.s)("$__cancelReason",1),variant:Object(k.d)("standard"),name:"cancelReason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,onChange:function(e){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&C(e.target.value)}},placeholder:Object(k.s)("$__cancelReason_placeholder",1)})),a.a.createElement("div",{style:{position:"absolute",right:"7px",top:"7px",display:"flex"}},a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__cancel","*"),color:Object(k.d)("lightgrey"),icon:"cancel",onClick:function(){var e;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&(D(!1),C(null))},size:"25px"}),a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__save",1),color:"green",icon:"playlist_add_check",onClick:function(){se()},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(wt.a,{max:300,style:{flexWrap:"wrap",display:"inline-flex",border:"none"}},Object.keys(q._toUser).map((function(e){return a.a.createElement(Ne.a,{key:e,title:q._toUser[e].displayName?q._toUser[e].displayName:q._toUser[e].name},a.a.createElement(Re.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(le.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(1e3*q.ini).tz("America/Sao_Paulo").format("DD/MM/YYYY"))):a.a.createElement(a.a.Fragment,null,parseInt(_()(1e3*q.ini).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",icon:"schedule"}),a.a.createElement("div",{className:"text"},_()(1e3*q.ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"))):a.a.createElement(a.a.Fragment,null),parseInt(_()(1e3*q.fin).tz("America/Sao_Paulo").format("YYYY"))>2021?a.a.createElement("div",{className:r.timeInfo},a.a.createElement(le.a,{color:"color",icon:"watch_later"}),a.a.createElement("div",{className:"text"},_()(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(le.a,{color:"color",icon:"hourglass_full"}),a.a.createElement("div",{className:"text"},l)),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(k.d)("menu")}},Object(k.s)("$__cancelled")):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",null,ie),q.deleted&&q.deletedReason&&a.a.createElement("div",{style:{color:"red"}},Object(k.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(at,{transparent:!0,options:[{name:"$__cancelThis",icon:"cancel",onClick:function(){var e;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&D(!0)},show:"hover"}]}),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement("div",{style:{clear:"both"}}))}if("kpi"===q.type){var m=q&&q.balance?q.balance:0;return a.a.createElement("div",null,q.cardId?a.a.createElement(vn,{db:"cards",data:c.a.getState().db.cards[q.cardId],ignoreList:!0,noOptions:!0}):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",null,ie),a.a.createElement("div",{className:parseFloat(q.value)>0?r.valuePositive:r.valueNegative},Object(k.h)(q.value,q.kpi_type?q.kpi_type:"decimal")),!e.stories&&a.a.createElement("div",{className:r.lastValue},Object(k.s)("$__balance",1),": ",Object(k.h)(m,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(d.a)(Object(d.a)({position:"absolute"},ce?{right:"-20px"}:{left:"-20px"}),{},{bottom:0})},a.a.createElement(On,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:q.user._id},a.a.createElement(Re.a,Object.assign({},q.user._id&&!(null===(t=c.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(k.s)("$__deletedUser"),src:null},{alt:q.user.displayName?q.user.displayName:q.user.name,src:"".concat(q.user.image),style:{width:"22px",height:"22px"}})))),a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},ce?{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"})},_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*q.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*q.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*q.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(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(Ne.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(Re.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(_()(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(le.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(Be,{icon:"thumb_up",iconColor:Object(k.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(Re.a,{alt:q._reactions.like[e].name,src:q._reactions.like[e].image||He.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(_()(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(Be,{icon:"thumb_down",iconColor:Object(k.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(Re.a,{alt:q._reactions.nolike[e].name,src:q._reactions.nolike[e].image||He.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(_()(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(Be,{icon:"favorite",iconColor:Object(k.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(Re.a,{alt:q._reactions.love[e].name,src:q._reactions.love[e].image||He.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(_()(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(Be,{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(Re.a,{alt:q._reactions.approve[e].name,src:q._reactions.approve[e].image||He.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(_()(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(Be,{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(Re.a,{alt:q._reactions.attention[e].name,src:q._reactions.attention[e].image||He.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(_()(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"}},O&&!e.noReactions&&!q.deleted&&a.a.createElement("div",{style:{display:"flex",minWidth:"fit-content",justifyContent:"center"},onMouseOver:function(e){ee(!0)},onMouseLeave:te},a.a.createElement(le.a,{icon:oe&&"like"===oe?"thumb_up":"thumb_up_off_alt",iconColor:oe&&"like"===oe?Object(k.d)("menu"):Object(k.d)("medium"),title:Object(k.s)("$__like",1),size:"18px",onClick:function(){re("like")},onMouseLeave:te}),a.a.createElement(le.a,{icon:oe&&"nolike"===oe?"thumb_down":"thumb_down_off_alt",title:Object(k.s)("$__notlike",1),iconColor:oe&&"nolike"===oe?Object(k.d)("menu"):Object(k.d)("medium"),size:"18px",onClick:function(){re("nolike")},onMouseLeave:te}),a.a.createElement(le.a,{icon:oe&&"love"===oe?"favorite":"favorite_border",title:Object(k.s)("$__love",1),iconColor:oe&&"love"===oe?Object(k.d)("menu"):Object(k.d)("medium"),size:"18px",onClick:function(){re("love")},onMouseLeave:te}),a.a.createElement(le.a,{icon:"verified",title:Object(k.s)("$__approve",1),iconColor:oe&&"approve"===oe?"green":Object(k.d)("medium"),size:"18px",onClick:function(){re("approve")},onMouseLeave:te}),a.a.createElement(le.a,{icon:"report_problem",title:Object(k.s)("$__attention",1),iconColor:oe&&"attention"===oe?"red":Object(k.d)("medium"),size:"18px",onClick:function(){re("attention")},onMouseLeave:te}),q&&q.user&&q.user._id===l._id&&a.a.createElement(le.a,{icon:"forward",title:Object(k.s)("$__forwardThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){var e;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&$(!0)},onMouseLeave:te}),a.a.createElement(le.a,{icon:"reply",title:Object(k.s)("$__replyThisMessage",1),iconColor:"deepskyblue",size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts||{}),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts&&c.a.getState().chats.drafts[e.nodeId]?c.a.getState().chats.drafts[e.nodeId]:{}),{},{reply:q._id})))}))},onMouseLeave:te}),!q.deleted&&"comment"===q.type&&q.user&&q.user._id&&q.user._id===l._id&&parseInt(q.created_at)>parseInt(_()().unix("x"))-180?a.a.createElement(E.a,{id:"chat_message_delete",title:Object(k.s)("$__delete","*"),color:"red",icon:"delete_forever",onClick:function(){se()},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"}})),A?a.a.createElement(jt.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:A},a.a.createElement("div",{className:"forwardMessage"},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(mt,{title:Object(k.s)("$__forwardMessage",1),icon:"forward",onCancel:function(){var e;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&$(!1)}})),a.a.createElement("div",{style:{padding:15}},a.a.createElement(Qt,{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){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&V(e)}})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){var e;(null===X||void 0===X||null===(e=X.current)||void 0===e?void 0:e.mounted)&&($(!1),V(null))}}),U&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__forward"),text:Object(k.s)("$__forward"),icon:"forward",size:"25px",load:!!R,onClick:function(){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&G(!0),function(e,t){e&&e.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket;var r=c.a.getState(),n=(r.db,r.session,Object(d.a)(Object(d.a)({},t),{},{forwardedId:t._id,_id:Object(M.a)(),created_at:"".concat(_()().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){$r(e,{comment:Object(d.a)(Object(d.a)({},n),{},{idRel:t}),node:t}),console.log(n),Y.a.post("timeline/add",Object(d.a)(Object(d.a)({},n),{},{idRel:t}))}))}(e,Object(d.a)(Object(d.a)({},q),{},{_forwardToId:U})),setTimeout((function(){var t;(null===X||void 0===X||null===(t=X.current)||void 0===t?void 0:t.mounted)&&($(!1),V(null),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.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"}}))}))),Zn=r(1948),Qn={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(f.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(k.d)("color")}},zIndex:500,bottom:"100%",top:"none",left:"33px",height:"auto",maxHeight:"151px !important",overflow:"auto !important"}},ea=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(f.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(f.a)(t,"color",X.O),Object(f.a)(t,"width","30px"),Object(f.a)(t,"height","30px"),Object(f.a)(t,"lineHeight","25px"),Object(f.a)(t,"fontSize","12px"),Object(f.a)(t,"textAlign","center"),Object(f.a)(t,"position","absolute"),Object(f.a)(t,"bottom","23px"),Object(f.a)(t,"left","50%"),Object(f.a)(t,"marginLeft","-24px"),Object(f.a)(t,"zIndex","1"),Object(f.a)(t,"borderTopRightRadius","50%"),Object(f.a)(t,"borderTopLeftRadius","50%"),Object(f.a)(t,"borderBottomRightRadius","50%"),Object(f.a)(t,"borderBottomLeftRadius","50%"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(k.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.b)+", 0.4)"},info:{backgroundColor:X.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.4)"},success:{backgroundColor:X.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.4)"},danger:{backgroundColor:X.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.4)"},warning:{backgroundColor:X.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.4)"},primary:{backgroundColor:X.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(f.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(f.a)(r,"width","45%"),Object(f.a)(r,"float","left"),Object(f.a)(r,"padding","7px"),Object(f.a)(r,"marginBottom","5px"),Object(f.a)(r,"position","relative"),Object(f.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(X.r)(X.b)+", 0.14)"),Object(f.a)(r,"borderRadius","6px"),Object(f.a)(r,"color","rgba("+Object(X.r)(X.b)+", 0.87)"),Object(f.a)(r,"background",X.O),Object(f.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+X.q[10],borderRight:"0 solid "+X.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(f.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+X.O,borderRight:"0 solid "+X.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(f.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:X.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(k.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(f.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(k.d)("color")},progressBar:{backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.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(d.a)(Object(d.a)({},X.l),{},{"& textarea":Object(d.a)(Object(d.a)({},X.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(f.a)(n,"outline","none"),Object(f.a)(n,"fontSize","0.9rem"),Object(f.a)(n,"color","#7288a3"),Object(f.a)(n,"borderColor"," #3a546f"),Object(f.a)(n,"overflow","hidden"),Object(f.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function ta(){ta=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ra=Object(R.a)(ea),na=Object(s.b)((function(e,t){return{draft:e.chats&&e.chats.drafts?e.chats.drafts[t.nodeId]:{}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(t.functions.socket,a.a.useState("")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState([]),j=Object(h.a)(w,2),S=j[0],L=j[1],C=a.a.useState([]),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState({}),N=Object(h.a)(D,2),P=N[0],A=N[1],$=a.a.useState(null),z=Object(h.a)($,2),R=z[0],G=z[1],H=a.a.useState(null),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(h.a)(q,2),J=X[0],K=X[1],Z=a.a.useState([]),Q=Object(h.a)(Z,2),ee=Q[0],te=Q[1],re=a.a.useState(!1),ne=Object(h.a)(re,2),ae=ne[0],oe=ne[1],ie=a.a.useState(58),ce=Object(h.a)(ie,2),se=ce[0],ue=ce[1],de=ra(),pe=a.a.createRef(),fe=a.a.createRef(),he=Object(k.j)(),me=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}))]&&(me=r.cards[e.nodeId]._users[Object.keys(r.cards[e.nodeId]._users).find((function(e){return e.indexOf(n._id)>-1}))]);var ge=window.location.hash.split("/");ge[0]=ge[0].replace("#",""),a.a.useEffect((function(){var t,r=!0;return r&&(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(){r=!1,s("")}}),[e.nodeId]);var be=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 ve=function(){var e,t=[];if(e=l){var r=e.split("@[");r.length>0&&r.map((function(e){if(e){var r=e.split("](")[1];r&&(r=r.split(")")[0])&&36===r.length&&t.push(r)}}))}return t},ye=function(){var t=Object(p.a)(ta().mark((function t(){var a,o,i,u,h,m,g,v;return ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={_id:Object(M.a)(),idRel:e.nodeId,replyData:e.draft&&e.draft.reply&&c.a.getState().timeline[e.nodeId][e.draft.reply]?c.a.getState().timeline[e.nodeId][e.draft.reply]:{},reply:e.draft&&e.draft.reply?e.draft.reply:null,message:l,type:"comment",mentions:ve(),notifyUsers:o,filesCount:S.length>0?S.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&&(a=Object(d.a)(Object(d.a)({},a),{},{urlPreview:JSON.stringify(U)}),V(null)),s(""),c.a.getState().functions.socket,oe(!1),S.length>0&&b(!0),o=[],i=ve(),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)})).map((function(e){o.push(e)})),e.onSending&&e.onSending(Object(d.a)(Object(d.a)({},a),{},{user:{_id:n._id,name:r.users[n._id].name,image:r.users[n._id].image||null}})),(u=Object(d.a)(Object(d.a)({},a),{},{created_at:"".concat(_()().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,$r({reduxFunction:e.reduxFunction},Object(d.a)(Object(d.a)({},a),{},{comment:u})),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,{message:null,reply:null,files:null}))})),t.next=18,Y.a.post("timeline/add",a);case 18:return(h=t.sent)&&h.data&&(m=h.data)._id&&(g=Object(d.a)(Object(d.a)({},m.comment),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null}),v=2,me<2&&(v=me),i.map(function(){var t=Object(p.a)(ta().mark((function t(n){return ta().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])&&Ht(e,n,v,e.nodeId,!0);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),S.length>0?Oe({comment:g,dataMessage:a}):(e.onSending&&e.onSending(),F([]),L([]),te([]),V(null),K(!1),b(!1),e.onSending&&e.onSending())),t.abrupt("return",!1);case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),xe=function(){var e=Object(p.a)(ta().mark((function e(t,r){var n;return ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Math.round(100*t.loaded/t.total),A(Object(d.a)(Object(d.a)({},P),{},Object(f.a)({},r,n)));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),_e=function(){var e=Object(p.a)(ta().mark((function e(t,r){return ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:G({options:t,fi:r}),A({});case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Oe=function(){var t=Object(p.a)(ta().mark((function t(r){var n,a,o,i,l,s=arguments;return ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:0,a=s.length>2&&void 0!==s[2]?s[2]:[],c.a.getState().functions.socket,o=r.comment,i=r.dataMessage,(l=Array.from(S)).map(function(){var t=Object(p.a)(ta().mark((function t(c,s){var u,d;return ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s!==n){t.next=5;break}return t.next=3,Object(St.a)(o._id,c,!0,{onUploadProgress:function(e){return xe(e,s)},onUploadError:function(e){_e(r,s)}});case 3:(u=t.sent)&&((d=Array.from(a)).push(u),F(d),l.length>n+1?Oe(r,n+1,d):l.length===n+1&&(i.files=d,setTimeout((function(){Y.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 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),we=function(){var t=Object(p.a)(ta().mark((function t(r){var n;return ta().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L([].concat(Object(Se.a)(S),Object(Se.a)(Object.keys(r).map((function(e){return r[e]}))))),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},(null===(n=c.a.getState().chats.drafts)||void 0===n?void 0:n[e.nodeId])||{}),{},{files:[].concat(Object(Se.a)(S),Object(Se.a)(Object.keys(r).map((function(e){return r[e]}))))})))})),O(!1);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),je=function(){var e=Object(p.a)(ta().mark((function e(t){var r,n,a,o,i,l;return ta().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.a.getState().functions.socket,s(t),!t||!(t.indexOf("http://")>-1||t.indexOf("https://")>-1)){e.next=30;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=9,n.map((function(e){var t=e.replace(":","");(t.indexOf("http://")>-1||t.indexOf("https://")>-1)&&a.test(t)&&(r=e)}));case 9:if(!(!U&&r&&-1===ee.indexOf(r)||r&&U&&-1===ee.indexOf(r)&&U.link!==r)){e.next=30;break}if(K(!0),-1!==t.indexOf("youtube.com/watch?")){e.next=29;break}return console.log("Verificando URL",r),e.prev=13,e.next=16,kt.a.post("/URL_DATA",{url:r});case 16:(o=e.sent)&&o.data&&(i=o.data)&&i.title&&i.img&&i.contentSnippet?V(i):(K(!1),V(null)),e.next=29;break;case 20:e.prev=20,e.t0=e.catch(13),K(!1),V(null),(l=ee).push(r),te(l),Object(k.c)({message:Object(k.s)("$__couldNotLoadDataFromURL",1),variant:"warning",persist:!1,horizontal:"center"}),console.log(e.t0);case 29:t.indexOf("youtube.com/watch?")>-1&&K(!1);case 30:t.indexOf("youtube.com/watch?")>-1&&K(!1);case 31:case"end":return e.stop()}}),e,null,[[13,20]])})));return function(t){return e.apply(this,arguments)}}(),Ee=[];r.cards[e.nodeId]&&r.cards[e.nodeId]._users&&Object.keys(r.cards[e.nodeId]._users).map((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(Ee).filter((function(e){return Ee[e].id===a})).length&&Ee.push({id:a,display:o})}})),r.cards[e.nodeId]&&!r.cards[e.nodeId].private&&(he&&(he.owner||he.planAdmin||he.planModerate)||me&&me.access&&parseInt(me.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))})).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Ee).filter((function(e){if(Ee[e].id===t)return!0})).length&&Ee.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).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Ee).filter((function(e){if(Ee[e].id===t)return!0})).length&&Ee.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).map((function(t){t&&null!==t&&void 0!==t&&t!==n._id&&0===Object.keys(Ee).filter((function(e){if(Ee[e].id===t)return!0})).length&&Ee.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})}));return document.getElementById("sendingInput_".concat(e.nodeId))&&document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight&&document.getElementById("sendingInput_".concat(e.nodeId)).offsetHeight,a.a.createElement(Ie.FileDrop,{ref:pe,className:e.relative?de.rootRelative:de.root,onDragOver:function(){!e.disabledSend&&O(!0)},onDrop:we,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(d.a)(Object(d.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(Zn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(Zn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10})))),e.draft&&e.draft.reply||S&&S.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(k.d)("menu"),display:"flex",alignItems:"center"}},a.a.createElement(le.a,{icon:"reply",color:Object(k.d)("menu"),size:"22px"}),a.a.createElement("span",{style:{marginLeft:10}},Object(k.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(k.d)("menu"))}},a.a.createElement(B,null,a.a.createElement(Kn,{storie:c.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(E.a,{title:Object(k.s)("$__cancelReply"),color:"red",icon:"cancel",size:"17px",onClick:function(){e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts[e.nodeId]||{}),{},{reply:null})))}))},transparent:!0}))))):a.a.createElement(a.a.Fragment,null),S&&S.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(E.a,{title:Object(k.s)("$__clearFiles",1),text:Object(k.s)("$__clearFiles"),color:"gray",icon:"clear_all",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmClearFiles",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t;L([]),e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},(null===(t=c.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"}},S.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(le.a,{icon:o,size:"50px"}):a.a.createElement("img",{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(le.a,{icon:"cloud_done",color:"green"}):g?a.a.createElement(a.a.Fragment,null):a.a.createElement(le.a,{icon:"delete_forever",color:"red",onClick:function(){return function(e){var t=Array.from(S);t.splice(e,1),L(t)}(t)}})),R&&R.fi===t?a.a.createElement(E.a,{title:Object(k.s)("$__uploadFiles",1),text:Object(k.s)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Oe({comment:R.options.comment},R.fi,T),G(null)},size:"25px"}):P&&String(P[t])&&P[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(Ir.a,{variant:"buffer",className:de.progressBar,value:P[t]<90?P[t]:90,valueBuffer:P[t]})),a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:10,marginLeft:15}},P[t]<90?P[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(kn,{style:{marginBottom:15,backgroundColor:"#f0f0f0",padding:7}},a.a.createElement("div",{style:{position:"absolute",right:"20px"}},a.a.createElement(E.a,{title:Object(k.s)("$__removePreview"),color:"red",icon:"delete_forever",size:"14px",onClick:function(){V(null),K(!1)}})),U.img&&a.a.createElement(Cn,{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:He.a),alt:U.title||U.link})),a.a.createElement(Cn,{xs:12,sm:6,md:8,lg:9,xl:10},a.a.createElement("div",{style:{fontSize:"14px",color:Object(k.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"},Object(k.s)("$__openLink","*")))),R?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15,textAlign:"center",display:"flex",justifyContent:"center"}},a.a.createElement(E.a,{title:Object(k.s)("$__fileSendErrorClickToReSend",1),text:Object(k.s)("$__fileSendErrorClickToReSend"),color:"red",icon:"upload",onClick:function(){Oe({comment:R.options.comment},R.fi,T),G(null)},size:"25px"})):g?a.a.createElement("div",{style:{position:"relative",height:"60px",backgroundColor:"#ffffff",width:"100%",padding:15}},Object(k.s)("$__sending",1),a.a.createElement(Ir.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(Te.b,{id:"sendingInput_".concat(e.nodeId),value:l.trim().length>0?l:"",inputRef:be,onChange:function(e){je(e.target.value),fe.current&&fe.current.clientHeight&&ue(fe.current.clientHeight)},onBlur:function(t){t.target.value&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{drafts:Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},c.a.getState().chats.drafts[e.nodeId]||{}),{},{message:t.target.value})))}))},onPaste:function(e){we(e.clipboardData.files)},placeholder:Object(k.s)("$__writeMessage"),style:Object(d.a)(Object(d.a)({},Qn),{},{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():l.length>0&&l.trim()&&l.trim().length>0?ye():s(""))},autoFocus:!0,placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(Te.a,{trigger:"@",data:Ee,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(Re.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&&c.a.getState().db.users[i._parent]&&c.a.getState().db.users[i._parent].name?a.a.createElement("div",{style:{fontSize:11,color:"lightgray",marginTop:-3}},c.a.getState().db.users[i._parent].name):a.a.createElement(a.a.Fragment,null)),i&&i._parent&&c.a.getState().db.users[i._parent]&&c.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(c.a.getState().db.users[i._parent].image,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):a.a.createElement(a.a.Fragment,null))},style:{backgroundColor:Object(k.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($e,{title:Object(k.s)("$__emojis",1),icon:ae?"highlight_off":"sentiment_very_satisfied",color:Object(k.d)("medium"),onClick:function(){oe(!ae)}}),!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 we(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(le.a,{icon:"attachment",color:Object(k.d)("medium"),size:"22px"})),!g&&(l.trim().length>0||S.length>0)&&a.a.createElement($e,{title:Object(k.s)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(k.d)("menu"),onClick:function(){return ye()}}),e.closeOption&&a.a.createElement(le.a,{title:Object(k.s)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(k.d)("color"),onClick:function(){return e.onClose()}}),ae&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px",zIndex:100}},a.a.createElement(De.a,{onEmojiClick:function(e,t){s("".concat(l," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))):a.a.createElement("div",{className:e.relative?de.editorRelative:de.editor,style:{backgroundColor:"#f0f0f0"}},Object(k.s)("$__avaiableForViewingOnly")),a.a.createElement("div",{className:x?de.onDropFile:de.dropFile,onDragLeave:function(){!e.disabledSend&&O(!1)}},Object(k.s)("$__dropTheFileToAttach","*"))))})),aa=Object(R.a)((function(e){return{backdrop:{zIndex:e.zIndex.drawer+1,color:Object(k.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 oa(e){var t=aa(),r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(e.icon?e.icon:"add_photo_alternate"),l=Object(h.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(d.a)({},e.style?e.style:{})},o?a.a.createElement(j.a,{className:t.backdrop,open:o,onClick:function(){return i(!1)}},a.a.createElement("div",{className:t.box},ia&&Object.keys(ia).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},ia[r]&&ia[r].map((function(r,n){return a.a.createElement("div",{key:n,className:t.icon},a.a.createElement(le.a,{icon:r,size:"30px",color:e.color?e.color:Object(k.d)("color"),onClick:function(){u(r),i(!1),e.callBack&&e.callBack(r),e.onChange&&e.onChange(r)}}))}))))})))):a.a.createElement(le.a,{icon:s,color:e.color?e.color:Object(k.d)("color"),size:e.size||"30px",onClick:function(){e.onChange&&i(!0)}}))}var ia={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"]},ca={header:Object(d.a)(Object(d.a)({},X.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(k.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(k.d)("color"),fontWeight:"500",alignItems:"center"}}};function la(){la=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var sa=Object(R.a)(ca);var ua=Object(s.b)((function(e){return{users:e.db.users,groups:e.db.groups}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.session,n=t.functions.socket,o=sa(),i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(!1),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(e.title?e.title.trim():""),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(e.icon||null),w=Object(h.a)(O,2),j=w[0],S=w[1],L=a.a.useState(e.icon||null),C=Object(h.a)(L,2),I=(C[0],C[1],a.a.useState(!1)),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(h.a)(N,2),A=P[0],$=P[1],z=e.customButtons&&e.customButtons.filter((function(e){return!1!==e}));a.a.useEffect((function(){s||(!e.title&&e.editable&&D(!0),u(!0))}));var M=function(){var t=Object(p.a)(la().mark((function t(){return la().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:x}),e.onEdit&&e.onEdit(Object(d.a)({name:x},j?{icon:j}:{}),e._id?e._id:null)}catch(r){console.log(r)}D(!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(d.a)({minHeight:"30px",display:"flex",alignItems:"center"},e.style),onMouseEnter:function(){return b(!0)},onMouseLeave:function(){A||b(!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(k.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(k.d)("colorText"),paddingRight:"7px",marginLeft:e.icon?"7px":"none",width:"100%"},onDoubleClick:function(){e.onEdit&&e.editable&&(_(e.title?e.title.trim():""),D(!0))}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",display:"flex",alignItems:"center"}},e.icon||e.permitIcon||e.iconOnEditable&&F?a.a.createElement(oa,{icon:e.icon||"perm_media",color:e.color?e.color:Object(k.d)("colorText"),onChange:e.onChangeIcon||e.editable&&e.permitIcon?function(t){e.onChangeIcon&&e.onChangeIcon(t),e.onEdit&&e.onEdit(Object(d.a)({name:x},t?{icon:t}:{})),S(t)}:null,size:"calc(".concat(e.fontSize," + 4px)")||!1,style:{marginRight:7}}):a.a.createElement(a.a.Fragment,null),F?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:e.placeholder?e.placeholder:Object(k.s)("$__nameOfCard",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){_(e.target.value)},onKeyDown:function(t){13===t.keyCode&&x&&M(),27===t.keyCode&&(D(!1),_(e.title?e.title.trim():""))}},value:x,placeholder:e.placeholder?e.placeholder:Object(k.s)("$__titleOfCard_placeholder",1),autoFocus:!e.noAutoFocus,multiline:!!e.multiline}),(F||e.onSave)&&a.a.createElement(E.a,{title:Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(){F?e.noCancel?x&&M():M():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),(F||e.onCancel)&&a.a.createElement(E.a,{title:Object(k.s)("$__close",1),color:Object(k.d)("colorText"),icon:"cancel",onClick:function(){F&&(e.onCancel?x&&D(!1):D(!1)),e.onCancel&&e.onCancel()},size:e.actionsSize||"25px",transparent:!0})):a.a.createElement(Ne.a,{title:e.tooltipText?e.tooltipText:e.title?e.title:""},a.a.createElement("div",{style:Object(d.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(k.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(k.s)(r.period),a.a.createElement(pt,{style:{color:Object(k.d)("menu"),height:"20px",width:"20px"}})),a.a.createElement("div",{className:o.actionButtons,style:Object(d.a)({},e.actionButtonsStyle?e.actionButtonsStyle:{})},e.actionsButtons&&e.onSave&&a.a.createElement(E.a,{title:Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(){F?e.noCancel?x&&M():M():e.onSave()},size:e.actionsSize||"25px",transparent:!0}),e.actionsButtons&&e.onCancel&&a.a.createElement(E.a,{title:Object(k.s)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){F?e.noCancel?x&&D(!1):D(!1):e.onCancel()},size:e.actionsSize||"25px",transparent:!0}),!F&&e.timelineMessage&&g&&a.a.createElement("div",{className:o.button,style:{opacity:g?"1":"0"}},a.a.createElement(ze.a,{overlap:"rectangular",onClick:function(){return $(!0)},icon:"add_comment",size:"20px",tooltipprops:A?{open:A,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,PopperProps:{disablePortal:!0},interactive:!0}:{},title:A?a.a.createElement("div",{style:{position:"relative",minWidth:"220px"}},a.a.createElement(na,{nodeId:e._id,onSending:function(){b(!1),$(!1)},onClose:function(){$(!1),b(!1)},relative:!0,closeOption:!0})):"$__addComment"})),!F&&z&&z.map((function(e,t){return e&&e.component?e.component:e&&!1!==e&&null!==e&&(g||"hover"!==e.show)&&a.a.createElement("div",Object.assign({key:t,className:o.button},e.provided),a.a.createElement(E.a,{title:e.title?Object(k.s)(e.title,1):Object(k.s)(e.name,1),color:Object(k.d)(e.color||"colorText"),icon:e.icon,onClick:function(t){e.onClick&&e.onClick(t)},onMouseLeave:function(){A||b(!1)},onClose:e.onClose?function(){e.onClose&&e.onClose(),b(!1)}:null,size:e.actionsSize||"16px",transparent:!0,badgeContent:e.count?e.count:null}))})),e.children)))})),da=r(142);var pa=function(e){return a.a.createElement("div",{id:"sideModule_closeButton",style:Object(d.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(da.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(E.a,{id:"sideModule_saveButton",title:Object(k.s)("$__save",1),color:Object(k.d)("color"),icon:"save",onClick:function(){e.save()},size:"25px"}),e.saveClose&&a.a.createElement(E.a,{id:"sideModule_saveAndCloseButton",title:Object(k.s)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){e.saveClose()},size:"25px"})),e.close&&a.a.createElement(E.a,{title:Object(k.s)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.close()},size:"25px"})))},fa=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(d.a)(Object(d.a)({},X.l),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"30%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(d.a)(Object(d.a)({},X.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(d.a)(Object(d.a)({},X.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(d.a)(Object(d.a)({},X.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(k.d)("color"),color:Object(k.d)("light")}}},ha=r(63),ma=r.n(ha),ga=r(229),ba=r(224),va={messagesContainer:{height:"100%",width:"100%"}};function ya(){ya=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var xa=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=e.messages,o=e.type,i=e.nodeId,l=a.a.useState(0),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useRef)(),b=Object(n.useRef)({}),v=Object(n.useRef)({}),y=Object(n.useRef)({}),x=Object(n.useRef)({});a.a.useEffect((function(){return g.current={mounted:!0},function(){g&&g.current&&g.current.mounted&&(g.current.mounted=!1)}}),[]),a.a.useEffect((function(){var e;if(null===g||void 0===g||null===(e=g.current)||void 0===e?void 0:e.mounted){var t,n=(null===r||void 0===r||null===(t=r.filter((function(e){return e.type===o&&e.user._id!==c.a.getState().session._id&&(!e.readedBy||e.readedBy&&!e.readedBy[c.a.getState().session._id])})))||void 0===t?void 0:t.length)||0;m(n)}}),[r,o,i]),Object(n.useEffect)((function(){u>0&&_(!0)}),[u]),Object(n.useEffect)((function(){return x.current=Object(d.a)(Object(d.a)({},x.current),{},{scrolling:!1}),v.current=Object(d.a)(Object(d.a)({},v.current),{},{lock:!1}),function(){v.current={},x.current={}}}),[e.nodeId,e.type]),Object(n.useLayoutEffect)((function(){k(!0),parseInt(u)>0&&_(!0)}),[e.nodeId,e.type]),Object(n.useLayoutEffect)((function(){var e,t,n,a;r.length>0&&((!(null===(e=v.current)||void 0===e?void 0:e.mounted)||(null===v||void 0===v||null===(t=v.current)||void 0===t?void 0:t.messagesLength)&&r.length>v.current.messagesLength)&&(v.current=Object(d.a)(Object(d.a)({},v.current),{},{loading:!1,messagesLength:r.length}),(null===(n=x.current)||void 0===n?void 0:n.scrolling)&&(null===(a=v.current)||void 0===a?void 0:a.mounted)?k():k(!0),v.current.mounted||(v.current=Object(d.a)(Object(d.a)({},v.current),{},{mounted:!0}),k(!0))))}),[r]);var _=function(){var t=Object(p.a)(ya().mark((function t(){var r,n,a,l,s=arguments;return ya().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=s.length>0&&void 0!==s[0]&&s[0],!x.current.clearMessages&&parseInt(u)>0&&(a||!(null===(r=x.current)||void 0===r?void 0:r.scrolling)&&(null===v||void 0===v||null===(n=v.current)||void 0===n?void 0:n.length))&&(x.current=Object(d.a)(Object(d.a)({},x.current),{},{clearMessages:!0}),l=c.a.getState().functions.socket,Pr(e,{readedBy:c.a.getState().session._id,id:i,db:e.db,type:o}),l.emit("data",{module:"chat",method:"put",action:"read"},{readedBy:c.a.getState().session._id,id:i,db:e.db,type:o},(function(e){setTimeout((function(){x.current=Object(d.a)(Object(d.a)({},x.current),{},{clearMessages:!1})}),500)})),c.a.getState().chats.unreadeds[e.nodeId]&&e.reduxFunction("ASYNC","SET_CHATS",Object(d.a)(Object(d.a)({},c.a.getState().chats),{},{unreadeds:Object(d.a)(Object(d.a)({},c.a.getState().chats.unreadeds),{},Object(f.a)({},e.nodeId,0))})));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=Object(p.a)(ya().mark((function t(){var n,a,o,i,l;return ya().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=c.a.getState().db.users[e.nodeId]?"users":"cards",(null===v||void 0===v||null===(n=v.current)||void 0===n?void 0:n.timelineEnd)||!(null===(a=v.current)||void 0===a?void 0:a.mounted)||v.current.lock){t.next=7;break}return v.current=Object(d.a)(Object(d.a)({},v.current),{},{lock:!0,loading:!0}),t.next=5,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/scrollFunction()"}),{ids:[e.nodeId],db:o,type:"comment",limit:!0,skip:r.length});case 5:(i=t.sent)&&(l=Object(d.a)(Object(d.a)({},v.current),{},{length:r.length+i.total}),i.total<20&&(l=Object(d.a)(Object(d.a)({},l),{},{timelineEnd:!0})),v.current=Object(d.a)({},l));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function w(e){var t=r[e];return y.current[t._id]+11||83}var j=Object(n.memo)((function(t){var r,n=t.data;return a.a.createElement(Kn,{storie:n,openLightBox:function(t){var r;(null===g||void 0===g||null===(r=g.current)||void 0===r?void 0:r.mounted)&&e.openLightBox(t)},hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId,showUserName:!!(null===(r=c.a.getState().db)||void 0===r?void 0:r.cards[e.nodeId]),onResize:function(e){var t;(null===g||void 0===g||null===(t=g.current)||void 0===t?void 0:t.mounted)&&function(e,t){var r;y.current=Object(d.a)(Object(d.a)({},y.current),{},Object(f.a)({},e,t)),(null===b||void 0===b||null===(r=b.current)||void 0===r?void 0:r.resetAfterIndex)&&b.current.resetAfterIndex(0)}(n._id,e)}})}));function E(e){var t=e.index,n=e.style,o=r[t];return a.a.createElement("div",{style:n},a.a.createElement(j,{data:o}))}function k(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if((null===g||void 0===g||null===(e=g.current)||void 0===e?void 0:e.mounted)&&(v.current.lock||t||!x.current.scrolling)){var n,a;v.current=Object(d.a)(Object(d.a)({},v.current),{},{lock:!1});var o=r.length-1,i="end",c=v.current.length||0,l=(null===v||void 0===v||null===(n=v.current)||void 0===n?void 0:n.visibleStartIndex)||0;!t&&x.current&&x.current.scrolling&&(i="start",o=r.length-c+l+1),parseInt(u)>0&&!x.current.scrolling&&_(!0),(null===b||void 0===b||null===(a=b.current)||void 0===a?void 0:a.scrollToItem)?b.current.scrollToItem(o,i):t&&setTimeout((function(){k(!0)}),100)}}var S=setTimeout((function(){}),15e3),L=function(e,t){var r;parseInt(u)>0&&e.overscanStartIndex===e.visibleStartIndex&&e.overscanStopIndex===e.visibleStopIndex&&_(!0);var n=Object(d.a)({},v.current);(null===(r=v.current)||void 0===r?void 0:r.mounted)&&v.current&&!v.current.loading&&e.visibleStartIndex<10&&(clearTimeout(S),n=Object(d.a)(Object(d.a)(Object(d.a)({},v.current),e),{},{loading:!0}),v.current=Object(d.a)({},n),S=setTimeout((function(){O()}),1e3)),v.current=Object(d.a)(Object(d.a)({},n),e)};return a.a.createElement("div",{style:va.messagesContainer},a.a.createElement(ba.a,{style:va.messagesContainer},(function(e){var t=e.height,n=e.width;return a.a.createElement(ga.b,{className:"List",height:t,itemCount:r.length,itemSize:w,ref:b,width:n,onItemsRendered:L,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(d.a)(Object(d.a)({},x.current),{},{scrolling:!0})),e.scrollOffset-120>x.current.scrollOffset&&(x.current=Object(d.a)(Object(d.a)({},x.current),{},{scrolling:!1}),parseInt(u)>0&&_()),(!x.current.scrollOffset||e.scrollOffset>x.current.scrollOffset-100)&&(x.current=Object(d.a)(Object(d.a)({},x.current),{},{scrollOffset:e.scrollOffset,scrolling:!1}),parseInt(u)>0&&_())}},E)})),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(Be,{icon:"arrow_downward",iconColor:"red",size:"33px",onClick:function(){k(!0)}})):a.a.createElement(a.a.Fragment,null))})),_a={};function Oa(){Oa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var wa=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],d=a.a.useState([]),f=Object(h.a)(d,2),m=f[0],g=f[1],b=c.a.getState(),v=(b.db,b.functions.socket,window.location.hash.split("/"));v[0]=v[0].replace("#",""),a.a.useEffect((function(){if(e.text.length>1&&e.text!==n){o(e.text);var t=setTimeout((function(){return y()}),1e3);return u(!0),function(){return clearTimeout(t)}}}),[e.text]);var y=function(){var t=Object(p.a)(Oa().mark((function t(){var r;return Oa().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,kt.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(Tr,null)),a.a.createElement(kn,null,Object.keys(m).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},Object.keys(m).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(Kn,{messageClick:e.onAction?function(){}:null,searchText:e.text.trim(),storie:m[t],hideCards:!!e.hideCards,db:e.db,nodeId:e.nodeId}))}))))))})));var ja=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){c.a.getState().db;var t,r=a.a.useState(""),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=s[1],p=a.a.useState(!1),m=Object(h.a)(p,2),g=m[0],b=m[1],v=window.location.hash.split("/");return v[0]=v[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(Ce,{label:Object(k.s)("$__searchInChat"),variant:Object(k.d)("fieldVariant"),name:"searchInChat",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.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(k.s)("$__searchInChat"),value:Object(k.q)(o).toLowerCase(),autoFocus:!0})):a.a.createElement(E.a,{title:Object(k.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(Tr,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(f.a)(t,"maxHeight","90vh"),Object(f.a)(t,"maxWidth","666px"),Object(f.a)(t,"zIndex",2001),t)},a.a.createElement(wa,{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 Ea(){Ea=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ka=Object(R.a)(In),Sa=Object(s.b)((function(e,t){var r=e.timeline;t.nodeId;return{timeline:r}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=ka(),r=c.a.getState().session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=e.timeline,f=e.type||"comment",m=Object(n.useRef)(),g=e.nodeId?c.a.getState().db["".concat(e.db?e.db:"cards")][e.nodeId]:{},b=c.a.getState().db.users[e.nodeId]?"users":"cards";Object(n.useEffect)((function(){return m.current={mounted:!0},function(){m&&m.current&&m.current.mounted&&(m.current.mounted=!1)}}),[]);var v=[],y=[];c.a.getState().db.cards[e.nodeId]&&u[e.nodeId]&&Object.keys(u[e.nodeId]).map((function(t){return y.push(u[e.nodeId][t])}));"kpi"===f&&function e(t){Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===t&&c.a.getState().db.cards[e].kpi_useParent&&c.a.getState().db.cards[e].kpi_type===c.a.getState().db.cards[t].kpi_type})).map((function(t){c.a.getState().timeline[t]&&Object.keys(c.a.getState().timeline[t]).filter((function(e){return"kpi"===c.a.getState().timeline[t][e].type&&!c.a.getState().timeline[t][e].deleted})).map((function(e){return y.push(c.a.getState().timeline[t][e])})),e(t)}))}(e.nodeId),c.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===y.filter((function(e){return e._id===t})).length})).map((function(e){y.push(u[r._id][e])})),u&&u[e.nodeId]&&Object.keys(u[e.nodeId]).filter((function(t){return u[e.nodeId]})).map((function(t){y.push(u[e.nodeId][t])})),y=Object.keys(y).sort((function(e,t){return parseInt(y[e].created_at)<parseInt(y[t].created_at)?-1:parseInt(y[e].created_at)>parseInt(y[t].created_at)?1:0})).filter((function(t){return y[t].user&&y[t].user._id&&(y[t].user._id===r._id||y[t].user._id===e.nodeId)})).map((function(e){return y[e]}))),e.kpi_type&&(y=Object.keys(y).filter((function(t){return y[t].kpi_type===e.kpi_type||y[t].reply})).map((function(e){return y[e]})));var x=g&&g.kpi_ini?parseFloat(g.kpi_ini):0;if(a.a.useEffect((function(){var t,r=!0;if(null===m||void 0===m||null===(t=m.current)||void 0===t?void 0:t.mounted){var n=function(){var t=Object(p.a)(Ea().mark((function t(){var r;return Ea().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.type?e.type:"comment",t.next=3,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Timeline/Index/init()",force:!0}),Object(d.a)({ids:e.nodeId,db:b,type:r},"kpi"===e.type?{limit:!1,skip:!1,reqChildrens:!0}:{limit:!0,skip:y.filter((function(e){return e.type===r})).length>0?y.filter((function(e){return e.type===r})).length-1:0,reqChildrens:!1}));case 3:s(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();r&&y.filter((function(e){return e.type===f})).length<10&&(s(!0),n())}return function(){r=!1}}),[f,e.nodeId]),l)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(je,null));var _=Object.keys(y).length>0&&Object.keys(y).filter((function(e){if((!y[e].deleted||y[e].deleted&&y[e].user&&y[e].user._id&&y[e].user._id===r._id)&&(y[e].type===f||y[e].reply&&Object.keys(y).filter((function(t){return y[t]&&y[t]._id===y[e].reply&&y[t].type===f})).length>0))return!0})).sort((function(e,t){return y[e].created_at<y[t].created_at?-1:y[e].created_at>y[t].created_at?1:0})).map((function(e){var t=y[e];return x=parseFloat(parseFloat(x)+parseFloat(t.value)),t.balance=x,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}},_&&_.length>0?a.a.createElement(xa,{messages:_,hideCards:!!e.hideCards,db:e.db,type:f,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(ja,{db:b,nodeId:e.nodeId,onAction:function(e){}}))))})),La=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.nodeId,r=c.a.getState().session,n=c.a.getState().db.users[t]?"users":"cards",o=!!e.disabledSend&&e.disabledSend;return t&&e.disabledSend&&(!c.a.getState().db.cards[t]||c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].onlyAdminsSendMessages&&c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[r._id]&&c.a.getState().db.cards[t]._users[r._id].access<4)&&(o=!0),"users"===n&&c.a.getState().db.users&&c.a.getState().db.users[t]&&c.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(B,null,a.a.createElement(Sa,e))),o?c.a.getState().db.cards[t]&&"chatGroup"===c.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(k.d)("menu")}},Object(k.s)("$__onlyAdminsCanSendMessages",1)):a.a.createElement(a.a.Fragment,null):a.a.createElement(B,null,a.a.createElement(na,{db:e.db?e.db:"cards",nodeId:t,editorStyle:{padding:"7px"}})))})),Ca=r(1967);function Ia(){Ia=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ta=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=function(){var t=Object(p.a)(Ia().mark((function t(r,n){var a,o,i;return Ia().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n,o=c.a.getState().db[e.dbNode],!e.ws){t.next=9;break}return t.next=5,a.map(function(){var t=Object(p.a)(Ia().mark((function t(r,n){var i,l,s,u;return Ia().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,Y.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)&&(l=i&&i.data&&i.data.id?i.data.id:i.data.value,0===o.filter((function(e){return e.value===l})).length&&(o.push({value:l,label:r}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},Object(f.a)({},e.dbNode,o)))),0===a.filter((function(e){return e.value===l})).length&&(a.splice(n,1),a.push({value:l,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(d.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(Ca.a,Object.assign({},r,{onChange:function(e,r){t(e,r)}}))})),Fa=Object(me.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}}}))(Hr.a);function Da(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1];return a.a.createElement(Fa,{style:Object(d.a)(Object(d.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 Na=Object(me.a)({root:Object(d.a)(Object(d.a)({},X.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(k.d)("color")},"& label.MuiFormLabel-filled":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":0},"& label.Mui-focused":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":0},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(k.d)("fieldVariant")?0:"filled"===Object(k.d)("fieldVariant")?"-15px":0,borderRadius:Object(k.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}})})(Le.a),Pa=r(814),Aa={labelTop:Object(d.a)(Object(d.a)({},X.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(k.d)("color")},"& label.MuiFormLabel-filled":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(k.d)("fieldVariant")?"0px":"filled"===Object(k.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(k.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}}),noLabel:Object(d.a)(Object(d.a)({},X.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(k.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(k.d)("fieldRadius"),color:"#FFFFFF","& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}}),labelTopLight:Object(d.a)(Object(d.a)({},X.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(k.d)("color")},"& label.MuiFormLabel-filled":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":"0px"},"& label.Mui-focused":{color:Object(k.d)("color"),marginTop:"standard"===Object(k.d)("fieldVariant")||"filled"===Object(k.d)("fieldVariant")?"-10px":"0px"},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{marginTop:"standard"===Object(k.d)("fieldVariant")?"0px":"filled"===Object(k.d)("fieldVariant")?"-15px":"0px",borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}}),noLabelLight:Object(d.a)(Object(d.a)({},X.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(k.d)("color")},"& label.MuiFormLabel-filled":{display:"none"},"& label.Mui-focused":{display:"none"},"& .MuiInput-underline:after":{borderBottomColor:Object(k.d)("line")},"& .MuiOutlinedInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&.Mui-focused fieldset":{borderColor:Object(k.d)("line")}},"& .MuiFilledInput-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}},"& .MuiInputLabel-outlined":{display:"none",marginTop:"0px","&.Mui-focused":{marginTop:"0px"},"&.MuiFormLabel-filled":{marginTop:"0px"}},"& .MuiInputBase-root":{borderRadius:Object(k.d)("fieldRadius"),"& fieldset":{borderColor:Object(k.d)("line")},"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")},"&.Mui-focused":{borderBottomColor:Object(k.d)("line"),"&::before":{borderBottomColor:Object(k.d)("line")},"&::after":{borderBottomColor:Object(k.d)("line")}}}})},$a=Object(R.a)(Aa);var za=function(e){var t=$a(),r=a.a.useState([]),n=Object(h.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(Ta,{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(k.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(Na,Object.assign({},t,{label:Object(k.s)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(d.a)(Object(d.a)({},t.InputProps),e.InputProps)})):a.a.createElement(Ce,Object.assign({},t,{label:Object(k.s)(e.placeholder||"$__values","*"),variant:"standard",InputProps:Object(d.a)(Object(d.a)({},t.InputProps),e.InputProps)}))},renderOption:function(t){var r,n;return a.a.createElement("div",{style:Object(d.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(Xe.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(Da,{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(k.r)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(Pa.a,{style:{color:Object(k.r)(t.color||"#b7b7b7",!0),fontSize:"20px"}},"delete"),onDelete:function(){c(t)}})):t&&t.label?a.a.createElement(Da,{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(k.r)(t.color||"#b7b7b7",!0)},deleteIcon:a.a.createElement(Pa.a,{style:{color:Object(k.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.map((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})},Ma={instruction:{},picture:{}};function Ya(){Ya=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ba=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ma)((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(h.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.filter((function(e){return e.value})).map((function(e){t.push(e)})),i(t)}}),[e.data]);var c=function(){var t=Object(p.a)(Ya().mark((function t(r){return Ya().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(za,{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:!0,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)}}))}))),Ra=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(k.d)("color")}}},switch:{fontSize:"16px",fontWeight:"bold",color:Object(k.d)("medium")},accessDescription:{fontSize:"14px",color:Object(k.d)("medium")}}};function Ga(){Ga=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ha=Object(s.b)((function(e,t){return{tag:e.db.tag,userGroup:e.db.userGroup,sideModule:e.sideModule}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=r.session,s=i.users,u=i.dataType,m=o.data,g=Object(n.useState)(m),b=Object(h.a)(g,2),v=b[0],y=(b[1],a.a.useState(!Object(k.t)(m&&m.email?m.email:""))),x=Object(h.a)(y,2),_=x[0],O=x[1],w=Object(k.j)(),j=JSON.stringify(v)!==JSON.stringify(m),E=function(t){var r=t.value,n=Object(d.a)(Object(d.a)({},m),{},Object(f.a)({},t.name,r));!r&&n[t.name]&&delete n[t.name],e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:n}))},S=function(t){j&&!t?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},L=function(){var t=Object(p.a)(Ga().mark((function t(r){var n;return Ga().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Nt(m.email);case 2:if(n=t.sent,m.name){t.next=7;break}Object(k.c)({message:Object(k.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===m.type}))[0].disabledFields.indexOf("email")||!_){t.next=11;break}Object(k.c)({message:_,variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 11:if(-1!==u.filter((function(e){return e.name===m.type}))[0].disabledFields.indexOf("email")||!(!Object(k.t)(o.data.email)||s[m._id]&&m.email!==s[m._id].email&&n)){t.next=15;break}O(Object(k.s)("$__invalidEmail",1)),t.next=19;break;case 15:return t.next=17,Tt(e);case 17:t.sent&&(Object(k.c)({message:Object(k.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&S(!0));case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=!1;return(m._id===l._id||w&&w.user&&(w.userAdmin||w.userEdit))&&(C=!0),a.a.createElement("div",null,a.a.createElement(pa,{save:C&&j?function(){return L()}:null,saveClose:C&&j?function(){return L(!0)}:null,close:function(){return S(!0)}}),C||!C&&o.data.image,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(dn,{maxWidthOrHeight:600,img:o.data&&o.data.image?o.data.image:null,onChange:C?function(e,t){E({name:"file",value:t})}:null,avatar:!0,avatarIcon:m.type&&"user"!==m.type?m.type&&"group"!==m.type?"business":"groups":"person"})),a.a.createElement("form",{className:t.data,autoComplete:"off",id:"sideModule_user_data"},a.a.createElement(Ce,{id:"sideModule_user_fullName",label:Object(k.s)("$__fullName",1),variant:Object(k.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"person"})),onChange:function(e){E(e.target)},onBlur:function(e){if(m&&!m.name){var t=e.target.value?"".concat(e.target.value.split(" ")[0]," ").concat(e.target.value.split(" ")[1]?e.target.value.split(" ")[1]:""):"";E({name:"name",value:t.trim()})}}},value:m&&m.fullName?m.fullName:"",placeholder:Object(k.s)("$__fullName",1),autoFocus:!0,disabled:!C}),a.a.createElement(Ce,{id:"sideModule_user_displayName",label:Object(k.s)("$__displayName",1),variant:Object(k.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_comfy_ind"})),onChange:function(e){E(e.target)},onBlur:function(e){E(e.target)}},value:m&&m.name?m.name:"",placeholder:Object(k.s)("$__displayName",1),disabled:!C}),-1===u.filter((function(e){return e.name===m.type}))[0].disabledFields.indexOf("email")&&a.a.createElement(Ce,{id:"sideModule_user_email",label:Object(k.s)("$__email",1),variant:Object(k.d)("fieldVariant"),name:"email",type:"email",helperText:_,InputProps:{autoComplete:"new-password",className:!_&&m.email&&Object(k.t)(m&&m.email?m.email:"")?"":"invalid",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"alternate_email"})),onChange:function(e){O(null),E(e.target)},onBlur:function(){var e=Object(p.a)(Ga().mark((function e(t){var r;return Ga().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m._id&&"new"!==m._id&&s[m._id]&&s[m._id].email!==t.target.value||!m._id||"new"===m._id)){e.next=9;break}if(!Object(k.t)(t.target.value)||s[m._id]&&t.target.value===s[m._id].email){e.next=8;break}return e.next=4,Nt(t.target.value);case 4:r=e.sent,O(r?Object(k.s)("$__emailAlreadyExists",1):null),e.next=9;break;case 8:O(Object(k.s)("$__invalidEmail",1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:m&&m.email?m.email:"",placeholder:Object(k.s)("$__email",1),disabled:!C}),C&&w&&w.user&&(w.userAdmin||w.userEdit)?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_tags"},a.a.createElement(Ba,{data:{values:m.tags||[],_id:m._id},options:c.a.getState().db.tag?c.a.getState().db.tag:[],placeholder:"$__tagsPlaceholder",dbNode:"tag",callBack:function(e){E({name:"tags",value:e})},secondaryParent:m._parent,colorPickerCallBack:function(e){c.a.getState().functions.socket.emit("tag.UPD",e)}})),a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Ba,{data:{values:m.groups||[],_id:m._id},options:c.a.getState().db.userGroup?c.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){E({name:"groups",value:e})},secondaryParent:m._parent,colorPickerCallBack:function(e){}}))):a.a.createElement(a.a.Fragment,null)))})));function Wa(e){var t=a.a.useState({cPassword:"",password:""}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(0),p=Object(h.a)(u,2),f=p[0],m=p[1],g=a.a.useState(0),b=Object(h.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){e.clear&&e.clear!==v&&(y(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(k.s)("$__passwordTip_1")),a.a.createElement("p",null,Object(k.s)("$__passwordTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(k.s)("$__passwordTip_3")),a.a.createElement("li",null,Object(k.s)("$__passwordTip_4")),a.a.createElement("li",null,Object(k.s)("$__passwordTip_5")),a.a.createElement("li",null,Object(k.s)("$__passwordTip_6")),a.a.createElement("li",null,Object(k.s)("$__passwordTip_7")))),a.a.createElement(Ce,{label:Object(k.s)("$__password",1),variant:"standard",name:"password_primary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.password,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,null,"lock_outline")),autoComplete:"new-password",onChange:function(e){o(Object(d.a)(Object(d.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:m(0);break;case 1:m(1);break;case 2:m(2);break;case 3:m(3);break;case 4:m(4)}e.length<8&&m(0)}(e.target.value),f>2&&n.password===e.target.value?s(!0):s(!1)}},value:n.password}),a.a.createElement(Ce,{label:Object(k.s)("$__passwordConfirm",1),variant:"standard",name:"password_secondary",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:n.cPassword,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{color:l?"green":"lightgray"},l?"verified":"check")),autoComplete:"new-password",onChange:function(t){o(Object(d.a)(Object(d.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(k.s)("$__passwordTooWeak",1):2===f?Object(k.s)("$__weakPassword",1):3===f?Object(k.s)("$__goodPassword",1):4===f?Object(k.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 Ua=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(k.d)("medium")}}};function Va(){Va=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var qa=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.sideModule,l=n.session,s=n.functions,u=n.db,m=s.socket,g=o.data,b=a.a.useState(g),v=Object(h.a)(b,2),y=v[0],x=(v[1],a.a.useState(!1)),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(null),E=Object(h.a)(j,2),S=E[0],L=E[1],C=a.a.useState(0),I=Object(h.a)(C,2),T=I[0],F=I[1],D=Object(k.j)(),N=function(t){return w(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),{},{_access:Object(d.a)(Object(d.a)({},o.data._access),{},Object(f.a)({},t.name,t.value))})})),!0},P=function(t){var r={_id:g._id,isAdmin:t};try{c.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(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}},A=function(t){!t&&O?Object(k.c)({message:Object(k.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(p.a)(Va().mark((function t(r){return Va().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return w(!1),t.next=3,Ft(e);case 3:t.sent&&(Object(k.c)({message:Object(k.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),P(!g._access.admin||null),r&&A(!0));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),z=function(){var e=Object(p.a)(Va().mark((function e(){return Va().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m.emit("data",{module:"user",method:"post",action:"accessSendInvite"},{_id:c.a.getState().sideModule.data._id,name:c.a.getState().sideModule.data.name,email:c.a.getState().sideModule.data.email},(function(){Object(k.c)({message:Object(k.s)("$__invitedEmailSended",1),variant:"success",persist:!1,horizontal:"center"})}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=Object(p.a)(Va().mark((function e(){return Va().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Y.a.post("/user/new-password",{userId:g._id,password:S});case 3:e.sent&&(L(null),Object(k.c)({message:Object(k.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(k.c)({message:"".concat(Object(k.s)("$__invalidRequest",1)," | ").concat(Object(k.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)}}(),B=(u.plans[0].settings.space,u.plans[0]);l&&l.GlobalData&&String(l.GlobalData.plan)&&u.plans.filter((function(e){return e.value===l.GlobalData.plan})).length>0&&u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0].settings&&(u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0].settings.space,B=u.plans.filter((function(e){return e.value===l.GlobalData.plan}))[0]);var R=1;B&&B.settings&&B.settings.admins&&(R=parseInt(B.settings.admins)),l&&l.GlobalData&&l.GlobalData.customAdmins&&(R=parseInt(l.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&&l._id!==g._id||l._id===g._id?a.a.createElement("div",null,a.a.createElement(pa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return A(!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(Wa,{onConfirmed:function(e){L(e)},clear:T})),S&&a.a.createElement("div",{style:(t={display:"flex",padding:"7px 15px",margin:"auto",cursor:"pointer",backgroundColor:"green",marginTop:"15px"},Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),Object(f.a)(t,"borderRadius","7px"),t),onClick:function(){M()}},a.a.createElement(Be,{icon:"save",text:Object(k.s)("$__save","*"),title:!Object(k.s)("$__save","*"),iconColor:Object(k.d)("lightText"),textColor:Object(k.d)("lightText")})))):(console.log(R,G),a.a.createElement("div",null,a.a.createElement(pa,{save:O?function(){return $()}:null,saveClose:O?function(){return $(!0)}:null,close:function(){return A(!0)}}),a.a.createElement("div",{className:r.data},a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__permitPlataformAccess",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.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(k.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(k.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(le.a,{icon:"supervised_user_circle",size:"33px",color:g&&g._access&&g._access.admin?null:"#FFFFFF"}),Object(k.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(k.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(le.a,{icon:"supervisor_account",size:"33px",color:g&&g._access&&g._access.admin?"#FFFFFF":null}),Object(k.s)("$__supervisorAccount")))),a.a.createElement("fieldset",null,a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.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(k.s)("$__adminLimitReached")),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.s)("$__adminLimitReachedDescription",1)),a.a.createElement("div",{style:{position:"relative",marginTop:7,color:"red",fontWeight:"bolder"}},Object(k.s)("$__usedUsers","*")," ",G," ",Object(k.s)("$__of","*")," ",R,a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("acc#tab/subscriptionUpgrade")}},Object(k.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(k.s)("$__unregisteredUserAlert",1)),a.a.createElement(Be,{text:Object(k.s)("$__sendInviteEmail",1),icon:"contact_mail",onClick:function(){z()}})),g._token&&g._token._id&&a.a.createElement("fieldset",{style:{backgroundColor:"rgba(255,0,0,0.1)"}},a.a.createElement("i",null,Object(k.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(wr,{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(k.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(wr,{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(k.s)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__interact",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__edit",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.s)("$__userAccess_UserAccessDescription",1)))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(wr,{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(k.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(wr,{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(k.s)("$__read",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__createTemplate",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.s)("$__userAccess_StrategyAndPlansAccessDescription")))),D&&D.master&&g._isAdmin?a.a.createElement("fieldset",null,a.a.createElement("legend",null,a.a.createElement(wr,{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(k.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(wr,{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(k.s)("$__edit",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__moderate",1))),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{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(k.s)("$__admin",1))):a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.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(wr,{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(k.s)("$__accountAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.s)("$__accountAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null),D&&D.masterAdmin&&l&&(l.email.indexOf("@sonne.global")>-1||l.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(wr,{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(k.s)("$__machenAdministrator",1)),a.a.createElement("div",{className:r.accessDescription},a.a.createElement("i",null,Object(k.s)("$__machenAdministratorDescription"))))):a.a.createElement(a.a.Fragment,null)),y&&y._access&&y._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 Xa(){Xa=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ja=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){e.classes;var t,r,o,i=c.a.getState(),l=i.sideModule,s=(i.db,i.session,i.functions.socket,l.data,a.a.useState(!1)),u=Object(h.a)(s,2),m=u[0],g=(u[1],a.a.useState((t={image:null},Object(f.a)(t,"image",null),Object(f.a)(t,"status",!1),t))),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(null),_=Object(h.a)(x,2),O=_[0],w=_[1];Object(n.useEffect)((function(){j()}),[]);var j=function(){var e=Object(p.a)(Xa().mark((function e(){var t,r;return Xa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kt.a.post("/M_User_TwoFactor",{action:"has"});case 2:if(!((t=e.sent)&&t.data&&t.data.result)){e.next=7;break}y(Object(d.a)(Object(d.a)(Object(d.a)({},v),t.data.result),{},{status:!0})),e.next=11;break;case 7:return e.next=9,kt.a.post("/M_User_TwoFactor",{action:"create"});case 9:(r=e.sent)&&y(Object(d.a)(Object(d.a)(Object(d.a)({},v),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(p.a)(Xa().mark((function e(){var t;return Xa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kt.a.post("/M_User_TwoFactor",{action:"verify",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?y(Object(d.a)(Object(d.a)({},v),{},{status:!0})):(Object(k.c)({message:Object(k.s)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),y(Object(d.a)(Object(d.a)({},v),{},{status:!1}))),w(null);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Object(p.a)(Xa().mark((function e(){var t,r;return Xa().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kt.a.post("/M_User_TwoFactor",{action:"disable",code:O});case 2:(t=e.sent)&&t.data&&t.data.result?(y((r={image:null},Object(f.a)(r,"image",null),Object(f.a)(r,"status",!1),r)),j()):Object(k.c)({message:Object(k.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(pa,{close:function(){m?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")}}),v.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(k.s)("$__disableTokenTip_1")),a.a.createElement("p",null,Object(k.s)("$__disableTokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(k.s)("$__disableTokenTip_3")),a.a.createElement("li",null,Object(k.s)("$__disableTokenTip_4")),a.a.createElement("li",null,Object(k.s)("$__disableTokenTip_5")),a.a.createElement("li",null,Object(k.s)("$__disableTokenTip_6")),a.a.createElement("li",null,Object(k.s)("$__disableTokenTip_7")))),a.a.createElement(Ce,{label:Object(k.s)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.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(f.a)(o,"display","flex"),Object(f.a)(o,"alignItems","center"),Object(f.a)(o,"justifyContent","center"),Object(f.a)(o,"borderRadius","7px"),o),onClick:function(){S()}},a.a.createElement(Be,{icon:"toggle_on",text:Object(k.s)("$__disableToken","*"),title:Object(k.s)("$__disableToken","*"),iconColor:Object(k.d)("lightText"),textColor:Object(k.d)("lightText")}))):a.a.createElement("div",{style:{position:"relative",width:"100%",textAlign:"center",padding:"15px"}},a.a.createElement("div",{style:{position:"relative",width:"100%"}},v.image&&a.a.createElement("img",{src:v.image})),a.a.createElement("div",{style:{textAlign:"left"}},a.a.createElement("p",null,Object(k.s)("$__tokenTip_1")),a.a.createElement("p",null,Object(k.s)("$__tokenTip_2")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(k.s)("$__tokenTip_3")),a.a.createElement("li",null,Object(k.s)("$__tokenTip_4")),a.a.createElement("li",null,Object(k.s)("$__tokenTip_5")),a.a.createElement("li",null,Object(k.s)("$__tokenTip_6")),a.a.createElement("li",null,Object(k.s)("$__tokenTip_7")))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__token",1)),a.a.createElement(Ce,{label:Object(k.s)("$__token",1),variant:"standard",name:"token",type:"password",InputLabelProps:{shrink:!0},InputProps:{value:O,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,null,"lock_outline")),autoComplete:"new-token",onChange:function(e){w(e.target.value)}},placeholder:Object(k.s)("$__token","*"),autoComplete:"new-token",value:O,max:6})),!v.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(f.a)(r,"display","flex"),Object(f.a)(r,"alignItems","center"),Object(f.a)(r,"justifyContent","center"),Object(f.a)(r,"borderRadius","7px"),r),onClick:function(){E()}},a.a.createElement(Be,{icon:"check",text:Object(k.s)("$__activeToken","*"),title:!Object(k.s)("$__activeToken","*"),iconColor:Object(k.d)("lightText"),textColor:Object(k.d)("lightText")}))))})));function Ka(){Ka=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Za=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=a.a.useState(o.data),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useState)(o.data),b=Object(h.a)(g,2),v=b[0],y=(b[1],a.a.useState(o.data&&o.data.language?o.data.language:"pt-BR")),x=Object(h.a)(y,2),_=x[0],O=x[1],w=JSON.stringify(v)!==JSON.stringify(u),j=function(t){var r=Object(d.a)(Object(d.a)({},u),{},Object(f.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(d.a)(Object(d.a)({},o),{},{data:r})),m(r)},E=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];w&&!t?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},S=function(){var t=Object(p.a)(Ka().mark((function t(r){return Ka().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Tt(e);case 2:t.sent&&(Object(k.c)({message:Object(k.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),u.language!==_&&e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.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(v,u);var L=Object(k.j)(),C=!1;return L&&L.user&&(L.userAdmin||L.userEdit)&&(C=!0),a.a.createElement("div",null,a.a.createElement(pa,{save:w?function(){return S()}:null,saveClose:w?function(){return S(!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(k.s)("$__language",1)),a.a.createElement(Ta,{id:"combo-box-demo",options:i.languages,getOptionLabel:function(e){return Object(k.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(Ce,Object.assign({},e,{label:Object(k.s)("$__language",1),variant:Object(k.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(k.s)("$__sessionDuration",1)),a.a.createElement("div",null,Object(k.s)("$__sessionDurationDescription",1)),a.a.createElement(Ta,{id:"combo-box-demo",options:i.expiresIn,getOptionLabel:function(e){return Object(k.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(Ce,Object.assign({},e,{label:Object(k.s)("$__expiresIn",1),variant:Object(k.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})}})),c.a.getState().session.isResale&&"user"!==u.type?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},c.a.getState().db.users[u._id].independentAccount?a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(k.s)("$__thisIsAIndependentAccountExplain",1)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:t.switch},a.a.createElement(wr,{checked:!!u.independentAccount,onChange:function(e){C&&j({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(k.s)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null)))}))),Qa=r(645),eo=r.n(Qa),to=r(1136);r(699),r(1377);var ro=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(le.a,{size:"22px",color:Object(k.d)("color"),icon:"today",onClick:e.onClick}))})),no=function(e){return Object(Qa.registerLocale)("pt",to.a),a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.a)({width:"100%"},e.horizontal?{display:"flex",alignItems:"center"}:{}),e.style?e.style:{}),{},{justifyContent:"center"})},a.a.createElement("div",{style:Object(d.a)({},e.horizontal?{width:e.onClear?"calc(50% - 11px)":""}:{})},a.a.createElement(eo.a,Object.assign({locale:"pt",placeholderText:e.placeholder?e.placeholder:Object(k.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(k.s)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{customInput:a.a.createElement(ro,null),showYearDropdown:!0}))),e.range?a.a.createElement("div",{style:Object(d.a)({},e.horizontal?{marginLeft:7,width:e.onClear?"calc(50% - 18px)":"calc(50% - 7px)"}:{marginTop:7})},a.a.createElement(eo.a,Object.assign({locale:"pt",placeholderText:Object(k.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(k.s)("$__time"),dateFormat:"dd/MM/yyyy HH:mm",showTimeInput:!0}:{dateFormat:"dd/MM/yyyy"},{maxDate:e.maxDate?e.maxDate:null,customInput:a.a.createElement(ro,null),showYearDropdown:!0}))):a.a.createElement(a.a.Fragment,null),e.onClear&&(e.startDate||e.endDate)?a.a.createElement("div",{style:Object(d.a)({display:"flex",justifyContent:e.clearButtonPosition?e.clearButtonPosition:"center"},e.horizontal?{}:{paddingTop:3})},a.a.createElement(E.a,Object.assign({color:Object(k.d)("lightgray"),icon:"clear",onClick:e.onClear,size:"15px"},e.horizontal?{}:{title:Object(k.s)("$__clearDate","*"),text:Object(k.s)("$__clearDate","*")}))):a.a.createElement(a.a.Fragment,null))};function ao(){ao=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var oo=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){var t=e.classes,r=c.a.getState(),o=r.sideModule,i=r.db,l=Object(n.useState)(o.data),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(n.useState)(o.data),b=Object(h.a)(g,2),v=b[0],y=b[1],x=JSON.stringify(u)!==JSON.stringify(v),_=function(t){var r=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},t.name,t.value));e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),{},Object(f.a)({},t.name,t.value))})),!t.value&&r[t.name]&&delete r[t.name],m(r)},O=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x&&!t?Object(k.c)({message:Object(k.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(p.a)(ao().mark((function t(r){return ao().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Tt(e);case 2:t.sent&&(Object(k.c)({message:Object(k.s)("$__userDataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),y(u),r&&O(!0));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=Object(k.j)(),E=!1;return j&&j.user&&(j.userAdmin||j.userEdit)&&(E=!0),a.a.createElement("div",null,a.a.createElement(pa,{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(k.s)("$__limitNumberOfUsers",1)),a.a.createElement("div",null,Object(k.s)("$__limitAdminUsersExplain",1),a.a.createElement(Ce,{label:Object(k.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}))),c.a.getState().session.isResale?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},c.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(k.s)("$__thisIsAIndependentAccountExplain",1)),a.a.createElement("ul",{style:{color:"gray",fontSize:12,width:"100%",textAlign:"initial"}},u.plan?a.a.createElement("li",null,Object(k.s)("$__signaturePlan",1),": ",Object(k.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(k.s)("$__expireAccountDate",1),": ",ma()(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(wr,{checked:!!u.independentAccount,onChange:function(e){E&&_({name:"independentAccount",value:!u.independentAccount})},name:"independentAccount",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__turnIntoIndependentAccount",1)),a.a.createElement("div",{style:{color:"gray",fontSize:11}},Object(k.s)("$__turnIntoIndependentAccountExplain",1)))):a.a.createElement(a.a.Fragment,null),(!v.independentAccount&&u.plan||!u.plan)&&u.independentAccount?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(Ta,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(k.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(Ce,Object.assign({},e,{label:Object(k.s)("$__demoPlanSignature",1),variant:Object(k.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&&!v.expireAccountDate?a.a.createElement(no,{placeholder:Object(k.s)("$__dueDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){_({name:"expireAccountDate",value:String(ma()(e).unix("X"))})},maxDate:new Date(1e3*ma()().add("days",30).unix("X")),startDate:u&&u.expireAccountDate?new Date(1e3*u.expireAccountDate):null}):a.a.createElement(a.a.Fragment,null)))}))),io=r(1094),co=r.n(io),lo=r(1095),so=r.n(lo);function uo(){uo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var po=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){e.classes;var t,r=c.a.getState(),o=r.sideModule,i=(r.db,r.session,r.functions.socket,o.data,a.a.useState(!1)),l=Object(h.a)(i,2),s=l[0],u=(l[1],a.a.useState((t={image:null},Object(f.a)(t,"image",null),Object(f.a)(t,"status",!1),t))),d=Object(h.a)(u,2),m=(d[0],d[1],a.a.useState(null)),g=Object(h.a)(m,2);g[0],g[1],Object(n.useEffect)((function(){b()}),[]);var b=function(){var e=Object(p.a)(uo().mark((function e(){return uo().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(pa,{close:function(){s?Object(k.c)({message:Object(k.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(k.s)("$__mobileTokenTip_1")),a.a.createElement("ul",null,a.a.createElement("li",null,Object(k.s)("$__mobileTokenTip_2")),a.a.createElement("li",null,Object(k.s)("$__mobileTokenTip_3")),a.a.createElement("li",null,Object(k.s)("$__mobileTokenTip_4")))),a.a.createElement("img",{src:so.a,style:{width:"52%"}}),a.a.createElement("img",{src:co.a,style:{width:"52%",marginTop:"33px"}})))}))),fo=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(d.a)(Object(d.a)({},X.l),{},{position:"absolute",right:"0px",top:"0px",bottom:"0px",minWidth:"500px",width:"25%",zIndex:"1100",backgroundColor:"rgba(255,255,255,1)"}),modulePopup:Object(d.a)(Object(d.a)({},X.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(d.a)(Object(d.a)({},X.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(d.a)(Object(d.a)({},X.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(k.d)("color"),color:Object(k.d)("light")}}},ho=Object(s.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(I.b)(C,e)}))(Object(me.a)(fo)((function(e){var t=e.classes,r=e.sideModule,n={};return e.count&&(n=Object(yt.k)(r.id)),a.a.createElement("div",{className:t.MenuButton,id:"sideModule_buttom_".concat(e.module)},a.a.createElement(Pe.a,{onClick:function(){e.openModule(e.module)}},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:e.count&&n&&n[e.count]?n[e.count]:null,color:"secondary"},a.a.createElement(le.a,{icon:e.icon,size:e.size,color:r.activeModule===e.module?Object(k.d)("active"):Object(k.d)("colorText"),title:e.title})),r.activeModule===e.module&&a.a.createElement(le.a,{className:t.MenuButton_arrow,color:r.activeModule===e.module?Object(k.d)("active"):Object(k.d)("colorText"),icon:"play_arrow"})))})));function mo(e){var t=Object(R.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(k.d)(e.color?e.color:"color"),borderColor:Object(k.d)(e.color?e.color:"color"),color:Object(k.d)("lightText"),"&:hover":{backgroundColor:Object(k.d)(e.color?e.color:"color",.8),borderColor:Object(k.d)(e.color?e.color:"color"),boxShadow:"0 0 0 0.2rem ".concat(Object(k.d)(e.color?e.color:"color",.2))},"&:active":{boxShadow:"none",backgroundColor:Object(k.d)(e.color?e.color:"color"),borderColor:Object(k.d)(e.color?e.color:"color")},"&:focus":{boxShadow:"0 0 0 0.2rem ".concat(Object(k.d)(e.color?e.color:"color",.2))}}})();return!e.color||e.color&&-1===["default","inherit","primary","secondary"].indexOf(e.color)?a.a.createElement(q.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(q.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 go(){go=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var bo,vo=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.sideModule,n=t.db,o=t.functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(null),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),E=Object(h.a)(j,2),S=E[0],L=E[1],C=a.a.useState(0),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState(""),N=Object(h.a)(D,2),P=N[0],A=N[1],$=r.data||{},z=0;$&&"step"===$.type&&(z=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===$._id&&!c.a.getState().db.cards[e].deleted})).length);var M=window.location.hash.split("/");M[0]=M[0].replace("#",""),a.a.useEffect((function(){return"user"===$.type?G():y(!1),function(){}}),[]),a.a.useEffect((function(){Y()}),[$._id]);var Y=function(){var e=Object(p.a)(go().mark((function e(){var t;return go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(yt.t)($._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(p.a)(go().mark((function t(){return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(z>0)){t.next=3;break}return Object(k.c)({message:Object(k.s)("$__beforeRemovingYouneedToMoveAllActivitiesInTheColumn",1),variant:"warning",persist:!1,horizontal:"center"}),t.abrupt("return");case 3:Object(k.c)({message:Object(k.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.p)(e,{_id:$._id},!1),Object(k.f)(e,{_id:$._id},!1),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&M.length>0&&M[0]&&36===M[0].length&&i.a.push("sp")}});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(){var t=Object(p.a)(go().mark((function t(){return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmDeleteThisAndAllLinkedsActivies",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.p)(e,{_id:$._id},!1,!0),e.reduxFunction("ASYNC","CLEAR_MODULE"),"plan"===$.type&&window.location.pathname.indexOf("sp")>-1&&M.length>0&&M[0]&&36===M[0].length&&i.a.push("sp")}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var e=Object(p.a)(go().mark((function e(){var t;return go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!1),e.next=3,kt.a.post("/Card_Count",{id:$._id,all:!0,rel:"INN"});case 3:(t=e.sent)&&(y(!0),F(t.data));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=Object(p.a)(go().mark((function e(){return go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0),o.emit("data",{module:"user",method:"post",action:"migrate"},{from:$._id,fromData:$,to:O,toData:n.users[O]},Object(p.a)(go().mark((function e(){var t;return go().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(!0),t=Object(d.a)({},n.cards),Object.keys(t).filter((function(e){return t[e]._users&&t[e]._users[$._id]})).map((function(e){t[e]._users[O]||(t[e]._users=Object(d.a)(Object(d.a)({},t[e]._users),{},Object(f.a)({},O,{access:t[e]._users[$._id].access,_id:O}))),delete t[e]._users[$._id]})),y(!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(pa,{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(k.d)("color")}},Object(k.s)("$__deleteOptions",1)),a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},"chatGroup"===$.type?Object(k.s)("$__deleteThisChatGroup",1):Object(k.s)("$__deleteThisActivity",1)),a.a.createElement(mo,{onClick:function(){B()}},Object(k.s)("$__delete",1))),"step"!==$.type&&Object.keys(S).length>0&&a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__thisActivityHasOtherLinkedsActivities",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%",color:"red"}},Object(k.s)("$__deleteAllActiviesLinkedAlert",1)),a.a.createElement(mo,{onClick:function(){R()}},Object(k.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(k.d)("color")}},Object(k.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(k.s)("$__delete".concat(n.users[$._id].type,"WithUsersDescription"),1):Object(k.s)("$__delete".concat(n.users[$._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deleteThisDescription",1)),a.a.createElement(mo,{onClick:function(){B()}},Object(k.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,v?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(k.d)("color")}},Object(k.s)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(k.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},T," ",Object(k.s)("$__items"),a.a.createElement("br",null),Object(k.s)("$__deleteCountCardsExplain"))),O?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){w(null)}},a.a.createElement(Re.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(mo,{onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(k.s)("$__confirm"),text:Object(k.s)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){H()}},{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(k.s)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(k.s)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(Ce,{label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:P,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.d)("color")},"search")),onChange:function(e){A(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)&&(!P||P&&n.users[e].name.toLowerCase().indexOf(P.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(Re.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(k.d)("color")}},Object(k.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deactivateWhithoutMigration",1)),a.a.createElement(mo,{onClick:function(){B()}},Object(k.s)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deactivateUserDescription",1)),a.a.createElement(mo,{onClick:function(){B()}},Object(k.s)("$__deactivateThis",1)))):a.a.createElement(a.a.Fragment,null),v?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(da.a,null)):a.a.createElement(a.a.Fragment,null)))}));w.default.div(bo||(bo=Object(u.a)(["\n            background-color:none\n            ","\n            "])),(function(e){return e.isDragDisable?"":e.isDragging?"opacity:0.88":""}));var yo=Object(s.b)((function(e){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=(t.db,t.session,a.a.useState("")),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],p=s[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(Ce,{label:Object(k.s)("$__ApprovalOrRejectReason",1),variant:Object(k.d)("fieldVariant"),name:"reason",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"toc"})),onChange:function(e){i(e.target.value)}},value:o,placeholder:Object(k.s)("$__ApprovalOrRejectReason",1)})),u?a.a.createElement(Tr,null):a.a.createElement("div",{style:{display:"flex",alignContent:"flex-end",justifyContent:"center"}},a.a.createElement(E.a,{reverse:!0,title:Object(k.s)("$__indorse"),text:Object(k.s)("$__indorse"),color:"green",textColor:"green",icon:"approval",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmApproveItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){br(Object(d.a)(Object(d.a)({},e),{},{reason:o,approval:!0,approved:!0})),p(!0)}})},size:"25px",style:{padding:12}}),a.a.createElement(E.a,{reverse:!0,title:Object(k.s)("$__reject"),text:Object(k.s)("$__reject"),color:"red",textColor:"red",icon:"backspace",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmRejectItem",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){br(Object(d.a)(Object(d.a)({},e),{},{reason:o,approval:!0}))}})},size:"25px",style:{padding:12}}))))})),xo=r(96),_o=r(782),Oo=r.n(_o),wo=["currencySymbol"],jo=["classes","currencySymbol","inputProps","InputProps"],Eo=function(e){Object(P.a)(r,e);var t=Object(A.a)(r);function r(e){var n;return Object(D.a)(this,r),(n=t.call(this,e)).getValue=n.getValue.bind(Object(xo.a)(n)),n.callEventHandler=n.callEventHandler.bind(Object(xo.a)(n)),n}return Object(N.a)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=(e.currencySymbol,Object(V.a)(e,wo));this.autonumeric=new Oo.a(this.input,this.props.value,Object(d.a)(Object(d.a)(Object(d.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.classes,t.currencySymbol),n=t.inputProps,o=t.InputProps,i=(Object(V.a)(t,jo),{});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(Le.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(d.a)({startAdornment:a.a.createElement(Et.a,{position:"start"},r)},o),inputProps:Object(d.a)({},n)},i))}}]),r}(a.a.Component);Eo.defaultProps={type:"text",variant:"standard",currencySymbol:"$",outputFormat:"number",textAlign:"right",maximumValue:"10000000000000",minimumValue:"-10000000000000"};var ko=Eo,So=(Oo.a.getPredefinedOptions(),r(1949)),Lo=r(1096),Co=r.n(Lo);function Io(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useRef(null),c=a.a.useState(0),l=Object(h.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(So.a,{variant:"text",ref:i,"aria-label":"split button"},a.a.createElement(q.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(q.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(Co.a,null))),a.a.createElement(rt.a,{open:n,anchorEl:i.current,role:void 0,transition:!0},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ze.a,Object.assign({},r,{style:{transformOrigin:"bottom"===n?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:p},a.a.createElement(et.a,{id:"split-button-menu"},e.options.map((function(t,r){return a.a.createElement(Qe.a,{key:t.value,selected:t.value===s,onClick:function(){u(t.value),d(),e.onChange&&e.onChange(t.value)}},t.label)}))))))})))}var To=r(1969),Fo=Object(me.a)({root:{"&:hover":{backgroundColor:"transparent"},color:Object(k.d)("color")}})(To.a);function Do(){Do=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var No=Object(R.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 Po=Object(s.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=No(),r=a.a.useRef(null),n=c.a.getState(),o=n.db,i=n.session,l=(n.functions,a.a.useState(o.cards[e._id]||{})),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(!!e.open),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState([]),O=Object(h.a)(x,2),w=O[0],j=O[1],S=a.a.useState([]),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState(""),F=Object(h.a)(T,2),D=F[0],N=F[1],P=a.a.useState(!1),A=Object(h.a)(P,2),$=A[0],z=A[1],M=a.a.useState(!1),B=Object(h.a)(M,2),R=B[0],G=B[1],H=a.a.useState(Object(yt.v)(u._id)),W=Object(h.a)(H,2),U=W[0],V=W[1];a.a.useEffect((function(){return V(Object(yt.v)(u._id)),function(){}}),[e.users]),a.a.useEffect((function(){o.cards[e._id]&&JSON.stringify(o.cards[e._id])!==JSON.stringify(u)&&(m(o.cards[e._id]),V(Object(yt.v)(u._id)))}),[e.cards]);var X=Object(k.j)(),J=Object(yt.u)(u._id),K=!1;J>3&&(K=!0),!K&&X.plan&&X.planAdmin&&(K=!0);var Z=window.location.hash.split("/");function Q(e){"Tab"===e.key&&(e.preventDefault(),y(!1))}Z[0]=Z[0].replace("#","");var ee=function(){var t=Object(p.a)(Do().mark((function t(r,n){var a,i;return Do().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,Ht(e,r,a,u._id,i);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),te=function(){var e=Object(p.a)(Do().mark((function e(t){return Do().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.a.put("cards/removeAccess/",{cardId:u._id,userIds:w}),j([]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var t=Object(p.a)(Do().mark((function t(){return Do().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:C.map((function(t){Object(yt.L)(e,{_id:u._id,userId:t,option:!0})})),G(!1);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ne=function(e){var t=e.data;return a.a.createElement(Qe.a,null,t.label,a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}}))},ae=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&&_()(1e3*parseInt(u._users[r].myDay)).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")&&(o=!0);var i=!!(Object.keys(U).length>1&&U[r]&&U[r].isResponsible),c=!!(e.customDefine&&e.customDefine.name&&Object.keys(U).length>1&&U[r]&&U[r][e.customDefine.name]),l=U[r]?U[r]:u._users[r];return a.a.createElement(Qe.a,{onClick:n?function(){}:null,disabled:!n},a.a.createElement("div",{style:Object(d.a)({position:"relative",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},n?{}:{cursor:"pointer"})},a.a.createElement("div",{style:Object(d.a)(Object(d.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&&K?a.a.createElement(E.a,{title:Object(k.s)("$__defineAsResponsible",1),color:"lightGray",icon:"admin_panel_settings",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"left",confirm:function(){Vt(e,{cardId:u._id,userId:r})}})},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.customDefine&&u._users[r]&&K?a.a.createElement(E.a,{title:Object(k.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]?"red":"green",icon:e.customDefine&&e.customDefine.icon||"check",onClick:function(){Object(k.c)({message:Object(k.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(){qt(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(Fo,Object.assign({},R?{checked:!!(o||C.indexOf(r)>-1)}:{checked:!!u._users[r]},{disabled:!(!R||!o),onClick:n?function(){if(R){var e=Array.from(C);-1===e.indexOf(r)?e.push(r):e.indexOf(r)>-1&&e.splice(e.indexOf(r),1),I(e)}else!function(e){var t=Array.from(w);u._users[e]&&-1===t.indexOf(e)?(t.push(e),j(t)):u._users[e]&&t.indexOf(e)>-1?(t.splice(t.indexOf(e),1),j(t)):u._users[e]||ee(e)}(r)}:null,color:"default"}))),w.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(q.a,{ref:r,"aria-controls":v?"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(gt,{data:u||{}})),a.a.createElement(rt.a,{open:v,anchorEl:r.current,transition:!0},(function(t){var r,n=t.TransitionProps,o=t.placement;return a.a.createElement(Ze.a,Object.assign({},n,{style:{transformOrigin:"bottom"===o?"center top":"center bottom",maxHeight:"333px",minHeight:"50px",overflowY:"auto"},id:"quick_417"}),a.a.createElement(tt.a,null,a.a.createElement("div",{style:(r={position:"relative",width:"100%",paddingBottom:w&&w.length>0||C&&C.length>0?"50px":0},Object(f.a)(r,"width","100%"),Object(f.a)(r,"display","flex"),Object(f.a)(r,"justifyContent","space-between"),r)},a.a.createElement(Ke.a,{onClickAway:function(){y(!1),G(!1),I([])}},a.a.createElement("div",null,$&&a.a.createElement("div",{style:{position:"relative",marginTop:15,width:"100%",padding:"4px 15px",fontSize:"16px",color:"lightGray"}},a.a.createElement(Ce,{id:"quickUser_Search",label:Object(k.s)("$__searchByName",1),variant:Object(k.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end",style:{cursor:"pointer"},onClick:function(){N(""),z(!1)}},a.a.createElement(le.a,{icon:"close"})),onChange:function(e){N(e.target.value)},onBlur:function(e){}},value:D,placeholder:Object(k.s)("$__searchByName",1),autoFocus:!0})),a.a.createElement(et.a,{autoFocusItem:v,id:"menu-list-grow",onKeyDown:Q},R?a.a.createElement("div",{style:{position:"relative",overflow:"auto"}},a.a.createElement(Qe.a,{disabled:!0},Object(k.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(ae,{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(Qe.a,{disabled:!0},Object(k.s)("$__usersGroups","*")),console.log(c.a.getState().db.userGroup),c.a.getState().db.userGroup.map((function(e){return a.a.createElement(ne,{data:e,key:e.value})}))):a.a.createElement(a.a.Fragment,null),a.a.createElement(Qe.a,{disabled:!0},Object(k.s)("$__users","*")),Object.keys(U).filter((function(t){if((!D||D&&U[t].name.toLowerCase().indexOf(D.toLowerCase())>-1)&&"user"===U[t].type&&!U[t].deleted&&!U[t]._parent&&(!e.customDefine||e.customDefine&&u._users[t]))return!0})).sort((function(e,t){return U[e].name<U[t].name?-1:U[e].name>U[t].name?1:0})).map((function(e){return U&&U[e]&&U[e]._id&&a.a.createElement(ae,{pr:e,key:e})})),Object.keys(U).filter((function(t){if((!D||D&&U[t].name.toLowerCase().indexOf(D.toLowerCase())>-1)&&"external"===U[t].type&&!U[t].deleted&&(!e.customDefine||e.customDefine&&u._users[t]))return!0})).length>0&&a.a.createElement(Qe.a,{disabled:!0},Object(k.s)("$__UnityUsers","*")),Object.keys(U).filter((function(t){return(!D||D&&U[t].name.toLowerCase().indexOf(D.toLowerCase())>-1)&&"external"===U[t].type&&!U[t].deleted&&(!e.customDefine||e.customDefine&&u._users[t])})).sort((function(e,t){return U[e].name<U[t].name?-1:U[e].name>U[t].name?1:0})).map((function(e){return U&&U[e]&&U[e]._id&&a.a.createElement(ae,{pr:e,key:e})})),Object.keys(U).filter((function(t){if((!D||D&&U[t].name.toLowerCase().indexOf(D.toLowerCase())>-1)&&"consultant"===U[t].type&&!U[t].deleted&&(!e.customDefine||e.customDefine&&u._users[t]))return!0})).length>0&&a.a.createElement(Qe.a,{disabled:!0},Object(k.s)("$__planningUsers","*")),Object.keys(U).filter((function(t){if((!D||D&&U[t].name.toLowerCase().indexOf(D.toLowerCase())>-1)&&"consultant"===U[t].type&&!U[t].deleted&&(!e.customDefine||e.customDefine&&u._users[t]))return!0})).sort((function(e,t){return U[e].name<U[t].name?-1:U[e].name>U[t].name?1:0})).map((function(e){return U&&U[e]&&U[e]._id&&a.a.createElement(ae,{pr:e,key:e})})))),$||R?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(E.a,{title:Object(k.s)("$__searchUser",1),color:Object(k.d)("menu"),icon:"search",onClick:function(){z(!0)},size:"25px"})),e.customDefine||$||R||!K?R?a.a.createElement("div",{style:{position:"absolute",right:15,top:10}},a.a.createElement(E.a,{title:Object(k.s)("$__back",1),color:Object(k.d)("menu"),icon:"arrow_back",onClick:function(){G(!1)},size:"25px"})):a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:45,top:10}},a.a.createElement(E.a,{title:Object(k.s)("$__sendToMyDay",1),color:"orange",icon:"schedule_send",onClick:function(){G(!0)},size:"25px"}))))),w&&w.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(k.s)("$__confirmSelectedUsersRemove"),a.a.createElement(E.a,{title:Object(k.s)("$__remove",1),color:"#FFFFFF",icon:"delete_forever",onClick:function(){te()},size:"25px",transparent:!0})),R&&C&&C.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(wt.a,{style:{flexWrap:"wrap"}},C.map((function(e,t){return e&&c.a.getState().db.users[e]?a.a.createElement(Ne.a,{title:c.a.getState().db.users[e].name,key:e},a.a.createElement(Re.a,{alt:c.a.getState().db.users[e].name,src:c.a.getState().db.users[e].image||null,style:{width:"23px",height:"23px"}},c.a.getState().db.users[e].name.substr(0,1))):a.a.createElement(a.a.Fragment,null)}))),a.a.createElement(E.a,{title:Object(k.s)("$__sendToMyDay",1),color:"#FFFFFF",icon:"schedule_send",onClick:function(){re()},size:"25px",transparent:!0}))))})))})),Ao=Object(R.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)}}})),$o={recurrence:"0",recurrenceRepeatDays:null,recurrenceEndDate:null,recurrenceLimit:null,recurrenceMyDay:null,recurrenceOnlyCompleted:null,recurrenceDuplicateCard:null};var zo=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({recurrence:"0"}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=Ao();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=_()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD");return _()(1e3*e.data.startDate).tz("America/Sao_Paulo").add(r,"d").unix("X")<_()().tz("America/Sao_Paulo").unix("X")&&(n=_()().tz("America/Sao_Paulo").add(r,"d").format("YYYY-MM-DD")),Object(d.a)(Object(d.a)({},t),{},{recurrenceNextDate:n})}(t)),t.recurrence&&parseInt(t.recurrence)>0&&parseInt(t.recurrence)<31&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(parseInt(t.recurrence),"days").format("YYYY-MM-DD")})),"everyFriday"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(5).format("YYYY-MM-DD")})),"everyMonday"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().tz("America/Sao_Paulo").add(1,"weeks").isoWeekday(1).format("YYYY-MM-DD")})),"everyFirstMonthDay"===t.recurrence&&(r=Object(d.a)(Object(d.a)({},r),{},{recurrenceNextDate:_()().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(k.s)("$__recurrence"),a.a.createElement(Io,{options:[{value:"0",label:Object(k.s)("$__nonrecurrence")},{value:"1",label:Object(k.s)("$__everyDay")},{value:"7",label:Object(k.s)("$__weekly")},{value:"15",label:Object(k.s)("$__every15days")},{value:"30",label:Object(k.s)("$__every30days")},{value:"everyFirstMonthDay",label:Object(k.s)("$__everyFirstMonthDay")},{value:"everyMonday",label:Object(k.s)("$__everyMonday")},{value:"everyFriday",label:Object(k.s)("$__everyFriday")},{value:"custom",label:Object(k.s)("$__custom")}],value:n&&n.recurrence?n.recurrence:"0",onChange:function(e){c("0"===e?Object(d.a)(Object(d.a)({},$o),{},{recurrence:null,recurrenceRepeatDays:null}):"custom"!==e?{recurrence:"".concat(e),recurrenceRepeatDays:null}:Object(d.a)(Object(d.a)({},n),{},{recurrence:"".concat(e),recurrenceNextDate:null,recurrenceRepeatDays:1}))}})),n&&n.recurrence&&"0"!==String(n.recurrence)&&a.a.createElement("div",{className:i.custom},Object(k.s)("$__preffers",1),n&&"custom"===n.recurrence&&a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(k.s)("$__repeatEvery",1),a.a.createElement(Ce,{style:{width:"100px"},variant:Object(k.d)("standard"),name:"recurrenceRepeatDays",type:"number",min:"1",InputLabelProps:{shrink:!0},InputProps:{min:1,autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"replay_10"}),Object(k.s)("$__days").toLowerCase()),onChange:function(e){parseInt(e.target.value)>0&&c(Object(d.a)(Object(d.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(k.s)("$__limitDate",1),a.a.createElement(Ce,{style:{width:"200px"},variant:Object(k.d)("standard"),name:"endDate",InputLabelProps:{shrink:!0},type:"date",InputProps:{endAdornment:n.recurrenceEndDate?a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"clear",onClick:function(){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:null}))}})):null,autoComplete:"new-password",onBlur:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:e.target.value?_()(e.target.value).tz("America/Sao_Paulo").format("YYYY-MM-DD"):null}))},onChange:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceEndDate:e.target.value?_()(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(k.s)("$__recurrenceDuplicateCard",1),a.a.createElement(wr,{checked:!!n.recurrenceDuplicateCard,onChange:function(e){c(Object(d.a)(Object(d.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(k.s)("$__copyCatenation",1),a.a.createElement(wr,{checked:!!n.recurrenceCopyCatenation,onChange:function(e){c(Object(d.a)(Object(d.a)({},n),{},{recurrenceCopyCatenation:!n.recurrenceCopyCatenation}))},name:"recurrenceCopyCatenation",inputProps:{"aria-label":"secondary checkbox"}}))))}));function Mo(){Mo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Yo=Object(s.b)((function(e){return{tags:e.db.tag}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ma)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],i=Object(k.j)();a.a.useEffect((function(){if(e.data.values){var t=[];e.data.values.map((function(e){c.a.getState().db.tag.filter((function(t){return t.value===e.value})).length>0&&t.push(e)})),o(t)}}),[e.data]);var l=function(){var t=Object(p.a)(Mo().mark((function t(r){return Mo().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(za,{dbNode:e.dbNode?e.dbNode:"tag",secondaryParent:e.secondaryParent?e.secondaryParent:null,options:c.a.getState().db.tag?c.a.getState().db.tag:[],style:{width:"100%"},name:"tag",ws:!0,title:Object(k.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){l(e)},colorPickerCallBack:function(e){c.a.getState().functions.socket.emit("tag.UPD",e)}}))}))),Bo=r(129),Ro=r.n(Bo);function Go(){Go=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ho=Object(s.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t,r=e.classes,n=e.sideModule,o=c.a.getState(),l=o.db,s=o.session,u=l.planType,m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState({}),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState(!1),S=Object(h.a)(j,2),L=S[0],C=S[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState(!1),M=Object(h.a)(z,2),B=M[0],R=M[1],G=a.a.useState(null),H=Object(h.a)(G,2),W=H[0],U=H[1],V=a.a.useState(null),q=Object(h.a)(V,2),X=q[0],J=q[1],K=a.a.useState(!1),Z=Object(h.a)(K,2),Q=Z[0],ee=Z[1],te=a.a.useState(0),re=Object(h.a)(te,2),ne=re[0],ae=re[1],oe=a.a.useState(!1),ie=Object(h.a)(oe,2),ce=ie[0],se=ie[1],ue=Object(k.j)(),de=Object(yt.u)(n.id);a.a.useEffect((function(){b._id!==n.data._id&&(v(n.data),C(!1)),B||(n.data.startDate&&U(n.data&&n.data.startDate?n.data.startDate:null),n.data.endDate&&J(n.data&&n.data.endDate?n.data.endDate:null),v(n.data),C(!1),"link"!==b.type||b.name||ge(),R(!0),pe()),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(C(!0),e.reqSave&&e.reqSave(!0))}),[n.data,b]),a.a.useEffect((function(){!b.name||b.name&&""===b.name.trim?C(!1):C(!0)}),[O]),a.a.useEffect((function(){e.cards[b._id]&&(e.cards[b._id]._requireApproval&&!b._requireApproval||!e.cards[b._id]._requireApproval&&b._requireApproval)&&v(Object(d.a)(Object(d.a)({},b),{},{_requireApproval:!e.cards[b._id]._requireApproval}))}),[e.cards]);var pe=function(){var t=Object(p.a)(Go().mark((function t(){return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 2:t.sent&&se(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),fe=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!b[t.name]||n.data[t.name]&&n.data[t.name]!==t.value||a)&&e.reqSave&&e.reqSave(!0);var o=Object(d.a)(Object(d.a)({},b),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(d.a)(Object(d.a)(Object(d.a)({},b),o),{},Object(f.a)({},r.name,r.value))),v(o),w(Object(d.a)(Object(d.a)({},O),{},Object(f.a)({},t.name,t.value),r&&r.name&&r.value?Object(f.a)({},r.name,r.value):{}))},he=function(t){L&&!t?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},me=function(){var t=Object(p.a)(Go().mark((function t(){var r,a=arguments;return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],F){t.next=19;break}if(C(!1),e.reqSave&&e.reqSave(!1),b.status||(b.status="notStarted"),"new"===n.id&&n.data&&v(Object(d.a)(Object(d.a)({},b),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:b})),b.name&&(!b.name||""!==b.name.trim())){t.next=12;break}D(!1),Object(k.c)({message:Object(k.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(yt.H)(Object(d.a)(Object(d.a)({},e),{},{store:Object(d.a)(Object(d.a)({},e.store),{},{db:Object(d.a)({},c.a.getState().db)})}),r,b);case 14:t.sent&&(O&&O.status&&(Object(yt.Q)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:b._id}}),{status:O.status}),Object(yt.f)(e,b._id,O.status)),D(!1),Object(k.c)({message:Object(k.s)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),C(!1),e.reqSave&&e.reqSave(!1),r&&he(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ge=function(){var t=Object(p.a)(Go().mark((function t(){var r;return Go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y.a.post("/link/content",{url:b.url});case 2:r=t.sent,v(Object(d.a)(Object(d.a)({},b),{},{content:r.data.article})),C(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),be=n.data&&n.data.type?l.dataType.filter((function(e){return e.name===n.data.type}))[0]:{},ve=null;if(b._parent&&(ve=c.a.getState().db.cards[b._parent]),!b)return null;var ye=c.a.getState().db.cards[b._id]&&c.a.getState().db.cards[b._id]._users&&c.a.getState().db.cards[b._id]._users[s._id]&&c.a.getState().db.cards[b._id]._users[s._id].myDay?c.a.getState().db.cards[b._id]._users[s._id].myDay:null,xe=!!(!ye||ye&&ye&&_()(new Date(1e3*ye)).format("YYYY/MM/DD")!==_()().format("YYYY/MM/DD")),_e=b.isTemplate?b.isTemplate:Object(yt.S)(b._id),Oe=!!e.permission&&e.permission;!b||!b._planId||l.cards[b._planId]&&Object(yt.D)(b._planId)||(Oe=!1),!Oe&&parseInt(de)>=4&&(Oe=!0),!Oe&&Object(yt.D)(b._planId)&&ue&&ue.admin&&ue.plan&&(ue.planAdmin||ue.planModerate)&&(Oe=!0);var we=!1,je=a.a.createElement(a.a.Fragment,null);if(b&&b.url&&b.url.indexOf(".youtube.com/watch?")>-1){var Ee=b.url.split("?")[1].split("v=")[1].split("&")[0];Ee&&(je=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(Ee),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),we=!0)}if(b&&b.url&&b.url.indexOf("//youtu.be/")>-1){var ke=b.url.split(".be/")[1];ke&&(je=a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(ke),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),we=!0)}return a.a.createElement(a.a.Fragment,null,a.a.createElement(pa,{save:L?function(){D(!0),me()}:null,saveClose:L?function(){D(!0),me(!0)}:null,saveLoader:F,close:function(){e.onClose&&e.onClose()}}),a.a.createElement("div",{className:r.root},b._requireApproval?a.a.createElement("div",{style:{position:"relative",width:"100%",background:Object(k.d)("ColumnTitleColor"),padding:7,display:"grid"}},a.a.createElement("div",{style:{color:"red",fontWeight:"bold",fontSize:14}},Object(k.s)("$__attention",1),": ",a.a.createElement("span",{style:{color:"#FFFFFF"}},Object(k.s)("$__thisActivityRequireApproval",1))),a.a.createElement(yo,{nodeId:b._id})):a.a.createElement(a.a.Fragment,null),we?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"}},je):a.a.createElement(a.a.Fragment,null),Oe&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("imageUpload"))&&a.a.createElement(dn,{img:b?b.image:null,onChange:function(e,t){fe({name:"image",value:e}),fe({name:"file",value:t})},files:b._files?b._files:{},maxWidthOrHeight:600,avatar:"chatGroup"===b.type,aspectRatio:"chatGroup"===b.type?null:16/9,onDelete:function(){fe({name:"image",value:null},{name:"file",value:null},!0)}}),!Oe&&b.image&&a.a.createElement("div",{className:r.image,style:{backgroundImage:"url(".concat(b.image,")")}}),"plan"!==b.type||b._id?a.a.createElement(a.a.Fragment,null):a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(Ta,{id:"combo-box-demo",options:u,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"planType",disableClearable:!0,value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__planType",1),variant:Object(k.d)("fieldVariant"),value:b&&b.planType?u.filter((function(e){return e.value===b.planType}))[0]:u[0]}))},onChange:function(e,t){fe({name:"planType",value:t.value})}}),u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType&&!0===e.swot})).length>0?a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement("div",{style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",color:Object(k.d)("color")}},a.a.createElement(le.a,{icon:Ro.a,color:Object(k.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(k.s)(u.filter((function(e){return!b.planType||b.planType&&e.value===b.planType}))[0].description,1))),a.a.createElement("div",{className:r.data},(b._parent||b._planId)&&ce?a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"auto"}},a.a.createElement("span",{style:{color:Object(k.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(k.s)("$__loadingdata")),a.a.createElement(Tr,null)):(b._parent&&l.cards[b._parent]||b._planId&&l.cards[b._planId])&&a.a.createElement(Sr,{id:b._parent?b._parent:b._planId?b._planId:null,open:function(t){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:t},"step"===c.a.getState().db.cards[t].type?{module:"columnEdit",activeModule:"columnEdit"}:{module:"cardEdit",activeModule:"cardEdit"}),{},{data:c.a.getState().db.cards[t]}))}}),a.a.createElement("div",{style:{position:"relative",alignItems:"center",clear:"both",justifyContent:"space-between",display:"flex"}},b._id&&l.cards[b._id]&&l.cards[b._id]._users&&a.a.createElement(Po,{_id:b._id,noLimit:!0,avatarSize:"33px",permission:Oe}),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},"plan"===b.type&&b._id&&Oe?a.a.createElement(E.a,{title:Object(k.s)("$__openPlan",1),icon:"launch",color:"lightgray",onClick:function(){i.a.push("sp#".concat(b._id,"/dashboard")),he(!0)},size:"25px"}):a.a.createElement(a.a.Fragment,null),e.card&&e.card._id&&"plan"===e.card.type?a.a.createElement(E.a,{title:Object(k.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(k.g)(e,b._id,!(!e.card||!e.card._isFavorite)),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},b._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[b._id]),{},{_isFavorite:!e.card||!e.card._isFavorite})))}))},size:"25px"}):a.a.createElement(a.a.Fragment,null),b._id&&36===b._id.length&&"chatGroup"!==b.type&&"plan"!==b.type&&a.a.createElement(E.a,{title:Object(k.s)(ye&&_()(new Date(1e3*ye)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"$__removeOfMyDate":"$__addOnMyDay",1),color:ye&&_()(new Date(1e3*ye)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"red":"lightblue",icon:ye&&_()(new Date(1e3*ye)).format("YYYY/MM/DD")===_()().format("YYYY/MM/DD")?"auto_delete":"alarm_add",onClick:function(){Object(yt.L)(e,{_id:b._id,userId:s._id,option:xe}),e.myDayClick&&e.myDayClick()},size:"25px"}))),a.a.createElement("div",null,e.card&&"plan"!==b.type&&"chatGroup"!==b.type&&e.card._id&&e.card._users[s._id]&&"completed"!==b.status&&de>0?a.a.createElement("div",{style:{position:"relative",width:"100%",float:"left"},onClick:function(e){e.stopPropagation()}},a.a.createElement(ar,{data:e.card})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,"plan"===b.type&&b._id?Object(k.s)("$__plan ".concat(b.planType?u[1].label:u[0].label),1):Object(k.s)("$__data",1)),a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:7}},a.a.createElement("div",{style:{color:"gray"}},b._cardCode?"#".concat(b._cardCode," "):""),b.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",textAlign:"right",marginLeft:10}},Object(k.s)("$__createdAt"),": ",Object(k.k)(b.created_at)):a.a.createElement(a.a.Fragment,null)),a.a.createElement(Ce,{label:Object(k.s)(be&&be.fieldsTitle&&be.fieldsTitle.name?be.fieldsTitle.name:"$__titleOfCard",1),variant:Object(k.d)("fieldVariant"),name:"name",id:"edit_693",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){fe(e.target)}},value:b&&b.name?b.name:"",placeholder:Object(k.s)(be&&be.fieldsTitle&&be.fieldsTitle.placeholder&&be.fieldsTitle.placeholder.name?be.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("name")>-1))}),de>3||b.description||Oe?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:Object(k.s)("$__description",1),variant:Object(k.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"toc"})),onChange:function(e){fe(e.target)}},value:b&&b.description?b.description:"",placeholder:Object(k.s)("$__descriptionOfCard_placeholder",1),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),"task"===b.type||"iniciative"===b.type?a.a.createElement(ko,{label:Object(k.s)("$__price",1),variant:"standard",currencySymbol:"$",outputFormat:"string",style:{width:"100%",marginBottom:10},value:b&&b.value?b.value:"",onChange:function(e,t){return fe({name:"value",value:t})}}):a.a.createElement(a.a.Fragment,null),(de>3||b.url||Oe)&&"chatGroup"!==b.type?a.a.createElement(Ce,{label:Object(k.s)("$__URL",1),variant:Object(k.d)("fieldVariant"),name:"url",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"http"})),onChange:function(e){fe(e.target)}},value:b&&b.url?b.url:"",placeholder:"https://domain.com",disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("name")>-1))}):a.a.createElement(a.a.Fragment,null),b.url?a.a.createElement("div",{style:{width:"100%",textAlign:"right"}},a.a.createElement("a",{href:b.url,target:"_blank",style:{color:Object(k.d)("menu"),fontWeight:"bold"}},Object(k.s)("$__openlink","*"))):a.a.createElement(a.a.Fragment,null)),(de>3||b.client||Oe)&&!_e&&Oe&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("client"))&&(!b.client||b.client&&l.users[b.client])&&a.a.createElement(Ta,{id:"combo-box-demo",options:Object.keys(l.users).filter((function(e){return"client"===l.users[e].type||"group"===l.users[e].type||"sic"===l.users[e].type})).sort((function(e,t){return l.users[e].name<l.users[t].name?-1:l.users[e].name>l.users[t].name?1:0})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}})),getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"client",value:b&&b.client?Object.keys(l.users).filter((function(e){return b.client&&l.users[e]._id===b.client})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}}))[0]:null,renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__account",1),variant:Object(k.d)("fieldVariant"),value:b&&b.client?Object.keys(l.users).filter((function(e){return b.client&&l.users[e]._id===b.client})).map((function(e){return{label:l.users[e].name,value:String(l.users[e]._id)}}))[0]:null}))},onChange:function(e,t){fe({name:"client",value:t&&t.value?String(t.value):null})},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("client")>-1))}),((de>2||b.endDate||b.startDate||Oe)&&!_e&&"chatGroup"!==b.type||!(!Oe&&!b.startDate&&!b.endDate)&&!_e&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("deadline")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__deadline",1)),b.endDate||b.startDate||A?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:Object(k.s)("$__initialDate",1),variant:Object(k.d)("fieldVariant",1),name:"startDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:null,autoComplete:"start-date",onChange:function(e){_()(e.target.value).isValid()&&U(_()(e.target.value).unix("X"));var t={startDate:_()(e.target.value).unix("X")};U(_()(e.target.value).unix("X")),(!X||X<_()(e.target.value).unix("X"))&&(t=Object(d.a)(Object(d.a)({},t),{},{endDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X")}),J(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 23:59:59")).unix("X"))),v(Object(d.a)(Object(d.a)({},b),t)),C(!0)}},value:W?_()(1e3*W).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement(Ce,{label:Object(k.s)("$__endDate",1),variant:Object(k.d)("fieldVariant",1),name:"endDate",InputLabelProps:{shrink:!0},type:"datetime-local",inputProps:{min:!X||W?_()(1e3*W).format("YYYY-MM-DDTHH:mm"):null,autoComplete:"end-date",onChange:function(e){var t={endDate:_()(e.target.value).unix("X")};J(_()(e.target.value).unix("X")),W||(t=Object(d.a)(Object(d.a)({},t),{},{startDate:_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X")}),U(_()("".concat(_()(e.target.value).format("YYYY-MM-DD")," 00:00:00")).unix("X"))),v(Object(d.a)(Object(d.a)({},b),t)),C(!0)}},value:X?_()(1e3*X).format("YYYY-MM-DDTHH:mm"):null}),a.a.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"flex-end"}},a.a.createElement(E.a,{color:Object(k.d)("lightgray"),icon:"clear",onClick:function(){U(null),J(null),v(Object(d.a)(Object(d.a)({},b),{},{startDate:null,endDate:null,recurrence:null})),$(!1),C(!0)},size:"15px",title:Object(k.s)("$__clearDate","*"),text:Object(k.s)("$__clearDate","*")})),a.a.createElement("div",{style:{position:"relative",width:"fit-content",float:"right",display:"flex",justifyContent:"right"}},a.a.createElement(Io,{options:[{value:0,label:"Manual"},{value:7,label:"7 ".concat(Object(k.s)("$__days").toLowerCase())},{value:15,label:"15 ".concat(Object(k.s)("$__days").toLowerCase())},{value:30,label:"30 ".concat(Object(k.s)("$__days").toLowerCase())},{value:60,label:"60 ".concat(Object(k.s)("$__days").toLowerCase())},{value:90,label:"90 ".concat(Object(k.s)("$__days").toLowerCase())},{value:180,label:"180 ".concat(Object(k.s)("$__days").toLowerCase())},{value:365,label:"365 ".concat(Object(k.s)("$__days").toLowerCase())}].concat(Object(Se.a)(ve&&ve.startDate&&ve.endDate?[{value:"parent",label:"".concat(Object(k.s)("$__useParentDate")," ").concat(_()(1e3*ve.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")," - ").concat(_()(1e3*ve.endDate).tz("America/Sao_Paulo").format("DD/MM/YYYY"))}]:[])),value:ne||"",onChange:function(e){"parent"!==e&&0!==e?(J(_()(new Date(1e3*W)).tz("America/Sao_Paulo").add(e,"days").unix("X")),fe({name:"endDate",value:_()(new Date(1e3*W)).tz("America/Sao_Paulo").add(e,"days").unix("X")},null,!0)):"parent"===e&&(ve.startDate&&(U(ve.startDate),fe({name:"startDate",value:ve.startDate},ve.endDate?{name:"endDate",value:ve.endDate}:null,!0),ve.endDate&&J(ve.endDate)),!ve.startDate&&ve.endDate&&(J(ve.endDate),fe({name:"endDate",value:ve.endDate},null,!0))),ae(e)}})),a.a.createElement("div",{className:r.switch,style:{position:"relative",width:"100%",float:"left",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(k.s)("$__freeChildrenDate",1),a.a.createElement(wr,{checked:!!b.freeChildrenDate,onChange:function(e){fe({name:"freeChildrenDate",value:!b.freeChildrenDate})},name:"freeChildrenDate",inputProps:{"aria-label":"secondary checkbox"},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("freeChildrenDate")>-1))})),b.startDate&&_()(b.startDate).isValid()&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("recurrence"))&&a.a.createElement("div",{style:{width:"311px",position:"relative",float:"left"}},b._recurrenceId?a.a.createElement("div",{style:{marginTop:"15px"}},Object(k.s)("$__recurrentActivityFrom"),":",a.a.createElement(vn,(t={db:"cards",data:l.cards[b._recurrenceId]},Object(f.a)(t,"db","cards"),Object(f.a)(t,"Avatar",!0),Object(f.a)(t,"ignoreList",!0),Object(f.a)(t,"onlyOption",!0),t))):a.a.createElement("div",null,a.a.createElement(zo,{data:b,onChange:function(e){v(Object(d.a)(Object(d.a)(Object(d.a)({},b),e),{},{recurrenceNextDate:_()("".concat(e.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").format("YYYY-MM-DD")})),C(!0)}}),b.recurrence&&"0"!==b.recurrence&&b.recurrenceNextDate&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",null,Object(k.s)("$__NextRecurrenceDate")),a.a.createElement(no,{placeholder:Object(k.s)("$__NextRecurrenceDate"),clearButtonPosition:"flex-end",onChangeStartDate:function(e){var t={recurrenceNextDate:_()(e).tz("America/Sao_Paulo").format("YYYY-MM-DD")};v(Object(d.a)(Object(d.a)({},b),t)),C(!0)},startDate:b.recurrenceNextDate&&_()(b.recurrenceNextDate).isValid()?new Date(1e3*_()("".concat(b.recurrenceNextDate," 06:00:00")).tz("America/Sao_Paulo").unix("X")):null,onClear:function(){v(Object(d.a)(Object(d.a)({},b),{},{recurrenceNextDate:null})),C(!0)}}))))):Oe||(de>2||b.endDate||b.startDate||Oe)&&!_e?a.a.createElement(Be,{text:Object(k.s)("$__addDeadline",1),icon:"timer",onClick:function(){$(!0),U(_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")),fe({name:"startDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X")},"parent"!==ne?{name:"endDate",value:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(ne,"days").unix("X")}:null),"parent"!==ne&&J(_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add(ne,"days").unix("X"))}}):a.a.createElement(a.a.Fragment,null)),("completed"===b.status||!Oe)&&de<3?a.a.createElement(a.a.Fragment,null,b._tags&&b._tags.length>0?a.a.createElement(qe.a,{options:b._tags,expanded:!0}):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("tags"))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__tags",1)),a.a.createElement(Yo,{data:{values:b._tags?b._tags:[]},callBack:function(e){Oe&&fe({name:"_tags",value:e})},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("_tags")>-1)),placeholder:Object(k.s)("$__selectTheOptions",1)}),b&&b._tags&&b._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!b.childrenAutoTag,onChange:function(e){Oe&&fe({name:"childrenAutoTag",value:!b.childrenAutoTag})},name:"childrenAutoTag",inputProps:{"aria-label":"secondary checkbox"},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("childrenAutoTag")>-1))}),Object(k.s)("$__makeLinksAssumeTheSameLabelsOnAdd",1)):a.a.createElement(a.a.Fragment,null))),(!be.hideFields||be.hideFields&&(-1===be.hideFields.indexOf("priority")||-1===be.hideFields.indexOf("status")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},!_e&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("priority"))&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Ta,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"priority",disableClearable:!0,value:b&&b.priority&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__priority",1),variant:Object(k.d)("fieldVariant"),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0].color:l.priority[0].color)})}),value:b&&b.priority&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.priority)}))[0]:l.priority[0]}))},onChange:function(e,t){Oe&&fe({name:"priority",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(k.s)(e.label,1))},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Ta,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"risk",disableClearable:!0,value:b&&b.risk&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__risk",1),variant:Object(k.d)("fieldVariant"),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.risk?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.risk?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0].color:l.priority[0].color)})}),value:b&&b.risk&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.risk)}))[0]:l.priority[0]}))},onChange:function(e,t){Oe&&fe({name:"risk",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(k.s)(e.label,1))},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Ta,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"complexity",disableClearable:!0,value:b&&b.complexity&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__complexity",1),variant:Object(k.d)("fieldVariant"),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.complexity?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.complexity?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0].color:l.priority[0].color)})}),value:b&&b.complexity&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.complexity)}))[0]:l.priority[0]}))},onChange:function(e,t){Oe&&fe({name:"complexity",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(k.s)(e.label,1))},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 15px)",margin:3,paddingLeft:7}},a.a.createElement(Ta,{id:"combo-box-demo",options:l.priority,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"impact",disableClearable:!0,value:b&&b.impact&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:l.priority[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__impact",1),variant:Object(k.d)("fieldVariant"),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1)),inputProps:Object(d.a)(Object(d.a)({},e&&e.inputProps?e.inputProps:{}),{},{style:Object(d.a)(Object(d.a)({},e&&e.inputProps&&e.inputProps.style?e.inputProps.style:{}),{},{paddingLeft:7,marginTop:3,marginLeft:-5,width:"calc(100% - 7px)",color:b&&b.impact?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:l.priority[0].color,borderLeft:"solid 3.33px ".concat(b&&b.impact?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0].color:l.priority[0].color)})}),value:b&&b.impact&&l.priority?l.priority.filter((function(e){return String(e.value)===String(b.impact)}))[0]:l.priority[0]}))},onChange:function(e,t){Oe&&fe({name:"impact",value:t.value})},renderOption:function(e,t){t.inputValue;return a.a.createElement("span",{style:{color:e.color}},Object(k.s)(e.label,1))},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("priority")>-1))}))),!_e&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("status"))&&a.a.createElement(Ta,{id:"combo-box-demo",options:l.status,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:b&&b.status&&l.status?l.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:l.status[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__status",1),variant:Object(k.d)("fieldVariant"),value:b&&b.status&&l.status?l.status.filter((function(e){return String(e.value)===String(b.status)}))[0]:l.status[0]}))},onChange:function(e,t){(Oe||"0"!==String(de))&&fe({name:"status",value:t.value})},disabled:!(Oe&&!(be&&be.disabledFields&&be.disabledFields.indexOf("status")>-1))&&"0"===String(de)})),(de>4||ue&&ue.plan&&ue.planAdmin)&&"plan"===b.type&&"completed"!==b.status&&a.a.createElement(a.a.Fragment,null,Q||b.miroBoard?Q?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__MiroBoard",1)),a.a.createElement(Ce,{label:Object(k.s)("$__MiroBoardCode"),variant:Object(k.d)("fieldVariant"),name:"boardCode",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"save",color:"green",onClick:function(){return ee(!1)}})),onChange:function(e,t){fe({name:"miroBoard",value:e.target.value})}},value:b&&b.miroBoard?b.miroBoard:"",placeholder:Object(k.s)("$__MiroBoardCodePlaceholder",1),disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("miroBoard")>-1))})):b.miroBoard&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__MiroBoard",1)),a.a.createElement(Be,{text:Object(k.s)("$__openMiroBoard",1),icon:"developer_board",onClick:function(){e.reduxFunction("ASYNC","LIGHTBOX",{miro:!0,miroBoard:b.miroBoard})}}),a.a.createElement(Be,{text:Object(k.s)("$__editBoard",1),icon:"insert_link",onClick:function(){ee(!0)}})):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__MiroBoard",1)),a.a.createElement(Be,{text:Object(k.s)("$__addBoard",1),icon:"developer_board",onClick:function(){ee(!0)}}))),(!b._id||b&&b._users&&s&&s._id&&b._users[s._id]&&b._users[s._id].access&&parseInt(b._users[s._id].access)>=3&&(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("private")))&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!b.private,onChange:function(e){Oe&&fe({name:"private",value:!b.private})},name:"private",inputProps:{"aria-label":"secondary checkbox"},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("private")>-1))}),Object(k.s)("$__private",1))),(!be.hideFields||be.hideFields&&-1===be.hideFields.indexOf("private"))&&b.private&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!b.privateChildrens,onChange:function(e){Oe&&fe({name:"privateChildrens",value:!b.privateChildrens})},name:"privateChildrens",inputProps:{"aria-label":"secondary checkbox"},disabled:!(Oe&&"completed"!==b.status&&!(be&&be.disabledFields&&be.disabledFields.indexOf("private")>-1))}),Object(k.s)("$__privateChildrens",1))),Oe&&"chatGroup"===b.type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!b.onlyAdminsSendMessages,onChange:function(e){Oe&&fe({name:"onlyAdminsSendMessages",value:!b.onlyAdminsSendMessages})},name:"onlyAdmins",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__onlyAdminsCanSendMessage",1))),b.broadcast||c.a.getState().timeline&&(!c.a.getState().timeline[b._id]||c.a.getState().timeline[b._id]&&0===Object.keys(c.a.getState().timeline[b._id]).length)?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!b.broadcast,onChange:function(e){Oe&&fe({name:"broadcast",value:!b.broadcast})},name:"broadcast",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__workAsABroadcastList",1))):a.a.createElement(a.a.Fragment,null)),ue&&ue.plan&&ue.planAdmin&&_e&&"plan"===b.type&&s._access&&s._access.userAdmin&&s._access.machenAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(Ta,{id:"combo-box-demo",options:l.plans,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:b&&b.plans&&l.plans?l.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}},renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__avaiablefromplan",1),variant:Object(k.d)("fieldVariant"),value:b&&b.plans&&l.plans?l.plans.filter((function(e){return String(e.value)===String(b.plans)}))[0]:{label:"$__notAvaiable",value:null,settings:{}}}))},onChange:function(e,t){Oe&&fe({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null))))}))),Wo=r(1133),Uo=r(1951),Vo=r(1970),qo=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(k.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(k.d)("medium")}}};function Xo(){Xo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Jo=Object(s.b)((function(e){return{store:{sideModule:e.sideModule}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(qo)((function(e){var t=e.classes,r=c.a.getState(),n=r.timeline,o=r.db,i=r.session,l=r.sideModule,s=l.data||{},u=a.a.useState(!s.kpi_type),m=Object(h.a)(u,2),g=(m[0],m[1],a.a.useState(s.kpi_type?"timeline":"settings")),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!(!s._id||"new"!==s._id||!s.name)),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState({}),S=Object(h.a)(j,2),L=S[0];S[1],a.a.useEffect((function(){O&&e.reqSave&&e.reqSave()}),[O]);var C=Object(k.j)(),I=Object(yt.u)(l.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,P=0;s._parent&&c.a.getState().db.cards[s._parent]&&c.a.getState().db.cards[s._parent].kpi_type&&"task"!==c.a.getState().db.cards[s._parent].kpi_type&&(N=c.a.getState().db.cards[s._parent],P=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(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent&&c.a.getState().db.cards[e]._parent===N._id&&c.a.getState().db.cards[e].kpi_type===N.kpi_type&&c.a.getState().db.cards[e].kpi_useParent})).map((function(e){parseInt(N.kpi_ini)>parseInt(N.kpi_fin&&parseInt(c.a.getState().db.cards[e].kpi_ini))?P-=parseInt(c.a.getState().db.cards[e].kpi_ini):parseInt(c.a.getState().db.cards[e].kpi_fin)&&(P-=parseInt(c.a.getState().db.cards[e].kpi_fin))})));var A=function(t){(t.value&&!l.data[t.name]||l.data[t.name]&&l.data[t.name]!==t.value)&&w(!0);var r=Object(d.a)(Object(d.a)({},l.data),{},Object(f.a)({},t.name,t.value));r.kpi_ini||(r=Object(d.a)(Object(d.a)({},r),{},{kpi_ini:0})),r.kpi_fin||(r=Object(d.a)(Object(d.a)({},r),{},{kpi_fin:0})),!r.kpi_useParent&&"false"!==!String(r.kpi_useParent)&&N&&N.kpi_type===t.value&&(r=Object(d.a)(Object(d.a)({},r),{},{kpi_useParent:!0})),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l),{},{data:r}))},$=function(){var t=Object(p.a)(Xo().mark((function t(){var r,n=arguments;return Xo().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"!==l.data.kpi_type||!(0===parseInt(l.data.kpi_fin)&&0===parseInt(l.data.kpi_ini)||parseInt(l.data.kpi_fin)>0&&parseInt(l.data.kpi_fin)<parseInt(l.data.kpi_ini))){t.next=6;break}Object(k.c)({message:Object(k.s)("$__invalidMaximumMinutes",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(yt.H)(e,!0,l.data);case 8:t.sent&&Object(k.c)({message:Object(k.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)}}(),z=function(){var t=Object(p.a)(Xo().mark((function t(r){return Xo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l),{},{data:Object(d.a)(Object(d.a)({},l.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)}}(),M=function(){var e=Object(p.a)(Xo().mark((function e(t,r){var n;return Xo().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)),A({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(pa,{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(E.a,{title:Object(k.s)("$__changeKpiType",1),color:Object(k.d)("settings"===v?"menu":"color"),icon:"tune",onClick:function(){return y("settings")},size:"25px",transparent:!0}),a.a.createElement(E.a,{title:Object(k.s)("$__chart",1),color:Object(k.d)("chart"===v?"menu":"color"),icon:"analytics",onClick:function(){return y("chart")},size:"25px",transparent:!0}),a.a.createElement(E.a,{title:Object(k.s)("$__statement",1),color:Object(k.d)("timeline"===v?"menu":"color"),icon:"receipt",onClick:function(){return y("timeline")},size:"25px",transparent:!0})):a.a.createElement("div",null),"chart"===v?a.a.createElement(Gr,{data:s,chartShow:!0}):"settings"===v?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",null,Object(k.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(Vo.a,{value:s&&s.kpi_type?s.kpi_type:"task",exclusive:!0,onChange:function(e,t){A({name:"kpi_type",value:t})}},a.a.createElement(Uo.a,{value:"decimal"},a.a.createElement(le.a,{title:Object(k.s)("$__decimal",1),color:"color"},"filter_9_plus")),a.a.createElement(Uo.a,{value:"currency"},a.a.createElement(le.a,{title:Object(k.s)("$__currency",1),color:"color"},"attach_money")),a.a.createElement(Uo.a,{value:"percent"},a.a.createElement(Ne.a,{title:Object(k.s)("$__percentage",1)},a.a.createElement("span",{style:{color:"".concat(Object(k.d)("color")),fontSize:"22px"}},"%"))),a.a.createElement(Uo.a,{value:"time"},a.a.createElement(le.a,{title:Object(k.s)("$__time",1),color:"color"},"hourglass_top")),a.a.createElement(Uo.a,{value:"task"},a.a.createElement(le.a,{title:Object(k.s)("$__task",1),color:"color"},"task"))):"decimal"===s.kpi_type?a.a.createElement(le.a,{title:Object(k.s)("$__decimal",1),color:"color"},"filter_9_plus"):"currency"===s.kpi_type?a.a.createElement(le.a,{title:Object(k.s)("$__currency",1),color:"color"},"attach_money"):"percent"===s.kpi_type?a.a.createElement(le.a,{title:Object(k.s)("$__percentage",1),color:"color"},"percent"):a.a.createElement(le.a,{title:Object(k.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(k.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(k.s)("$__notAllocatedBudget",1):Object(k.s)("$__notAllocatedGoal",1)),Object(k.h)(P,"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(wr,{checked:!!s.kpi_useParent,onChange:function(e){z({name:"kpi_useParent",value:!s.kpi_useParent})},name:"kpi_useParent",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__useParentKpi",1)),s.kpi_useParent?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{color:"red"}},Object(k.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(k.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(vn,{db:"cards",data:c.a.getState().db.cards[e],notGlobalExpanded:!0,ignoreList:!0}),a.a.createElement("div",{style:{width:"100%",height:22}},a.a.createElement(Wo.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(k.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(Ta,{id:"combo-box-demo",options:o.currency,getOptionLabel:function(e){return Object(k.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(Ce,Object.assign({},e,{label:Object(k.s)("$__currency",1),variant:Object(k.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){A({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(Ce,{label:s.kpi_useParent?Object(k.s)("$__budget"):"time"===s.kpi_type?Object(k.s)("$__minimumMinutes",1):Object(k.s)("$__initialValue",1),variant:"outlined",name:"kpi_ini",error:!(!L||!L.kpi_ini),helperText:L&&L.kpi_ini?Object(k.s)("$__valueExceedAllocatedValue",1):null,placeholder:Object(k.s)("$__value",1),value:Object(k.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){M(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(Ce,{label:s.kpi_useParent?Object(k.s)("$__goal"):"time"===s.kpi_type?Object(k.s)("$__maximumMinutes",1):Object(k.s)("$__finalValue",1),variant:"outlined",name:"kpi_fin",error:!(!L||!L.kpi_fin),helperText:L&&L.kpi_fin?Object(k.s)("$__valueExceedAllocatedValue",1):null,value:Object(k.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){M(e,"fin")}}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:t.switch},a.a.createElement(wr,{checked:!!s.kpi_reqMessage,onChange:function(e){A({name:"kpi_reqMessage",value:!s.kpi_reqMessage})},name:"kpi_reqMessage",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__reqDescription",1)))):a.a.createElement("div",{style:{position:"absolute",top:30,bottom:0,left:0,right:0}},a.a.createElement(Gr,{data:s,chartShow:!1}),a.a.createElement("div",{style:{position:"absolute",top:103,bottom:0,left:0,right:0}},a.a.createElement(La,{noSearch:!0,nodeId:s._id,type:"kpi",db:"cards",disabledSend:!0,loadTimeline:!0,kpi_type:s.kpi_type})))))}))),Ko=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"}}};var Zo=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ko)((function(e){var t=e.classes,r=c.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(Gr,{data:n,chartShow:!0}))})));function Qo(){Qo=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ei,ti,ri=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.sideModule,i=(r.session,n.planType),l=o.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){y||("link"===l.type&&"new"===l._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(d.a)(Object(d.a)({},o.data),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(n=Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},r.name,r.value))),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},o),{},{data:Object(d.a)(Object(d.a)({},o.data),n)}))},O=function(t){m&&!t?Object(k.c)({message:Object(k.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(p.a)(Qo().mark((function t(){var r,n=arguments;return Qo().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(k.c)({message:Object(k.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=11;break;case 6:return t.next=8,Object(yt.H)(e,!0,o.data);case 8:t.sent&&Object(k.c)({message:Object(k.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(p.a)(Qo().mark((function t(){return Qo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__unlinkCardsConfirm",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t=Object(p.a)(Qo().mark((function t(){return Qo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(yt.N)(e,{cardId:l._id,_planId:l._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(pa,{save:m?function(){w()}:null,saveClose:m?function(){w(!0)}:null,close:function(){O(!0)}}),a.a.createElement("div",{className:t.root},"plan"!==l.type?a.a.createElement(a.a.Fragment,null,Object.keys(n.cards).filter((function(e){return n.cards[e]._parent===l._id&&!n.cards[e].checklist})).length>0?a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__unLinkCards",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__unLinkCardsDescription",1)),a.a.createElement(mo,{onClick:function(){j()}},Object(k.s)("$__unLinkCards",1))):a.a.createElement("fieldset",{style:{marginBottom:"14px"}},(!E.hideFields||E.hideFields&&-1===E.hideFields.indexOf("type"))&&a.a.createElement(Ta,{id:"combo-box-demo",options:n.type,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:l&&l.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(l.type)}))[0]:n.type[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__type",1),variant:Object(k.d)("fieldVariant"),value:l&&l.type&&n&&n.type?n.type.filter((function(e){return String(e.value)===String(l.type)}))[0]:n.type[0]}))},onChange:function(e,t){_({name:"type",value:t.value})}}))):a.a.createElement(a.a.Fragment,null),"plan"===l.type?a.a.createElement("fieldset",{style:{marginBottom:"14px",marginTop:30}},a.a.createElement(Ta,{id:"combo-box-demo",options:i,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"type",disableClearable:!0,value:l&&l.planType?i.filter((function(e){return e.value===l.planType}))[0]:i[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__planType",1),variant:Object(k.d)("fieldVariant"),value:l&&l.planType?i.filter((function(e){return e.value===l.planType}))[0]:i[0]}))},onChange:function(e,t){_({name:"planType",value:t.value})}}),i.filter((function(e){return!l.planType||l.planType&&e.value===l.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(k.d)("color")}},a.a.createElement(le.a,{icon:Ro.a,color:Object(k.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(k.s)(i.filter((function(e){return!l.planType||l.planType&&e.value===l.planType}))[0].description,1))):a.a.createElement(a.a.Fragment,null)))})));function ni(){ni=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ai=w.default.div(ei||(ei=Object(u.a)(["\n            background-color:none\n            "]))),oi=(w.default.div(ti||(ti=Object(u.a)(["background-color:red\n            padding:7px"]))),Object(s.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(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(c.a.getState().functions.socket,a.a.useState(e.name?e.name:"")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[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(p.a)(ni().mark((function t(){return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.a)(Object(d.a)(Object(d.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={};c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&(j=c.a.getState().db[e.db][e.nodeId]);var S=Object.keys(c.a.getState().db.cards).filter((function(t){if(!c.a.getState().db.cards[t].deleted&&!c.a.getState().db.cards[t].checklist&&!c.a.getState().db.cards[t]._recurrenceId&&c.a.getState().db.cards[t]._parent===e.nodeId&&(!c.a.getState().db.cards[t].private||c.a.getState().db.cards[t].private&&c.a.getState().db.cards[t]._users[n._id]))return!0})).map((function(e){return e})),L=function(){var e=Object(p.a)(ni().mark((function e(){var t,r;return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.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(d.a)({_parent:j._id,planId:j._planId?j._planId:null,name:l,type:r,status:"notStarted"},j.childrenAutoTag&&j._tags&&j._tags.length>0?{_tags:j._tags}:{}),function(){var e=Object(p.a)(ni().mark((function e(r){return ni().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("card.UPD",{cardId:r.id,cardData:Object(d.a)(Object(d.a)({},r.data),{},{_planId:j._planId?j._planId:null,_parent:j._id,_timeline:Object(f.a)({},r.log._id,Object(d.a)(Object(d.a)({},r.log),{},{_parent:[r.id]})),_users:Object(f.a)({},n._id,{name:c.a.getState().db.users[n._id].name?c.a.getState().db.users[n._id].name:null,displayName:c.a.getState().db.users[n._id].displayName?c.a.getState().db.users[n._id].displayName:null,image:c.a.getState().db.users[n._id].image?c.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(p.a)(ni().mark((function t(n){var a,o,i,l,s;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(c.a.getState().db.cards).filter((function(t){if(c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].checklist&&c.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,l=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,l),t.abrupt("return");case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),I=function(){var e=Object(p.a)(ni().mark((function e(t){return ni().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(p.a)(ni().mark((function e(t){return ni().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(k.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(k.s)("$__loadingCatenation")),a.a.createElement(Tr,null));var F=S.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=S.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(cr.a,{onDragEnd:C,onDragStart:I,onDragUpdate:T},a.a.createElement(cr.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(ai,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),F.length>0?F.map((function(e,t){return a.a.createElement(cr.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(vn,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0}))}))})):a.a.createElement(a.a.Fragment,null),D.length>0?D.map((function(n,o){return a.a.createElement("div",{key:n},a.a.createElement(vn,{provided:e,snapshot:t,data:r.cards[n],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(Be,{reverse:!0,text:Object(k.s)("$__add","*"),icon:"add_box",iconColor:Object(k.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(Ce,{label:Object(k.s)("$__taskTitle"),variant:Object(k.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&&l&&L(),27===e.keyCode&&(b(!g),s(""))}},autoFocus:!0,value:l,placeholder:Object(k.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(E.a,{title:Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(e){L()},transparent:!0}),a.a.createElement(E.a,{title:Object(k.s)("$__cancel",1),color:"lightgrey",icon:"cancel",onClick:function(e){b(!g),s("")},transparent:!0})))))})));function ii(){ii=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ci=function(){var e=Object(p.a)(ii().mark((function e(t){var r,n,a,o,i,c,l,s;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.ids,t.searchText,n=t.page,a=void 0===n?0:n,o=t.limit,i=void 0===o?20:o,c=t.asc,void 0!==c&&c,l=t.childrens,void 0!==l&&l,e.next=3,new Promise(function(){var e=Object(p.a)(ii().mark((function e(n,o){var c,l;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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(!(s=e.sent)){e.next=6;break}return e.abrupt("return",s);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),li=function(){var e=Object(p.a)(ii().mark((function e(t){var r;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(){var e=Object(p.a)(ii().mark((function e(r,n){var a;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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)}}(),si=function(){var e=Object(p.a)(ii().mark((function e(t){var r,n,a,o,i,c,l,s,u,d,f;return ii().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(p.a)(ii().mark((function e(a,i){var l,u;return ii().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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(!(f=e.sent)){e.next=6;break}return e.abrupt("return",f);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ui(){ui=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var di=Object(s.b)((function(e){return{showPrivate:e.controls.lockPrivate}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(null),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(s),s=Object(h.a)(l,1)[0],u=a.a.useState(!0),m=Object(h.a)(u,1)[0],g=a.a.useState({}),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(""),_=Object(h.a)(x,2),O=_[0],w=_[1],j=e.idPlan?e.idPlan:null;a.a.useEffect((function(){return E({id:j}),li(),function(){y({}),m(!0)}}),[]);var E=function(){var t=Object(p.a)(ui().mark((function t(r,n){var a,o;return ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,li({ids:r&&r.id?[r.id]:[],childrens:!1,types:e&&e.types?e.types:null});case 2:(a=t.sent)&&(o=n||v,j&&(o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},j,{name:c.a.getState().db.cards[j].name,parent:c.a.getState().db.cards[j]._parent,private:null,type:"plan",_id:j,open:!0}))),a.filter((function(e){return"chatGroup"!==e.type})).map((function(e){o=Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},o[e._id]?o[e._id]:{}),e)))})),y(o));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),S=function(){var e=Object(p.a)(ui().mark((function e(t){var r,n,a,o,i,c,l=arguments;return ui().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=v,c=Object(d.a)(Object(d.a)({},c),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(v).filter((function(e){if(v[e].parent===a)return!0})).length?E({id:a,type:i},c):y(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=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&&c.a.getState().controls.lockPrivate)&&(S({id:n},!v[n]||!v[n].open),i(n),e&&e.onSelect&&e.onSelect(v[n])),t.preventDefault(),t.stopPropagation()}},a.a.createElement(ua,{title:"".concat(r.private&&!c.a.getState().controls.lockPrivate?Object(k.s)("$__private"):r.name),tooltipText:"".concat(r.private&&!c.a.getState().controls.lockPrivate?Object(k.s)("$__private"):r.name),icon:(r.private&&!c.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&&!c.a.getState().controls.lockPrivate?"lightgray":o&&o===n?Object(k.d)("color"):Object(k.d)("gray")}),v[n]&&v[n].open?C(n):a.a.createElement(a.a.Fragment,null))},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a.a.createElement("div",{style:{marginLeft:7}},Object.keys(v).filter((function(t){return!e||e&&v[t].parent===e})).length>0?Object.keys(v).filter((function(t){return!e||e&&v[t].parent===e})).sort((function(e,t){return v[e].step&&v[t].step&&parseInt(v[e].step)<parseInt(v[t].step)?-1:v[e].step&&v[t].step&&parseInt(v[e].step)>parseInt(v[t].step)?1:v[e].name.toLowerCase().trim()<v[t].name.toLowerCase().trim()?-1:v[e].name.toLowerCase().trim()>v[t].name.toLowerCase().trim()?1:0})).map((function(e){return L(v[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(Ce,{label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:O,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.d)("lightgray")},"search")),onChange:function(e){w(e.target.value)},onKeyDown:function(e){}}})),a.a.createElement("div",{style:Object(d.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(v).filter((function(e){return"chatGroup"!==v[e].type&&((!j||j&&36!==j.length)&&!v[e].parent||j&&36===j.length&&v[e]._id===j)&&(""===O||O&&v[e].name.toLowerCase().indexOf(O.toLowerCase().trim())>-1)})).sort((function(e,t){return v[e].name.toLowerCase().trim()<v[t].name.toLowerCase().trim()?-1:v[e].name.toLowerCase().trim()>v[t].name.toLowerCase().trim()?1:0})).map((function(e){return L(v[e],e)}))))))}));function pi(){pi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fi=function(e){var t=c.a.getState().db;return a.a.createElement(Ta,{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(k.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(Ce,Object.assign({},r,{label:Object(k.s)("$__action",1),variant:Object(k.d)("fieldVariant"),inputProps:Object(d.a)(Object(d.a)({},r&&r.inputProps?r.inputProps:{}),{},{style:Object(d.a)(Object(d.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(k.s)(e.label,1))},onChange:function(t,r){e.onChange(r.value)}})},hi=Object(s.b)((function(e){return{sideModule:e.sideModule,card:e.db.cards[e.sideModule.id],cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t,r=e.classes,n=e.sideModule,o=c.a.getState(),i=o.db,l=o.session,s=i.planType,u=a.a.useState({}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState({}),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState(!1),j=Object(h.a)(w,2),S=j[0],L=j[1],C=a.a.useState(!1),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!1),N=Object(h.a)(D,2),P=N[0],A=N[1],$=a.a.useState(null),z=Object(h.a)($,2),M=(z[0],z[1]),B=a.a.useState(null),R=Object(h.a)(B,2),G=(R[0],R[1]),H=a.a.useState(!1),W=Object(h.a)(H,2),U=(W[0],W[1]),V=a.a.useState((null===(t=n.data)||void 0===t?void 0:t.onConcludedStepMoveTo)||null),q=Object(h.a)(V,2),X=q[0],J=q[1],K=Object(k.j)(),Z=Object(yt.u)(n.id);a.a.useEffect((function(){g._id!==n.data._id&&(b(n.data),L(!1)),P||(n.data.startDate&&M(n.data&&n.data.startDate?n.data.startDate:null),n.data.endDate&&G(n.data&&n.data.endDate?n.data.endDate:null),b(n.data),L(!1),"link"!==g.type||g.name||ne(),A(!0),Q()),n.data.name&&""!==n.data.name.trim()&&"link"===n.data.type&&"new"===n.data._id&&(L(!0),e.reqSave&&e.reqSave(!0))}),[n.data,g]),a.a.useEffect((function(){!g.name||g.name&&""===g.name.trim?L(!1):L(!0)}),[x]);var Q=function(){var t=Object(p.a)(pi().mark((function t(){return pi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{idRel:[n.data._id],cardLoad:"parents"});case 2:t.sent&&U(!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ee=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t.value&&!n.data[t.name]&&!g[t.name]||n.data[t.name]&&n.data[t.name]!==t.value||a)&&e.reqSave&&e.reqSave(!0);var o=Object(d.a)(Object(d.a)({},g),{},Object(f.a)({},t.name,t.value));r&&r.name&&r.value&&(o=Object(d.a)(Object(d.a)(Object(d.a)({},g),o),{},Object(f.a)({},r.name,r.value))),b(o),O(Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},t.name,t.value),r&&r.name&&r.value?Object(f.a)({},r.name,r.value):{}))},te=function(t){S&&!t?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},re=function(){var t=Object(p.a)(pi().mark((function t(){var r,a=arguments;return pi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=a.length>0&&void 0!==a[0]&&a[0],T){t.next=19;break}if(L(!1),e.reqSave&&e.reqSave(!1),g.status||(g.status="notStarted"),"new"===n.id&&n.data&&b(Object(d.a)(Object(d.a)({},g),n.data)),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:g})),g.name&&(!g.name||""!==g.name.trim())){t.next=12;break}F(!1),Object(k.c)({message:Object(k.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=19;break;case 12:return t.next=14,Object(yt.H)(Object(d.a)(Object(d.a)({},e),{},{store:Object(d.a)(Object(d.a)({},e.store),{},{db:Object(d.a)({},c.a.getState().db)})}),r,g);case 14:t.sent&&(x&&x.status&&(Object(yt.Q)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:g._id}}),{status:x.status}),Object(yt.f)(e,g._id,x.status)),F(!1),Object(k.c)({message:Object(k.s)("$__DataSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null})),L(!1),e.reqSave&&e.reqSave(!1),r&&te(!0);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ne=function(){var t=Object(p.a)(pi().mark((function t(){var r;return pi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y.a.post("/link/content",{url:g.url});case 2:r=t.sent,b(Object(d.a)(Object(d.a)({},g),{},{content:r.data.article})),L(!0),e.reqSave&&e.reqSave(!0);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ae=n.data&&n.data.type?i.dataType.filter((function(e){return e.name===n.data.type}))[0]:{};if(g._parent&&c.a.getState().db.cards[g._parent],!g)return null;var oe=c.a.getState().db.cards[g._id]&&c.a.getState().db.cards[g._id]._users&&c.a.getState().db.cards[g._id]._users[l._id]&&c.a.getState().db.cards[g._id]._users[l._id].myDay?c.a.getState().db.cards[g._id]._users[l._id].myDay:null,ie=(!oe||oe&&oe&&(_()(new Date(1e3*oe)).format("YYYY/MM/DD"),_()().format("YYYY/MM/DD")),g.isTemplate?g.isTemplate:Object(yt.S)(g._id),!!e.permission&&e.permission);if(!g||!g._planId||i.cards[g._planId]&&Object(yt.D)(g._planId)||(ie=!1),!ie&&parseInt(Z)>=4&&(ie=!0),!ie&&Object(yt.D)(g._planId)&&K&&K.admin&&K.plan&&(K.planAdmin||K.planModerate)&&(ie=!0),a.a.Fragment,g&&g.url&&g.url.indexOf(".youtube.com/watch?")>-1){var ce=g.url.split("?")[1].split("v=")[1].split("&")[0];ce&&(a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(ce),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),!0)}if(g&&g.url&&g.url.indexOf("//youtu.be/")>-1){var se=g.url.split(".be/")[1];se&&(a.a.createElement("iframe",{width:"560",height:"315",style:{top:0,width:"100%",maxWidth:"500px",height:"100%",alignSelf:"center",position:"absolute",overflow:"hidden"},src:"https://www.youtube.com/embed/".concat(se),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),!0)}return a.a.createElement(a.a.Fragment,null,a.a.createElement(pa,{save:S?function(){F(!0),re()}:null,saveClose:S?function(){F(!0),re(!0)}:null,saveLoader:T,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"===g.type&&g._id&&ie?a.a.createElement(E.a,{title:Object(k.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"===g.type&&g._id?Object(k.s)("$__plan ".concat(g.planType?s[1].label:s[0].label),1):Object(k.s)("$__data",1)),g.created_at?a.a.createElement("div",{style:{position:"relative",fontSize:12,color:"#bfbfbf",padding:"3px 0px",marginTop:-8,textAlign:"right"}},Object(k.s)("$__createdAt"),": ",Object(k.k)(g.created_at)):a.a.createElement(a.a.Fragment,null),a.a.createElement(Ce,{label:Object(k.s)(ae&&ae.fieldsTitle&&ae.fieldsTitle.name?ae.fieldsTitle.name:"$__titleOfCard",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){ee(e.target)}},value:g&&g.name?g.name:"",placeholder:Object(k.s)(ae&&ae.fieldsTitle&&ae.fieldsTitle.placeholder&&ae.fieldsTitle.placeholder.name?ae.fieldsTitle.placeholder.name:"$__titleOfCard_placeholder",1),disabled:!(ie&&"completed"!==g.status&&!(ae&&ae.disabledFields&&ae.disabledFields.indexOf("name")>-1))}),Z>3||g.description||ie?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:Object(k.s)("$__description",1),variant:Object(k.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"toc"})),onChange:function(e){ee(e.target)}},value:g&&g.description?g.description:"",placeholder:Object(k.s)("$__descriptionOfCard_placeholder",1),disabled:!(ie&&"completed"!==g.status&&!(ae&&ae.disabledFields&&ae.disabledFields.indexOf("description")>-1))})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.showSumValues,onChange:function(e){ee({name:"showSumValues",value:!g.showSumValues})},name:"showSumValues",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__showSumValues",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.requireValue,onChange:function(e){ee({name:"requireValue",value:!g.requireValue})},name:"requireValue",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__requireValue",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__automation",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__users",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(k.s)("$__automationUsersExplain",1)),a.a.createElement(fi,Object.assign({value:g.automationUsers||null,onChange:function(e){ee({name:"automationUsers",value:e})}},"0"===g.step?{ignoreValues:["remove"]}:{})),g._id&&i.cards[g._id]&&i.cards[g._id]._users&&a.a.createElement(Po,{_id:g._id,noLimit:!0,avatarSize:"33px",permission:ie}),!g.automationUsers||"remove"!==g.automationUsers&&"replace"!==g.automationUsers?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.keepUserWhoCreatedActivity,onChange:function(e){ee({name:"keepUserWhoCreatedActivity",value:!g.keepUserWhoCreatedActivity})},name:"keepUserWhoCreatedActivity",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__keepUserWhoCreatedActivity",1))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__dueDate",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__due",1)),a.a.createElement(fi,{value:g.automationDueDateType||null,onChange:function(e){ee({name:"automationDueDateType",value:e})},ignoreValues:["replace"]}),g.automationDueDateType&&"add"===g.automationDueDateType?a.a.createElement(Ce,{label:Object(k.s)("$__automationDueDate",1),variant:Object(k.d)("fieldVariant"),name:"automationDueDate",min:1,InputProps:{type:"number",min:1,autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},Object(k.s)("$__days","*")),onChange:function(e){var t=e.target.value||1;parseInt(t)<1&&(t=1),ee({name:"automationDueDate",value:t})}},value:g&&g.automationDueDate?g.automationDueDate:1}):a.a.createElement(a.a.Fragment,null))),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__tags",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__tags",1)),a.a.createElement(fi,{value:g.automationTags||null,onChange:function(e){ee({name:"automationTags",value:e})}}),g.automationTags&&"doNotChange"!==g.automationTags?a.a.createElement(Yo,{data:{values:g._tags?g._tags:[]},callBack:function(e){ie&&ee({name:"_tags",value:e})},disabled:!(ie&&"completed"!==g.status&&!(ae&&ae.disabledFields&&ae.disabledFields.indexOf("_tags")>-1)),placeholder:Object(k.s)("$__selectTheOptions",1)}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__icon",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__setThisIconWhenAdd",1)),a.a.createElement(oa,{icon:g.setIcon?g.setIcon:g.icon?g.icon:"task",color:Object(k.d)("colorText"),onChange:function(e){ee({name:"setIcon",value:e})},size:"25px",style:{marginRight:7}})))),Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===g._parent&&"step"===c.a.getState().db.cards[e].type&&!c.a.getState().db.cards[e].deleted})).length===parseInt(g.step)+1?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("div",{style:{position:"relative",width:"100%",color:"gray",fontSize:10}},Object(k.s)("$__onConcludedStepMoveTo",1)),a.a.createElement("div",{className:r.switch},X&&X===g.onConcludedStepMoveTo?a.a.createElement(E.a,{title:Object(k.s)("$__selectTarget",1),text:Object(k.s)("$__selectTarget",1),color:Object(k.d)("menu"),icon:"assistant_navigation",onClick:function(){J(null)},size:"14px",textSize:"14px"}):a.a.createElement("div",null,a.a.createElement(di,{onSelect:function(t){c.a.getState().db.cards[t._id]||Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"parents",idRel:t._id}),J(t._id)},ignoreTypes:["chatGroup"],types:["plan","guideline","guidelineC","guidelineD","guidelineE","guidelineR","objective","goal","step"]}),X&&X!==g.onConcludedStepMoveTo?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(E.a,{title:Object(k.s)("$__cancel",1),text:Object(k.s)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){ee({name:"onConcludedStepMoveTo",value:(null===g||void 0===g?void 0:g.onConcludedStepMoveTo)||null})}}),a.a.createElement(E.a,{title:Object(k.s)("$__save",1),text:Object(k.s)("$__save",1),color:Object(k.d)("menu"),icon:"check",onClick:function(){ee({name:"onConcludedStepMoveTo",value:X})}})):a.a.createElement(a.a.Fragment,null)),g.onConcludedStepMoveTo&&X===g.onConcludedStepMoveTo&&c.a.getState().db.cards[g.onConcludedStepMoveTo]?a.a.createElement(a.a.Fragment,null,a.a.createElement(Sr,{id:g.onConcludedStepMoveTo,showLegend:!0,legend:Object(k.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(k.s)("$__status",1)),a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__changeStatusTo",1)),a.a.createElement(fi,{value:g.automationStatusType||null,onChange:function(e){ee({name:"automationStatusType",value:e})},ignoreValues:["add","remove"]}),g.automationStatusType&&"doNotChange"!==g.automationStatusType?a.a.createElement(Ta,{id:"combo-box-demo",options:i.status,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"automationStatus",disableClearable:!0,value:g&&g.automationStatus&&i.status?i.status.filter((function(e){return String(e.value)===String(g.automationStatus)}))[0]:i.status[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__status",1),variant:Object(k.d)("fieldVariant"),value:g&&g.automationStatus&&i.status?i.status.filter((function(e){return String(e.value)===String(g.automationStatus)}))[0]:i.status[0]}))},onChange:function(e,t){(ie||"0"!==String(Z))&&ee({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(k.s)("$__automationApprovalExplain",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.requireApproval,onChange:function(e){ee({name:"requireApproval",value:!g.requireApproval})},name:"requireApproval",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__requireApproval",1)),g.requireApproval?a.a.createElement(Po,{_id:g._id,noLimit:!0,avatarSize:"33px",permission:ie,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(k.s)("$__showInPanel",1)),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.showInPanel,onChange:function(e){ee({name:"showInPanel",value:!g.showInPanel})},name:"showInPanel",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__permitOpenTicketInPanel",1)),g.showInPanel?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",{style:{marginBottom:"14px"},id:"sideModule_user_group"},a.a.createElement(Ba,{data:{values:g.showGroups||[],_id:g._id},options:c.a.getState().db.userGroup?c.a.getState().db.userGroup:[],placeholder:"$__userGroupPlaceholder",dbNode:"userGroup",callBack:function(e){ee({name:"showGroups",value:e})}})),a.a.createElement(Ce,{label:Object(k.s)("$__shortCutTitle",1),variant:Object(k.d)("fieldVariant"),name:"shortCutTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){ee(e.target)}},value:g&&g.shortCutTitle?g.shortCutTitle:"",placeholder:Object(k.s)("$__shortCutTitlePlaceholder")}),a.a.createElement(Ce,{label:Object(k.s)("$__shortCutDescription",1),variant:Object(k.d)("fieldVariant"),name:"shortCutDescription",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"toc"})),onChange:function(e){ee(e.target)}},value:g&&g.shortCutDescription?g.shortCutDescription:"",placeholder:Object(k.s)("$__shortCutDescriptionPlaceholder",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__shortCutButtonToAdd",1),variant:Object(k.d)("fieldVariant"),name:"shortCutButtonToAdd",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){ee(e.target)}},value:g&&g.shortCutButtonToAdd?g.shortCutButtonToAdd:"",placeholder:Object(k.s)("$__shortCutButtonToAddPlaceholder")}),a.a.createElement("div",{className:r.switch},a.a.createElement(wr,{checked:!!g.requireDescription,onChange:function(e){ee({name:"requireDescription",value:!g.requireDescription})},name:"requireDescription",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__requireDescription",1))):a.a.createElement(a.a.Fragment,null))))))})));var mi=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t=e.classes,r=c.a.getState(),n=(r.db,r.sideModule.data||{}),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),d=Object(h.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(pa,{save:l?function(){}:null,saveClose:l?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(k.d)("color")}},Object(k.s)("$__integration",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__useIdToFeelFlowIdIntegration",1)),a.a.createElement("div",{style:{fontSize:14,fontWeight:"bold",color:"blue"}},n._id))))}))),gi=Object(R.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 bi(e){var t=gi(),r=Object(d.a)({},e);return r.title&&delete r.title,e.title?a.a.createElement(Ne.a,{title:e.title},a.a.createElement(Re.a,Object.assign({},r,{className:t[e.size]}),e.children)):a.a.createElement(Re.a,Object.assign({},r,{className:t[e.size]}),e.children)}function vi(){vi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var yi=Object(s.b)((function(e){return{history:e.db.history,showPrivate:e.controls.lockPrivate,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,l=c.a.getState().db,s=a.a.useState(e.data),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1];a.a.useEffect((function(){return function(){}}),[]),a.a.useEffect((function(){0===e.unlockedPrivates&&y(!1)}),[e.unlockedPrivates]);var x=f.name.split("."),_=x[x.length-1];"blob"===f.name&&(f.name="".concat(Object(k.s)("$__coverImage","*"),".jpg"),_="jpg");var O="attachment";c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&(O=c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(f.file));var w=function(){var e=Object(p.a)(vi().mark((function e(t){return vi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{i.emit("data",{module:"node",method:"put",action:"update"},Object(d.a)({_id:f._id},t),Object(p.a)(vi().mark((function e(){return vi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m(Object(d.a)(Object(d.a)({},f),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 l.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1})).length>0&&l.fileExtensions.filter((function(e){return e.ext.indexOf(_.toLowerCase())>-1}))[0].viewer&&(j=l.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"}},f.in&&f.in.private&&!e.showPrivate&&!v?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(le.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(le.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%"}},f.in&&f.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===f.in.db&&f.in._id===o._id?a.a.createElement("div",null,a.a.createElement(bi,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"21px",height:"21px"}},f.createdBy.name)):a.a.createElement(a.a.Fragment,null),"User"===f.in.db&&f.in._id!==o._id?a.a.createElement("div",null,a.a.createElement(bi,{alt:f.in.name,src:f.in.image,style:{width:"21px",height:"21px"}},f.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(mt,{private:!(!f.in||!f.in.private||c.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(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},title:"".concat("User"===f.in.db?"".concat(Object(k.s)("$__chatWithUser","*")," - ").concat(f.in._id!==o._id?"".concat(f.in.name):"".concat(f.createdBy.name)):"chatGroup"===f.in.type?"".concat(Object(k.s)("$__chatGroup","*")," - ").concat(f.in.name):"User"!==f.in.db&&"chatGroup"!==f.in.type?"".concat(f.in.name):""),icon:"User"===f.in.db||"chatGroup"===f.in.type?null:f.in.type&&l&&l.dataType&&l.dataType.filter((function(e){return e.name===f.in.type}))[0]&&l.dataType.filter((function(e){return e.name===f.in.type}))[0].icon||"$__topic",color:Object(k.d)("medium"),style:{padding:"7px",minHeight:"21px !important",textAlign:"left"},textStyle:!0}),a.a.createElement("span",{style:{marginRight:7}},"/")),a.a.createElement(mt,{private:!(!f.in||!f.in.private||c.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),y(!!t),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,privateTitle:Object(k.s)("$__privateFile"),title:f.name,value:f.name.replace(".".concat(_),""),searchText:e.searchText?e.searchText:null,color:e.dark?Object(k.d)("lightgray"):Object(k.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(d.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(pe.a,{src:"https://machen.azureedge.net/".concat(f.file),controls:!0})),f.createdBy&&a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center",color:e.dark?"lightgray":"gray",fontSize:10,marginLeft:"57px",clear:"both"}},f.in&&!f.in.private?a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"lightgray",fontSize:10,marginRight:7}},Object(k.s)("$__sendedBy"),":"),a.a.createElement(bi,{alt:f.createdBy.name,src:f.createdBy.image,style:{width:"15px",height:"15px"}},f.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},f.createdBy.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement("span",{style:{marginLeft:3}},Object(k.k)(f.created_at)))),e.showParent&&(f.timelineId||f.message)&&(l.cards[f.cardId]&&r[f.cardId]&&r[f.cardId][f.timelineId]||f.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(Kn,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:l.cards[f.cardId]&&r[f.cardId]&&r[f.cardId][f.timelineId]?r[f.cardId][f.timelineId]:f.message,db:"cards",nodeId:f.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&f.cardId&&l.cards[f.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(vn,{db:"cards",data:l.cards[f.cardId],showConnectedIn:!0})),a.a.createElement("div",{style:{width:"100%",height:"1px",backgroundColor:"rgba(0,0,0,0.1)",marginTop:"15px"}})))}));function xi(){xi=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var _i,Oi,wi=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!0),i=Object(h.a)(o,2),l=(i[0],i[1]),s=a.a.useState([]),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(""),E=Object(h.a)(j,2),S=E[0],L=E[1],C=a.a.useState(0),I=Object(h.a)(C,2),T=I[0],F=I[1],D=[];a.a.useEffect((function(){return w(!0),function(){m([]),l(!0)}}),[e.nodeId]),a.a.useEffect((function(){w(!0)}),[T]),a.a.useEffect((function(){O&&N()}),[O]);var N=function(){var t=Object(p.a)(xi().mark((function t(){var n,a;return xi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v){t.next=5;break}return t.next=3,ci({ids:[e.nodeId],type:r.cards[e.nodeId]?"cards":"users",page:T});case 3:(n=t.sent)&&(n.length<20&&y(!0),a=Array.from(f),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)})),m(a),l(!1),w(!1));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),P=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"},(!S&&f.length>10||S)&&a.a.createElement("div",{style:{position:"relative",padding:"10px"}},a.a.createElement(Ce,{label:Object(k.s)("$__fileNameSearch",1),variant:Object(k.d)("fieldVariant"),name:"name",id:"sideModule_files_search",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"find_in_page"})),onChange:function(e){L(e.target.value)}},value:Object(k.q)(S).toLowerCase(),placeholder:Object(k.s)("$__fileNameSearch")})),a.a.createElement("div",{style:{position:"absolute",bottom:0,top:f&&f.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(k.d)("color"):Object(k.d)("menu"),fontSize:14}},a.a.createElement(le.a,{color:Object(k.d)("color"),icon:"folder_open",title:Object(k.s)("$__files","*"),size:"20px",style:{marginRight:"15px"}}),Object(k.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)}()}},f&&f.length>0&&f.filter((function(e){return!S||""===S||S&&e.data.name.toLowerCase().indexOf(S.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(d.a)(Object(d.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){P(t.data._id),e.preventDefault()},id:"sideModule_files_file_".concat(t.data._id)},a.a.createElement(yi,{data:i,resume:!0,dark:!!e.dark,admin:c,searchText:S,openLightBox:function(){P(t.data._id)}}))})),(f.length>0||O)&&!v?a.a.createElement("li",{style:{width:"100%",textAlign:"center",position:"relative",float:"left",color:e.dark?Object(k.d)("color"):Object(k.d)("menu")}},a.a.createElement(Tr,null),Object(k.s)("$__checkingFiles","*")):0!==f.length||O?a.a.createElement(a.a.Fragment,null):Object(k.s)("$__hasNoFiles","*"))))}));function ji(){ji=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ei=w.default.div(_i||(_i=Object(u.a)(["\n            background-color:none;\n            "]))),ki=(w.default.div(Oi||(Oi=Object(u.a)(["background-color:red;\n            padding:7px;"]))),Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.session,c.a.getState().functions.socket),o=a.a.useState(e.name?e.name:""),i=Object(h.a)(o,2),l=(i[0],i[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=(s[0],s[1],window.location.hash.split("/"));u[0]=u[0].replace("#",""),36!==u[0].length&&(u[0]=null),c.a.getState().db[e.db]&&c.a.getState().db[e.db][e.nodeId]&&c.a.getState().db[e.db][e.nodeId];var m=Object.keys(c.a.getState().db.cards).filter((function(t){if(!c.a.getState().db.cards[t].deleted&&!c.a.getState().db.cards[t].checklist&&c.a.getState().db.cards[t]._recurrenceId&&c.a.getState().db.cards[t]._parent===e.nodeId)return!0})).map((function(e){return e})),g=function(){var t=Object(p.a)(ji().mark((function t(a){var o,i,l,s,u,p;return ji().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=Object.keys(c.a.getState().db.cards).filter((function(t){if(c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].checklist&&c.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,l=a.source,s=a.draggableId,i){t.next=4;break}return t.abrupt("return",!1);case 4:if(i.droppableId!==l.droppableId||i.id!==l.index){t.next=6;break}return t.abrupt("return",!1);case 6:return(u=o).splice(l.index,1),u.splice(i.index,0,s),n.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:u}),p={},u.map((function(e,t){return p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},e,r.cards[e])),p=Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},p[e]),{},{order:{low:"".concat(t+1)}}))),!0})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),p)})),t.abrupt("return");case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),b=function(){var e=Object(p.a)(ji().mark((function e(t){return ji().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)}}(),v=function(){var e=Object(p.a)(ji().mark((function e(t){return ji().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(cr.a,{onDragEnd:g,onDragStart:b,onDragUpdate:v},a.a.createElement(cr.c,{droppableId:"Drop_tasks",type:"column",direction:"vertical"},(function(e,t){return a.a.createElement(Ei,Object.assign({ref:e.innerRef},e.droppableProps,{isDraggingOver:t.isDraggingOver}),m.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(cr.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement(vn,{provided:t,snapshot:n,data:r.cards[e],db:"cards",onlyOption:!0,showCompleteOption:!0,directDeletion:!0,editable:!0,noShowRecurrenceCard:!0})}))})),e.placeholder)}))))}))),Si=function(e){return{root:Object(f.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(k.d)("color"),color:Object(k.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"}},speedDialInvisible:{right:e.spacing(2),bottom:"-60px",position:"absolute","& .MuiFab-root":{backgroundColor:Object(k.d)("color"),color:Object(k.d)("lightText"),display:"flex",alignItems:"center",justifyContent:"center"},"& .MuiButtonBase-root":{}}}};function Li(){Li=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ci=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Si)((function(e){var t=e.classes,r=(c.a.getState().functions.socket,a.a.useState({name:"plan"})),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(""),s=Object(h.a)(l,2),u=s[0],f=(s[1],a.a.useState("")),m=Object(h.a)(f,2),g=m[0],b=(m[1],a.a.useState(null)),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(0),O=Object(h.a)(_,2),w=(O[0],O[1],c.a.getState()),j=w.db,E=w.session,S=j.cards,L=c.a.getState().sideModule.data;a.a.useEffect((function(){Object(p.a)(Li().mark((function t(){return Li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.a)(e,null,!1,null,"plans",!1);case 2:case"end":return t.stop()}}),t)})))()}),[]);var C=a.a.useRef(null),I=[];j.dataType.filter((function(e){return e.sendTo})).map((function(e){I.push({name:e.name})}));var T=j.users[Object.keys(j.users).find((function(e){return e.indexOf(E._id)>-1}))]._access,F=0;E._id&&j.cards[L._id]&&j.cards[L._id]._users&&j.cards[L._id]._users[Object.keys(j.cards[L._id]._users).find((function(e){return e.indexOf(E._id)>-1}))]&&(F=j.cards[L._id]._users[Object.keys(j.cards[L._id]._users).find((function(e){return e.indexOf(E._id)>-1}))]);var D=window.location.hash.split("/");D[0]=D[0].replace("#","");var N=S;N=Object.keys(N).filter((function(e){if(!N[e].archived&&!N[e].deleted&&(N[e]._users&&N[e]._id!==L._id&&N[e]._users[E._id]&&parseInt(N[e]._users[E._id].access)>2||T&&(T.owner||T.planAdmin||T.planModerate)||F&&F.access&&parseInt(F.access)>2))return!0})).map((function(e){return N[e]})),u&&(N=Object.keys(N).filter((function(e){if(N[e]&&N[e].name&&N[e].name.toLowerCase().indexOf(u.toLowerCase())>-1)return!0})).map((function(e){return N[e]}))),o&&(N=Object.keys(N).filter((function(e){if(N[e]&&N[e].type&&N[e].type===o.name)return!0})).map((function(e){return N[e]}))),N=Object.keys(N).filter((function(e){return L.type&&N[e].type&&j.dataType.filter((function(e){return e.name===L.type}))&&j.dataType.filter((function(e){return e.name===L.type})).length>0&&j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn&&(j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.copy.indexOf(N[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.attach.indexOf(N[e].type)>-1||j.dataType.filter((function(e){return e.name===L.type}))[0].sharedIn.shared.indexOf(N[e].type)>-1)})).map((function(e){return N[e]}));var P=function(){var t=Object(p.a)(Li().mark((function t(){var r;return Li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={_id:Object(M.a)(),cardId:L._id,idRel:y,_parent:y,type:"comment",message:g||"",shared:!0},$r(e,Object(d.a)(Object(d.a)({},r),{},{user:Object(d.a)({},j.users[E._id]),files:{}})),Y.a.post("timeline/add",r),x(null),i({name:"plan"});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(){var t=Object(p.a)(Li().mark((function t(){return Li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmMoveCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){var t={cardId:L._id,newRel:y,planId:j.cards[y]._planId?j.cards[y]._planId:"plan"===j.cards[y].type?y:null,oldRel:L._parent};Object(yt.e)(e,t)&&(x(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:C},y&&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(k.s)("$__action")),a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return P()}},Object(k.s)("$__share","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement("legend",null,Object(k.s)("$__AttachInCard")),a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},onClick:function(){return A()}},Object(k.s)("$__Attach","*"))),a.a.createElement("fieldset",{style:{maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},color:"red",onClick:function(){x(null)}},Object(k.s)("$__cancel","*"))))),a.a.createElement("div",{style:{width:"100%",padding:"15px"}},a.a.createElement(di,{styles:{height:"auto",maxHeight:y?"calc(100vh - 400px)":"none"},onSelect:function(e){x(e._id)},ignoreTypes:["chatGroup"]})))}))),Ii=r(294),Ti=r(196),Fi=r.n(Ti);var Di=function(e){var t=Fi.a.ExcelFile,r=Fi.a.ExcelFile.ExcelSheet,n=Fi.a.ExcelFile.ExcelColumn,o=e.data,i=[],l=[],s=0,u=0,p=0,h=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=c.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 l=a,u="",d=0,p=0,f=0;a<60?u="".concat(l," ").concat(Object(k.s)("$__seconds",1)):a>3600?(l-=3600*(d=Math.trunc(l/3600)),f=(l-=60*(p=Math.trunc(l/60)>0?Math.trunc(l/60):0))>0?l:0,u="".concat(d," ").concat(Object(k.s)("$__hour",1)).concat(d>1?"s":""," ").concat(p," ").concat(Object(k.s)("$__minutes",1)," ").concat(f," ").concat(Object(k.s)("$__seconds",1))):(f=(l-=60*(p=Math.trunc(l/60)>0?Math.trunc(l/60):0))>0?l:0,u="".concat(p," ").concat(Object(k.s)("$__minutes",1)," ").concat(f," ").concat(Object(k.s)("$__seconds",1))),i.push({name:o[e].name,type:Object(k.s)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:_()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:_()(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(k.s)("$__".concat(n.type),1),card:n.name,description:o[e]._times[r].message,iniData:_()(1e3*o[e]._times[r].ini).tz("America/Sao_Paulo").format("YYYY/MM/DD HH:mm:ss"),finalData:_()(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}),l=Object(d.a)(Object(d.a)({},l),{},Object(f.a)({},e,t))}));var m=s,g="";s<60?(h=m,g="".concat(m," ").concat(Object(k.s)("$__seconds",1))):s>3600?(m-=3600*(u=Math.trunc(m/3600)),h=(m-=60*(p=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(u," ").concat(Object(k.s)("$__hour",1)).concat(u>1?"s":""," ").concat(p," ").concat(Object(k.s)("$__minutes",1)," ").concat(h," ").concat(Object(k.s)("$__seconds",1))):(h=(m-=60*(p=Math.trunc(m/60)>0?Math.trunc(m/60):0))>0?m:0,g="".concat(p," ").concat(Object(k.s)("$__minutes",1)," ").concat(h," ").concat(Object(k.s)("$__seconds",1))),i.push({name:"",type:"",card:"",description:"",iniData:"",finalData:"",total:g,hours:"",minutes:"",seconds:"",calc:""})}return a.a.createElement(t,{filename:"".concat(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_timeSheet"),element:a.a.createElement(E.a,{title:Object(k.s)("$__export"),text:Object(k.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(k.s)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__valueForCalculation",1)),value:"calc"})),l&&Object.keys(l).length>0&&Object.keys(l).map((function(e,t){var o=l[e][0].name;return a.a.createElement(r,{data:l[e],name:o,key:e},a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__name",1)),value:"name"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__type",1)),value:"type"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__card",1)),value:"card"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__description",1)),value:"description"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__initialTimer",1)),value:"iniData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__finalTimer",1)),value:"finalData"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__totalTime",1)),value:"total"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__hours",1)),value:"hours"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__minutes",1)),value:"minutes"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__seconds",1)),value:"seconds"}),a.a.createElement(n,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__valueForCalculation",1)),value:"calc"}))})))},Ni={card:{border:"0",marginBottom:"30px",marginTop:"30px",borderRadius:"6px",color:"rgba("+Object(X.r)(X.b)+", 0.87)",background:X.O,width:"100%",boxShadow:"0 1px 4px 0 rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.56), 0 4px 25px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.56)",borderRadius:"6px"},"& small":{color:"rgba("+Object(X.r)(X.O)+", 0.7) !important"}},cardPricing:{textAlign:"center","&:after":{backgroundColor:"rgba("+Object(X.r)(X.b)+", 0.7) !important"},"& ul":{listStyle:"none",padding:0,maxWidth:"240px",margin:"10px auto"},"& ul li":{color:X.q[0],textAlign:"center",padding:"12px 0px",borderBottom:"1px solid rgba("+Object(X.r)(X.q[0])+",0.3)"},"& ul li:last-child":{border:0},"& ul li b":{color:X.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:X.O,borderColor:"rgba("+Object(X.r)(X.O)+",0.3)","& b, & svg,& .fab,& .fas,& .far,& .fal,& .material-icons":{color:X.O,fontWeight:"700"}}},cardProduct:{marginTop:"30px"},primary:{background:"linear-gradient(60deg,"+X.z[1]+","+X.z[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},info:{background:"linear-gradient(60deg,"+X.u[1]+","+X.u[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},success:{background:"linear-gradient(60deg,"+X.G[1]+","+X.G[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},warning:{background:"linear-gradient(60deg,"+X.N[1]+","+X.N[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},danger:{background:"linear-gradient(60deg,"+X.j[1]+","+X.j[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},rose:{background:"linear-gradient(60deg,"+X.D[1]+","+X.D[4]+")","& h1 small":{color:"rgba("+Object(X.r)(X.O)+", 0.8)"},color:X.O},cardChart:{"& p":{marginTop:"0px",paddingTop:"0px"}},cardLogin:{transform:"translate3d("+Object(X.r)(X.b)+")",transition:"all 300ms linear"}},Pi=["className","children","plain","profile","blog","raised","background","pricing","color","product","testimonial","chart","login"],Ai=Object(R.a)(Ni);function $i(e){var t,r=Ai(),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,h=e.product,m=e.testimonial,g=e.chart,b=e.login,v=Object(V.a)(e,Pi),x=y()((t={},Object(f.a)(t,r.card,!0),Object(f.a)(t,r.cardPlain,i),Object(f.a)(t,r.cardProfile,c||m),Object(f.a)(t,r.cardBlog,l),Object(f.a)(t,r.cardRaised,s),Object(f.a)(t,r.cardBackground,u),Object(f.a)(t,r.cardPricingColor,d&&void 0!==p||d&&void 0!==u),Object(f.a)(t,r[p],p),Object(f.a)(t,r.cardPricing,d),Object(f.a)(t,r.cardProduct,h),Object(f.a)(t,r.cardChart,g),Object(f.a)(t,r.cardLogin,b),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:x},v),o)}var zi={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(X.r)(X.O)+", 0.8)"}}},cardBodyProfile:{marginTop:"15px"},cardBodyCalendar:{padding:"0px !important"}},Mi=["className","children","background","plain","formHorizontal","pricing","signup","color","profile","calendar"],Yi=Object(R.a)(zi);function Bi(e){var t,r=Yi(),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,h=e.calendar,m=Object(V.a)(e,Mi),g=y()((t={},Object(f.a)(t,r.cardBody,!0),Object(f.a)(t,r.cardBodyBackground,i),Object(f.a)(t,r.cardBodyPlain,c),Object(f.a)(t,r.cardBodyFormHorizontal,l),Object(f.a)(t,r.cardPricing,s),Object(f.a)(t,r.cardSignup,u),Object(f.a)(t,r.cardBodyColor,d),Object(f.a)(t,r.cardBodyProfile,p),Object(f.a)(t,r.cardBodyCalendar,h),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var Ri={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:X.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(X.r)(X.b)+", 0.24), 0 8px 10px -5px rgba("+Object(X.r)(X.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:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.M)},successCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.F)},dangerCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.i)},infoCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.t)},primaryCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.y)},roseCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.C)},customCardHeader:{color:X.O,"&:not($cardHeaderText):not($cardHeaderIcon)":Object(d.a)({},X.g)}},Gi=["className","children","color","plain","image","contact","signup","stats","icon","text"],Hi=Object(R.a)(Ri);function Wi(e){var t,r=Hi(),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,h=e.text,m=Object(V.a)(e,Gi),g=y()((t={},Object(f.a)(t,r.cardHeader,!0),Object(f.a)(t,r[i+"CardHeader"],i),Object(f.a)(t,r.cardHeaderPlain,c),Object(f.a)(t,r.cardHeaderImage,l),Object(f.a)(t,r.cardHeaderContact,s),Object(f.a)(t,r.cardHeaderSignup,u),Object(f.a)(t,r.cardHeaderStats,d),Object(f.a)(t,r.cardHeaderIcon,p),Object(f.a)(t,r.cardHeaderText,h),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:g},m),o)}var Ui=r(1973),Vi=r(1953),qi=r(1952),Xi=r(1954),Ji=r(1874);function Ki(){Ki=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(R.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 Zi=Object(s.b)((function(e){return{cards:e.db.cards,timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.timeline,o=a.a.useState(_()(new Date).tz("America/Sao_Paulo").subtract(720,"d").format("YYYY-MM-DD")),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DD")),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState({}),j=Object(h.a)(w,2),S=j[0],L=j[1],C=a.a.useState({}),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!0),N=Object(h.a)(D,2),P=N[0],A=N[1],$=window.location.hash.split("/");$[0]=$[0].replace("#",""),a.a.useEffect((function(){return M(),function(){}}),[]),a.a.useEffect((function(){z()}),[e.cards]);var z=function(){var t=Object(p.a)(Ki().mark((function t(){var r;return Ki().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(yt.t)(e.nodeId);case 2:r=t.sent,F(r);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=Object(p.a)(Ki().mark((function t(){return Ki().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[e.nodeId],db:"cards",type:"timer",reqChildrens:!0});case 3:t.sent&&A(!1),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0),A(!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(k.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(k.s)("$__hour",1)).concat(a>1?"s":""," ").concat(o," ").concat(Object(k.s)("$__minutes",1)," ").concat(i>0?"".concat(i," ").concat(Object(k.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(k.s)("$__minutes",1)," ").concat(l>0?"".concat(l," ").concat(Object(k.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(d.a)(Object(d.a)({},B),{},Object(f.a)({},r,Object(d.a)({},n[e][t]._toUser[r]?n[e][t]._toUser[r]:{})))})):B=Object(d.a)(Object(d.a)({},B),{},Object(f.a)({},n[e][t].user._id,Object(d.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(S).length||Object.keys(S).length>0&&Object.keys(S).filter((function(r){return n[e]&&n[e][t]&&n[e][t].type&&"timer"===n[e][t].type&&S[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)>=_()("".concat(l," 00:00:01")).unix("X")||0===parseInt(n[e][t].ini))&&parseInt(n[e][t].fin)<=_()("".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="",c="";if(a<60)i="".concat(o," ").concat(Object(k.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,p=(o-=60*u)>0?o:0;i="".concat(s," ").concat(Object(k.s)("$__hour",1)).concat(s>1?"s":""," ").concat(u," ").concat(Object(k.s)("$__minutes",1)," ").concat(p>0?"".concat(p," ").concat(Object(k.s)("$__seconds",1)):""),c="".concat(s,"H ").concat(u,"M ").concat(p," S")}else{var h=Math.trunc(o/60)>0?Math.trunc(o/60):0,m=(o-=60*h)>0?o:0;i="".concat(h," ").concat(Object(k.s)("$__minutes",1)," ").concat(m>0?"".concat(m," ").concat(Object(k.s)("$__seconds",1)):""),c="".concat(h,"M ").concat(m," S")}Y=Object(d.a)(Object(d.a)({},Y),{},Object(f.a)({},r,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.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:c,_times:Object(d.a)(Object(d.a)({},Y[r]&&Y[r]._times?Y[r]._times:{}),{},Object(f.a)({},t,Object(d.a)(Object(d.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(Ne.a,{title:e.data.name},a.a.createElement(Re.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(k.d)("menu"),width:"33%",minWidth:"150px"}},e.data.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(k.d)("menu")}},e.data.timerText))};return a.a.createElement($i,null,a.a.createElement(ua,{title:Object(k.s)("$__timeSheet",1),icon:"update",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},customButtons:[!x&&{title:"$__timeSheetExport",icon:"file_download",color:Object(k.d)("colorText"),onClick:function(){O(!x)}}]}),P?a.a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250,250,250,0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10}},a.a.createElement(je,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(k.s)("$__timeCourse",1)),a.a.createElement(Ce,{label:Object(k.s)("$__initialDate",1),variant:Object(k.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:l}),a.a.createElement(Ce,{label:Object(k.s)("$__endDate",1),variant:Object(k.d)("fieldVariant"),name:"endDate",type:"date",min:l||null,InputLabelProps:{shrink:!0},inputProps:{min:l||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(Ui.a,{style:{width:"100%"}},a.a.createElement(qi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(le.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"12px"}},Object(k.s)("$__users"),a.a.createElement(wt.a,{max:6},Object.keys(S).length>0&&Object.keys(S).map((function(e,t){return a.a.createElement(Ne.a,{title:r.users[e].name,key:t},a.a.createElement(Re.a,{alt:r.users[e].name,src:r.users[e].image||null},r.users[e].name.substr(0,1)))}))))),a.a.createElement(Vi.a,{style:{minWidth:"100%"}},a.a.createElement(Ji.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(Xi.a,{key:e,style:{minWidth:"100%"},control:a.a.createElement(a.a.Fragment,null,a.a.createElement(Re.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(Fo,{checked:!(!S||!S[e]),onChange:function(){!function(e){S[e]&&Object.keys(S).filter((function(e){return S[e]})).length<=1?L({}):L(Object(d.a)(Object(d.a)({},S),{},Object(f.a)({},e,!S[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(Di,{data:Y}),a.a.createElement(E.a,{title:Object(k.s)("$__closeFilter"),text:Object(k.s)("$__closeFilter"),color:"lightgrey",textColor:"lightgrey",icon:"cancel",onClick:function(){O(!x)},size:"25px"}))),a.a.createElement(Wi,{style:{height:"333px"}},a.a.createElement(Ii.a,{data:Object(Se.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(k.d)("menu"),textAlign:"center"}},G(R,!0))),a.a.createElement(Bi,null,a.a.createElement(kn,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(k.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(k.s)("$__timeSheetShowingAllTimesRegisteredInAllActivitiesOfPlan"):Object(k.s)("$__timeSheetShowingAllTimesRegisteredInActivityAndLinkedActivities")))})),Qi=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(k.d)("color")}}},timeline:{position:"absolute",width:"100%",bottom:"0px"},avatar:{width:"22px",height:"22px"},switch:{fontSize:"16px",fontWeight:"bold",color:Object(k.d)("medium")}}};var ec=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Qi)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.sideModule,i=r.session,l=o.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=u[1],f=a.a.useState(c.a.getState().db.cards[l._id]._users[i._id]?"timeline":"chart"),m=Object(h.a)(f,2),g=m[0],b=m[1];Object(k.j)(),i._id&&n.cards[l._id]&&n.cards[l._id]._users&&n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))]&&n.cards[l._id]._users[Object.keys(n.cards[l._id]._users).find((function(e){return e.indexOf(i._id)>-1}))];var v=window.location.hash.split("/");v[0]=v[0].replace("#","");var y=n.cards[l._id]._timeline||{};return y=Object.keys(y).filter((function(e){return"kpi"===y[e].type})).map((function(e){return y[e]})),l._parent&&l._parent!==v[0]&&c.a.getState().db.cards[l._parent],a.a.createElement("div",null,!d&&a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex"}},"chart"!==g&&c.a.getState().db.cards[l._id]._users[i._id]&&a.a.createElement(E.a,{title:Object(k.s)("$__add"),text:Object(k.s)("$__add"),icon:"more_time",size:"25px",onClick:function(){p(!0)}}),"chart"!==g&&a.a.createElement(E.a,{title:Object(k.s)("$__showChart"),text:Object(k.s)("$__showChart"),icon:"analytics",size:"25px",onClick:function(){b("chart")}}),"timeline"!==g&&a.a.createElement(E.a,{title:Object(k.s)("$__showTimeline"),text:Object(k.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(Zi,{nodeId:l._id})),(d||"timeline"===g)&&a.a.createElement("div",{style:{position:"absolute",top:35,left:0,right:0,bottom:0}},a.a.createElement(La,{nodeId:l._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(ar,{data:l,manualAdd:!0,callBack:function(){p(!1)}})))})));function tc(){tc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var rc=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.sideModule,n=t.db,o=(t.functions.socket,a.a.useState(!1)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(null),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState({}),w=Object(h.a)(O,2),j=(w[0],w[1]),E=a.a.useState(0),S=Object(h.a)(E,2),L=S[0],C=S[1],I=a.a.useState(""),T=Object(h.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(){P()}),[N._id]);var P=function(){var e=Object(p.a)(tc().mark((function e(){var t;return tc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(yt.t)(N._id);case 2:(t=e.sent)&&j(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var t=Object(p.a)(tc().mark((function t(){return tc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmDeleteThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Jt(N._id),Object(k.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(p.a)(tc().mark((function e(){var t;return tc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,kt.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)}}(),z=function(){var e=Object(p.a)(tc().mark((function e(){var t;return tc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,e.next=4,Y.a.post("/user/migrateActivities",{from:N._id,fromData:N,to:[x],toData:n.users[x]});case 4:e.sent&&(s(!0),t=Object(d.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(d.a)(Object(d.a)({},t[e]._users),{},Object(f.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(){z()}),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(pa,{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(k.d)("color")}},Object(k.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(k.s)("$__delete".concat(n.users[N._id].type,"WithUsersDescription"),1):Object(k.s)("$__delete".concat(n.users[N._id].type,"NoUsersDescription"),1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deleteThisDescription",1)),a.a.createElement(mo,{onClick:function(){A()}},Object(k.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&&!l?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__thisUserHas",1)),a.a.createElement("div",{style:{position:"relative",marginTop:"22px",bottom:"7px",width:"100%",fontSize:"12px",color:Object(k.d)("mediumText"),display:"flex",justifyContent:"center",textAlign:"center"}},L," ",Object(k.s)("$__items"),a.a.createElement("br",null),Object(k.s)("$__deleteCountCardsExplain"))),x?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__selectedUserToMigrationCards")),a.a.createElement("div",{style:{cursor:"pointer",marginBottom:"7px",display:"flex",alignItems:"center"},onClick:function(){_(null)}},a.a.createElement(Re.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(mo,{onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmUserTransferData",1),autoClose:5e4,buttons:[{shadow:!0,title:Object(k.s)("$__confirm"),text:Object(k.s)("$__confirm"),color:"green",icon:"done_all",size:"25px",style:{marginLeft:15},onClick:function(){z()}},{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"red",icon:"close",size:"25px",style:{marginLeft:15},onClick:function(){}}],variant:"warning",persist:!1,horizontal:"right"})}},Object(k.s)("$__migrate",1))):a.a.createElement("fieldset",{style:{marginTop:7,marginBottom:7}},a.a.createElement("legend",null,Object(k.s)("$__chooseAUserToTransferCardsBeforeDeletingUser")),a.a.createElement(Ce,{label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:F,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.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(Re.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(k.d)("color")}},Object(k.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deactivateWhithoutMigration",1)),a.a.createElement(mo,{onClick:function(){A()}},Object(k.s)("$__deactivateThis",1)))):a.a.createElement("fieldset",{style:{textAlign:"center"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__deactivateThis",1)),a.a.createElement("div",{style:{textAlign:"center",width:"100%"}},Object(k.s)("$__deactivateUserDescription",1)),a.a.createElement(mo,{onClick:function(){A()}},Object(k.s)("$__deactivateThis",1)))),g?a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"33px"}},a.a.createElement(da.a,null)):a.a.createElement(a.a.Fragment,null)))})),nc=r(19),ac=r(1968),oc=Object(R.a)({root:{"&:hover":{backgroundColor:"transparent"}},icon:{borderRadius:"50%",width:16,height:16,boxShadow:"inset 0 0 0 1px ".concat(Object(k.d)("color",.2),", inset 0 -1px 0 ").concat(Object(k.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(k.d)("color",.6)),outlineOffset:2},"input:hover ~ &":{backgroundColor:"#ebf1f5"},"input:disabled ~ &":{boxShadow:"none",background:"rgba(206,217,224,.5)"}},checkedIcon:{backgroundColor:Object(k.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(k.d)("color",1)}}});var ic=function(e){var t=oc();return a.a.createElement(ac.a,Object.assign({className:t.root,disableRipple:!0,color:"default",checkedIcon:a.a.createElement("span",{className:Object(nc.default)(t.icon,t.checkedIcon)}),icon:a.a.createElement("span",{className:t.icon})},e))},cc=r(1955),lc=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(k.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(k.d)("color",.2)),borderRadius:"5px",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px",paddingRight:"7px",fontWeight:"bold",fontSize:"12px",color:Object(k.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(k.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"12px",color:Object(k.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(k.d)("color",.2)),borderRadius:"0 0 5px 5px",paddingTop:"15px",paddingLeft:"16px",fontSize:"12px",fontWeight:"bold",color:Object(k.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(k.d)("medium")},accessDescription:{fontSize:"12px",color:Object(k.d)("medium")}}},sc=r(619),uc=r.n(sc);function dc(){dc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var pc=Object(s.b)((function(e,t){return{users:e.db.users,cardUsers:e.db.cards[e.sideModule.data._id]}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(lc)((function(e){var t,r=e.classes,n=c.a.getState(),o=n.db,i=n.sideModule,l=n.session,s=a.a.useState({id:null}),u=Object(h.a)(s,2),f=u[0],m=u[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState("users"),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(""),S=Object(h.a)(j,2),L=S[0],C=S[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1],N=o.cards[i.data._id],P=(null===(t=o.cards[N._planId])||void 0===t?void 0:t.client)||null,A=Object(d.a)({},o.users),$=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},N&&N._users?Object(d.a)({},N._users):{}),N._parent&&o.cards[N._parent]&&o.cards[N._parent]._users?Object(d.a)({},o.cards[N._parent]._users):{}),N._planId&&o.cards[N._planId]&&o.cards[N._planId]._users?Object(d.a)({},o.cards[N._planId]._users):{}),A),z=Array.from(c.a.getState().db.userGroup),M=window.location.hash.split("/");M[0]=M[0].replace("#","");var B=Object(k.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(l._id)>-1}))]:0;if(!i||!i.data)return null;var G=function(){var t=Object(p.a)(dc().mark((function t(r,n,a){var c,l;return dc().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,Ht(e,r,c,i.data._id,l);case 6:if(!t.sent){t.next=11;break}return y(!1),m({_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(p.a)(dc().mark((function t(r){return dc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Wt(e,r,i.data._id);case 2:if(!t.sent){t.next=7;break}return y(!1),m({_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(p.a)(dc().mark((function t(r,n){return dc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y.a.put("cards/removeAccess/",{cardId:i.data._id,userIds:[r]});case 2:t.sent&&(n&&e.reduxFunction("ASYNC","CLEAR_MODULE"),y(!1),m({_id:null}));case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if(!N)return null;A=A&&Object.keys(A).length>0&&Object.keys(A).filter((function(e){return e&&N&&N._users&&N._users[A[e]._id]&&!N._users[A[e]._id].deleted})).sort((function(e,t){return e.name<t.name?-1:0})).map((function(e){return A[e]})),$=($=Object.keys($).filter((function(e){if("A10"===$[e].name&&console.log($[e],P),e&&(!$[e].type||$[e].type&&"client"!==$[e].type&&"unity"!==$[e].type&&"group"!==$[e].type)&&!$[e].deleted&&(!P&&(!$[e]._parent||$[e]._parent&&$[e]._parent===l.account)||P&&($[e]._parent&&($[e]._parent===P||$[e]._parent===l.account)||!$[e]._parent)))return!0})).map((function(e){return $[e]}))).filter((function(e){return e&&(!P||P&&(e._parent===P||!e._parent))&&(!N._users||!N._users[e._id])&&(!L||L&&(e.name&&e.name.toLowerCase().indexOf(L.toLowerCase())>-1||L.indexOf(">")>-1&&e._parent&&c.a.getState().db.users&&c.a.getState().db.users[e._parent]&&c.a.getState().db.users[e._parent].name&&c.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(p.a)(dc().mark((function e(t){return dc().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(p.a)(dc().mark((function e(t){return dc().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(E.a,{transparent:!0,title:N._groups&&N._groups[t.value]?Object(k.s)("$__removeTeam"):Object(k.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):Ut(e,t.value,N._id)}})))},X=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=!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])||(c=!1),N&&N._planId&&Object(yt.D)(N._planId)&&(c=!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(k.s)("$__responsible",1)):"",n&&!f._id?a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(k.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(at,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(k.d)("color"),options:[{name:"$__setAsResponsible",icon:"admin_panel_settings",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Vt(e,{cardId:i.data._id,userId:s._id})}})}}].concat(Object(Se.a)(c&&(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===l._id)?[{name:"$__editAccess",icon:"manage_accounts",onClick:function(){m({_id:s._id,access:u})}},{name:"$__removeAccess",icon:"delete_forever",color:"red",onClick:function(){Object(k.c)({message:s._id!==l._id?Object(k.s)("$__confirmRemoveUser",1):Object(k.s)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(s._id,s._id===l._id)}})}}]:[]))}))),a.a.createElement("div",{className:r.avatar,style:{backgroundImage:'url("'.concat(s.image?s.image:uc.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:c?function(){(s&&(!s._access||s._access&&"owner"!==s._access)&&(R&&String(R.access)&&parseInt(R.access)>2&&parseInt(R.access)>=parseInt(u)||B&&B.plan&&(B.planAdmin||B.planModerate))||s._id===l._id)&&m({_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(k.s)("$__owner",1):"0"===u?Object(k.s)("$__reader",1):"1"===u?Object(k.s)("$__executioner",1):"2"===u?Object(k.s)("$__collaborator",1):"3"===u?Object(k.s)("$__leadership",1):"4"===u?Object(k.s)("$__supervisor",1):"5"===u?Object(k.s)("$__admin",1):Object(k.s)("$__reader",1),")")))};if(f&&f._id){var J=1;N._users&&N._users[f._id]&&N._users[f._id].access&&(J=String(N._users[f._id].access));var K=N._users[f._id],Z=!1;return N&&N._planId&&Object(yt.D)(N._planId)&&(Z=!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"}},v&&a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__save"),icon:"save",color:Object(k.d)("color"),onClick:function(){G(f._id,f.access,K)}}),A.length>1&&a.a.createElement(E.a,{transparent:!0,title:f._id!==l._id?Object(k.s)("$__removeAccess",1):Object(k.s)("$__getOut",1),icon:f._id!==l._id?"delete_forever":"logout",color:"red",onClick:function(){Object(k.c)({message:f._id!==l._id?Object(k.s)("$__confirmRemoveUser",1):Object(k.s)("$__confirmGetOut",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){W(f._id,f._id===l._id)}})}}),a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__close","*"),icon:"undo",color:Object(k.d)("medium"),onClick:function(){v?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){m({_id:null}),y(!1)}}):(m({_id:null}),y(!1))}})),a.a.createElement("div",{style:{position:"relative",width:"100%",padding:15,float:"left"}},(f._id!==l._id||B.plan&&B.planAdmin)&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%"}},a.a.createElement(cc.a,{defaultValue:String(J),"aria-label":"gender",name:"customized-radios",onChange:function(e){m(Object(d.a)(Object(d.a)({},f),{},{access:e.target.value})),y(!0)}},"plan"!==N.type&&(R&&parseInt(R.access)>=0||Z&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"0",control:a.a.createElement(ic,null),label:Object(k.s)("$__reader",1)}),"plan"!==N.type&&(R&&parseInt(R.access)>=1||Z&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"1",control:a.a.createElement(ic,null),label:Object(k.s)("$__executioner",1)}),"plan"!==N.type&&"chatGroup"!==N.type&&(R&&parseInt(R.access)>=2||Z&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"2",control:a.a.createElement(ic,null),label:Object(k.s)("$__collaborator",1)}),(R&&parseInt(R.access)>=3||Z&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"3",control:a.a.createElement(ic,null),label:Object(k.s)("$__leadership",1)}),"chatGroup"!==N.type&&(R&&parseInt(R.access)>=4||Z&&B&&B.plan&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"4",control:a.a.createElement(ic,null),label:Object(k.s)("$__supervisor",1)}),(R&&parseInt(R.access)>=5||B&&B.plan&&Z&&(B.planAdmin||B.planModerate))&&a.a.createElement(Xi.a,{value:"5",control:a.a.createElement(ic,null),label:Object(k.s)("$__admin",1)}))),"chatGroup"!==N.type?a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},"0"===f.access&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(k.s)("$__readOnlyTodo",1)),a.a.createElement("li",null,Object(k.s)("$__readTimeline",1))),parseInt(f.access)>=1&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(k.s)("$__executioner",1)),a.a.createElement("li",null,Object(k.s)("$__timeSheetRegister",1)),a.a.createElement("li",null,Object(k.s)("$__interactonTheTimeline",1))),parseInt(f.access)>1&&a.a.createElement("li",null,Object(k.s)("$__ExecuteAndCreateSubTasks",1)),parseInt(f.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(k.s)("$__access",1)," BRIGHT & CONNECTED"),a.a.createElement("li",null,Object(k.s)("$__access",1)," INSIGHTS")),a.a.createElement("li",null,Object(k.s)("$__updateDueDate",1)),a.a.createElement("li",null,Object(k.s)("$__updateTags",1)),a.a.createElement("li",null,Object(k.s)("$__updateIndicators",1)),a.a.createElement("li",null,Object(k.s)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(k.s)("$__defineResponsible",1))),parseInt(f.access)>3&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(k.s)("$__updateData",1)),a.a.createElement("li",null,Object(k.s)("$__usersManager",1))),parseInt(f.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(k.s)("$__access",1)," MATRIX SWOT")),a.a.createElement("li",null,Object(k.s)("$__settings",1))),5===parseInt(f.access)&&a.a.createElement("li",null,Object(k.s)("$__deleteActivity",1))):a.a.createElement("ul",{id:"ACTIVE_USERS_LIST",style:{position:"relative",float:"left",width:"100%"}},parseInt(f.access)>1&&a.a.createElement("li",null,Object(k.s)("$__viewAndInteract",1)),parseInt(f.access)>2&&a.a.createElement(a.a.Fragment,null,a.a.createElement("li",null,Object(k.s)("$__addAndRemoveUsers",1)),a.a.createElement("li",null,Object(k.s)("$__update",1))),5===parseInt(f.access)&&a.a.createElement("li",null,Object(k.s)("$__deleteGroup",1))),N._users[f._id]&&!N._users[f._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(E.a,{transparent:!0,title:Object(k.s)("$__setAsResponsible"),text:Object(k.s)("$__setAsResponsible"),icon:"admin_panel_settings",size:"25px",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmSetAsResponsibleCard",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Vt(e,{cardId:i.data._id,userId:f._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(Ce,{id:"quickUser_Search",label:Object(k.s)("$__searchByName",1),variant:Object(k.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end",style:{cursor:"pointer"},onClick:function(){C(""),D(!1)}},a.a.createElement(le.a,{icon:"close"})),onChange:function(e){C(e.target.value)},onBlur:function(e){}},value:L,placeholder:Object(k.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(k.d)("color")}},Object(k.s)("$__permittedUsers",1)),A&&A.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(k.d)("color")}},Object(k.s)("$__permittedTeams",1)),z.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(k.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(le.a,{icon:"supervised_user_circle",size:"33px",color:"users"!==O?null:"#FFFFFF"}),Object(k.s)("$__showUsers"))),a.a.createElement("div",{style:{padding:7,marginLeft:7,width:"calc(50% - 4px)",cursor:"pointer",backgroundColor:"users"!==O?Object(k.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(le.a,{icon:"group_work",size:"33px",color:"users"!==O?"#FFFFFF":null}),Object(k.s)("$__showTeams")))),"users"===O&&$&&$.length>0&&!f._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__avaiableUsers",1)),a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__add"),icon:"person_add",text:Object(k.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&&z&&z.length>0&&!f._id&&a.a.createElement("fieldset",{style:{marginTop:"7px"}},a.a.createElement("legend",{style:{color:Object(k.d)("color")}},Object(k.s)("$__avaiableTeams",1)),a.a.createElement("div",null,a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__add"),icon:"person_add",text:Object(k.s)("$__addAllTeams"),size:"20px",onClick:function(){V(z)}})),z.filter((function(e){return!N._groups||N._groups&&!N._groups[e.value]})).sort((function(e,t){return e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?-1:e.label.toLowerCase().trim()<t.label.toLowerCase().trim()?1:0})).map((function(e,t){return a.a.createElement("div",{style:{width:"100%",padding:7},key:e._id},q(e))}))),F?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{position:"absolute",right:15,top:0}},a.a.createElement(E.a,{title:Object(k.s)("$__search",1),color:Object(k.d)("menu"),icon:"search",onClick:function(){D(!0)},size:"25px"})))}))),fc=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(k.d)("color")}}},loader:{position:"relative",width:"100%",height:"40px",textAlign:"center","& .MuiCircularProgress-root":{color:"".concat(Object(k.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(k.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(k.d)("medium")}}};function hc(){hc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var mc=function(){var e=Object(p.a)(hc().mark((function e(t){var r,n,a;return hc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=c.a.getState().sideModule.data).status&&delete r.status,(n=window.location.hash.split("/"))[0]=n[0].replace("#",""),e.prev=4,e.next=7,Y.a.post("feed/save",Object(d.a)(Object(d.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(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:a.data._id,data:Object(d.a)({},r)})),console.log(a),t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds),{},Object(f.a)({},r._id,Object(d.a)(Object(d.a)(Object(d.a)({},r),c.a.getState().db.feeds&&c.a.getState().db.feeds[r._id]?c.a.getState().db.feeds[r._id]:{}),{},{_parent:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[r._id]&&c.a.getState().db.feeds[r._id]._parent?c.a.getState().db.feeds[r._id]._parent:{}),{},Object(f.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)}}(),gc=function(){var e=Object(p.a)(hc().mark((function e(t){var r,n,a,o=arguments;return hc().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(p.a)(hc().mark((function e(n,a){var o,i;return hc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.a.post("/Feed_List_V2",r);case 3:(o=e.sent)&&o.data&&(i={},o.data.map((function(e){var t={};e.parents&&e.parents.length>0&&e.parents.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e._id,Object(d.a)({idRel:e.idRel},e.i)))})),i=Object(d.a)(Object(d.a)({},i),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.a)({},e.data),e.hide?{hide:!0}:{}),{},{feed:[Object(d.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(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.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 bc(){bc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var vc=Object(R.a)(fc);var yc=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=vc(),r=c.a.getState(),n=r.sideModule,o=r.session,i=r.db,l=n.data||{},s=a.a.useState(!1),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState(!1),v=Object(h.a)(b,2),y=v[0],x=v[1],O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],S=(w[1],a.a.useRef()),L=0,C=Object(k.j)(),I=window.location.hash.split("/");I[0]=I[0].replace("#",""),I[0]&&36===I[0].length&&(L=Object(yt.u)(I[0]));var T=function(t){""===l.name||"name"===t.name&&""===t.value?g(!1):l._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(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.a)({},n.data),{},Object(f.a)({},t.name,t.value))}))},F=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];m&&!t?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){e.reduxFunction("ASYNC","CLEAR_MODULE")}}):e.reduxFunction("ASYNC","CLEAR_MODULE")},D=function(){var t=Object(p.a)(bc().mark((function t(r){return bc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g(!1),n.data.name){t.next=5;break}Object(k.c)({message:Object(k.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,mc(e,!0);case 7:t.sent?(Object(k.c)({message:Object(k.s)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),r&&F(!0)):(Object(k.c)({message:Object(k.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)}}(),N=function(){var t=Object(p.a)(bc().mark((function t(r){var a,o,i,l;return bc().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(k.c)({message:"".concat(Object(k.s)("$__invalidUrl",1),": ").concat(Object(k.s)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.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,Y.a.post("/feed/exist",{url:r});case 16:o=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.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),P(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,Y.a.post("/link/exist",{idRel:i[0],url:a});case 31:l=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:l.data.title,description:l.data.contentSnippet,image:l.data.img,url:l.data.link,content:l.data.article}})),l&&x(!1),l.data.title&&g(!0),t.next=40;break;case 37:t.prev=37,t.t1=t.catch(26),Object(k.c)({message:"".concat(Object(k.s)("$__invalidFeedUrl",1),": ").concat(Object(k.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)}}(),P=function(){var t=Object(p.a)(bc().mark((function t(r){var a;return bc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Y.a.post("/feed/request/",{url:r});case 3:a=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},n),{},{data:Object(d.a)(Object(d.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(k.c)({message:"".concat(Object(k.s)("$__invalidFeedUrl",1),": ").concat(Object(k.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)}}(),A=!!e.permission&&e.permission;return!A&&parseInt(L)>=3&&(A=!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"}},A&&m&&a.a.createElement(pa,{save:m?function(){D()}:null,saveClose:m?function(){D(!0)}:null,saveLoader:j,close:function(){e.onClose&&e.onClose()}}),a.a.createElement(E.a,{title:Object(k.s)("$__close",1),color:"lightgrey",icon:"cancel",onClick:function(){e.onClose&&e.onClose()},size:"25px"}))),a.a.createElement("div",{className:t.data},l._lock?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,Object.assign({label:Object(k.s)("$__titleOfFeed",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){T(e.target)}},value:l&&l.name?l.name:"",placeholder:Object(k.s)("$__titleOfFeed_placeholder")},o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account||l&&l.name?{disabled:!0}:{})),a.a.createElement(Ce,{label:Object(k.s)("$__customTitle",1),variant:Object(k.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"title"})),onChange:function(e){T(e.target)}},value:l&&l.customTitle?l.customTitle:"",placeholder:Object(k.s)("$__customTitle",1)}),o&&"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"!==o.account?a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:Object(k.s)("$__nameOfFontData",1),variant:Object(k.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"copyright"})),onChange:function(e){T(e.target)}},value:l&&l.font?l.font:"",placeholder:Object(k.s)("$__nameOfFontData",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__descriptionOfRss",1),variant:Object(k.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"subtitles"})),onChange:function(e){T(e.target)}},value:l&&l.description?l.description:"",placeholder:Object(k.s)("$__descriptionOfRss",1)})):a.a.createElement(a.a.Fragment,null),a.a.createElement(Ce,{label:Object(k.s)("$__customDescription",1),variant:Object(k.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"subtitles"})),onChange:function(e){T(e.target)}},value:l&&l.customDescription?l.customDescription:"",placeholder:Object(k.s)("$__customDescription",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__url","*"),variant:Object(k.d)("fieldVariant"),ref:S,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"http"})),onChange:function(e){T(e.target)},onBlur:function(e){N(e.target.value)}},value:l&&l.url?l.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!l._lock}),C&&C.feed&&(C.feedAdmin||C.feedModerate)&&a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement("legend",null,Object(k.s)("$__tags",1)),a.a.createElement(Yo,{data:{values:l._tags?l._tags:[]},callBack:function(e){T({name:"_tags",value:e})}})),C&&C.feed&&C.feedAdmin?a.a.createElement("fieldset",{style:{marginBottom:"14px"}},a.a.createElement(Ta,{id:"combo-box-demo",options:i.plans,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"plans",disableClearable:!0,value:l&&l.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(l.plans)}))[0]:i.plans[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__avaiablefromplan",1),variant:Object(k.d)("fieldVariant"),value:l&&l.plans&&i.plans?i.plans.filter((function(e){return String(e.value)===String(l.plans)}))[0]:i.plans[0]}))},onChange:function(e,t){A&&T({name:"plans",value:t.value})}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:t.switch},a.a.createElement(wr,{checked:!!l.private,onChange:function(e){T({name:"private",value:!l.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__private",1))):a.a.createElement(Ce,{label:Object(k.s)("$__feedUrl","*"),variant:Object(k.d)("fieldVariant"),ref:S,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"rss_feed"})),onChange:function(e){T(e.target)},onBlur:function(e){N(e.target.value)}},value:l&&l.url?l.url:"",placeholder:"http://www.domain.xpto/rss...",disabled:!!l._lock}),!l._lock&&!y&&a.a.createElement(Be,{text:Object(k.s)("link"===n.data.type?"$__validUrl":"$__validFeedUrl",1),icon:"check",onClick:function(){return N(S.current.value)}}),y&&a.a.createElement("div",{className:t.loader},a.a.createElement(da.a,null)),l.feed&&l.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(k.s)("$__preview",1)),l.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},_()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank"},Object(k.s)("$__openLink","*")))))})))))}));function xc(){xc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var _c=Object(R.a)(fc);var Oc=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=_c(),r=c.a.getState().sideModule,n=r.data||{},o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],O=(y[1],a.a.useRef()),w=0,j=window.location.hash.split("/");j[0]=j[0].replace("#",""),j[0]&&36===j[0].length&&(w=Object(yt.u)(j[0]));var S=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(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.a)({},r.data),{},Object(f.a)({},t.name,t.value))}))},L=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];l&&!t?Object(k.c)({message:Object(k.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(p.a)(xc().mark((function t(n){return xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s(!1),r.data.name){t.next=5;break}Object(k.c)({message:Object(k.s)("$__fillName",1),variant:"warning",persist:!1,horizontal:"right",confirm:null}),t.next=9;break;case 5:return t.next=7,mc(e,!0);case 7:t.sent?(Object(k.c)({message:Object(k.s)("$__feedSigned",1),variant:null,persist:!1,horizontal:"right",confirm:null}),n&&L(!0)):(Object(k.c)({message:Object(k.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(p.a)(xc().mark((function t(n){var a,o,i;return xc().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(k.c)({message:"".concat(Object(k.s)("$__invalidUrl",1),": ").concat(Object(k.s)("$__urlMustContainHttps",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.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,Y.a.post("/link/exist",{idRel:o[0],url:a});case 15:i=t.sent,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.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(k.c)({message:"".concat(Object(k.s)("$__invalidFeedUrl",1),": ").concat(Object(k.s)("$__pleaseVerifyTheFeedAddress",1)),variant:"error",persist:!1,horizontal:"right",confirm:null});case 24:t.next=28;break;case 26:Object(k.c)({message:"".concat(Object(k.s)("$__invalidUrl",1),": ").concat(Object(k.s)("$__pleaseVerifyTheUrl",1)),variant:"error",persist:!1,horizontal:"right",confirm:null}),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r),{},{data:Object(d.a)(Object(d.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(da.a,{size:"25px"})),T&&l&&a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),color:Object(k.d)("color"),icon:"save",onClick:function(){C()},size:"25px"}),a.a.createElement(E.a,{title:Object(k.s)("$__saveAndClose",1),color:"green",icon:"playlist_add_check",onClick:function(){C(!0)},size:"25px"})),a.a.createElement(E.a,{title:Object(k.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(Ce,{label:Object(k.s)("$__titleOfUrl",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_headline"})),onChange:function(e){S(e.target)}},value:n&&n.name?n.name:"",placeholder:Object(k.s)("$__titleOfUrl_placeholder"),disabled:!0}),a.a.createElement(Ce,{label:Object(k.s)("$__customTitle",1),variant:Object(k.d)("fieldVariant"),name:"customTitle",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"title"})),onChange:function(e){S(e.target)}},value:n&&n.customTitle?n.customTitle:"",placeholder:Object(k.s)("$__customTitle",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__nameOfFontData",1),variant:Object(k.d)("fieldVariant"),name:"font",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"copyright"})),onChange:function(e){S(e.target)}},value:n&&n.font?n.font:"",placeholder:Object(k.s)("$__nameOfFontData",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__descriptionOfUrl",1),variant:Object(k.d)("fieldVariant"),name:"description",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"subtitles"})),onChange:function(e){S(e.target)}},value:n&&n.description?n.description:"",placeholder:Object(k.s)("$__descriptionOfUrl",1)}),a.a.createElement(Ce,{label:Object(k.s)("$__customDescription",1),variant:Object(k.d)("fieldVariant"),name:"customDescription",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"subtitles"})),onChange:function(e){S(e.target)}},value:n&&n.customDescription?n.customDescription:"",placeholder:Object(k.s)("$__customDescription",1)}),a.a.createElement("div",{className:t.switch},a.a.createElement(wr,{checked:!!n.private,onChange:function(e){S({name:"private",value:!n.private})},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__private",1))),a.a.createElement(Ce,{label:Object(k.s)("$__url","*"),variant:Object(k.d)("fieldVariant"),ref:O,name:"url",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"http"})),onChange:function(e){S(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(Be,{text:Object(k.s)("$__validUrl",1),icon:"check",onClick:function(){return I(O.current.value)}}),g&&a.a.createElement("div",{className:t.loader},a.a.createElement(da.a,null)),n.feed&&n.feed.length>0&&a.a.createElement("ul",{className:t.preview},a.a.createElement("div",{className:t.previewTitle},Object(k.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},_()(e.pubDate).format("DD/MM/YYYY HH:MM")),a.a.createElement("div",{className:t.feedLink},a.a.createElement("a",{href:e.link,target:"_blank"},Object(k.s)("$__openLink","*")))))})))))}));var wc,jc=Object(s.b)((function(e){return{sideModuleWindow:e.session.sideModuleWindow,sideModule:e.sideModule,cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(fa)((function(e){var t,r,n=c.a.getState(),o=n.sideModule,i=n.db,l=n.session,s=a.a.useState(!1),u=Object(h.a)(s,2),p=u[0],f=u[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1];if(a.a.useEffect((function(){return o.id&&(b||"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 y=e.classes,x=o.data,_=window.location.hash.split("/");_[0]=_[0].replace("#","");var O=i.cards[x._id]?"cards":"users",w=Object(k.j)(),j=Object(yt.u)(o.id),E=!1;!x||!x._planId||i.cards[x._planId]&&Object(yt.D)(x._planId)||(E=!1),!(E=!(!o||!("new"===o.id||("user"===x.type||"client"===x.type)&&w&&w.user&&(w.userAdmin||w.userModerate)||"user"!==x.type&&"client"!==x.type&&"chatGroup"!==x.type&&w&&(w.owner||w.plan&&(w.planAdmin||w.planModerate))||"chatGroup"===x.type&&(!x.client||x.client&&i.users[x.client])&&w&&(w.owner||w.plan&&(w.planAdmin||w.planModerate)))))&&parseInt(j)>=4&&(E=!0),!E&&Object(yt.D)(x._planId)&&w&&w.admin&&w.plan&&(w.planAdmin||w.planModerate)&&(E=!0);var S=[{name:"userEdit",icon:"notes",title:"$__userEdit",reqId:!1,module:Ha,closeOption:!1,permission:0},{name:"feedEdit",icon:"rss_feed",title:"$__feedEdit",reqId:!1,module:yc,closeOption:!1,permission:3,template:!0},{name:"link",icon:"link",title:"$__link",reqId:!1,module:Oc,permission:3,closeOption:!1,hide:!0,template:!0},{name:"timeline",icon:"timeline",title:"$__timeline",reqId:!0,module:La,props:{type:"comment",nodeId:o.id,db:"cards",loadTimeline:!0,disabledSend:"0"===String(j)},closeOption:!0,permission:0,count:"comment"},{name:"log",icon:"history",title:"$__log",reqId:!0,module:La,props:{type:"log",nodeId:o.id,db:"cards",loadTimeline:!0,noSearch:!0,disabledSend:!0},closeOption:!0,permission:0,count:"log"},{name:"checklist",icon:"checklist",title:"$__list",reqId:!0,module:kr,closeOption:!0,permission:1,props:{nodeId:o.data._id,db:o.db?o.db:"cards",permission:E,showProgress:!0},template:!0}].concat(Object(Se.a)(x.type.indexOf("guideline")>-1||x.type.indexOf("objective")>-1||x.type.indexOf("goal")>-1?[{name:"catenation",icon:"account_tree",title:"$__catenation",reqId:!0,module:oi,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:ki,closeOption:!0,permission:3,props:{nodeId:o.data._id,db:o.db?o.db:"cards"},template:!0},{name:"files",icon:"folder",title:"$__files",reqId:!0,module:wi,closeOption:!0,permission:3,props:{nodeId:o.id,db:o.db}},{name:"access",icon:l._id===x._id?"vpn_key":"security",title:l._id===x._id?"$__changePassword":"$__access",reqId:!0,module:qa,closeOption:!1,permission:l._id===x._id?0:4}],Object(Se.a)(l._id===x._id?[{name:"twoFactor",icon:"pin",title:"$__twoFactorAuthenticator",reqId:!0,module:Ja,closeOption:!1,permission:l._id===x._id?0:6,ownerLock:!0},{name:"mobile",icon:"phone_iphone",title:"$__mobile",reqId:!0,module:po,closeOption:!1,permission:l._id===x._id?0:6,ownerLock:!0}]:[]),[{name:"resume",icon:"blur_on",title:"$__resume",resume:!0,reqId:!0,module:Zo,closeOption:!0,permission:2,template:!0},{name:"cardEdit",icon:"subject",title:"$__edition",reqId:!1,module:Ho,closeOption:!1,permission:0,buttonsCount:3,template:!0},{name:"columnEdit",icon:"tune",title:"$__edition",reqId:!1,module:hi,closeOption:!1,permission:0,buttonsCount:3,template:!0},{name:"users",icon:"supervised_user_circle",title:"$__usersAndDepartments",reqId:!0,module:pc,closeOption:!0,permission:3,template:!0}],Object(Se.a)("users"===O?[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:rc,closeOption:!0}]:[{name:"delete",icon:"delete_sweep",title:"$__delete",reqId:!0,module:vo,closeOption:!0,permission:5,template:!0}]),Object(Se.a)(j>=4||j&&j<4&&x.kpi_type&&"task"!==x.kpi_type||w&&w.plan&&w.planAdmin?[{name:"kpi",icon:"analytics",title:"$__kpi",reqId:!0,module:Jo,closeOption:!1,permission:3,count:"kpi"}]:[]),[{name:"timeLog",icon:"timer",title:"$__timerLog",reqId:!0,module:ec,closeOption:!0,permission:1,count:"timer"},{name:"sendTo",icon:"share",title:"$__sendTo",reqId:!0,module:Ci,closeOption:!0,permission:3,template:!0}],Object(Se.a)("client"===x.type||"group"===x.type||"unity"===x.type?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:oo,closeOption:!1,permission:1,template:!0}]:[]),Object(Se.a)("user"===x.type&&l._id===x._id?[{name:"settings",icon:"admin_panel_settings",title:"$__settings",reqId:!0,module:Za,closeOption:!1,permission:1,template:!0}]:[]),Object(Se.a)("step"===x.type&&E?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:mi,closeOption:!1,permission:5,template:!0}]:[]),Object(Se.a)("user"!==x.type&&"step"!==x.type?[{name:"settings",icon:"settings",title:"$__settings",reqId:!0,module:ri,closeOption:!1,permission:5,template:!0}]:[])),L=S.filter((function(e){return e.name===o.activeModule}))[0];if(!L||!L.module)return null;var C=function(t){p?Object(k.c)({message:Object(k.s)("$__confirmCloseWithUnsavedData",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){f(!1),o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)({},o))}}):(o.activeModule=t,e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)({},o)))},I=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];p||t?Object(k.c)({message:Object(k.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))},T=Object(yt.S)(x._id),F=(o.data.type?i.dataType.filter((function(e){return 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(),I()}},a.a.createElement("div",{className:l.sideModuleWindow&&"popup"===l.sideModuleWindow?y.modulePopup:l.sideModuleWindow&&"expanded"===l.sideModuleWindow?y.moduleExpanded:l.sideModuleWindow&&"fullScreen"===l.sideModuleWindow?y.moduleFullScreen:y.module,id:"sideModule",onClick:function(e){e.stopPropagation()}},a.a.createElement("div",{className:y.menu,style:{background:Object(k.d)("menuColor"),borderRight:"solid 3px ".concat(Object(k.d)("color"))},id:"sideModule_menu"},a.a.createElement("div",{className:y.menuButtons_resume}),F.map((function(e,t){var r=!0;!x||!x._planId||i.cards[x._planId]&&Object(yt.D)(x._planId)||(r=!1);var n=S.filter((function(t){return t.name.trim()===e.trim()&&!t.resume&&!t.hide}))[0];if(n&&(("user"===x.type||"client"===x.type)&&(w&&w.user&&(w.userAdmin||w.userModerate&&n.permission<=4||w.userEdit&&n.permission<=3)||x._id===l._id&&n.permission<=3)||"user"!==x.type&&"client"!==x.type&&"account"!==x.type&&"unity"!==x.type&&r&&w&&w.plan&&(w.planAdmin||w.planModerate&&n.permission<=4)||("user"!==x.type||"client"!==x.type||"account"!==x.type)&&String(j)&&parseInt(j)>=parseInt(n.permission))){if(n.ownerLock&&w&&!w.owner&&x._access&&x._access.owner&&l._id!==x._id)return null;if((!T||o.data&&T&&n.template)&&(n&&!n.reqId||n&&(n.reqId||!n.reqId)&&36===o.id.length)){if("recurrence"===n.name&&Object.keys(c.a.getState().db.cards).filter((function(e){if(!c.a.getState().db.cards[e].deleted&&!c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._recurrenceId&&c.a.getState().db.cards[e]._recurrenceId===o.data._id)return!0})).length>0)return a.a.createElement(ho,{key:t,icon:n.icon,module:n.name,title:Object(k.s)(n.title,1),count:n.count?n.count:null,openModule:function(e){C(e)}});if("recurrence"!==n.name)return a.a.createElement(ho,{key:t,icon:n.icon,module:n.name,title:Object(k.s)(n.title,1),count:n.count?n.count:null,openModule:function(e){C(e)}})}}}))),a.a.createElement("div",{id:"sideModule_header"},a.a.createElement(ua,Object.assign({title:o&&o.data&&o.data.name||"".concat(Object(k.s)("$__create")," ").concat(Object(k.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(k.d)("menu")},E&&(null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r._id)?{editable:!0,onChangeIcon:function(t){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:o.data._id}}),{icon:t})}}:{})),L.closeOption&&a.a.createElement(pa,{close:function(){return I()}})),a.a.createElement("div",{className:y.content},a.a.createElement(B,null,a.a.createElement(L.module,Object.assign({},L.props,{permission:E,onClose:function(e){I(e)},reqSave:function(e){f(e)}})))),a.a.createElement("div",{className:y.subTitle,id:"sideModule_subTitle",style:Object(d.a)(Object(d.a)({},o&&o.data&&o.data.private?{background:"gray"}:{}),{},{display:"flex",justifyContent:"space-between"})},Object(k.s)(L.title.toLowerCase(),1),o&&o.data&&o.data.private?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(k.s)("$__isPrivate","*"),a.a.createElement(le.a,{icon:"lock",color:"#FFFFFF",size:20,style:{marginLeft:7}})):a.a.createElement(a.a.Fragment,null)))):null}))),Ec=r(1101),kc=r.n(Ec),Sc=Object(me.a)({root:{"& .MuiPaper-root":{overflow:"visible"}}})(jt.a),Lc=function(){return Object(d.a)(Object(d.a)({},Aa),{},{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(k.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(k.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(k.d)("menu"),"& .selectedCard":{position:"relative",float:"left",width:"250px",height:"33px",display:"flex !important",alignItems:"center"}},flex:{flex:1},title:Object(d.a)(Object(d.a)({},X.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(d.a)(Object(d.a)({},X.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(k.d)("light")," !important"),"&,&:hover,&:focus":{color:"inherit"}}),page:{position:"relative",color:Object(k.d)("line"),fontSize:"16px",textTransform:"uppercase",cursor:"pointer","& a":{color:"#FFFFFF"}},pageLink:{position:"relative",float:"left",color:Object(k.d)("light"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none","&:hover":{fontWeight:"bold"},"& a":{color:"#FFFFFF"}},pageLinkActive:{color:Object(k.d)("line"),margin:"7px",fontSize:"14px",cursor:"pointer",userSelect:"none",fontWeight:"bold"},activeArrow:{position:"absolute",left:"calc(50% - 11px)",bottom:"-23px",transform:"rotate(-90deg)"}})},Cc=Object(R.a)(Lc);var Ic,Tc=JSON.stringify((wc={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(f.a)(wc,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(wc,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(wc,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(wc,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),wc)),Fc=Object(s.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=e.field,n=Cc(),o=c.a.getState(),i=o.db,l=o.searchs,s=a.a.useState(Object(d.a)({},JSON.parse(Tc))),u=Object(h.a)(s,2),p=u[0],m=u[1],g=a.a.useState(null),b=Object(h.a)(g,2),v=b[0],y=b[1],x=JSON.parse(Tc);a.a.useEffect((function(){var t;if(e.onChange){var r={};Object.keys(p).map((function(e){x[e]||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,p[e]))),x[e]&&JSON.stringify(Tc[e])!==JSON.stringify(p[e])&&(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,p[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(d.a)(Object(d.a)({},c.a.getState().searchs),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},JSON.parse(Tc)),p))))}),[p]),a.a.useEffect((function(){var t=Object(d.a)(Object(d.a)({},JSON.parse(Tc)),l[e.nodeId]||{});JSON.stringify(t)!==JSON.stringify(p)&&m(t)}),[r]),a.a.useEffect((function(){e.searchs&&!e.searchs[e.nodeId]&&m(JSON.parse(Tc))}),[e.searchs]);var O=window.location.hash.split("/");O[0]=O[0].replace("#",""),36!==O[0].length&&(O[0]=null);var w=window.location.pathname.split("/"),j=("/".concat(w[1]),function(t,r){var n,a,o=p[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})),m(Object(d.a)(Object(d.a)({},p),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},o),{},Object(f.a)({},r,"all"===r||!o[r])))))}),E=function(t){var r;return a.a.createElement(Ui.a,{style:{width:"100%"},expanded:v===t,onChange:function(){y(v===t?null:t)}},a.a.createElement(qi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(le.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(k.s)("$__".concat(t))),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},Object.keys(p[t]).map((function(e,r){if(p[t][e]&&"all"!==e)return a.a.createElement(Ne.a,{title:Object(k.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(Vi.a,{style:{minWidth:"100%"}},a.a.createElement(Ji.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(Xi.a,{style:{minWidth:"100%"},control:a.a.createElement(Fo,{checked:!(!p[t]||!p[t].all),onChange:function(){j("priority","all")},color:"default"}),label:Object(k.s)("$__allPriorities")}),i.priority.map((function(e,r){return a.a.createElement(a.a.Fragment,{key:r},a.a.createElement(Xi.a,{style:{minWidth:"100%",borderLeft:"3px solid ".concat(e.color)},control:a.a.createElement(Fo,{indeterminate:!(!p[t]||!p[t].all),checked:!(!p[t]||!p[t][e.value]),onChange:function(){j(t,e.value)},color:"default"}),label:Object(k.s)(e.label)}))})))))};return"admin"===r?a.a.createElement(wr,{checked:!!p.admin,onChange:function(e){m(Object(d.a)(Object(d.a)({},p),{},{admin:!p.admin}))},name:"adminView",inputProps:{"aria-label":"secondary checkbox"}}):"text"===r?a.a.createElement("div",{className:n.textField,style:{width:"100%"}},a.a.createElement(Ce,{className:n.noLabelLight,label:Object(k.s)("$__search","*"),autoFocus:!0,value:p.text||"",InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.d)("color")},"search")),onChange:function(e){m(Object(d.a)(Object(d.a)({},p),{},{text:e.target.value}))},onKeyDown:function(e){}}})):"date"===r?a.a.createElement(a.a.Fragment,null,a.a.createElement(no,{type:"datetime",onChangeStartDate:function(t){var r,n={startDate:_()(t).unix("x")};(!(null===(r=c.a.getState().searchs[e.nodeId])||void 0===r?void 0:r.endDate)||c.a.getState().searchs[e.nodeId].endDate<_()(t).unix("x"))&&(n=Object(d.a)(Object(d.a)({},n),{},{endDate:_()("".concat(_()(t).format("YYYY-MM-DD")," 23:59:59")).add(1,"week").unix("X")})),m(Object(d.a)(Object(d.a)({},p),n))},onChangeEndDate:function(e){m(Object(d.a)(Object(d.a)({},p),{},{endDate:_()(e).unix("x")}))},range:!0,horizontal:!0,startDate:(null===p||void 0===p?void 0:p.startDate)?new Date(1e3*p.startDate):null,endDate:(null===p||void 0===p?void 0:p.endDate)?new Date(1e3*p.endDate):null,onClear:function(){m(Object(d.a)(Object(d.a)({},p),{},{startDate:null,endDate:null}))}})):"tags"===r?a.a.createElement(za,{dbNode:"tag",options:c.a.getState().db.tag,style:{width:"100%"},name:"tag",ws:!0,multiple:!0,value:(null===p||void 0===p?void 0:p.tags)||[],placeholder:Object(k.s)("$__tags"),onChange:function(e){m(Object(d.a)(Object(d.a)({},p),{},{tags:e}))}}):"status"===r?a.a.createElement(Ui.a,{style:{width:"100%",padding:0},expanded:"status"===v,onChange:function(){y("status"===v?null:"status")}},a.a.createElement(qi.a,{style:{minWidth:"100%"},expandIcon:a.a.createElement(le.a,null,"expand_more"),"aria-controls":"panel1a-content",id:"panel1a-header"},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px",justifyContent:"space-between",width:"100%",display:"flex"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(k.s)("$__status")),a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},(null===p||void 0===p?void 0:p.status)&&Object.keys(p.status).map((function(e,t){if((p.status[e]||p.status.all)&&"all"!==e)return a.a.createElement(Ne.a,{title:Object(k.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(Vi.a,{style:{minWidth:"100%"}},a.a.createElement(Ji.a,{style:{width:"100%"}},a.a.createElement(Xi.a,{style:{minWidth:"100%"},control:a.a.createElement(Fo,{checked:!(!p.status||!p.status.all),onChange:function(){j("status","all")},color:"default"}),label:Object(k.s)("$__allStatus")}),i.status.map((function(e,t){return a.a.createElement(a.a.Fragment,{key:t},a.a.createElement(Xi.a,{style:{minWidth:"100%"},control:a.a.createElement(Fo,{indeterminate:!(!p.status||!p.status.all),checked:!(!p.status||!p.status[e.value]),onChange:function(){j("status",e.value)},color:"default"}),label:Object(k.s)(e.label)}))}))))):"priority"===r?E("priority"):"complexity"===r?E("complexity"):"risk"===r?E("risk"):"impact"===r?E("impact"):"users"===r?a.a.createElement("div",{style:{marginTop:5}},a.a.createElement(Qt,Object.assign({includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:c.a.getState().db.cards[e.nodeId]||null,noLimit:!0,multiple:!0,onSelect:function(e){m(Object(d.a)(Object(d.a)({},p),{},{users:e}))},selected:(null===p||void 0===p?void 0:p.users)||[],transparent:!0},(null===e||void 0===e||null===(t=e.fieldsProps)||void 0===t?void 0:t.users)||{}))):a.a.createElement(a.a.Fragment,null)}));var Dc=JSON.stringify((Ic={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(f.a)(Ic,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(Ic,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(Ic,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(f.a)(Ic,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Ic)),Nc=Object(s.b)((function(e){return{searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r,n=c.a.getState().searchs,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(Object(d.a)({},JSON.parse(Dc))),p=Object(h.a)(u,2),m=p[0],g=p[1],v=a.a.useState(e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),y=Object(h.a)(v,2),x=y[0],_=y[1],O=JSON.parse(Dc);a.a.useEffect((function(){var t;if(e.onChange){var r={};Object.keys(m).map((function(e){O[e]||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,m[e]))),O[e]&&JSON.stringify(Dc[e])!==JSON.stringify(m[e])&&(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,m[e])))})),e.onChange(r)}null===e||void 0===e||null===(t=e.preffers)||void 0===t||t.searchButton}),[m]),a.a.useEffect((function(){var e=Object(d.a)(Object(d.a)({},JSON.parse(Dc)),n[x]||{});JSON.stringify(e)!==JSON.stringify(m)&&g(e)}),[x]),a.a.useEffect((function(){_(e.nodeId?e.nodeId:b()("".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(Fc,{nodeId:x,field:t,onChange:e.onChange?function(t){e.onChange(t),g(t)}:null}))})),JSON.stringify(m)!==Dc?a.a.createElement("div",{style:{padding:"5px",width:"100%",display:"flex",justifyContent:"flex-end"},onClick:function(){s(!l)}},a.a.createElement(Be,{reverse:!0,icon:"clear_all",text:Object(k.s)("$__removeFilter","*"),onClick:function(){!function(){var t=Object(d.a)({},c.a.getState().searchs);t[x]&&delete t[x],e.reduxFunction("IMMEDIATE","SET_SEARCH",t),g(Object(d.a)({},JSON.parse(Dc))),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(E.a,{color:Object(k.d)("menu"),icon:"search",onClick:function(){e.reduxFunction("ASYNC","SET_SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().searchs),{},Object(f.a)({},x,Object(d.a)(Object(d.a)({},JSON.parse(Dc)),m)))),e.onSearch&&e.onSearch()},size:"15px",title:"".concat(Object(k.s)("$__search")),text:"".concat(Object(k.s)("$__search"))}):a.a.createElement(a.a.Fragment,null)))}));function Pc(){Pc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ac=function(e,t){var r=c.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(d.a)(Object(d.a)({},r[n]),t))})):r.push(t),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{tag:Object(Se.a)(r)}))},$c=function(){var e=Object(p.a)(Pc().mark((function e(t,r){return Pc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.a.delete("/tag/unique/".concat(r._id),Object(d.a)({},r))&&zc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),zc=function(e,t){var r=[];c.a.getState().db.tag.map((function(e){e.value!==t._id&&r.push(e)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{tag:r}))},Mc=function(){var e=Object(p.a)(Pc().mark((function e(t,r){return Pc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.a.put("/tag/unlink/",Object(d.a)({},r))&&Bc(t,r);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Yc=function(){var e=Object(p.a)(Pc().mark((function e(t,r){var n,a;return Pc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState(),a=n.session,r.target===r._id&&(r.target=a.account),e.next=4,Y.a.put("/tag/link/",Object(d.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)}}(),Bc=function(e,t){var r=[],n=c.a.getState(),a=n.session,o=n.db;o.tag.map((function(e){var n=e;e.value===t._id&&(n=Object(d.a)(Object(d.a)({},n),{},{count:0})),r.push(n)}));var i=Object(d.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(d.a)(Object(d.a)({},o),{},{tag:r,cards:i}))},Rc=function(e){return Object(d.a)(Object(d.a)({},X.l),{},{menu:{position:"relative",borderRight:Object(k.d)("color")},menuExpanded:{position:"relative",borderRight:Object(k.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(k.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(k.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};r(993);function Gc(){Gc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Hc=function(e){var t=e.data,r=a.a.useState(!1),n=Object(h.a)(r,2),o=(n[0],n[1]),c=a.a.useState(!1),l=Object(h.a)(c,2),s=l[0],u=l[1],f=Object(k.j)(),m=function(){var t=Object(p.a)(Gc().mark((function t(r){return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmDeleteTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){$c(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(p.a)(Gc().mark((function t(r){return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmUnlinkTag",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Mc(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(){f&&f.plan&&f.planAdmin&&u(!0)},onMouseLeave:function(e){u(!1)}},a.a.createElement("div",{style:Object(d.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,i.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(at,{horizontalButton:!0,transparent:!0,size:"14px",btColor:Object(k.d)("color"),onOpen:function(){o(!0)},onClose:function(){o(!1)},options:[].concat(Object(Se.a)(f&&f.plan&&f.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(){m(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(k.d)("color"),fontSize:"12px"}},t.item.text)};function Wc(){Wc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Uc=Object(s.b)((function(e){return{tag:e.db.tag}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Object(R.a)(Rc)(),r=c.a.getState(),n=r.db,o=r.session,i=e.tag,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),O=x[0],w=x[1],j=a.a.useState({}),S=Object(h.a)(j,2),L=S[0],C=S[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(null),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState([]),M=Object(h.a)(z,2),G=M[0],H=M[1],W=a.a.useState(!1),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(null),J=Object(h.a)(X,2),K=J[0],Z=J[1],Q=a.a.useState(!0),ee=Object(h.a)(Q,2),te=ee[0],re=ee[1],ne=Fi.a.ExcelFile,ae=Fi.a.ExcelFile.ExcelSheet,oe=Fi.a.ExcelFile.ExcelColumn,ie=window.location.hash.split("/");ie.length>0&&(ie[0]=ie[0].replace("#","")),a.a.useEffect((function(){return u||(f(!0),se(),e.onLoad&&e.onLoad()),function(){}}),[]),a.a.useEffect((function(){return se(),function(){}}),[A,JSON.stringify(e.tag)]);var ce=Object(k.j)(),se=function(){var e=[];i.filter((function(e){var t=A?Object(k.q)(A.toLowerCase().trim()):"",r=Object(k.q)(e.label.toLowerCase().trim());if(!e.parent&&(!A||A&&r.indexOf(t)>-1))return!0})).sort((function(e,t){return Object(k.q)(e.label.toLowerCase().trim())<Object(k.q)(t.label.toLowerCase().trim())?-1:Object(k.q)(e.label.toLowerCase().trim())>Object(k.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(d.a)({id:e.value,text:e.label},e))})),e.push({id:r.label.substr(0,1),text:r.label.substr(0,1),children:[Object(d.a)(Object(d.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(d.a)({id:e.value,text:e.label},e))})),e.filter((function(e){return e.id===r.label.substr(0,1)}))[0].children.push(Object(d.a)(Object(d.a)({id:r.value,text:r.label},r),{},{children:c}))}})),JSON.stringify(e)!==JSON.stringify(G)&&H(e)},ue=function(){C({}),D(!1),v(!1)},de=function(e){v(!0),C(e||{})},pe=function(){var t=Object(p.a)(Wc().mark((function t(){var r;return Wc().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,Y.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&&(Ac(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,Y.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),Ac(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)}}(),fe=function(){var e=Object(p.a)(Wc().mark((function e(){var t;return Wc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return q(!0),e.next=3,kt.a.post("Rel_TagUser_Used");case 3:(t=e.sent)&&(q(!1),Z(a.a.createElement(ne,{filename:"".concat(_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_tagReport"),element:a.a.createElement(E.a,{title:Object(k.s)("$__export"),text:Object(k.s)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(ae,{data:t.data,name:"timeSheet"},a.a.createElement(oe,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__user",1)),value:"user"}),a.a.createElement(oe,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__tag",1)),value:"tag"}),a.a.createElement(oe,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__activity",1)),value:"card"}),a.a.createElement(oe,{style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__status",1)),value:"status"})))));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(B,null,a.a.createElement("div",{className:t.menu},a.a.createElement("div",{style:{marginTop:"5px"}},a.a.createElement(mt,{title:Object(k.s)("$__tags",1),icon:"bookmarks",iconTitle:Object(k.s)("$__tags",1),color:Object(k.d)("colorText"),fontSize:"16px",moreButton:!0,options:[{name:"$__addTag",icon:"add_box",color:Object(k.d)("color"),show:"hover",onClick:function(){de()}},ce&&ce.plan&&ce.planAdmin&&!O&&{name:"$__showAllTags",icon:"style",color:Object(k.d)("color"),show:"hover",onClick:function(){w(!0)}},O&&{name:"$__onlyMyTags",icon:"loyalty",color:Object(k.d)("color"),show:"hover",onClick:function(){w(!1)}},{name:te?"$__showFilters":"$__showTagList",icon:te?"filter_alt":"bookmarks",color:Object(k.d)("color"),show:"hover",onClick:function(){re((function(e){return!e}))}},ce&&ce.plan&&ce.planAdmin&&{name:"$__exportReport",icon:"print",color:Object(k.d)("color"),show:"hover",onClick:function(){fe()}}],optionsProps:{transparent:!0}})),K&&K,a.a.createElement("div",{className:t.separator}),te?a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",clear:"both"}},a.a.createElement(Ce,{label:Object(k.s)("$__search",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:A?a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"cancel",color:"green",onClick:function(){return $(null)}})):null,onChange:function(e){$(e.target.value)}},placeholder:Object(k.s)("$__nameOfTagSearch_placeholder",1)})):a.a.createElement("div",{style:{display:"flex",position:"relative",float:"left",padding:7,width:"-webkit-fill-available"}},a.a.createElement(Nc,{nodeId:"tagsView",customLabels:{text:"$__"},fields:["tags","date","users","status","priority","impact","risk","complexity"].concat(Object(Se.a)(ce&&ce.plan&&ce.planAdmin?["admin"]:[])),showFilters:!0,mode:"modal",onChange:function(e){console.log(e)},fieldsProps:{users:{allPlataform:!0,selectedShow:{internal:!0,external:!1}}}}))),te&&a.a.createElement("div",{style:{position:"absolute",top:"112px",bottom:0,overflow:"auto",padding:"3px",paddingTop:"7px",listStyle:"none",width:"100%"}},a.a.createElement(kc.a,{collapse:"ALL",items:G,maxDepth:3,renderItem:function(e){return a.a.createElement(Hc,{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;Yc(e,{_id:t.dragItem.id,target:n.id}),H(r)}})),a.a.createElement(Sc,{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(mt,{title:L.value?Object(k.s)("$__editTag",1):Object(k.s)("$__newTag",1),icon:"label",onCancel:function(){v(!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(Ce,{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(k.s)("$__name",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){C(Object(d.a)(Object(d.a)({},L),{},{name:e.target.value}))}},defaultValue:L&&L.label?L.label:null,placeholder:Object(k.s)("$__nameOfTag_placeholder",1)})),a.a.createElement("div",{style:{display:"flex",padding:"15px",overflow:"visible"}},a.a.createElement("span",{style:{marginRight:"7px"}},Object(k.s)("$__tagColor"),":"),a.a.createElement(Xe.a,{disablePortal:!0,color:L.color,onChange:function(e){C(Object(d.a)(Object(d.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(k.s)("$__clickHereToAddColor")))),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){v(!1)}}),L&&(L.name||L.newColor)&&a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),icon:"save",size:"25px",load:!!F,onClick:function(){pe()}})))),V?a.a.createElement(je,{fullScreen:!0}):a.a.createElement(a.a.Fragment,null))}));var Vc=Object(s.b)((function(e){return{timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Mr();return document.title="".concat(t&&t.total>0?"(".concat(t.total,") "):"","MACHEN"),a.a.createElement(a.a.Fragment,null,a.a.createElement(Je.a,{badgeContent:t&&t.total?t.total:0,color:"secondary",overlap:"rectangular"},e.children))})),qc={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"+X.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"+X.q[8]}},Xc=["className","children","plain","profile","pricing","testimonial","stats","chart","product"],Jc=Object(R.a)(qc);function Kc(e){var t,r=Jc(),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,h=Object(V.a)(e,Xc),m=y()((t={},Object(f.a)(t,r.cardFooter,!0),Object(f.a)(t,r.cardFooterPlain,i),Object(f.a)(t,r.cardFooterProfile,c||s),Object(f.a)(t,r.cardFooterPricing,l),Object(f.a)(t,r.cardFooterTestimonial,s),Object(f.a)(t,r.cardFooterStats,u),Object(f.a)(t,r.cardFooterChart,d||p),Object(f.a)(t,n,void 0!==n),t));return a.a.createElement("div",Object.assign({className:m},h),o)}var Zc=function(e){return{container:Object(d.a)(Object(d.a)({},X.e),{},Object(f.a)({zIndex:"4"},e.breakpoints.down("sm"),{paddingBottom:"100px"})),cardTitle:Object(d.a)(Object(d.a)({},X.d),{},{color:X.O}),textCenter:{textAlign:"center"},justifyContentCenter:{justifyContent:"center !important"},customButtonClass:{"&,&:focus,&:hover":{color:X.O},marginLeft:"5px",marginRight:"5px"},inputAdornment:{marginRight:"18px"},inputAdornmentIcon:{color:X.q[6]},cardHidden:{opacity:"0",transform:"translate3d(0, -60px, 0)"},cardHeader:{marginBottom:"20px"},socialLine:{padding:"0.9375rem 0"}}};function Qc(){Qc=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var el=Object(R.a)(Zc);var tl,rl,nl=r(1971),al=r(1957),ol=r(1964);function il(){il=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var cl=w.default.div(tl||(tl=Object(u.a)(["\n            background-color:none;\n\n            "]))),ll=w.default.div(rl||(rl=Object(u.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            "]))),sl=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(""),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState({}),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState({open:!1,name:""}),j=Object(h.a)(w,2),E=j[0],S=j[1],L=c.a.getState().db,C=c.a.getState().functions.socket,I=function(){var e=Object(p.a)(il().mark((function e(t){var r,n,a,o,i,c;return il().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),Y.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(p.a)(il().mark((function e(t){var r,a,i,c;return il().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,Y.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,Y.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(""),v(""),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(p.a)(il().mark((function e(t,r){var n,a;return il().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.a.getState().functions.socket,e.prev=1,e.next=4,Y.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(p.a)(il().mark((function t(){var r;return il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Y.a.post("boards/add",{name:E.name});case 3:r=t.sent,e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},{boardModels:Object(d.a)(Object(d.a)({},c.a.getState().db.cards.boardModels),{},{boards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards.boardModels.boards),r.data)})})})),S({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(kn,null,L.cards&&L.cards.boardModels&&L.cards.boardModels.boards&&Object.keys(L.cards.boardModels.boards).map((function(t){return a.a.createElement(cr.a,{onDragEnd:I,key:t},a.a.createElement(Cn,{md:3},a.a.createElement("fieldset",{style:{width:"100%"}},a.a.createElement("legend",null,L.cards.boardModels.boards[t].name),a.a.createElement(cr.c,{droppableId:t,type:"column",direction:"vertical"},(function(r,n){return a.a.createElement(cl,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(cr.b,{draggableId:e,index:r,key:"".concat(e,"-").concat(r)},(function(r){return a.a.createElement(ll,Object.assign({},r,{ref:r.innerRef},r.draggableProps,{isDragging:n.isDragging},r.dragHandleProps),L.cards.boardModels.boards[t].columns[e].name&&a.a.createElement(ua,{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),v(L.cards.boardModels.boards[t].columns[e].icon||null),o(e),O(Object(f.a)({},t,{open:!0}))},show:"hover"}]}))}))})),_&&_[t]&&_[t].open?a.a.createElement(a.a.Fragment,null,a.a.createElement(ll,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"40px",height:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(oa,{callBack:function(e){v(e)}})),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 40px)"}},a.a.createElement(Ce,{label:Object(k.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(k.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(Be,{icon:"save",text:Object(k.s)("$__save","*"),onClick:function(){T(t)}}),a.a.createElement(Be,{icon:Object(k.s)("$__cancel","*"),iconColor:"red",text:Object(k.s)("$__cancel","*"),onClick:function(){u(""),O({})}}))):a.a.createElement(Be,{icon:"add_box",text:Object(k.s)("$__addColumn",1),onClick:function(){O(Object(f.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(Ce,{label:Object(k.s)("$__boardName",1),variant:"outlined",name:"boardName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){S(Object(d.a)(Object(d.a)({},E),{},{name:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&e.target.value.length>0&&D()}},value:E&&E.name,placeholder:Object(k.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(Be,{icon:"save",text:Object(k.s)("$__save","*"),onClick:function(){D()}}),a.a.createElement(Be,{icon:"cancel",iconColor:"red",text:Object(k.s)("$__cancel","*"),onClick:function(){u(""),S({open:!1,name:""})}}))):a.a.createElement(Be,{icon:"add_box",text:Object(k.s)("$__addBoard",1),onClick:function(){S(Object(d.a)(Object(d.a)({},E),{},{open:!0}))}})))})),ul=r(1966),dl=function(e){return{root:Object(d.a)(Object(d.a)({},X.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(k.d)("dark"),color:Object(k.d)("light")},column:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(k.d)("light",.4)),width:"300px"},column2:{padding:"7px 15px",fontWeight:"bold",borderRight:"solid 1px ".concat(Object(k.d)("light",.4)),width:"calc(100% - 300px)"},body:{color:Object(k.d)("medium"),position:"relative",clear:"both",display:"flex",alignItems:"center",borderBottom:"solid 1px ".concat(Object(k.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(k.d)("medium",.2))}}},chip:{margin:"3px"}}};function pl(){pl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fl=Object(s.b)((function(e){return{languages:e.languages}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(dl)((function(e){var t=e.classes,r=c.a.getState(),n=r.languages,o=r.db,i=c.a.getState().functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=s[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(25),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(""),w=Object(h.a)(O,2),j=w[0],E=w[1],S=function(){var e=Object(p.a)(pl().mark((function e(t,r,n,a){return pl().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(k.s)("$__page")," ",g+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(n).length/x),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.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(k.s)("$__cardsPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Ce,{label:Object(k.s)("$__search",1),variant:Object(k.d)("fieldVariant"),value:j,onChange:function(e){E(e.target.value)}}),a.a.createElement(Be,{text:Object(k.s)("$__showOnlyEmpty","*"),icon:u?"subtitles_off":"subtitles",iconColor:Object(k.d)("medium"),onClick:function(){d(!u)}})),a.a.createElement(tt.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(k.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<I.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(ua,{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(k.d)("menu"),noAutoFocus:!0,multiline:!0}))),a.a.createElement("div",{className:t.column},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement(ua,{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){S(r,e,"en-US",t)},color:Object(k.d)("menu"),noAutoFocus:!0,multiline:!0}))))}))))))}))),hl=function(e){Object(P.a)(r,e);var t=Object(A.a)(r);function r(e){var n;return Object(D.a)(this,r),(n=t.call(this,e)).change=function(e){n.setState({input:Object(k.e)(e.target.value)})},n.state={input:""},n.start=0,n}return Object(N.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(k.h)(this.state.input)))}}]),r}(a.a.Component);var ml=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(dl)((function(e){e.classes;var t=c.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(hl,null))}))),gl=["children","value","index"];function bl(e){var t=e.children,r=e.value,n=e.index,o=Object(V.a)(e,gl);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(nl.a,{p:3},t))}function vl(e){return{id:"scrollable-strength-tab-".concat(e),"aria-controls":"scrollable-strength-tabpanel-".concat(e)}}var yl=Object(R.a)((function(e){return{root:{flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper}}}));var xl=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){yl();var t=c.a.getState().db,r=a.a.useState(0),n=Object(h.a)(r,2),o=n[0],l=n[1],s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],p=u[1],f=a.a.useState(""),m=Object(h.a)(f,2),g=m[0],b=m[1];a.a.useEffect((function(){if(!d){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),String(e[0])&&l(Math.ceil(e[0])),p(!0)}}));var v=function(e){c.a.getState().functions.socket.emit("global",{fn:e})};return t.myTasksMenuExpanded,a.a.createElement("div",null,a.a.createElement(H.a,{position:"static",color:"default"},a.a.createElement(ol.a,{value:o,onChange:function(e,t){l(t),i.a.push("#".concat(t))},variant:"scrollable",scrollButtons:"on",indicatorColor:"primary",textColor:"primary","aria-label":""},a.a.createElement(al.a,Object.assign({label:"Data",icon:a.a.createElement(le.a,{color:(Object(k.d)(0===o?"medium":"color"),1)},"Data")},vl(0))),a.a.createElement(al.a,Object.assign({label:"Languages",icon:a.a.createElement(le.a,{color:(Object(k.d)(1===o?"medium":"color"),1)},"translate")},vl(1))),a.a.createElement(al.a,Object.assign({label:"Versions",icon:a.a.createElement(le.a,{color:(Object(k.d)(2===o?"medium":"color"),1)},"app_registration")},vl(2))))),a.a.createElement(bl,{value:o,index:0},a.a.createElement("div",null,a.a.createElement(ml,null))),a.a.createElement(bl,{value:o,index:1},a.a.createElement("div",null,a.a.createElement(fl,null))),a.a.createElement(bl,{value:o,index:2},a.a.createElement("div",null,a.a.createElement("input",{type:"text",value:g,onChange:function(e){b(e.target.value)}}),a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("version")}},Object(k.s)("$__send","*")),a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("logout")}},Object(k.s)("$__logout","*")),a.a.createElement(mo,{style:{position:"relative",float:"left",margin:"3px"},color:"primary",onClick:function(){v("reload")}},Object(k.s)("$__reload","*")))),a.a.createElement(bl,{value:o,index:3},a.a.createElement("div",null,a.a.createElement(sl,null))),a.a.createElement(bl,{value:o,index:4},Object(k.s)("$__accounts",1)),a.a.createElement(bl,{value:o,index:5},Object(k.s)("$__users",1)),a.a.createElement(bl,{value:o,index:6},Object(k.s)("$__support",1)),a.a.createElement(bl,{value:o,index:7},Object(k.s)("$__finance",1)))}));var _l=Object(s.b)((function(e){return{loaders:e.sessionLoads.cards.load}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(qo)((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(k.d)("menu"),fontSize:"12px",paddingRight:"15px",whiteSpace:"nowrap"}},Object(k.s)("$__loadingData")),a.a.createElement(Tr,null)))}))),Ol=r(260),wl=Object(R.a)(Lc);var jl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=wl(),r=c.a.getState(),n=r.session,o=r.search,i=r.db,l=a.a.useState(!1),s=Object(h.a)(l,2),u=(s[0],s[1],Object(k.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]),m=1;if(d[0]){var g=i.cards[d[0]]||{};(m=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)&&m.access&&(m=m.access)}return d[1]&&yf.filter((function(e){return e.path===f})).length>0&&yf.filter((function(e){return e.path===f}))[0].tabs&&yf.filter((function(e){return e.path===f}))[0].tabs.length>0?(yf.filter((function(e){return e.path===f}))[0].tabs&&yf.filter((function(e){return e.path===f}))[0].tabs).map((function(e){e.path===d[1]&&(u=e.searchFields)})):yf.filter((function(e){return e.path===f})).length>0&&yf.filter((function(e){return e.path===f}))[0].searchFields&&(u=yf.filter((function(e){return e.path===f}))[0].searchFields),JSON.stringify(Ol.a)===JSON.stringify(o)?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{}},a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:9,md:9,lg:9,xl:9},a.a.createElement("span",{style:{color:Object(k.d)("medium"),fontWeight:"bold",fontSize:"18px",display:"flex",alignItems:"center"}},a.a.createElement(le.a,{size:"18px"},"search"),Object(k.s)("$__appliedFilters"))),a.a.createElement(Cn,{xs:12,sm:3,md:3,lg:3,xl:3},a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(Be,{reverse:!0,icon:"clear_all",text:Object(k.s)("$__clearFilter","*"),onClick:function(){e.reduxFunction("ASYNC","SEARCH_CLEAR")}}))),u&&u.indexOf("text")>-1&&o.text&&a.a.createElement(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{className:t.textField,style:{width:"100%"}},Object(k.s)("$__text"),": ",o.text)),u&&u.indexOf("status")>-1&&JSON.stringify(o.cards.status)!==JSON.stringify(Ol.a.cards.status)&&a.a.createElement(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(k.s)("$__status")),Object.keys(o.cards.status).map((function(e,t){if(o.cards.status[e]&&"all"!==e)return a.a.createElement(Ne.a,{title:Object(k.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(Ol.a.cards.priority)&&a.a.createElement(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px"}},a.a.createElement("div",{style:{position:"relative",float:"left"}},Object(k.s)("$__priority")),Object.keys(o.cards.priority).map((function(e,t){if(o.cards.priority[e]&&"all"!==e)return a.a.createElement(Ne.a,{title:Object(k.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(Ol.a.users)&&a.a.createElement(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px"}},Object(k.s)("$__users"),a.a.createElement(wt.a,{max:6},Object.keys(c.a.getState().search.users.selected).length>0&&Object.keys(c.a.getState().search.users.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.users.selected[e]?a.a.createElement(Ne.a,{title:i.users[e].name,key:t},a.a.createElement(Re.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&&c.a.getState().search.users.selected[e]&&a.a.createElement(Ne.a,{title:Object(k.s)("$__unassigned",1),key:t},a.a.createElement(Re.a,{style:{width:"30px",height:"30px"},alt:Object(k.s)("$__unassigned",1),src:He.a},Object(k.s)("$__unassigned",1)))}))))),u&&u.indexOf("units")>-1&&JSON.stringify(o.units)!==JSON.stringify(Ol.a.units)&&Object.keys(i.users).filter((function(e){return"user"!==i.users[e].type})).length>0&&u.indexOf("units")>-1&&a.a.createElement(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px"}},Object(k.s)("$__units"),a.a.createElement(wt.a,{max:6},Object.keys(c.a.getState().search.units.selected).length>0&&Object.keys(c.a.getState().search.units.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.units.selected[e]?a.a.createElement(Ne.a,{title:i.users[e].name,key:t},a.a.createElement(Re.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&&c.a.getState().search.units.selected[e]&&a.a.createElement(Ne.a,{title:Object(k.s)("$__unassigned",1),key:t},a.a.createElement(Re.a,{style:{width:"30px",height:"30px"},alt:Object(k.s)("$__unassigned",1),src:He.a},Object(k.s)("$__unassigned",1)))}))))),c.a.getState().search.plans&&c.a.getState().search.plans.selected&&Object.keys(c.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(Cn,{xs:6,sm:4,md:2,lg:2,xl:2},a.a.createElement("div",{style:{color:Object(k.d)("color"),fontSize:"16px"}},Object(k.s)("$__plans"),a.a.createElement(wt.a,{max:6},Object.keys(c.a.getState().search.plans.selected).length>0&&Object.keys(c.a.getState().search.plans.selected).map((function(e,t){return"unassigned"!==e&&c.a.getState().search.plans.selected[e]?a.a.createElement(Ne.a,{title:i.cards[e].name,key:t},a.a.createElement(Re.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&&c.a.getState().search.plans.selected[e]&&a.a.createElement(Ne.a,{title:Object(k.s)("$__unassigned",1),key:t},a.a.createElement(Re.a,{style:{width:"30px",height:"30px"},alt:Object(k.s)("$__unassigned",1),src:He.a},Object(k.s)("$__unassigned",1)))}))))),a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12})))})),El=function(e){return{card:{width:"calc(20% - 20px)",minWidth:"250px",maxWidth:"400px",margin:"10px",placeSelf:"flex-end"}}};function kl(){kl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Sl=Object(s.b)((function(e,t){return{cards:e.db.cards,search:e.search}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(El)((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=(t.session,a.a.useState(0)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(21),f=Object(h.a)(u,2),m=f[0],g=(f[1],a.a.useState(!1)),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1];a.a.useEffect((function(){return j(l,m),function(){}}),[]),a.a.useEffect((function(){v||O||j(l,m)}),[l,m]);var j=function(){var t=Object(p.a)(kl().mark((function t(r,n){var a;return kl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.next=3,Object(st.b)(e,{cardLoad:"insights",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(y(!1),a.total<n&&w(!0));case 5: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 S={};S=(S=Object.keys(r.cards).filter((function(e){return"insight"===r.cards[e].type&&!r.cards[e].deleted&&Xt(e)})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),n.tags.length>0&&(S=S.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.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("insightList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)};return 0===Object.keys(S).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(kn,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(Cn,{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(le.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(k.s)("$__youHaveNoIdeasAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(k.s)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(k.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){L()}},a.a.createElement(kn,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},Object.keys(S).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(Cn,{key:S[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,{db:"cards",data:S[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))}))))}))),Ll=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 Cl=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ll)((function(e){e.data;var t=e.classes;return a.a.createElement("div",{className:t.feed},a.a.createElement(Zn.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(Zn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Zn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}}),a.a.createElement(Zn.a,{variant:"rect",animation:"wave",style:{width:"100%",height:"12px",marginBottom:10}})),a.a.createElement("div",{className:t.linkContent},a.a.createElement(Zn.a,{variant:"rect",style:{marginTop:15,borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Zn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Zn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8,marginBottom:12}}),a.a.createElement(Zn.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(Zn.a,{variant:"rect",style:{borderRadius:7,width:"100%",height:8}}))))))})));function Il(){Il=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Tl=Object(s.b)((function(e,t){return{cards:e.db.cards,search:e.search}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=(t.session,a.a.useState(0)),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(18),f=Object(h.a)(u,2),m=f[0],g=(f[1],a.a.useState(!1)),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(!1),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(0),E=Object(h.a)(j,2),S=(E[0],E[1]);a.a.useEffect((function(){return L(l,m),function(){}}),[]),a.a.useEffect((function(){v||O||L(l,m)}),[l,m]);var L=function(){var t=Object(p.a)(Il().mark((function t(r,n){var a;return Il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y(!0),t.next=3,Object(st.b)(e,{cardLoad:"link",limit:n,skip:r*n,ignoreLoader:!0});case 3:(a=t.sent)&&(y(!1),S(parseInt(a.total)),a.total<n&&w(!0));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),C=window.location.hash.split("/");C[0]=C[0].replace("#","");var I={};I=(I=Object.keys(r.cards).filter((function(e){return"link"===r.cards[e].type&&r.cards[e]._users&&Xt(e)&&!r.cards[e].deleted})).sort((function(e,t){return r.cards[e].created_at>r.cards[t].created_at?-1:0})).map((function(e){return r.cards[e]}))).filter((function(e){return e.description&&e.description.toLowerCase().indexOf(n.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(n.text.toLowerCase())>-1})).map((function(e){return e})),n.tags.length>0&&(I=I.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return n.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var T=function(e){var t=document.getElementById("linkList");t.scrollTop+window.innerHeight+150>t.scrollHeight&&s(l+1)},F=function(){for(var e=[],t=0;t<m;t++)e.push(a.a.createElement(Cn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Cl,null)));return a.a.createElement(a.a.Fragment,null,e)};return 0===Object.keys(I).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){T()}},a.a.createElement(kn,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement(Cn,{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(le.a,{size:"33px",icon:"info",color:"lightblue"})),a.a.createElement("div",{style:{color:"lightgray",fontSize:33,texAlign:"center",marginBottom:15}},Object(k.s)("$__youHaveNoRadarAddedYet")),a.a.createElement("div",{style:{color:"lightgray",fontSize:18,texAlign:"center",marginBottom:15}},Object(k.s)("$__visitLinkToHowGetStarted")),a.a.createElement("a",{href:"https://support.machen.ai/manual/bright-connected/radar/",target:"_blank",style:{fontSize:18,color:"blue",texAlign:"center"}},Object(k.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){T()}},a.a.createElement(kn,{style:Object(d.a)({},e.horizontal?{overflowX:"auto",flexFlow:"row",display:"-webkit-inline-box"}:{})},a.a.createElement("div",null),Object.keys(I).filter((function(t,r){return!e.max||e.max&&r<e.max})).map((function(e,t){return a.a.createElement(Cn,{key:I[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,{db:"cards",data:I[e],expanded:!0,Avatar:!0,Resume:!0,showConnectedIn:!0,LoadParent:!0}))})),v?a.a.createElement(F,null):a.a.createElement(a.a.Fragment,null)))})),Fl=r(801),Dl=r.n(Fl),Nl=r(802),Pl=r.n(Nl),Al=r(107);var $l=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ll)((function(e){var t=e.data,r=e.classes,n=a.a.useState(t.img),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState({backgroundSize:"contain"}),u=Object(h.a)(s,2),p=u[0],f=u[1],m=a.a.useRef({});return a.a.useEffect((function(){if(m.current&&e.onResize){var t=new ResizeObserver((function(){var t=m.current.clientHeight;e.onResize(t)}));return t.observe(m.current),function(){return t.disconnect()}}}),[]),a.a.createElement("div",{className:r.feed,ref:m,onClick:e.clickChannel?function(){return e.clickChannel()}:null,style:Object(d.a)(Object(d.a)({},e.clickChannel?{cursor:"pointer"}:{}),{},{position:"relative"})},a.a.createElement("div",{style:{display:"none"}},a.a.createElement("img",{src:i,onError:function(){l(null)},onLoad:function(e){var t=e.target;t&&t.width&&t.height&&(t.width>t.height&&t.width/t.height>1.75?f({backgroundSize:"contain"}):f({backgroundSize:"cover"}))}})),a.a.createElement("div",{className:r.image,style:Object(d.a)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},i?Object(d.a)({backgroundImage:'url("'.concat(i,'")')},p):{background:Object(k.d)("AvatarBackground")}),onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},!i&&a.a.createElement("div",{style:{marginTop:"calc(-48% - 10px)",display:"flex",justifyContent:"center",alignItems:"center"}},a.a.createElement(le.a,{icon:en.a,size:"39px",color:Object(k.d)("textColor")})),!e.clickChannel&&a.a.createElement("div",{style:{position:"absolute",top:7,right:7}},a.a.createElement(E.a,{title:Object(k.s)("$__sendToRadar","*"),color:Object(k.d)("menu"),icon:"settings_input_antenna",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{_id:"new",type:"link",name:t.title,description:t.contentSnippet,pubDate:t.isoDate?t.isoDate:t.pubDate,image:t.img,url:t.link}}))},size:"25px"})),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.5)",padding:"3px 7px",color:"white",fontSize:11}},_()(t.isoDate?t.isoDate:t.pubDate).format("DD/MM/YYYY HH:MM"))),a.a.createElement(Al.a,{title:a.a.createElement(a.a.Fragment,null,!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(k.s)("$__clickHereToReadNews",1)))},a.a.createElement("div",{className:r.infos,onClick:function(){e.clickChannel||window.open(t.link,"_blank")}},a.a.createElement("div",{className:r.linkTitle},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t&&t.title&&Pl()(t.title)?t.title:t.title?Dl()(t.title):""}})),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:t.contentSnippet&&Pl()(t.contentSnippet)?t.contentSnippet:t.contentSnippet?Dl()(t.contentSnippet):""},className:r.linkContent}),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedLink},!e.clickChannel&&a.a.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"14px",fontWeight:"bold"}},Object(k.s)("$__readMore",1)))))),a.a.createElement("div",{style:{top:-30}},a.a.createElement(qe.a,{options:e._tags})))})));var zl=Object(me.a)(Ll)((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(k.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(le.a,{icon:en.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(k.s)("$__attention")),a.a.createElement("div",{className:r.linkContent},Object(k.s)("$__weHaveNotFoundYetLink")),a.a.createElement("div",{className:r.feedFooter},a.a.createElement("div",{className:r.feedDate},_()(t.created_at&&t.created_at.low?t.created_at.low:t.created_at).format("DD/MM/YYYY HH:MM")))))}));function Ml(){Ml=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Yl=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ll)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=e.data,l=Object(k.j)(),s=window.location.hash.split("/");if(s[0]=s[0].replace("#",""),!o)return null;var u=function(){var t=Object(p.a)(Ml().mark((function t(a){var i,l;return Ml().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return 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 c.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel&&(i=o._parent[Object.keys(o._parent)[0]].idRel),t.next=4,Y.a.put("/rel/update",{_id:i,customTitle:a});case 4:t.sent,l=c.a.getState().db.feeds,o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return c.a.getState().db.cards[e]})).length&&o._parent[Object.keys(o._parent)[0]].idRel?l[o._id]=Object(d.a)(Object(d.a)({},l[o._id]),{},{_parent:Object(d.a)(Object(d.a)({},l[o._id]._parent),{},Object(f.a)({},Object.keys(o._parent)[0],Object(d.a)(Object(d.a)({},l[o._id]._parent[Object.keys(o._parent)[0]]),{},{customTitle:a})))}):l[o._id]=Object(d.a)(Object(d.a)({},l[o._id]),{},{_parent:Object(d.a)(Object(d.a)({},l[o._id]._parent),{},Object(f.a)({},s[0],Object(d.a)(Object(d.a)({},l[o._id]._parent[s[0]]),{},{customTitle:a})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{feeds:l})),e.onChange&&e.onChange();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var e=Object(p.a)(Ml().mark((function e(t){return Ml().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.c)({message:Object(k.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(p.a)(Ml().mark((function t(n){var a,i;return Ml().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n||s[0],t.next=3,Y.a.delete("feed/unfollow/".concat(a,"__").concat(o._id));case 3:t.sent,(i=Object(d.a)({},c.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(d.a)(Object(d.a)({},r),{},{feeds:Object(d.a)({},i)})),e.onChange&&setTimeout((function(){e.onChange()}),400);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=Object(p.a)(Ml().mark((function t(n){var a,i=arguments;return Ml().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.length>1&&void 0!==i[1]&&i[1],t.next=3,Y.a.put("feed/visible/",{feedId:o._id,visible:!o||!o.hide});case 3:t.sent,a=o,a=Object(d.a)(Object(d.a)({},a),{},{hide:!o||!o.hide}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{feeds:Object(d.a)(Object(d.a)({},r.feeds),{},Object(f.a)({},o._id,Object(d.a)(Object(d.a)({},r.feeds[o._id]),a)))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o._parent&&Object.keys(o._parent).map((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(mt,Object.assign({title:o.customTitle?o.customTitle:o.name,icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return u(e)},color:Object(k.d)("color"),editable:!!(s[0]&&36===s[0].length&&l&&l.plan&&(l.planAdmin||l.planModerate)||o._parent&&1===Object.keys(o._parent).length&&0===Object.keys(o._parent).filter((function(e){return c.a.getState().db.cards[e]})).length),moreButton:!0},s[0]&&"tab"===s[0]&&l&&l.plan&&(l.planAdmin||l.planModerate)?Object(d.a)({},o._parent&&Object.keys(o._parent).length>0&&{options:[{name:o.hide?Object(k.s)("$__folowRSS"):Object(k.s)("$__hideRSS"),icon:o.hide?"visibility":"visibility_off",onClick:function(){g()}}].concat(Object(Se.a)(l&&l.feed&&(l.feedAdmin||l.feedModerate)?[{name:Object(k.s)("$__edit"),icon:"settings_suggest",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"feeds",id:o._id,module:"feedEdit",activeModule:"feedEdit",data:Object(d.a)(Object(d.a)({},o),{},{_lock:!0,_admin:!!e.admin})}))}}]:[]),Object(Se.a)(function(){if(e.data._parent){var t=[];return Object.keys(e.data._parent).map((function(o){if(c.a.getState().db.cards[o]&&c.a.getState().db.cards[o]._users&&c.a.getState().db.cards[o]._users[n._id]){var l=c.a.getState().db.cards[o];t=[].concat(Object(Se.a)(t),[{name:l.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(k.d)("color")}},a.a.createElement("div",{style:{width:"33px"}},a.a.createElement(ze.a,{overlap:"rectangular",icon:l.type&&r&&r.dataType?r.dataType.filter((function(e){return e.name===l.type}))[0].icon:"topic",title:"$__".concat(l.type),size:"22px",color:Object(k.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},l.name))),onClick:function(){i.a.push("sp#".concat(o,"/bright-and-connected"))}}])}else 1===Object.keys(e.data._parent).length&&(t=[].concat(Object(Se.a)(t),[{name:Object(k.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(ze.a,{overlap:"rectangular",icon:"rss_feed",title:Object(k.s)("$__globalAccount"),size:"22px",color:Object(k.d)("menu")})),a.a.createElement("div",{style:{width:"calc(100% - 7px)",display:"flex",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},Object(k.s)("$__globalAccount}")),a.a.createElement("div",{style:{width:"16px"}},a.a.createElement(ze.a,{overlap:"rectangular",icon:"delete_forever",title:Object(k.s)("$__delete"),size:"22px",color:"red",onClick:function(){h(o)}})))),onClick:function(){h(o)}}]))})),t}}()))}):l&&l.plan&&(l.planAdmin||l.planModerate)?{options:[{name:Object(k.s)("$__deleteRSS"),icon:"delete_forever",onClick:function(){h()}}]}:{})),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})).map((function(e,t){var r=o.feed[e],n=z.a.MD5(r.link);if(o&&0===t)return a.a.createElement($l,{key:n,data:r,_tags:o._tags,clickChannel:function(){i.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})})):a.a.createElement(zl,{data:o,clickChannel:function(){i.a.push("".concat(window.location.pathname).concat(window.location.hash,"/").concat(o._id))}})))})));function Bl(){Bl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Rl=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.data,r=c.a.getState().db,n=a.a.useState(0),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(window.location.hash.split("/")),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState([]),_=Object(h.a)(x,2),O=_[0],w=_[1],j=a.a.useState(0),E=Object(h.a)(j,2),S=(E[0],E[1]),L=a.a.useState(!0),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(!1),D=Object(h.a)(F,2),N=D[0],P=D[1],A=a.a.useRef({});a.a.useEffect((function(){A.current={loading:!1};var t=window.location.hash.split("/");return t[0]=t[0].replace("#",""),JSON.stringify(t)!==JSON.stringify(v)&&y(t),T(!0),e.max&&S(e.max),function(){}}),[]),a.a.useEffect((function(){v.length>0&&!N&&($(),v[2]&&36!==v[2].length&&T(!0),P(!0))}),[v]),a.a.useEffect((function(){!u>Object.keys(O).length&&(T(!0),$())}),[i]),a.a.useEffect((function(){T(!1)}),[O]);var $=function(){var e=Object(p.a)(Bl().mark((function e(){var t,r;return Bl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u||A.current.loading){e.next=10;break}return A.current={loading:!0},T(!0),e.next=5,kt.a.post("/Feed_Links_V2",{ids:v[2]&&v[2].length?v[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)})),w(r)),t.data&&0===t.data.length&&m(!0),A.current={loading:!1};case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var n=Object(p.a)(Bl().mark((function n(a){var o;return Bl().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:Y.a.put("/rel/update",{_id:t.idRel,customTitle:a}),(o=r.cards[v[0].replace("#","")]._feeds)[t._id]=Object(d.a)(Object(d.a)({},o[t._id]),{},{customTitle:a}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.a)({},r.cards),{},Object(f.a)({},v[0].replace("#",""),Object(d.a)(Object(d.a)({},r.cards[v[0].replace("#","")]),{},{_feeds:o})))}));case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),M=function(){var n=Object(p.a)(Bl().mark((function n(a){var o,i;return Bl().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:window.history.back(),o=a.replace("#",""),Y.a.delete("feed/unfollow/".concat(o,"__").concat(t._id)),delete(i=r.cards[o]._feeds)[t._id],e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},r),{},{cards:Object(d.a)(Object(d.a)({},r.cards),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},r.cards[o]),{},{_feeds:i})))}));case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),B=function(){for(var e=[],t=0;t<21;t++)e.push(a.a.createElement(Cn,{xs:12,sm:6,md:4,lg:3,xl:2,key:"sk_".concat(t)},a.a.createElement(Cl,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(Be,{icon:"undo",text:Object(k.s)("$__back","*"),onClick:function(){return window.history.back()}}),v[0]&&"bright-and-connected"===v[1]&&v[2]&&a.a.createElement(Be,{icon:"delete_sweep",text:Object(k.s)("$__removeChannel","*"),onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmRemoveChannel",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){M(v[0])}})}})),a.a.createElement(ua,{title:"".concat(t.customTitle?t.customTitle:t.name),icon:"chrome_reader_mode",fontSize:"20px",onEdit:function(e,t){return z(e)},editable:!0})),a.a.createElement("div",{style:Object(d.a)(Object(d.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");!I&&r.scrollTop+window.innerHeight+400>r.scrollHeight&&!e.horizontal&&$()}()}},a.a.createElement(kn,{style:Object(d.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(Cn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement($l,{db:"cards",data:e}))})),!u&&I?a.a.createElement(B,null):a.a.createElement(a.a.Fragment,null))))})),Gl=function(e){return{}};function Hl(){Hl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Wl=Object(s.b)((function(e){return{store:{feeds:e.db.feeds}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Gl)((function(e){var t,r=c.a.getState(),n=r.search,o=r.session,i=a.a.useState(!0),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),a.a.useEffect((function(){_()}),[e.store.feeds]),a.a.useEffect((function(){x()}),[]);var x=function(){var t=Object(p.a)(Hl().mark((function t(){return Hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u(!0),"hideFeeds"!==y[1]){t.next=8;break}return t.next=4,gc(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Views/BrightAndConnected/Feeds -- iniFeeds()"}),{showHidden:!0});case 4:t.sent&&_(),t.next=16;break;case 8:if(0!==Object.keys(c.a.getState().db.feeds).filter((function(e){return!c.a.getState().db.feeds[e].hide})).length){t.next=15;break}return t.next=11,gc(Object(d.a)(Object(d.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(c.a.getState().db.feeds).length>0&&(e=Object(d.a)(Object(d.a)({},e),c.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(d.a)(Object(d.a)({},t),{},Object(f.a)({},r,e[r])))})),v(t),u(!1)};return s?a.a.createElement("div",{style:{position:"absolute",top:"0px",bottom:0,left:0,right:0}},a.a.createElement(Tr,null)):y[2]&&36===y[2].length?a.a.createElement("div",null,a.a.createElement(Rl,{follow:!0})):a.a.createElement("div",{style:(t={width:"100%"},Object(f.a)(t,"width","calc(100% - 20px)"),Object(f.a)(t,"position","relative"),Object(f.a)(t,"display","flex"),t)},a.a.createElement(kn,null,b&&Object.keys(b).length>0&&Object.keys(b).filter((function(t){if(36===y[0].length&&c.a.getState().db.cards[y[0]]&&b[t]._parent&&Object.keys(b[t]._parent).length>0&&b[t]._parent[y[0]])return!0;if("tab"===y[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 y[0]&&36!==y[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(Cn,{xs:12,sm:6,md:4,lg:3,xl:2,key:e},a.a.createElement(Yl,{data:r,follow:!0,onChange:function(){_()}}))}))))}))),Ul={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(f.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(k.d)("color")}}}},Vl=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(f.a)(t,e.breakpoints.down("sm"),{left:"30px !important"}),Object(f.a)(t,"color",X.O),Object(f.a)(t,"width","30px"),Object(f.a)(t,"height","30px"),Object(f.a)(t,"lineHeight","25px"),Object(f.a)(t,"fontSize","12px"),Object(f.a)(t,"textAlign","center"),Object(f.a)(t,"position","absolute"),Object(f.a)(t,"bottom","23px"),Object(f.a)(t,"left","50%"),Object(f.a)(t,"marginLeft","-24px"),Object(f.a)(t,"zIndex","1"),Object(f.a)(t,"borderTopRightRadius","50%"),Object(f.a)(t,"borderTopLeftRadius","50%"),Object(f.a)(t,"borderBottomRightRadius","50%"),Object(f.a)(t,"borderBottomLeftRadius","50%"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"justifyContent","center"),t),timelineSimpleBadge:{left:"30px"},custom:{backgroundColor:Object(k.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.b)+", 0.4)"},info:{backgroundColor:X.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.4)"},success:{backgroundColor:X.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.4)"},danger:{backgroundColor:X.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.4)"},warning:{backgroundColor:X.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.4)"},primary:{backgroundColor:X.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.z[0])+", 0.4)"},badgeIcon:{width:"14px",height:"14px"},timelinePanel:(r={},Object(f.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(f.a)(r,"width","45%"),Object(f.a)(r,"float","left"),Object(f.a)(r,"padding","7px"),Object(f.a)(r,"marginBottom","5px"),Object(f.a)(r,"position","relative"),Object(f.a)(r,"boxShadow","0 1px 4px 0 rgba("+Object(X.r)(X.b)+", 0.14)"),Object(f.a)(r,"borderRadius","6px"),Object(f.a)(r,"color","rgba("+Object(X.r)(X.b)+", 0.87)"),Object(f.a)(r,"background",X.O),Object(f.a)(r,"&:before",{position:"absolute",bottom:"16px",right:"-15px",display:"inline-block",borderTop:"15px solid transparent",borderLeft:"15px solid "+X.q[10],borderRight:"0 solid "+X.q[10],borderBottom:"15px solid transparent",content:'" "'}),Object(f.a)(r,"&:after",{position:"absolute",bottom:"16px",right:"-14px",display:"inline-block",borderTop:"14px solid transparent",borderLeft:"14px solid "+X.O,borderRight:"0 solid "+X.O,borderBottom:"14px solid transparent",content:'" "'}),r),timelineSimplePanel:{width:"calc(100% - 60px)"},timelinePanelInverted:Object(f.a)({},e.breakpoints.up("sm"),{float:"right",backgroundColor:X.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(k.d)("medium")},footerLine:{position:"relative",marginTop:"10px",marginBottom:"5px"},dropFile:{display:"none"},onDropFile:Object(f.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(k.d)("color")},progressBar:{backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.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(d.a)(Object(d.a)({},X.l),{},{"& textarea":Object(d.a)(Object(d.a)({},X.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(f.a)(n,"outline","none"),Object(f.a)(n,"fontSize","0.9rem"),Object(f.a)(n,"color","#7288a3"),Object(f.a)(n,"borderColor"," #3a546f"),Object(f.a)(n,"overflow","hidden"),Object(f.a)(n,"&& :: placeholder",{color:"#7288a3"}),n)}}}};function ql(){ql=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Xl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Vl)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(t.chat,e.classes),i=c.a.getState().functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(""),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),E=j[0],S=j[1],L=a.a.useState([]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState([]),D=Object(h.a)(F,2),N=D[0],P=D[1],A=a.a.useState(null),$=Object(h.a)(A,2),z=$[0],Y=$[1],B=a.a.useState(!1),R=Object(h.a)(B,2),G=R[0],H=R[1],W=a.a.useState([]),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(!1),J=Object(h.a)(X,2),K=J[0],Z=J[1],Q=a.a.createRef(),ee=a.a.createRef(),te=Object(k.j)(),re=0;n._id&&r.cards[e.nodeId]&&r.users&&r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]&&(re=r.users[Object.keys(r.users).find((function(e){return e.indexOf(n._id)>-1}))]);var ne=window.location.hash.split("/");ne[0]=ne[0].replace("#",""),a.a.useEffect((function(){u||f(!0)}));var ae=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},oe=function(){var t=Object(p.a)(ql().mark((function t(){var a,o,c;return ql().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Z(!1),O(!0),a=[],o=ae(),console.log(e),c={_id:Object(M.a)(),idRel:e.nodeId,replyData:e.replyData?e.replyData:{},reply:e.replyData?e.replyData._id:null,message:b,type:"comment",mentions:ae(),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},z&&(c=Object(d.a)(Object(d.a)({},c),{},{urlPreview:JSON.stringify(z)})),$r(e,Object(d.a)(Object(d.a)({},c),{},{user:Object(d.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)ie(t);else{e.onSending&&e.onSending();var n=Object(d.a)(Object(d.a)({},t),{},{_parent:e.nodeId,_client:r.cards[e.nodeId]&&r.cards[e.nodeId].client?r.cards[e.nodeId].client:null});z&&(n=Object(d.a)(Object(d.a)({},n),{},{urlPreview:JSON.stringify(z)})),o.map(function(){var t=Object(p.a)(ql().mark((function t(n){return ql().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,Ht(e,n,2,e.nodeId,!0);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),P([]),T([]),q([]),v(""),Y(null),O(!1),e.onSending&&e.onSending()}})),v(""),Y(null);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ie=function(){var t=Object(p.a)(ql().mark((function t(r){var n;return ql().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(p.a)(ql().mark((function e(t,n){var a;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P([].concat(Object(Se.a)(N),[t])),e.next=3,Object(St.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){})),P([]),T([]),v(""),Y(null),O(!1),e.onSending&&e.onSending()}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ce=function(){var e=Object(p.a)(ql().mark((function e(t){return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T([].concat(Object(Se.a)(I),Object(Se.a)(Object.keys(t).map((function(e){return t[e]}))))),S(!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=function(){var e=Object(p.a)(ql().mark((function e(t){var r,n,a,o;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v(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(!z&&r&&-1===V.indexOf(r)||r&&z&&-1===V.indexOf(r)&&z.link!==r){H(!0);try{i.emit("data",{module:"link",method:"post",action:"exist"},{idRel:ne[0],url:r},(function(e){Y(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})}})),(te&&(te.owner||te.planAdmin||te.planModerate)||re&&re.access&&parseInt(re.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(Ie.FileDrop,{ref:Q,className:e.relative?o.rootRelative:o.root,onDragOver:function(){!e.disabledSend&&S(!0)},onClick:function(){ee&&ee.current&&ee.current.focus()},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,a.a.createElement("div",{className:e.relative?o.editorRelative:o.editor,style:e.editorStyle?e.editorStyle:{},onClick:function(){ee&&ee.current&&ee.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(le.a,{icon:o,size:"50px"}):a.a.createElement("img",{src:o,style:{width:"100%",height:"100%"}})),N.length>0&&N[r]&&N[r].name===t.name?a.a.createElement(le.a,{icon:"cloud_done",color:"green"}):_?a.a.createElement(a.a.Fragment,null):a.a.createElement(le.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&&!z&&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(Zn.a,{variant:"rect",style:{width:"200px",height:"110px",maxWidth:"100%"}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"100%",height:"25px"}},a.a.createElement(Zn.a,{variant:"text",height:25,style:{marginBottom:"7px"}}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10}),a.a.createElement(Zn.a,{variant:"text",height:10})))),z&&a.a.createElement("div",{className:o.urlPreview},a.a.createElement("img",{src:"".concat(z.img?z.img:He.a),onError:function(e){e.target.src=He.a},alt:z.title}),a.a.createElement("div",{className:"data"},a.a.createElement("div",{className:"title"},z.title),z.site&&a.a.createElement("div",{className:"siteName"},z.site),z.contentSnippet&&a.a.createElement("div",{className:"contentSnippet"},z.contentSnippet)),a.a.createElement($e,{title:Object(k.s)("$__removeLink",1),icon:"delete_forever",color:"red",onClick:function(){return Y(null)}})),_?a.a.createElement("div",{className:o.sendingMessage},Object(k.s)("$__sending",1),a.a.createElement(Ir.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(Te.b,{ref:ee,value:b,onChange:function(e){se(e.target.value)},onPaste:function(e){ce(e.clipboardData.files)},placeholder:e.placeholder?e.placeholder:Object(k.s)("$__writeMessage"),style:Object(d.a)(Object(d.a)({},Ul),{},{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()&&oe())},placement:"top",forceSuggestionsAboveCursor:!0,autosize:{minRows:1,maxRows:6}},a.a.createElement(Te.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(Re.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($e,{title:Object(k.s)("$__emojis",1),icon:K?"highlight_off":"sentiment_very_satisfied",color:Object(k.d)("medium"),onClick:function(){Z(!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 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(le.a,{icon:"attachment",color:Object(k.d)("medium"),size:"22px"})),!_&&(b||I.length>0)&&a.a.createElement($e,{title:Object(k.s)("$__pressENTERtoSendorClickHere",1),icon:"send",color:Object(k.d)("menu"),onClick:function(){return oe()}}),e.closeOption&&a.a.createElement(le.a,{title:Object(k.s)("$__pressCRTL+ENTERtoSend",1),icon:"close",color:Object(k.d)("color"),onClick:function(){return e.onClose()}}),K&&a.a.createElement("div",{style:{position:"absolute",bottom:"44px",right:"40px"}},a.a.createElement(De.a,{onEmojiClick:function(e,t){v("".concat(b," ").concat(t.emoji))},groupVisibility:{recently_used:!1}})))))),a.a.createElement("div",{className:E?o.onDropFile:o.dropFile,onDragLeave:function(){!e.disabledSend&&S(!1)}},Object(k.s)("$__dropTheFileToAttach","*"))))}))),Jl=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(In)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.usersStatus,i.socket,a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],d=s[1],p=a.a.useState(!1),f=Object(h.a)(p,2),m=(f[0],f[1]),g=a.a.useState(null),b=Object(h.a)(g,2),v=(b[0],b[1],a.a.useState(null)),y=Object(h.a)(v,2),x=(y[0],y[1],null);w&&w._parent&&n.cards[w._parent]?w._parent:w&&w.idRel&&n.cards[w.idRel]&&w.idRel;var O=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];m(!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(k.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(k.s)("$__hideUser","*");r=r.replace(a,'<span style="color:'.concat(Object(k.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 S=!1;e.storie&&e.storie.user&&e.storie.user._id===o._id&&(S=!0);return""===w.message&&w.cardId&&w.cardId!==e.nodeId&&!c.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(){m(!1)}),e)}(1e3)},onMouseOver:function(){e.isReply||O(!0)},onClick:function(){e.isReply||O(!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(On,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:w.user._id},a.a.createElement(Re.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"}},"(",_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*w.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*w.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*w.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(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:S?"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(Ne.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)>_()().unix("X")-60&&(e.target.src=l)}}),"movie"!==s&&"string"===typeof l&&-1===l.indexOf("blob:")&&-1===l.indexOf("svg")?a.a.createElement(le.a,{icon:l,size:"50px"}):"movie"!==s&&!("img"===s&&l&&l.indexOf("svg")>-1)&&a.a.createElement("img",{src:l,style:{width:"100%",height:"100%"}}),"img"===s&&l&&l.indexOf("svg")>-1&&a.a.createElement("img",{src:ve.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(pe.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(k.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">').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"},Object(k.s)("$__openLink","*"))),a.a.createElement("div",{dangerouslySetInnerHTML:{__html:Object(k.p)(r,!0,"\n","\n")}}))}}())))}))),Kl=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:X.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:X.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(k.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.b)+", 0.4)"},info:{backgroundColor:X.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.4)"},success:{backgroundColor:X.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.4)"},danger:{backgroundColor:X.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.4)"},warning:{backgroundColor:X.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.4)"},primary:{backgroundColor:X.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.b)+", 0.87)",background:Object(k.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.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(k.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(k.d)("color")},progressBar:{backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.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 Zl(){Zl=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Kl)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.chat,r.timeline),s=i.socket,u=a.a.useState(e.stories||{}),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=O[0],j=(O[1],a.a.useState(!1)),E=Object(h.a)(j,2),k=E[0],S=(E[1],[]);a.a.useEffect((function(){return l&&l[e.data._id]&&Object.keys(l[e.data._id]).length!==Object.keys(m).length&&g(l[e.data._id]),function(){}}),[l]),a.a.useEffect((function(){e.data._id&&L()}),[e.data]);var L=function(){var t=Object(p.a)(Zl().mark((function t(){var r;return Zl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,zr(Object(d.a)(Object(d.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(p.a)(Zl().mark((function t(){return Zl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object.keys(m).filter((function(e){if(m[e].user&&m[e].user._id!==o._id&&(!m[e].readedBy||m[e].readedBy&&!m[e].readedBy[o._id]))return!0})).length>0&&(Pr(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 y?a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Zn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(Zn.a,{variant:"text",height:11,style:{marginBottom:"3px"}}),a.a.createElement(Zn.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}},m&&Object.keys(m).length>0&&Object.keys(m).sort((function(e,t){return parseInt(m[e].created_at)<parseInt(m[t].created_at)?-1:parseInt(m[e].created_at)>parseInt(m[t].created_at)?1:0})).map((function(r,n){var i=m[r];return!e.showUnReaded&&n>Object.keys(m).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(Jl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?m[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(Jl,{openLightBox:function(e){C(e)},storie:i,reply:i.reply?m[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(Xl,{nodeId:e.data._id,onSending:function(){I()},placeholder:"Escreva um coment\xe1rio"}))})));var Ql=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ll)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useRef({});return a.a.useEffect((function(){if(l.current&&e.onResize){var t=new ResizeObserver((function(){var t=l.current.clientHeight;e.onResize(t)}));return t.observe(l.current),function(){return t.disconnect()}}return function(){}}),[l]),a.a.useEffect((function(){i(e.data)}),[]),a.a.createElement("div",{ref:l,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(d.a)(Object(d.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.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(Ve,{data:o},a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(Be,{icon:"settings_input_antenna",title:Object(k.s)("$__sendToRadar",1),iconColor:Object(k.d)("menu"),size:"18px",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.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 es(){es=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ts=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ll)((function(e){var t=e.data,r=a.a.useState(0),n=Object(h.a)(r,2),o=n[0],i=n[1],c=a.a.useState(7),l=Object(h.a)(c,2),s=l[0],u=(l[1],a.a.useState([])),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState([]),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!0),w=Object(h.a)(O,2),j=w[0],E=w[1],k=a.a.useState(!1),S=Object(h.a)(k,2),L=S[0],C=S[1],I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(g)&&b(e),E(!0)}),[]),a.a.useEffect((function(){g.length>0&&!L&&(N(o,s),g[2]&&36!==g[2].length&&E(!0),C(!0))}),[g]),a.a.useEffect((function(){F||(E(!0),N(o,s))}),[o,s]),a.a.useEffect((function(){E(!1)}),[x]);var N=function(){var e=Object(p.a)(es().mark((function e(t,r){var n,a,o;return es().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(F){e.next=15;break}return E(!0),e.prev=2,e.next=5,kt.a.post("/Feed_Social_V2",{ids:null,skip:t*r,limit:r});case 5:n=e.sent,a={},o=0,n&&n.data&&n.data.length>0?n.data.map((function(e){var t={};e.reactions&&e.reactions.filter((function(e){return e&&e.user&&e.user._id})).length>0&&e.reactions.map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e.react.type,Object(d.a)(Object(d.a)({},t&&t[e.react.type]?t&&t[e.react.type]:{}),{},Object(f.a)({},e.user._id,Object(d.a)(Object(d.a)({},e.user),{},{reactDate:e.react.created_at})))))})),a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e.link._id,Object(d.a)(Object(d.a)({},e.link),{},{_reactions:t}))),e.total>o&&(o=e.total)})):n&&n.data&&0===n.data.length&&D(!0),_(Object(d.a)(Object(d.a)({},x),a)),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));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",onScroll:function(e){!function(e){var t=document.getElementById("linkList");console.log(t.scrollHeight-t.scrollTop),!j&&t.scrollHeight-t.scrollTop<2500&&i(o+1)}()}},a.a.createElement(kn,null,Object.keys(x).sort((function(e,t){return x[e].isoDate&&x[t].isoDate&&x[e].isoDate<x[t].isoDate?1:x[e].isoDate&&x[t].isoDate&&x[e].isoDate>x[t].isoDate?-1:0})).map((function(e){return a.a.createElement(kn,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(Cn,{xs:12,sm:10,md:8,lg:6,xl:6},a.a.createElement(Ql,{db:"cards",data:x[e],onClick:function(){window.open(x[e].link,"_blank")}})))}))),j&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Tr,null))))})));function rs(){rs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ns=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.data,r=a.a.useState(0),n=Object(h.a)(r,2),o=n[0],i=(n[1],a.a.useState(5)),c=Object(h.a)(i,2),l=(c[0],c[1],a.a.useState([])),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState([]),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!0),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),E=j[0],k=j[1];a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(u)&&f(e),O(!0)}),[]),a.a.useEffect((function(){u.length>0&&!E&&(S(),u[2]&&36!==u[2].length&&O(!0),k(!0))}),[u]);var S=function(){var e=Object(p.a)(rs().mark((function e(t,r){var n,a;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0===o||o>Object.keys(b).length)){e.next=13;break}return O(!0),e.prev=2,e.next=5,kt.a.post("/Feed_Social",{id:u[2]});case 5:n=e.sent,a={},n&&n.data&&n.data.links?(a=Object(d.a)(Object(d.a)({},a),n.data.links),v(Object(d.a)(Object(d.a)({},b),a)),O(!1)):O(!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(kn,null,Object.keys(b).length>0?Object.keys(b).sort((function(e,t){return b[e].isoDate&&b[t].isoDate&&b[e].isoDate<b[t].isoDate?1:b[e].isoDate&&b[t].isoDate&&b[e].isoDate>b[t].isoDate?-1:0})).map((function(e){return a.a.createElement(kn,{key:e,style:{display:"flex",justifyContent:"center"}},a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:6,xl:6},a.a.createElement(Ql,{db:"cards",data:b[e],onClick:function(){window.open(b[e].link,"_blank")}})))})):a.a.createElement(kn,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:6,xl:6},"A feed solicitado n\xe3o pode ser exibido"))),_&&a.a.createElement("div",{style:{position:"relative",width:"100%"}},a.a.createElement(Tr,null))))}));var as=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){a.a.useEffect((function(){return console.log("StrategyAndPlans"),function(){}}),[]),window.location.hash.split("/")[0].replace("#","")||i.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(_l,null),t[1]&&"home"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(ts,null)),t[1]&&"read"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(jl,null),a.a.createElement(ns,null)),t[1]&&"insight-boards"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(jl,null),a.a.createElement(Sl,null)),t[1]&&"radar"===t[1]&&a.a.createElement("div",{style:{top:33}},a.a.createElement(Tl,null)),t[1]&&("feeds"===t[1]||"bright-and-connected"===t[1])&&a.a.createElement(a.a.Fragment,null,a.a.createElement(jl,null),a.a.createElement(Wl,null)),t[1]&&"hideFeeds"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(jl,null),a.a.createElement(Wl,{showHidden:!0})),t[1]&&"allNews"===t[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(jl,null),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0,top:0}},a.a.createElement(Rl,null))))})),os=r(808),is=r(1109),cs=r.n(is),ls=(r(1627),Object(me.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"}}}))(Ne.a));r(1628),r(1629);var ss=function(e){var t=Object(R.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(k.d)("color")),backgroundColor:"#FFFFFF"}}}))(),r=a.a.useState(!1),n=Object(h.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(d.a)(Object(d.a)({},e.style?e.style:{}),e.onClick?{cursor:"pointer"}:{}),onClick:e.onClick?function(){e.onClick()}:null},a.a.createElement("div",{style:Object(d.a)({display:"flex",alignItems:"center"},e.onClick?{pointerEvents:"none"}:{})},a.a.createElement(Ne.a,{title:Object(k.s)("$__options",1)},e.hideText?a.a.createElement(Pe.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(le.a,{usePropagation:!0,size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(k.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(q.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(d.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(le.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(k.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(k.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(le.a,{size:e.size?e.size:"17px",color:e.btColor?e.btColor:Object(k.d)("menu"),icon:"arrow_drop_down"}):a.a.createElement(a.a.Fragment,null)))))),e.popper||e.options?a.a.createElement(rt.a,{open:o,anchorEl:c.current,role:void 0,transition:!0,style:{zIndex:"100 !important"}},(function(t){var r=t.TransitionProps,n=t.placement;return a.a.createElement(Ze.a,Object.assign({},r,{style:Object(d.a)(Object(d.a)({},"bottom"===n?{transformOrigin:"center top"}:{transformOrigin:"center bottom"}),{},{zIndex:"100 !important"})}),a.a.createElement(tt.a,{style:{marginTop:5}},a.a.createElement(Ke.a,{onClickAway:function(e){l(e)}},e.popper?e.popper:e.options&&e.options.length>0?a.a.createElement(et.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(Qe.a,{key:r,style:{color:t&&t.color?t.color:Object(k.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(Re.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(Je.a,{overlap:"rectangular",badgeContent:t.count?t.count:null,color:"secondary"},a.a.createElement(le.a,{usePropagation:!0,icon:t.icon,style:{margin:"none !important"},color:t.iconColor?t.iconColor:t.color?t.color:Object(k.d)("menu")})),!t.render&&a.a.createElement("span",{style:{marginLeft:"7px"}},Object(k.s)(t.name,1))))}))):a.a.createElement(a.a.Fragment,null))))})):a.a.createElement(a.a.Fragment,null))};function us(e){var t=e.options,r=void 0===t?[]:t,n=e.onChange,o=void 0===n?function(){}:n,i=c.a.getState().db;return a.a.createElement(ss,{text:Object(k.s)("$__showActivitiesType"),icon:"collections_bookmark",options:[].concat(Object(Se.a)(i.type.filter((function(e){return e.calendar})).map((function(e){return{name:Object(k.s)("".concat(e.label),1),icon:e.icon,iconColor:r.indexOf(e.value)>-1?"lightgray":Object(k.d)("menu"),color:r.indexOf(e.value)>-1?"lightgray":Object(k.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(k.s)("$__showAll",1):Object(k.s)("$__hideAll",1),icon:"clear_all",iconColor:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(k.d)("menu"),color:r.length!==i.type.filter((function(e){return e.calendar})).length?"lightgray":Object(k.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})).map((function(t){e.push(t.value)})),o(e)}}}])})}function ds(){ds=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ps=cs()(os.a),fs={allDay:Object(k.s)("$__allDay"),previous:"<",next:">",today:Object(k.s)("$__today"),month:Object(k.s)("$__month"),week:Object(k.s)("$__week"),day:Object(k.s)("$__aday"),agenda:Object(k.s)("$__agenda"),date:Object(k.s)("$__date"),time:Object(k.s)("$__hour"),event:Object(k.s)("$__activity"),showMore:function(e){return"+ (".concat(e,") ").concat(Object(k.s)("$__activities"))}};function hs(e){c.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(k.d)("menu"),borderRadius:0}},Object(k.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(k.d)("menu"),borderRadius:0}},Object(k.s)("$__next"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("TODAY")},style:{backgroundColor:Object(k.d)("menu"),borderRadius:0}},Object(k.s)("$__today"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("day")},style:{backgroundColor:Object(k.d)("menu"),borderRadius:0}},Object(k.s)("$__day"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("week")},style:{backgroundColor:Object(k.d)("menu"),borderRadius:0}},Object(k.s)("$__week"))),a.a.createElement("span",{className:"rbc-btn-group"},a.a.createElement("button",{type:"button",onClick:function(){r("month")},style:{backgroundColor:Object(k.d)("menu"),borderRadius:0}},Object(k.s)("$__month"))))}var ms=Object(s.b)((function(e){return{search:e.search,cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.reduxFunction,r=e.search,n=c.a.getState(),o=n.db,i=n.session,l=a.a.useState([]),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(null),g=Object(h.a)(m,2),b=g[0],v=(g[1],a.a.useState("week")),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(ma()().toLocaleString()),w=Object(h.a)(O,2),j=w[0],E=w[1],S=a.a.useState(null),L=Object(h.a)(S,2),C=(L[0],L[1]),I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(!1),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState([]),M=Object(h.a)(z,2),Y=M[0],B=M[1];ma.a.locale(i.language?i.language.toLowerCase():"pt-br",{week:{dow:1}});var R=Object(os.b)(ma.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()}),[A,Y]);var G=function(){var e=Object(p.a)(ds().mark((function e(){var t;return ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i.calendarPreffers?JSON.parse(i.calendarPreffers):{},t=Object(d.a)(Object(d.a)({},t),{},{disabledTypes:Array.from(Y),showAllEvents:F,severalDaysActivities:A,view:x}),c.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(p.a)(ds().mark((function e(){var t;return ds().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._users&&c.a.getState().db.cards[e]._users[i._id]&&(!c.a.getState().db.cards[e].checklist||c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e].showCard)&&ma()(1e3*c.a.getState().db.cards[e].startDate).isValid()&&ma()(1e3*c.a.getState().db.cards[e].endDate).isValid()&&(0===Y.length||Y.length>0&&-1===Y.indexOf(c.a.getState().db.cards[e].type))&&"plan"!==c.a.getState().db.cards[e].type&&"chatGroup"!==c.a.getState().db.cards[e].type&&"completed"!==c.a.getState().db.cards[e].status&&!c.a.getState().db.cards[e].deleted&&(A||!A&&ma()(1e3*c.a.getState().db.cards[e].startDate).format("YYYY-MM-DD")===ma()(1e3*c.a.getState().db.cards[e].endDate).format("YYYY-MM-DD"))&&(0===r.tags.length||r.tags.length>0&&c.a.getState().db.cards[e]._tags&&c.a.getState().db.cards[e]._tags.length>0&&c.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&&(c.a.getState().db.cards[e].name.toLowerCase().indexOf(r.text.toLowerCase())>-1||c.a.getState().db.cards[e].description&&c.a.getState().db.cards[e].description.toLowerCase().indexOf(r.text.toLowerCase())>-1))&&r.cards.status[c.a.getState().db.cards[e].status]&&(r.cards.priority.all||c.a.getState().db.cards[e].priority&&r.cards.priority[c.a.getState().db.cards[e].priority])&&(r.cards.risk.all||c.a.getState().db.cards[e].risk&&r.cards.risk[c.a.getState().db.cards[e].risk])&&(r.cards.complexity.all||c.a.getState().db.cards[e].complexity&&r.cards.complexity[c.a.getState().db.cards[e].complexity])&&(r.cards.impact.all||c.a.getState().db.cards[e].impact&&r.cards.impact[c.a.getState().db.cards[e].impact])&&(0===Object.keys(r.users.selected).length||Object.keys(r.users.selected).length>0&&Object.keys(c.a.getState().db.cards[e]._users).filter((function(e){return r.users.selected[e]})).length>0)})).map((function(e){var r=!1,n=ma()(1e3*c.a.getState().db.cards[e].startDate).toDate(),a=ma()(1e3*c.a.getState().db.cards[e].endDate).toDate(),o=ma()(1e3*c.a.getState().db.cards[e].endDate).unix("x")-ma()(1e3*c.a.getState().db.cards[e].startDate).unix("x");("00:00:00"===ma()(1e3*c.a.getState().db.cards[e].startDate).format("HH:mm:ss")&&"23:59:59"===ma()(1e3*c.a.getState().db.cards[e].endDate).format("HH:mm:ss")||Math.ceil(o/60/60)>23)&&(r=!0),t.push({title:c.a.getState().db.cards[e].name,allDay:r,startDate:n,endDate:a,_id:e})})),f(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(_l,null),a.a.createElement(kn,null,a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",width:"100%"}},a.a.createElement(at,{text:Object(k.s)("$__legend"),icon:"style",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(k.d)("menu"),borderRadius:0},options:[{name:Object(k.s)("$__scheduleColor",1),icon:"label",iconColor:"gray",color:"gray",disabled:!0},{name:Object(k.s)("$__late",1),icon:"label",iconColor:"red",disabled:!0}].concat(Object(Se.a)(o.status.map((function(e){return{name:Object(k.s)("".concat(e.label),1),icon:"label",iconColor:e.color,disabled:!0}}))),[{name:Object(k.s)("$__scheduleLeftBorderColor",1),icon:"border_left",color:"gray",iconColor:"gray",disabled:!0}],Object(Se.a)(o.priority.map((function(e){return{name:Object(k.s)("".concat(e.label),1),icon:"border_left",color:e.color,iconColor:e.color,disabled:!0}}))))}),a.a.createElement(us,{options:Y,onChange:function(e){B(e)}}),a.a.createElement(at,{text:Object(k.s)("$__options"),icon:"settings",horizontalButton:!0,transparent:!0,size:"21px",color:"lightgray",btColor:"lightgray",buttonStyle:{backgroundColor:Object(k.d)("menu"),borderRadius:0},style:{marginRight:"15px"},options:[{name:Object(k.s)("$__showAllEvents","*"),icon:F?"check_circle_outline":"radio_button_unchecked",onClick:function(){D((function(e){return!e}))}},{name:Object(k.s)("$__activitiesTInSeveralDays","*"),icon:A?"check_circle_outline":"radio_button_unchecked",onClick:function(){$((function(e){return!e}))}}]})),a.a.createElement(Cn,{xs:12,sm:12,md:12},a.a.createElement($i,null,a.a.createElement(Bi,null,a.a.createElement(ps,{selectable:!0,localizer:R,events:u,messages:fs,defaultDate:new Date,onSelectSlot:function(e){t("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:"new",module:"cardEdit",activeModule:"cardEdit",data:{type:"task",startDate:ma()(e.start).unix("x"),endDate:ma()(e.end).unix("x")}}))},startAccessor:"startDate",endAccessor:"endDate",onView:function(e){_(e)},onSelectEvent:function(e){C(e._id),t("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:e._id,module:"cardEdit",activeModule:"cardEdit",data:c.a.getState().db.cards[e._id]}))},eventPropGetter:function(e,t,r,n){var a=c.a.getState().db.cards[e._id],i=c.a.getState().db.status.filter((function(t){return t.value===c.a.getState().db.cards[e._id].status}))[0].color,l=ma()(new Date(t)).unix("x"),s=ma()(new Date(r)).unix("x");ma()(new Date(r)).unix("x")<ma()().unix("x")&&(i="#ff0000");var u=(s-l)/60/1440*100;return u>100&&(u=100),{className:"",style:Object(d.a)(Object(d.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(k.m)(i,.3):Object(k.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=(ma()(t.startDate).unix("x"),ma()(t.endDate).unix("x"),c.a.getState().db.cards[t._id]);c.a.getState().db.status.filter((function(e){return e.value===r.status}))[0].color;ma()(t.endDate).format("YYYY-MM")===ma()().format("YYYY-MM")&&(ma()(t.endDate).format("DD"),ma()().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(ls,{leaveDelay:800,title:a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{display:"flex",alignItems:"center",zIndex:5e3}},a.a.createElement(vn,{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(ze.a,{overlap:"rectangular",size:"12px",icon:n,color:"bkack",title:Object(k.s)("$__".concat(r.type))})),t.title))},toolbar:hs,month:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(k.d)("menu"),cursor:"pointer"}},t)}},week:{dateHeader:function(e){e.date;var t=e.label;return a.a.createElement("div",{style:{color:Object(k.d)("menu"),cursor:"pointer"}},t)}}},onNavigate:function(e,t,r){j&&ma()(e).format("YYYY-MM")===ma()(j).format("YYYY-MM")||E(e),"NEXT"!==r&&"PREV"!==r&&"TODAY"!==r&&"DATE"!==r&&_(r)},view:x,onEventResize:function(t){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:t.event._id}}),{startDate:ma()(t.start).unix("x"),endDate:ma()(t.end).unix("x")})},onEventDrop:function(t){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:t.event._id}}),{startDate:ma()(t.start).unix("x"),endDate:ma()(t.end).unix("x")})},showMultiDayTimes:!0,showAllEvents:F,popup:!0,resizable:!0,defaultView:"week"}))),a.a.createElement("div",{style:{height:300,width:"100%"}}))))})),gs=(r(999),r(1963)),bs=r(629);function vs(){vs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ys=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=c.a.getState(),n=r.session,a=r.db,o=Object(d.a)({},e),i=Object(d.a)({},e._parent&&c.a.getState().db.cards[e._parent]?c.a.getState().db.cards[e._parent]:{});Object.keys(o).map((function(e){o[e]||delete o[e]}));var l=o.name.trim().split("\n"),s=t,u={},h={};return(null===o||void 0===o?void 0:o.users)&&o.users.map((function(e,t){var r=Object(d.a)({},0===t?Object(d.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];h=Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({_id:e,name:n.name,image:n.image||null},r),{},{myDay:null})))})),l.map(function(){var e=Object(p.a)(vs().mark((function e(t,r){var a,l;return vs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.trim()&&(l=Object(M.a)(),Y.a.post("card/add",Object(d.a)(Object(d.a)(Object(d.a)({_id:l},o),i.showInPanel?{channel:!0}:{}),{},{name:t},"step"===o.type?{step:"".concat(s)}:{order:"".concat(s)})),o.channel&&delete o.channel,u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},l,Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({_id:l},o),{},{name:t,_users:h,_createdBy:{name:c.a.getState().db.users[n._id].name,image:c.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[l])||void 0===a?void 0:a.users)&&delete u[l].users,s+=1);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),u};function xs(){xs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){c.a.getState().session;var t=[],r=c.a.getState().db.cards[e.nodeId]||{},n=a.a.useState(!1),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0];s[1];if(r.automationUsers&&"doNotChange"!==r.automationUsers&&"remove"!==r.automationUsers&&r._users&&Object.keys(r._users).length>0){var m=c.a.getState().db.users[c.a.getState().session._id]||{},g=Object(d.a)(Object(d.a)({},"add"===r.automationUsers?Object(f.a)({},m._id,{_id:m._id,name:m.name,image:m.image||null}):{}),r._users);Object.keys(g).sort((function(e,t){return g[e].isResponsible?-1:1})).map((function(e,r){-1===t.indexOf(e)&&t.push(e)}))}var b=a.a.useState(t.length>0?t:[c.a.getState().session._id]),v=Object(h.a)(b,2),y=v[0],x=v[1],O=a.a.createRef(),w=a.a.createRef(),j=a.a.createRef(),S=a.a.createRef({}),L=function(){var t=Object(p.a)(xs().mark((function t(n){var a,o;return xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S&&(!S.current||S.current&&!S.current.loading)&&(S.current=Object(d.a)(Object(d.a)({},S.current),{},{loading:!0}),a=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({name:O.current.value,_parent:e.nodeId,myDay:!!e.myDay,type:e.type?e.type:"task",status:e.status?e.status:"notStarted",users:y},e.checklist&&n?{checklist:!0}:{}),e.initialData?e.initialData:{}),w&&w.current&&w.current.value?{description:w.current.value}:{}),j&&j.current&&j.current.getValue()?{value:j.current.getValue()}:{}),r&&r.automationDueDateType&&"add"===r.automationDueDateType&&(a=Object(d.a)(Object(d.a)({},a),{},{startDate:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:_()("".concat(_()().format("YYYY-MM-DD")," 23:59:59")).add((null===r||void 0===r?void 0:r.automationDueDate)||1,"days").unix("X")})),r&&r.automationStatusType&&"replace"===r.automationStatusType&&(a=Object(d.a)(Object(d.a)({},a),{},{status:r.automationStatus||"notStarted"},r.automationStatus&&"completed"===r.automationStatus?{completed_at:_()().unix("x")}:{})),(o=ys(a,e.rows||0,e))&&(e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),o)})),e.onSave&&e.onSave())),S.current=Object(d.a)(Object(d.a)({},S.current),{},{loading:!1}),e.onCancel&&e.onCancel();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return a.a.createElement("div",{style:Object(d.a)({position:"absolute",top:0,left:0,bottom:0,right:0,backgroundColor:e.backgroundColor||"rgba(250,250,250,0.77)",width:"100%",padding:"7px",display:"flex",alignItems:"center"},e.styles?e.styles:{})},a.a.createElement("div",{style:{width:"calc(100% - 50px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},e.placeHolder?e.placeHolder:Object(k.s)(e.checklist&&!e.myDay?"$__newSimpleTask":"$__newSubActivity")),e.explain?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3,color:Object(k.d)("menu")}},e.explain):a.a.createElement(a.a.Fragment,null),a.a.createElement(bs.a,{ref:O,style:{width:"100%",padding:7,border:"none",borderBottom:"solid 1px ".concat(Object(k.d)("color")),background:"none",resize:"none",fontFamily:"inherit",fontSize:14},onKeyDown:function(t){var r=t.which||t.keyCode;return 13!==r||t.shiftKey?13===r&&t.shiftKey&&O.current&&O.current.value&&0===O.current.value.trim().length?(t.preventDefault(),void(O.current.value="")):void(27===r&&e.onCancel&&e.onCancel()):(t.preventDefault(),void(O.current&&O.current.value&&O.current.value.trim().length>0&&L(!(!e.checklist||e.myDay))))},autoFocus:!0}),(r.requireDescription||u)&&a.a.createElement(Ce,{inputRef:w,label:Object(k.s)("$__description",1),variant:Object(k.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"description",color:"lightgray"}))},placeholder:Object(k.s)("$__description",1)}),(r.requireValue||i)&&a.a.createElement(ko,{label:Object(k.s)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:j,ref:j}),a.a.createElement(Qt,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,noLimit:!0,multiple:!0,onSelect:function(e){x(e)},selected:y,transparent:!0})),a.a.createElement("div",{style:{}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:e.placeHolder||Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(){!O.current.value||O.current.value&&""===O.current.value.trim()?O.current.focus():L(!(!e.checklist||e.myDay))},size:"25px"}),a.a.createElement(E.a,{id:"sideModule_saveButton",title:Object(k.s)("$__cancel",1),color:Object(k.d)("medium"),icon:"cancel",onClick:function(){e.onCancel&&e.onCancel()},size:"25px"})))}));var _s=r(1110),Os={widgetsContent:{backgroundColor:"#FFFFFF",height:"calc(100vh - 200px)",maxHeight:"calc(100vh - 350px)",position:"relative",overflowX:"auto"}};var ws=Object(s.b)((function(e){return{store:{cards:e.db.cards},hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=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(kn,{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(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center"}},Object(k.s)("$__myChannels"),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(ss,{style:{marginRight:7,marginLeft:7},text:Object(k.s)("$__channels"),active:!l,onClick:function(){s(!1)}}),a.a.createElement(ss,{text:Object(k.s)("$__showMyRequests"),active:l,onClick:function(){s(!0)}}))),l?a.a.createElement(Cn,{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(k.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(k.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(k.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(k.s)("$__stepNotStarted"))))),Object.keys(r.cards).filter((function(e){var t,n;return null===(t=r.cards[e])||void 0===t||null===(n=t._createdBy)||void 0===n?void 0:n.channel})).map((function(e,t){return a.a.createElement(a.a.Fragment,{key:"ch".concat(t,"-").concat(e)},a.a.createElement(_s.a,{db:"cards",data:r.cards[e],noShadow:!0}))}))):a.a.createElement(a.a.Fragment,null),!l&&u.map((function(t){return a.a.createElement(Cn,{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(d.a)(Object(d.a)({},c.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(k.d)("menu")," ")}},a.a.createElement("div",{style:{padding:3,color:Object(k.d)("menu"),fontWeight:"bold",fontSize:14}},t.shortCutTitle),a.a.createElement(Al.a,{arrow:!0,title:a.a.createElement(a.a.Fragment,null,t.shortCutDescription)},a.a.createElement("div",{style:{padding:3,color:Object(k.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(k.d)("menu"),fontWeight:"bold",fontSize:16,textTransform:"uppercase"}},t.shortCutButtonToAdd)))}))):a.a.createElement(a.a.Fragment,null))}))),js=r(1111),Es=r.n(js),ks=r(1112),Ss=r.n(ks);function Ls(){Ls=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Cs=Object(s.b)((function(e){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t,r=c.a.getState(),n=r.db,o=r.session,l=(n.dataType,n.users),s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],m=u[1],g=a.a.useState("EndDate"),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState(["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal","link","insight"]),O=Object(h.a)(x,2),w=O[0],j=O[1],S=Object(gs.a)(["banner"]),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState([]),F=Object(h.a)(T,2),D=F[0],N=F[1];a.a.useEffect((function(){var t=Object.keys(c.a.getState().db.cards).filter((function(t){return c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].checklist&&!c.a.getState().db.cards[t].deleted&&(!e.hidePrivate||e.hidePrivate&&!c.a.getState().db.cards[t].private)})).map((function(e){return c.a.getState().db.cards[e]}));JSON.stringify(t)!==JSON.stringify(D)&&N(t)}),[e.cards]);var P=function(){var e=Object(p.a)(Ls().mark((function e(){var t;return Ls().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.a.getState().functions.socket,I("banner",!0,{path:"/"});try{t.emit("data",{module:"user",method:"post",action:"preffers"},{hideSupportAndAppBanner:!0},(function(e){e.error&&console.log("hideSupportAndAppBanner",e.error)}))}catch(r){console.log(r)}case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=_()().format("YYYY-MM-DD"),$=window.location.hash.split("/");$[0]=$[0].replace("#","");var z=String(o.dashboard.period).replace("$__last","");z=z.replace("Days","");var M=D.filter((function(e){return 0===w.length||w.length>0&&-1===w.indexOf(e.type)})).filter((function(e){if(e&&e._users&&e._users[o._id]&&"completed"!==e.status&&"chatGroup"!==e.type&&"plan"!==e.type&&(e._users[o._id].myDay&&_()(1e3*e._users[o._id].myDay).format("YYYY-MM-DD")!==A||e._users[o._id].isResponsible&&(e.endDate&&_()(1e3*e.endDate).unix("x")<_()().unix("x")||e.startDate&&_()(1e3*e.startDate).unix("x")>_()(new Date(A)).subtract(30,"days").unix("x"))&&(e._users[o._id]&&!e._users[o._id].myDay||e._users[o._id].myDay&&_()(1e3*e._users[o._id].myDay).format("YYYY-MM-DD")!==A)))return!0})).sort((function(e,t){var r=e._users[o._id].myDay||e.endDate||e.startDate||0,n=t._users[o._id].myDay||t.endDate||t.startDate||0;return r>n?-1:r>n?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(vn,{db:"cards",data:t,noShadow:!0,suggestion:!0}),a.a.createElement(q.a,{onClick:function(){Object(yt.L)(e,{_id:t._id,userId:o._id,option:!0})}},a.a.createElement(le.a,{icon:"add",color:Object(k.d)("menu"),title:Object(k.s)("$__addOnMyDay")})))})),Y=D.filter((function(e){return"completed"!==e.status&&e.name&&!e.deleted&&!e.archived&&e._users&&e._users[o._id]&&(!e._users[o._id].myDay||e._users[o._id].myDay&&_()(new Date(1e3*e._users[o._id].myDay)).format("YYYY-MM-DD")!==A)&&(e.endDate&&_()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.endDate)).format("YYYY-MM-DD")<=_()(new Date(A)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&_()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.startDate)).format("YYYY-MM-DD")<=_()(new Date(A)).add(10,"days").format("YYYY-MM-DD"))})).sort((function(e,t){var r=e.name.toLowerCase().trim(),n=t.name.toLowerCase().trim();return"IniDate"===v&&(r=parseInt(e.startDate),n=parseInt(t.startDate)),"EndDate"===v&&(r=parseInt(e.endDate),n=parseInt(t.endDate)),r<n?-1:r>n?1:0})).map((function(e,t){return a.a.createElement(vn,{db:"cards",key:e._id,data:e,noShadow:!0})})),R=l&&Object.keys(l).length>0?l[Object.keys(l).find((function(e){return o&&o._id&&l[e]&&l[e]._id&&l[e]._id.indexOf(o._id)>-1}))]:{},G=new Date,H=G.getHours()>=0&&G.getHours()<5?"$__goodNight":G.getHours()>=5&&G.getHours()<12?"$__goodMorning":G.getHours()>=12&&G.getHours()<18?"$__goodAfternoon":"$__goodNight",W=Object.keys(n.cards).filter((function(t){return n.cards[t]&&!n.cards[t].deleted&&!n.cards[t].archived&&"plan"===n.cards[t].type&&n.cards[t]._users&&n.cards[t]._users[o._id]&&"completed"!==n.cards[t].status&&n.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!n.cards[t].private)})),U=Object.keys(n.cards).filter((function(t){return n.cards[t]&&!n.cards[t].deleted&&!n.cards[t].archived&&"plan"!==n.cards[t].type&&n.cards[t]._users&&n.cards[t]._users[o._id]&&"completed"!==n.cards[t].status&&n.cards[t]._isFavorite&&(!e.hidePrivate||e.hidePrivate&&!n.cards[t].private)})),V=U.map((function(e){var t=n.cards[e];return a.a.createElement("div",{style:{width:"calc(100%)",display:"flex",alignItems:"center",justifyContent:"center"},key:t._id},a.a.createElement(vn,{db:"cards",data:t,noShadow:!0}))}));return a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(kn,null,C.banner||o.hideSupportAndAppBanner?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,a.a.createElement(Cn,{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(k.d)("menu"),paddingLeft:"15px"}},Object(k.s)(H,1),", ",R&&R.displayName?R.displayName:R.name?R.name:"","!"),a.a.createElement(kn,{style:{width:"100%"}},a.a.createElement(Cn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("img",{src:Ss.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(Cn,{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(k.d)("medium"),paddingRight:15},dangerouslySetInnerHTML:{__html:Object(k.p)(Object(k.s)("$__supportWelcomeMessage",1))}}),a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0}},a.a.createElement(E.a,{title:Object(k.s)("$__clickToaccessSupportPage","*"),text:Object(k.s)("$__clickToaccessSupportPage"),color:Object(k.d)("menu"),icon:"help_outline",onClick:function(){window.open("https://support.machen.ai/","_blank")},size:"17px"}))))))),a.a.createElement(Cn,{xs:12,sm:12,md:6,lg:6,xl:6},a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("img",{src:Es.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(E.a,{title:Object(k.s)("$__hideSupportAndAppBanner","*"),text:Object(k.s)("$__hideSupportAndAppBanner"),color:Object(k.d)("menu"),icon:"close",onClick:function(){P()},size:"12px"})))))),W.length>0?a.a.createElement(kn,{style:{marginTop:"33px",marginBottom:"33px"}},a.a.createElement(Cn,{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(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginTop:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"}},Object(k.s)("$__favoritePlans"),W.length>3?a.a.createElement(E.a,{title:"".concat(Object(k.s)("$__viewAllFavorites","*")," (").concat(W.length,")"),text:"".concat(Object(k.s)("$__viewAllFavorites","*")," (").concat(W.length,")"),color:Object(k.d)("menu"),icon:"favorite",transparent:!0,onClick:function(){i.a.push("sp#tab/home")},size:"25px"}):a.a.createElement(a.a.Fragment,null)),a.a.createElement(kn,{style:{flexDirection:"row",overflowY:"auto",flexWrap:"nowrap",display:"-webkit-inline-box"}},W.sort((function(e,t){var r=n.cards[e].updated_at&&n.cards[e].updated_at.low?n.cards[e].updated_at.low:0,a=n.cards[t].updated_at&&n.cards[t].updated_at.low?n.cards[t].updated_at.low:0;return r>a?-1:r<a?1:0})).map((function(e,t){if(t<6)return a.a.createElement(Cn,{xs:12,sm:6,md:4,lg:3,xl:2,key:n.cards[e]._id,style:{marginTop:"33px",cursor:"pointer"},onClick:function(){i.a.push("sp#".concat(n.cards[e]._id,"/dashboard"))}},a.a.createElement(vn,{data:n.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(B,null,a.a.createElement(ws,null)),a.a.createElement(kn,{style:{paddingBottom:33,marginTop:33}},a.a.createElement(Cn,{xs:12,sm:12,md:6,lg:U.length>0?4:6,xl:U.length>0?4:6,style:{borderRight:"2px solid ".concat(Object(k.d)("menu"))},id:"view_dashboard_myDay"},a.a.createElement("div",{style:{padding:"0 16px",marginTop:15}},d?a.a.createElement("div",null,a.a.createElement("div",{style:{color:Object(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px",display:"flex",alignItems:"center"}},a.a.createElement(q.a,{onClick:function(){m(!1)}},a.a.createElement(le.a,{icon:"undo",color:Object(k.d)("menu"),title:Object(k.s)("$__backToMyDay")})),Object(k.s)("$__taskSuggestions")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},a.a.createElement(us,{options:w,onChange:function(e){j(e)}}),a.a.createElement("div",{style:{color:Object(k.d)("medium"),fontWeight:"bold",fontSize:"12px"},id:"view_dashboardSuggestionsAddButton"},"Clique no + para adicionar as tarefas ao seu dia.")),a.a.createElement("div",null,M)):a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{color:Object(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(k.s)("$__myDay"),M.length>0&&a.a.createElement("div",{style:(t={color:Object(k.d)("menu"),fontSize:"16px",marginTop:"7px",cursor:"pointer",textAlign:"left",padding:"7px"},Object(f.a)(t,"color","#f50057"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"alignItems","center"),t),onClick:function(){m(!0)},id:"view_dashboard_myDaySuggestionsOptions"},a.a.createElement(le.a,{icon:"info",color:Object(k.d)("medium"),style:{marginRight:"15px"}}),Object(k.s)("$__clickHereToCheckTaskSuggestions"))),a.a.createElement(kr,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))),a.a.createElement(Cn,{xs:12,sm:12,md:U.length>0?4:6,lg:U.length>0?4:6,xl:U.length>0?4:6,style:{borderRight:"2px solid ".concat(Object(k.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(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(k.s)("$__nextTasks")),a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(k.s)("$__orderBy".concat(v)),color:"lightgray",icon:"IniDate"===v?"today":"EndDate"===v?"event":"text_rotate_vertical",onClick:function(){"IniDate"===v&&y("EndDate"),"EndDate"===v&&y("name"),"name"===v&&y("IniDate")},size:"21px",style:{padding:"0px !important"}}))),a.a.createElement("div",null,Y))),U.length>0?a.a.createElement(Cn,{xs:12,sm:12,md:4,lg:4,xl:4,style:{borderRight:"2px solid ".concat(Object(k.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(k.d)("menu"),fontWeight:"bold",fontSize:"16px",marginBottom:"16px"}},Object(k.s)("$__myFavorites"))),a.a.createElement("div",null,V))):a.a.createElement(a.a.Fragment,null)))}))),Is=(r(1005),r(287)),Ts=r.n(Is);var Fs=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t=c.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(kn,null,t.GlobalData.strategicStatement?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__strategicStatement",1),icon:"history_edu",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__presidentMessage",1),icon:"account_box",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__vocation",1),icon:"spoke",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__history",1),icon:"menu_book",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__values",1),icon:"join_inner",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__legacy",1),icon:"subtitles",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{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(B,null,a.a.createElement(Cs,null)),a.a.createElement(kn,{style:{paddingBottom:33}},a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastNews","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Rl,{max:6,horizontal:!0})))),a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastAddRadar","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Tl,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastAddInsights","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllInsights"),color:"white",icon:Ts.a,transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Sl,{max:6,horizontal:!0,noPagination:!0}))))))})));var Ds=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t=c.a.getState(),r=t.session;t.db,a.a.useEffect((function(){return function(){}}),[]);var n=0;return r&&r.GlobalData&&(r.GlobalData.message&&(n+=1),r.GlobalData.history&&(n+=1),r.GlobalData.vocation&&(n+=1),r.GlobalData.legacy&&(n+=1)),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(kn,{style:{paddingBottom:33}},a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastAddInsights","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllInsights"),color:"white",icon:Ts.a,transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/insight-boards")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Sl,{max:6,horizontal:!0,noPagination:!0})))),a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastAddRadar","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllRadar"),color:"white",icon:"settings_input_antenna",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/radar")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Tl,{max:6,horizontal:!0,noPagination:!0}))))),n?a.a.createElement(kn,null,r.GlobalData.strategicStatement?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__strategicStatement",1),icon:"history_edu",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.strategicStatement}}))))):a.a.createElement(a.a.Fragment,null),r.GlobalData.message?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__presidentMessage",1),icon:"account_box",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.message}}))))):a.a.createElement(a.a.Fragment,null),r.GlobalData.vocation?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__vocation",1),icon:"spoke",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.vocation}}))))):a.a.createElement(a.a.Fragment,null),r.GlobalData.history?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__history",1),icon:"menu_book",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.history}}))))):a.a.createElement(a.a.Fragment,null),r.GlobalData.values?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__values",1),icon:"join_inner",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.values}}))))):a.a.createElement(a.a.Fragment,null),r.GlobalData.legacy?a.a.createElement(Cn,{md:6},a.a.createElement("div",{style:{height:"calc(100% - 33px)"}},a.a.createElement($i,{style:{height:"calc(100% - 33px)"}},a.a.createElement(mt,{title:Object(k.s)("$__legacy",1),icon:"subtitles",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{dangerouslySetInnerHTML:{__html:r.GlobalData.legacy}}))))):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),a.a.createElement(B,null,a.a.createElement(Cs,null)),a.a.createElement(kn,{style:{paddingBottom:33}},a.a.createElement(Cn,{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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center",justifyContent:"space-between",color:Object(k.d)("colorText"),padding:"0 15px"}},a.a.createElement("div",{style:{display:"flex"}},Object(k.s)("$__lastNews","*")),a.a.createElement(E.a,{title:Object(k.s)("$__save","*"),text:Object(k.s)("$__viewAllNews"),color:"white",icon:"feed",transparent:!0,onClick:function(){i.a.push("bright-and-connected#tab/allNews")},size:"25px"}))),a.a.createElement(B,null,a.a.createElement(Rl,{max:6,horizontal:!0}))))))}))),Ns=r(647),Ps=r.n(Ns);var As=function(e){var t=c.a.getState(),r=t.db,n=t.session,o=(r.dataType,e.data),i=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),l=a.a.useState(null),s=Object(h.a)(l,2),u=s[0],d=s[1],p=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]})).map((function(e){return c.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])&&_()(new Date(1e3*parseInt(e._users[o._id].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===i})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.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(vn,{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(k.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(k.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(k.d)("color"))},src:"".concat(o.image?o.image:Ps.a),onError:function(e){e.target.src="".concat(Ps.a)},onLoad:function(e){d("".concat(o.image?o.image:Ps.a))},width:"100%"}):a.a.createElement("div",{style:{width:"37px",height:"37px",top:"3px",left:"3px",borderRadius:"50%",border:"solid 2px ".concat(Object(k.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(k.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 $s(){$s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var zs=Object(s.b)((function(e){return{cards:e.db.cards,users:e.db.users}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t=c.a.getState().db,r=(t.dataType,t.users),n=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Object(k.j)();if(a.a.useEffect((function(){return l||(c.a.getState().session.cards.adminViewLoader||f(),s(!0)),function(){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.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 f=function(){var t=Object(p.a)($s().mark((function t(r){return $s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminView:!c.a.getState().session.cards.adminView})}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&c.a.getState().db.cards[e]._users&&Object.keys(c.a.getState().db.cards[e]._users).filter((function(t){return c.a.getState().db.cards[e]._users[t].myDay&&_()(new Date(1e3*parseInt(c.a.getState().db.cards[e]._users[t].myDay))).tz("America/Sao_Paulo").format("YYYY/MM/DD")===n})).length>0})).map((function(e){return c.a.getState().db.cards[e]}));console.log("----------------------------------------------",m.length);var g=Object.keys(r).filter((function(e){return!r[e].deleted&&"user"===r[e].type&&(!r[e]._parent||""===r[e]._parent)&&m.filter((function(t){return t._users&&t._users[e]&&t._users[e].myDay&&_()(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(kn,null,a.a.createElement(Cn,{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(k.d)("menu")}},Object(k.s)("$__dayTasks",1))),g.map((function(e){return a.a.createElement(Cn,{xs:12,sm:12,md:3,lg:3,xl:3,key:e._id,style:{marginBottom:"7px"}},a.a.createElement(As,{data:e}))}))))})));var Ms=Object(s.b)((function(e,t){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t,r=window.location.hash.split("/");return r[0]=r[0].replace("#",""),"47a4ecb1-5244-4fa5-abdd-83f6eaf3cd36"===(null===(t=c.a.getState().session)||void 0===t?void 0:t.account)?a.a.createElement(B,null,a.a.createElement(_l,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(B,null,a.a.createElement(Ds,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(B,null,a.a.createElement(zs,null))):a.a.createElement("div",null,a.a.createElement(_l,null),"tab"===r[0]&&"resume"===r[1]&&a.a.createElement(B,null,a.a.createElement(Fs,null)),"tab"===r[0]&&"dayTasks"===r[1]&&a.a.createElement(B,null,a.a.createElement(zs,null)))}))),Ys=function(){return{contentCenter:{position:"absolute",top:"50%",left:"50%",zIndex:"3",transform:"translate(-50%,-50%)",textAlign:"center",color:X.O,padding:"0 15px",width:"100%",maxWidth:"880px"},title:Object(d.a)(Object(d.a)({},X.H),{},{fontSize:"13.7em",color:X.O,letterSpacing:"14px",fontWeight:"700"}),subTitle:{fontSize:"2.25rem",marginTop:"0",marginBottom:"8px"},description:{fontSize:"1.125rem",marginTop:"0",marginBottom:"8px"}}},Bs=Object(R.a)(Ys);function Rs(){Rs=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Gs=Object(s.b)((function(e){return{showPrivate:e.controls.lockPrivate,history:e.db.history,unlockedPrivates:e.controls.unlockedPrivates}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(null),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState([]),y=Object(h.a)(v,2),x=(y[0],y[1]),_=a.a.useState(0),O=Object(h.a)(_,2),w=O[0],j=O[1],S=a.a.useState(10),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),D=F[0],N=(F[1],a.a.useState(A)),P=Object(h.a)(N,2),A=P[0],$=(P[1],a.a.useState([])),z=Object(h.a)($,2),M=z[0],Y=z[1],R=a.a.useState(0),G=Object(h.a)(R,2),H=G[0],W=G[1],U=a.a.useState("created_at"),V=Object(h.a)(U,2),q=V[0],X=V[1],J=a.a.useState(!0),K=Object(h.a)(J,2),Z=K[0],Q=K[1],ee=a.a.useState(""),te=Object(h.a)(ee,2),re=te[0],ne=te[1],ae=a.a.useState(!0),oe=Object(h.a)(ae,2),ie=oe[0],ce=oe[1],se=a.a.useState({}),ue=Object(h.a)(se,2),de=ue[0],pe=ue[1],fe=a.a.useState(""),he=Object(h.a)(fe,2),me=he[0],ge=he[1],be=a.a.useState({all:{name:Object(k.s)("$__all",1),icon:"inventory",open:!1,size:0,type:"all"},users:{name:Object(k.s)("$__users",1),open:!1,size:0,type:"user"},plans:{name:Object(k.s)("$__plans",1),open:!1,size:0,type:"plan"},myCards:{name:Object(k.s)("$__unlinkedCards",1),open:!1,size:0,type:"myTask"}}),ve=Object(h.a)(be,2),ye=(ve[0],ve[1],window.location.hash.split("/"));ye[0]=ye[0].replace("#","");var xe=null;ye[0]&&36===ye[0].length&&c.a.getState().db.cards[ye[0]]&&c.a.getState().db.cards[ye[0]]._users&&c.a.getState().db.cards[ye[0]]._users[n._id]&&(xe=ye[0]),a.a.useEffect((function(){return _e({id:xe}),li(),function(){Y([]),pe({}),ce(!0)}}),[]),a.a.useEffect((function(){g&&Oe({id:g})}),[g]),a.a.useEffect((function(){j(0),ce(!0),x([]),l||s(!0);var e=setTimeout((function(){M&&Oe({id:xe})}),1e3);return function(){return clearTimeout(e)}}),[re]),a.a.useEffect((function(){Oe({id:xe})}),[D,w,C,q,Z]);var _e=function(){var e=Object(p.a)(Rs().mark((function e(t,r){var n,a;return Rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,li({ids:t&&t.id?[t.id]:[],childrens:!1,type:t.type?t.type:null});case 2:(n=e.sent)&&(a=r||de,xe&&(a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},xe,{name:c.a.getState().db.cards[xe].name,parent:c.a.getState().db.cards[xe]._parent,private:null,type:"plan",_id:xe,open:!0}))),n.map((function(e){a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e._id,Object(d.a)(Object(d.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)}}(),Oe=function(){var e=Object(p.a)(Rs().mark((function e(t){var r;return Rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,si({ids:t&&t.id?[t.id]:[],type:t&&t.type||"cards",limit:C,skip:w*C,asc:!Z,orderBy:q||"created_at",search:re});case 2:(r=e.sent)&&(W(r&&r[0]&&r[0].total?parseInt(r[0].total):0),Y(r),ce(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=[],je=function(e){var t=q,r=Z;q===e?r=!Z:t=e,X(t),Q(r)},Ee=function(){var e=Object(p.a)(Rs().mark((function e(t){var r,n,a,o,i,c,l=arguments;return Rs().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(d.a)(Object(d.a)({},c),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c[a]),{},{open:r,loading:!0}))),0===Object.keys(de).filter((function(e){return de[e].parent===a})).length?_e({id:a,type:i},c):pe(c);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=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&&c.a.getState().controls.lockPrivate)&&(Ee({id:n},!de[n]||!de[n].open),b(n)),e.preventDefault(),e.stopPropagation()}},a.a.createElement(mt,{private:!(!t.private||c.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(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r}))},moreButton:!0,title:t.name,tooltipText:"".concat(t.private&&!c.a.getState().controls.lockPrivate?Object(k.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?Se(n):a.a.createElement(a.a.Fragment,null))},Se=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 ke(de[e],e)})):a.a.createElement(a.a.Fragment,null))};return a.a.createElement(B,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(Ce,{label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:re,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.d)("color")},"search")),onChange:function(e){ne(e.target.value)},onKeyDown:function(e){}}}),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:"created_at"===q&&Z?Object(k.s)("$__mostRecent",1):Object(k.s)("$__olderFirst",1),color:"created_at"===q?Object(k.d)("color"):"gray",icon:"calendar_month",onClick:function(){je("created_at")},size:"25px"}),"created_at"===q&&a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},Z?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(le.a,{size:"15px",color:Object(k.d)("menu"),style:{marginLeft:"-3px"}},Z?"south":"north"))),a.a.createElement("div",{style:{position:"relative",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"sideModule_saveButton",title:"name"===q&&Z?Object(k.s)("$__nameDesc",1):Object(k.s)("$__nameAsc",1),color:"name"===q?Object(k.d)("color"):"gray",icon:"sort_by_alpha",onClick:function(){je("name")},size:"25px"}),"name"===q&&a.a.createElement("div",{style:Object(d.a)(Object(d.a)({position:"absolute"},Z?{bottom:0}:{top:0}),{},{right:-5})},a.a.createElement(le.a,{size:"15px",color:Object(k.d)("menu"),style:{marginLeft:"-3px"}},Z?"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(mt,{title:Object(k.s)("$__folders",1),icon:"folder",fontSize:"20px",color:Object(k.d)("menu")}),a.a.createElement(Ce,{label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:me,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.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((!ye[0]||ye[0]&&36!==ye[0].length)&&!de[e].parent||ye&&ye[0]&&36===ye[0].length&&de[e]._id===ye[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 ke(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(mt,{title:Object(k.s)("$__files",1),icon:"cloud",fontSize:"20px",color:Object(k.d)("menu")})),a.a.createElement("div",{style:{position:"relative",float:"right",display:"flex",alignItems:"center",marginTop:-10}},Object(k.s)("$__page")," ",w+1," ",Object(k.s)("$__of")," ",Math.ceil(H/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.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(k.s)("$__filesPerPage")})))),ie?a.a.createElement(Tr,null):M&&M.length>0?M.map((function(t,r){we.push(t.data);var o=Object(d.a)(Object(d.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(yi,{data:o,openLightBox:function(){return function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:we,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(k.s)("$__page")," ",w+1," ",Object(k.s)("$__of")," ",Math.ceil(H/C),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.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(k.s)("$__filesPerPage")}))):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{style:{clear:"both"}}))))})),Hs=r(803),Ws=r.n(Hs),Us=(r(1636),r(1113)),Vs=r.n(Us),qs=r(1849),Xs=r(1881),Js=r(1850),Ks=r(1846),Zs={disabled:{"&:before":{borderColor:"transparent !important"}},underline:{"&:hover:not($disabled):before,&:before":{borderColor:X.q[4]+"!important",borderWidth:"1px !important"},"&:after":{borderColor:X.z[0]},"& + p":{fontWeight:"300"}},underlineError:{"&:after":{borderColor:X.j[0]}},underlineSuccess:{"&:after":{borderColor:X.G[0]}},labelRoot:Object(d.a)(Object(d.a)({},X.l),{},{color:X.q[3]+" !important",fontWeight:"400",fontSize:"12px",lineHeight:"1.42857",top:"10px",letterSpacing:"unset","& + $underline":{marginTop:"0px"}}),labelRootError:{color:X.j[0]+" !important"},labelRootSuccess:{color:X.G[0]+" !important"},formControl:{margin:"0 0 16px 0",paddingTop:"27px",position:"relative",verticalAlign:"unset","& svg,& .fab,& .far,& .fal,& .fas,& .material-icons":{color:X.q[14]}},whiteUnderline:{"&:hover:not($disabled):before,&:before":{backgroundColor:X.O},"&:after":{backgroundColor:X.O}},input:{color:X.q[14],height:"unset","&,&::placeholder":{fontSize:"12px",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:"400",lineHeight:"1.42857",opacity:"1"},"&::placeholder":{color:X.q[3]}},whiteInput:{"&,&::placeholder":{color:X.O,opacity:"1"}}},Qs=Object(R.a)(Zs);function eu(e){var t,r,n,o,i,c=Qs(),l=e.formControlProps,s=e.labelText,u=e.id,d=e.labelProps,p=e.inputProps,h=e.error,m=e.white,g=e.inputRootCustomClasses,b=e.success,v=e.helperText,x=y()((t={},Object(f.a)(t," "+c.labelRootError,h),Object(f.a)(t," "+c.labelRootSuccess,b&&!h),t)),_=y()((r={},Object(f.a)(r,c.underlineError,h),Object(f.a)(r,c.underlineSuccess,b&&!h),Object(f.a)(r,c.underline,!0),Object(f.a)(r,c.whiteUnderline,m),r)),O=y()(Object(f.a)({},g,void 0!==g)),w=y()((n={},Object(f.a)(n,c.input,!0),Object(f.a)(n,c.whiteInput,m),n));i=void 0!==l?y()(l.className,c.formControl):c.formControl;var j=y()((o={},Object(f.a)(o,c.labelRootError,h),Object(f.a)(o,c.labelRootSuccess,b&&!h),o));return a.a.createElement(qs.a,Object.assign({},l,{className:i}),void 0!==s?a.a.createElement(Xs.a,Object.assign({className:c.labelRoot+" "+x,htmlFor:u},d),s):null,a.a.createElement(Ks.a,Object.assign({classes:{input:w,root:O,disabled:c.disabled,underline:_},id:u},p)),void 0!==v?a.a.createElement(Js.a,{id:u+"-text",className:j},v):null)}function tu(){tu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var ru="".concat(String("CHEexohmzAHNEotLM0O.WzoOsvjRwlKh/sKKI2AFWaeL7zo4hC")),nu=Object(R.a)(Zc);var au=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({email:null,password:null}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(h.a)(i,2),l=c[0],s=c[1],u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(null),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=O[0],j=O[1],E=nu(),S=function(){var t=Object(p.a)(tu().mark((function t(){var r,a,o,i;return tu().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(k.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(k.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(k.s)("$__alertLoginEmptyPassword",1))}),t.next=33;break;case 12:return j(!0),t.next=15,Ws.a.hash(String(n.password),10);case 15:return r=t.sent,t.next=18,Ws.a.hash(String(n.password),10);case 18:if(a=t.sent,!(o=Object(fe.encode)("".concat(a,"//").concat(ru)))){t.next=32;break}return t.prev=21,t.next=24,kt.a.post("/Login",Object(fe.encode)(Object(fe.encode)(JSON.stringify({lp:o,login:n.email,password:Object(fe.encode)("".concat(r,"///").concat(Object(fe.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(k.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(k.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(p.a)(tu().mark((function t(){var r;return tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j(!0),l&&(!l||6===l.length)){t.next=5;break}Object(k.c)({message:Object(k.s)("$__invalidToken",1),variant:"warning",persist:!1,horizontal:"right"}),t.next=10;break;case 5:return t.next=7,kt.a.post("/M_User_TwoFactor",{action:"verify",code:l,token:y});case 7:(r=t.sent)&&r.data&&r.data.result?(localStorage.setItem("TOKEN",y),e.callback&&e.callback({fn:"login",token:y})):Object(k.c)({message:Object(k.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(p.a)(tu().mark((function t(r){var n;return tu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}e.callback({fn:"alert",message:Object(k.s)("$__loginAlertRecoveryEmailEmpty")}),t.next=14;break;case 4:return t.prev=4,t.next=7,kt.a.get("/M_User_RecoveryPass/?email=".concat(r));case 7:(n=t.sent)&&n.data?e.callback({fn:"alert",message:Object(k.s)("$__loginAlertRecoveryEmailSended")}):e.callback({fn:"alert",message:Object(k.s)("$__loginAlertRecoveryInvalidEmail")}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),e.callback({fn:"alert",message:Object(k.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(kn,{style:{display:"flex",justifyContent:"center"}},a.a.createElement(Cn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement($i,{db:"cards",login:!0},a.a.createElement(Wi,{className:"".concat(E.cardHeader," ").concat(E.textCenter),color:"primary",style:{background:Object(k.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(k.s)("$__login"))),a.a.createElement(Bi,null,m?a.a.createElement(a.a.Fragment,null,a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__token",1)),a.a.createElement(Ce,{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(Et.a,{position:"end"},a.a.createElement(Pa.a,{className:E.inputAdornmentIcon},"pin")),type:"number",autoComplete:!1},autoComplete:"new-password"}))):a.a.createElement(a.a.Fragment,null,a.a.createElement(eu,{labelText:Object(k.s)("$__email"),id:"email",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},{email:e.target.value}))},onLoad:function(e){o(Object(d.a)(Object(d.a)({},n),{},{email:e.target.value}))},endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(Vs.a,{className:E.inputAdornmentIcon}))}}),a.a.createElement(eu,{labelText:Object(k.s)("$__password"),id:"password",formControlProps:{fullWidth:!0},inputProps:{onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},{password:e.target.value}))},onLoad:function(e){o(Object(d.a)(Object(d.a)({},n),{},{password:e.target.value}))},onKeyDown:function(e){13===e.keyCode&&S()},endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(Pa.a,{className:E.inputAdornmentIcon},"lock_outline")),type:"password",autoComplete:"off"}}),a.a.createElement(Be,{icon:"lock",text:Object(k.s)("$__recoveryPass","*"),reverse:!0,style:{float:"right"},onClick:function(){C(n.email)}}))),a.a.createElement(Kc,{className:E.justifyContentCenter},m?a.a.createElement(Q,{style:{backgroundColor:w?"gray":"#c0b283",color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return L()}},Object(k.s)("$__validateTokenAndSigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(Tr,null)):a.a.createElement(a.a.Fragment,null)):a.a.createElement(Q,{style:{backgroundColor:w?"gray":Object(k.d)("menu"),color:"#FFFFFF"},simple:!0,size:"lg",block:!0,onClick:function(){return S()}},Object(k.s)("$__sigin"),w?a.a.createElement("div",{style:{position:"absolute",bottom:0,left:0,right:0}},a.a.createElement(Tr,null)):a.a.createElement(a.a.Fragment,null)))))))})),ou=Object(R.a)(Ys);var iu=Object(R.a)(Ys);var cu,lu={container:{borderRadius:"2px",marginRight:"7px",marginLeft:"7px",marginBottom:"15px",height:"min-content",width:"100%"},title:Object(d.a)(Object(d.a)({},X.l),{},{padding:"3px 0px",width:"100%",margin:"0px",background:Object(k.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(k.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(k.d)("light")),borderRadius:"2px",display:"block",backgroundColor:"#FFFFFF",boxShadow:"0px 0px 10px rgba(0,0,0,0.1)",overflow:"hidden",padding:"3px"}};var su,uu=w.default.div(cu||(cu=Object(u.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                ")})),du=Object(s.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(I.b)(C,e)}))(Object(me.a)(lu)(Object(n.memo)((function(e){var t=c.a.getState(),r=t.session,o=(t.db,b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),i=e.searchs&&e.searchs[o]?e.searchs[o]:null,l=Object(n.useRef)({}),s=Object(n.useRef)({}),u=Object(n.useRef)({}),p=Object(n.useRef)({});a.a.useEffect((function(){e.groupByColor||(p.current={})}),[e.groupByColor,e.cards]);var h=window.location.hash.split("/");h[0]=h[0].replace("#",""),36!==h[0].length&&(h[0]=null);var m=e.cards;i&&(m=Object(yt.r)(m,i));var g=String(r.dashboard.period).replace("$__last","");g=g.replace("Days","");var v=_()(new Date).tz("America/Sao_Paulo").subtract(parseInt(g),"d").format("YYYY-MM-DDT00:00"),y=_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(m=m.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=y&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=v||e.completed_at&&!e.completed_at.low&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=y&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=v)||"completed"!==e.status&&e.updated_at&&(e.updated_at.low&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=y&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=v||e.updated_at&&!e.updated_at.low&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=y&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=v))return!0})).map((function(e){return e}))),e.showDeleted||c.a.getState().controls.deleted||(m=m.filter((function(e){return!e.deleted})).map((function(e){return e})));var x=function e(t){var r=c.a.getState().db.cards[t]&&c.a.getState().db.cards[t].name?c.a.getState().db.cards[t].name.trim().toLowerCase():"";return c.a.getState().db.cards[t]&&"plan"!==c.a.getState().db.cards[t].type&&c.a.getState().db.cards[t]._parent&&(r="".concat(e(c.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(x(t._parent),"-").concat(o),i="".concat(x(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 O=Object(k.s)(e.column.name,1),w=null,j={};c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].customColumns&&(j=JSON.parse(c.a.getState().db.cards[h[0]].customColumns)),j&&j[e.column.name.replace("$__","")]&&j[e.column.name.replace("$__","")].name&&(O=Object(k.s)(j[e.column.name.replace("$__","")].name,1)),j&&j[e.column.name.replace("$__","")]&&j[e.column.name.replace("$__","")].icon&&(w=Object(k.s)(j[e.column.name.replace("$__","")].icon,1));var E=[];function S(t){var r=t.index,n=t.style,o=m[r],i="",l="";if(e.groupByColor&&h.indexOf("overview")>-1){var s=Object(yt.s)(o);-1===E.indexOf(s.parentId)&&c.a.getState().db.cards[s.parentId]&&"plan"!==c.a.getState().db.cards[s.parentId].type&&(i=c.a.getState().db.cards[s.parentId].name,l=s.color,E.push(s.parentId),p.current=Object(d.a)(Object(d.a)({},p.current),{},Object(f.a)({},o._id,{title:c.a.getState().db.cards[s.parentId].name,color:s.color||"#FFFFFF"})))}return a.a.createElement(a.a.Fragment,null,a.a.createElement(cr.b,{draggableId:o._id,index:r,key:o._id,isDragDisable:e.isDragDisable||!1},(function(t,c){var s;return a.a.createElement("div",{style:n},e.groupByColor&&p.current[o._id]&&h.indexOf("overview")>-1?a.a.createElement("div",{style:{width:"100%",padding:3,color:"gray",marginTop:17,borderBottom:"solid 3px ".concat((null===(s=p.current[o._id])||void 0===s?void 0:s.color)||"")}},p.current[o._id].title):a.a.createElement(a.a.Fragment,null),a.a.createElement(L,{separator:e.groupByColor&&h.indexOf("overview")>-1&&i?{title:i,color:l}:null,provided:t,isDragging:null===c||void 0===c?void 0:c.isDragging,index:r,snapshot:c,clone:"CL"}))})))}function L(t){var r,n=t.provided,o=t.index,i=t.snapshot,c=(t.clone,m[o]);return a.a.createElement("div",Object.assign({},n.draggableProps,n.dragHandleProps,{ref:n.innerRef}),a.a.createElement(vn,{separator:e.groupByColor&&h.indexOf("overview")>-1&&(null===p||void 0===p||null===(r=p.current[c._id])||void 0===r?void 0:r.title)?null===p||void 0===p?void 0:p.current[c._id]:null,data:c,db:e.db,showOrder:e.showOrder||!1,showSelected:e.showSelected||!1,locked:e.locked||!1,viewButton:e.viewButton||!1,showConnectedIn:!!e.showConnectedIn,isDragging:i.isDragging&&!i.isDropAnimating,snapshot:i,cardColorPicker:!!e.cardColorPicker,manualExpanded:(null===u||void 0===u?void 0:u.current[c._id])||!1,onResize:function(e){!function(e,t){var r;(null===l||void 0===l||null===(r=l.current)||void 0===r?void 0:r.resetAfterIndex)&&l.current.resetAfterIndex(0);s.current=Object(d.a)(Object(d.a)({},s.current),{},Object(f.a)({},e,t))}(c._id,e)},onExpand:function(e){(!u.current[c._id]&&e||"false"===String(e)&&u.current[c._id])&&function(e,t){var r;(null===l||void 0===l||null===(r=l.current)||void 0===r?void 0:r.resetAfterIndex)&&l.current.resetAfterIndex(0);u.current=Object(d.a)(Object(d.a)({},u.current),{},Object(f.a)({},e,t))}(c._id,e)}}))}function C(e){var t=m[e];return s.current[t._id]+7||67}return a.a.createElement(cr.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(t){return a.a.createElement(uu,Object.assign({},!e.isDropDisabled&&t.draggableProps,e,{ref:t.innerRef}),a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{style:{display:"none"}})),a.a.createElement("div",!e.isDropDisabled&&t.dragHandleProps,a.a.createElement(ua,Object.assign({title:O,icon:w||e.column.icon||"topic",color:Object(k.d)("menu"),style:{padding:"7px"}},h.length>0&&h[1]&&"overview"===h[1]&&c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].planType&&"flow"===c.a.getState().db.cards[h[0]].planType&&c.a.getState().db.cards[h[0]]._users&&c.a.getState().db.cards[h[0]]._users[r._id]&&c.a.getState().db.cards[h[0]]._users[r._id].access&&parseInt(c.a.getState().db.cards[h[0]]._users[r._id].access)>3?{permitIcon:!0,editable:!0,onEdit:function(t){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:h[0]}}),{customColumns:JSON.stringify(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[h[0]]&&c.a.getState().db.cards[h[0]].customColumns?JSON.parse(c.a.getState().db.cards[h[0]].customColumns):{}),{},Object(f.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(k.s)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(k.d)("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),a.a.createElement(cr.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(L,{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(ba.a,{style:{width:"100%",height:"100%"}},(function(e){var r=e.height,n=e.width;return a.a.createElement(ga.b,{className:"List",height:r,width:n,ref:l,itemCount:m.length,itemSize:C,outerRef:t.innerRef,itemData:m,style:{height:"100%"}},S)})))})),a.a.createElement("div",{id:"Agilev2_Column_552",style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Be,{text:Object(k.s)("$__add","*"),icon:"add_box",iconColor:Object(k.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:h[0]?h[0]:null,rows:m.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})))}))}))));function pu(){pu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var fu=w.default.div(su||(su=Object(u.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                ")})),hu=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(p.a)(pu().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v;return pu().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=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,p=o.droppableId,h=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!==p||c.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,l),m.map((function(e,t){s[e]=Object(d.a)(Object(d.a)({},s[e]),{},{order:{low:t}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:h.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===p})).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,l),h.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),b.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),v=Object(d.a)(Object(d.a)({},t),{},{cards:Object(d.a)(Object(d.a)({},t.cards),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},t.cards[l]),{},{status:p,completed_at:"completed"===p?{low:_()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:_()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:h});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(p.a)(pu().mark((function e(t){return pu().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(p.a)(pu().mark((function e(t){return pu().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(cr.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(cr.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(fu,Object.assign({},e,{ref:t.innerRef}),c.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(du,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(d.a)(Object(d.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(d.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 mu=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString()),l=Object(h.a)(i,2),s=l[0],u=l[1],p=a.a.useRef();return a.a.useEffect((function(){u(e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString())}),[e.nodeId]),a.a.useEffect((function(){e.defaultValues&&e.reduxFunction("ASYNC","SET_SEARCH",Object(d.a)(Object(d.a)({},c.a.getState().searchs),{},Object(f.a)({},s,Object(d.a)(Object(d.a)({},e.defaultValues||{}),c.a.getState().searchs[s]||{})))),o(Object(d.a)(Object(d.a)({},e.defaultValues||{}),c.a.getState().searchs[s]||{}))}),[s]),a.a.createElement("div",{style:Object(d.a)({zIndex:"100 !important"},e.style?e.style:{})},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ss,{text:Object(k.s)("$__filter"),icon:"filter_alt",popper:a.a.createElement("div",{style:{padding:"15px",zIndex:1},ref:p,id:"cal-menufilter"},a.a.createElement(Nc,Object.assign({},e,{onChange:function(t){o(t),e.onChange&&e.onChange(t)}})))}),e.showFilters?a.a.createElement("div",{style:{padding:"3px 15px",display:"flex",cursor:"pointer"}},n.text&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__text"),": ",a.a.createElement("span",{style:{color:Object(k.d)("darkText")}},n.text)),n.startDate&&n.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"}},_()(1e3*n.startDate).format("YYYY-MM-DD  HH:MM:ss")),a.a.createElement(le.a,{size:"22px",color:Object(k.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"}},_()(1e3*n.endDate).format("YYYY-MM-DD  HH:MM:ss")),a.a.createElement(le.a,{size:"22px",color:Object(k.d)("color"),icon:"today",onClick:e.onClick}))),n.users&&n.users.length>0?a.a.createElement("div",{style:{display:"flex",fontSize:11,width:150}},a.a.createElement(Qt,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!1,data:c.a.getState().db.cards[s],noLimit:!0,multiple:!0,selected:n.users,transparent:!0})):a.a.createElement(a.a.Fragment,null),n.tags&&a.a.createElement("div",{style:{display:"flex",fontSize:11}},n.tags.map((function(e,t){return a.a.createElement("div",{key:e.value,className:"tag",style:{backgroundColor:e.color||"lightgray",color:e.color?Object(k.r)(e.color,!0):"#FFFFFF",display:"flex",alignItems:"center",padding:"3px 7px",borderRadius:"7px",marginLeft:5,whiteSpace:"nowrap",height:"fit-content"}},e.parent&&c.a.getState().db.tag.filter((function(t){return t.value===e.parent})).length>0?a.a.createElement("div",{style:{fontSize:8,marginRight:3}},c.a.getState().db.tag.filter((function(t){return t.value===e.parent}))[0].label," / "):a.a.createElement(a.a.Fragment,null),e.label)}))),n.status&&!n.status.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__status"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(n.status).map((function(e,t){if(n.status[e])return a.a.createElement(Ne.a,{title:Object(k.s)(c.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:c.a.getState().db.status.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),n.priority&&!n.priority.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__priority"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(n.priority).map((function(e,t){if(n.priority[e]&&c.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0)return a.a.createElement(Ne.a,{title:Object(k.s)(c.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:c.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),n.risk&&!n.risk.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__risk"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(n.risk).map((function(e,t){if(n.risk[e]&&c.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0)return a.a.createElement(Ne.a,{title:Object(k.s)(c.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:c.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),n.complexity&&!n.complexity.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__complexity"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(n.complexity).map((function(e,t){if(n.complexity[e]&&c.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0)return a.a.createElement(Ne.a,{title:Object(k.s)(c.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:c.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))})))),n.impact&&!n.impact.all&&a.a.createElement("div",{style:{color:"gray",padding:"0px 15px",borderRight:"solid 1px gray",display:"flex",alignItems:"center"}},Object(k.s)("$__impact"),": ",a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object.keys(n.impact).map((function(e,t){if(n.impact[e]&&c.a.getState().db.priority.filter((function(t){return e&&t&&t.value===e})).length>0)return a.a.createElement(Ne.a,{title:Object(k.s)(c.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:c.a.getState().db.priority.filter((function(t){return t.value===e}))[0].color,margin:"7px 3px"}}))}))))):a.a.createElement(a.a.Fragment,null)))}));var gu=Object(s.b)((function(e){return{history:e.db.history,cards:e.db.cards,viewList:e.db.viewList,agileOrderBy:e.controls.agileOrderBy,agileOrderDesc:e.controls.agileOrderDesc,searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.searchs,l=r.dataType,s=a.a.useState(["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal","link","insight"]),u=Object(h.a)(s,2),p=u[0],f=u[1],m=a.a.useState(!1),g=Object(h.a)(m,2),v=g[0],y=g[1],x=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),O=window.location.hash.split("/");O[0]=O[0].replace("#","");var w=e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();if(o[w],a.a.useEffect((function(){v||y(!0)}),[r.cards,o,r.users]),window.location.hash.split("/")[0].replace("#","")||i.a.push("t#tab/myTasks"),!r.cards)return null;var j=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&&l.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 j=c.a.getState().session.cards.adminView?j.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})):j.filter((function(e){if(e._users&&Object.keys(e._users).filter((function(e){return e===n._id})).length>0)return!0})),p&&p.length>0&&(j=j.filter((function(e){return-1===p.indexOf(e.type)}))),"tab"===O[0]&&"unreaded"===O[1]&&(j=j.filter((function(e){if(Object(yt.k)(e._id).total>0)return!0})),"unreaded"),"tab"===O[0]&&"myDay"===O[1]&&(j=j.filter((function(e){return e._users&&e._users[n._id]&&e._users[n._id].myDay&&_()(new Date(1e3*e._users[n._id].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===x})).map((function(e){return e})),"myDay"),"tab"===O[0]&&"ourDay"===O[1]&&(j=j.filter((function(e){return!(!e||!e._users)&&Object.keys(e._users).filter((function(t){return t&&e._users[t]&&e._users[t].myDay&&_()(new Date(1e3*e._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===x})).length>0})).map((function(e){return e})),"ourDay"),"tab"===O[0]&&"private"===O[1]&&(j=j.filter((function(e){return e.private})).map((function(e){return e})),"nextTasks"),"tab"===O[0]&&"nextTasks"===O[1]&&(j=j.filter((function(e){return e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(x)).add(10,"days").format("YYYY-MM-DD")||e.startDate&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")>=_()().format("YYYY-MM-DD")&&_()(new Date(1e3*e.startDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<=_()(new Date(x)).add(10,"days").format("YYYY-MM-DD")})).map((function(e){return e})),"nextTasks"),"tab"===O[0]&&"lateTasks"===O[1]&&(j=j.filter((function(e){return e.endDate&&_()(new Date(1e3*e.endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(x)).tz("America/Sao_Paulo").format()&&"completed"!==e.status})).map((function(e){return e})),"lateTasks"),"tab"===O[0]&&"unlinkedCards"===O[1]&&(j=j.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(us,{options:p,onChange:function(e){f(e)}}),a.a.createElement(mu,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0,nodeId:w,style:{marginLeft:7}})),a.a.createElement(ua,{title:null,icon:null,color:Object(k.d)("menu"),style:{background:"transparent",padding:"7px"},customButtons:[{title:"$__orderByStartDate",icon:"today",color:"startDate"===e.agileOrderBy?Object(k.d)("color"):Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{agileOrderBy:"startDate"}))}},{title:"$__orderByEndDate",icon:"event",color:"endDate"===e.agileOrderBy?Object(k.d)("color"):Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{agileOrderBy:"endDate"}))}},{title:"$__orderByName",icon:"sort",color:"name"===e.agileOrderBy?Object(k.d)("color"):Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{agileOrderBy:"name"}))}},{title:"DESC"===e.agileOrderDesc?"$__asc":"$__desc",icon:"DESC"===e.agileOrderDesc?"text_rotation_down":"text_rotate_up",color:Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{agileOrderDesc:"DESC"===e.agileOrderDesc?"ASC":"DESC"}))}}]})),a.a.createElement("div",null,a.a.createElement(_l,null)),a.a.createElement("div",{style:{position:"relative",minHeight:"calc(100vh - 150px)",marginTop:"7px",width:"100%",overflowX:"auto",overflowY:"hidden"}},a.a.createElement(hu,{cards:j,inLine:r.viewList,showConnectedIn:!0,columnStyle:Object(d.a)({},r.viewList?{width:"100%"}:{maxHeight:"calc(100vh - 190px)",width:"25%"})}),a.a.createElement("div",{style:{clear:"both"}})))}));var bu=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(dl)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2);return r[0],r[1],a.a.createElement("div",{style:{width:"100%"}},"Resume")})));var vu=function(e){var t=Fi.a.ExcelFile,r=Fi.a.ExcelFile.ExcelSheet,n=Fi.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(_()().tz("America/Sao_Paulo").format("YYYY-MM-DDTHHMM"),"_").concat(Object(k.s)("$__companies"),"_").concat(Object(k.s)("$__users")),element:a.a.createElement(E.a,{title:Object(k.s)("$__export"),text:Object(k.s)("$__export"),icon:"file_download",size:"25px"})},a.a.createElement(r,{data:o.sort((function(e,t){return e.name<t.name})),name:Object(k.s)("$__accounts")},a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__company",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__signaturePlan",1)),value:"plan"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__activeUsersCount",1)),value:"usersCount"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.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(k.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.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(k.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.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(k.s)("$__id",1)),value:"id"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__name",1)),value:"name"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__unity",1)),value:"unity"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__email",1)),value:"email"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__createdAt",1)),value:"created_at"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__lastSessionDate",1)),value:"lastSession"}),a.a.createElement(n,{width:350,style:{alignment:{wrapText:!0}},label:"".concat(Object(k.s)("$__removed",1)),value:"deleted"}))})))};function yu(){yu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var xu=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(dl)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState([]),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState(null),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState("name"),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!0),w=Object(h.a)(O,2),j=w[0],S=w[1],L=c.a.getState().db.plans;a.a.useEffect((function(){C()}),[]);var C=function(){var e=Object(p.a)(yu().mark((function e(){var t,r;return yu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kt.a.post("Adm_ReqAccounts");case 2:t=e.sent,r=[],t&&(t.data.map((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})).map((function(e){t+=parseInt(e.filesSize)})),t>0&&(t=Object(k.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=ma()(1e3*e.created_at).format("DD/MM/YYYY HH:mm:ss"),e.lastSession=e.lastSession?ma()(1e3*e.lastSession).format("DD/MM/YYYY HH:mm:ss"):""})),r.push(Object(d.a)(Object(d.a)({id:e.id},e.account),{},{created_at:ma()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(k.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(d.a)(Object(d.a)({id:e.id},e.account),{},{created_at:ma()(1e3*n).format("DD/MM/YYYY HH:mm:ss"),plan:Object(k.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?S((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(k.i)(n)),a.a.createElement("div",null,a.a.createElement("div",{style:Object(d.a)(Object(d.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})).map((function(e){i+=parseInt(e.filesSize)})),i>0&&(i=Object(k.i)(i)),a.a.createElement("div",{style:Object(d.a)({position:"relative",width:"100%",padding:7,marginBottom:3},t.account.deleted?Object(d.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(d.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(k.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(k.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(E.a,{transparent:!0,title:Object(k.s)("$__showUsers","*"),color:Object(k.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(k.s)("$__users"),a.a.createElement(E.a,{transparent:!0,title:Object(k.s)("$__hide","*"),color:Object(k.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(k.d)("menu"),fontSize:"11px"}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"},onClick:function(){I("id")}},"#",Object(k.s)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("name")}},Object(k.s)("$__name")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"},onClick:function(){I("email")}},Object(k.s)("$__email")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("createdAt")}},Object(k.s)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"150px"},onClick:function(){I("lastSession")}},Object(k.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(vu,{data:s}),a.a.createElement("div",{style:{border:"solid 1px #f6f6f6",width:"100%",padding:3,overflowY:"auto",display:"flex",fontWeight:"bold",color:Object(k.d)("menu")}},a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},"#",Object(k.s)("$__id")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"300px"}},Object(k.s)("$__company")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(k.s)("$__createdDate")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"200px"}},Object(k.s)("$__plan")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(k.s)("$__users")),a.a.createElement("div",{style:{position:"relative",float:"left",width:"100px"}},Object(k.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 _u(){_u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ou=Object(s.b)((function(e){return{store:{languages:e.languages}}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(dl)((function(e){var t=e.classes,r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=c.a.getState().functions.socket,s=a.a.useState(!1),u=Object(h.a)(s,2),d=u[0],f=u[1],m=a.a.useState(0),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(25),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(""),j=Object(h.a)(w,2),E=j[0],S=j[1];a.a.useEffect((function(){i(c.a.getState().languages)}),[JSON.stringify(c.a.getState().languages)]);var L=function(){var e=Object(p.a)(_u().mark((function e(t,r,n,a){return _u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?l.emit("language.UPD",{alias:r,locale:n,text:a}):l.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(k.s)("$__page")," ",b+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(o).length/_),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.a,{component:"div",count:Object.keys(o).length,page:b,onChangePage:function(e,t){v(t)},rowsPerPage:_,onChangeRowsPerPage:function(e){O(parseInt(e.target.value,10))},labelRowsPerPage:Object(k.s)("$__aliasPerPage")}))),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Ce,{label:Object(k.s)("$__search",1),variant:Object(k.d)("fieldVariant"),value:E,onChange:function(e){S(e.target.value)}}),a.a.createElement(Be,{text:d?Object(k.s)("$__all","*"):Object(k.s)("$__onlyEmpty","*"),icon:d?"subtitles_off":"subtitles",iconColor:Object(k.d)("medium"),onClick:function(){f(!d)}})),a.a.createElement(tt.a,{className:t.root},a.a.createElement("div",{className:t.header},a.a.createElement("div",{className:t.column},Object(k.s)("$__alias",1)),a.a.createElement("div",{className:t.column},Object(k.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(ua,{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(k.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(ua,{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(k.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0})),a.a.createElement("fieldset",{style:{marginBottom:15}},a.a.createElement("legend",null,"Espanhol"),a.a.createElement(ua,{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(k.d)("menu"),noAutoFocus:!0,multiline:!0,noCancel:!0}))))}))))))})));var wu=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Os)((function(e){var t=c.a.getState().session,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=a.a.useState(null),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(null),u=Object(h.a)(s,2),d=u[0],p=u[1];return t._access.master?(window.location.hash.split("/")[0].replace("#",""),a.a.createElement("div",null,!r[0]&&a.a.createElement(bu,null),"tab"===r[0]&&"accounts"===r[1]&&a.a.createElement(xu,null),"tab"===r[0]&&"languages"===r[1]&&a.a.createElement(Ou,null),"tab"===r[0]&&"tests"===r[1]&&a.a.createElement("div",{style:{width:"300px"}},a.a.createElement(no,{type:"datetime",onChangeStartDate:function(e){console.log(_()(e).format("YYYY-MM-DD 23:59:59").unix("X")),l(_()(e).unix("X"))},onChangeEndDate:function(e){p(_()(e).unix("X"))},range:!0,startDate:i?new Date(1e3*i):null,endDate:d?new Date(1e3*d):null,onClear:function(){l(null),p(null)}})))):a.a.createElement("div",null,"ACCESS DENIED")}))),ju={badge:{borderRadius:"12px",padding:"5px 12px",textTransform:"uppercase",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:X.O,textAlign:"center",verticalAlign:"baseline",display:"inline-block"},primary:{backgroundColor:X.z[0]},warning:{backgroundColor:X.N[0]},danger:{backgroundColor:X.j[0]},success:{backgroundColor:X.G[0]},info:{backgroundColor:X.u[0]},rose:{backgroundColor:X.D[0]},gray:{backgroundColor:X.q[0]}};Object(R.a)(ju);var Eu=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:X.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:X.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(k.d)("color"),boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.b)+", 0.4)"},info:{backgroundColor:X.u[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.u[0])+", 0.4)"},success:{backgroundColor:X.G[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.G[0])+", 0.4)"},danger:{backgroundColor:X.j[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.j[0])+", 0.4)"},warning:{backgroundColor:X.N[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.N[0])+", 0.4)"},primary:{backgroundColor:X.z[0],boxShadow:"0 4px 20px 0px rgba("+Object(X.r)(X.b)+", 0.14), 0 7px 10px -5px rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.b)+", 0.87)",background:Object(k.d)("timelineMyMessage")},timelinePanelInverted:{maxWidth:"calc(100% - 70px)",float:"left",padding:"7px",marginLeft:"40px",marginBottom:"5px",position:"relative",boxShadow:"0 1px 4px 0 rgba("+Object(X.r)(X.b)+", 0.14)",borderRadius:"6px",color:"rgba("+Object(X.r)(X.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(k.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(k.d)("color")},progressBar:{backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.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 ku(){ku=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Su=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Eu)((function(e){var t=e.classes,r=c.a.getState(),n=r.db,o=r.session,i=r.functions,l=(r.chat,r.timeline),s=i.socket,u=a.a.useState(e.stories||{}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=[];a.a.useEffect((function(){y()}),[e.stories,e.nodeId,JSON.stringify(l)]);var y=function(){var t={};l[o._id]&&Object.keys(l[o._id]).filter((function(t){return l[o._id][t]&&l[o._id][t].user&&l[o._id][t].user._id&&l[o._id][t].user._id===e.nodeId})).map((function(e){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},e,l[o._id][e]))})),l[e.nodeId]&&Object.keys(l[e.nodeId]).map((function(r){t=Object(d.a)(Object(d.a)({},t),{},Object(f.a)({},r,l[e.nodeId][r]))})),b(t)},x=function(t){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:v,file:t})},_=function(){var t=Object(p.a)(ku().mark((function t(){return ku().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];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Kn,{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];v.push(r)})),a.a.createElement("li",{className:t.item,key:r,style:{}},a.a.createElement(Kn,{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(na,{nodeId:e.nodeId,onSending:function(){_()}}))})));function Lu(){Lu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Cu=Object(R.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 Iu=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=c.a.getState(),l=i.db,s=i.chat,u=i.timeline,f=e.data,m=Cu();a.a.useEffect((function(){n||o(!0)}));var g="cards";f.nodeId&&c.a.getState().db.users[f.nodeId]&&(g="users");var b=function(){var t=Object(p.a)(Lu().mark((function t(r,n){return Lu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.a.getState().db[n][r]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},s),{},{open:!0,db:n,nodeId:r,loading:!1})):(zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Notifications/Index/openChat()"}),{id:[r],db:n}),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},s),{},{open:!0,db:n,nodeId:r,loading:!0}))),e.openChat(r,n);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();if("timeline"===f.module&&(!f.inNode||!f.inNode.type||!c.a.getState().db||!c.a.getState().db[g]))return a.a.createElement(a.a.Fragment,null);if(!f.byUser||f.byUser&&!l.users[f.byUser]||f.inNode&&f.inNode.type&&f.inNode._id&&!c.a.getState().db[g][f.inNode._id])return a.a.createElement(a.a.Fragment,null);var v=function(){var e="";return e=_()().tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*f.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(Object(k.s)("$__today",1)," ").concat(_()(1e3*f.created_at).tz("America/Sao_Paulo").format("HH:MM")):_()().tz("America/Sao_Paulo").format("YYYY")===_()(1e3*f.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*f.created_at).tz("America/Sao_Paulo").format("DD/MM HH:MM")):"".concat(_()(1e3*f.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(k.d)("medium"),justifyContent:"space-between"}},a.a.createElement(bi,{alt:l.users[f.byUser].name,src:l.users[f.byUser].image||null,size:"sm"},l.users[f.byUser].name.substr(0,1)),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},Object(k.s)(f.description)," - ",e,f.readed&&a.a.createElement(le.a,{icon:"done_all",color:Object(k.d)("medium"),title:"$__readed"}))))};return a.a.createElement("div",{className:f.readed?m.Readed:m.unReaded},a.a.createElement("div",{style:{textAlign:"center",width:"100%",padding:"7px",maxWidth:"100%"}}),"timeline"===f.module&&!e.showTimeline&&f.inNode&&f.inNode.type&&f.inNode._id&&c.a.getState().db[g]&&c.a.getState().db[g][f.inNode._id]&&u[f.inNode._id]&&u[f.inNode._id][f.nodeId]&&a.a.createElement("div",{style:{display:"flex",cursor:"pointer"},onClick:function(){var t;"User"===f.inNode.type&&(f&&f.inNode&&f.inNode._id&&c.a.getState().db&&c.a.getState().db.users&&c.a.getState().db.users[f.inNode._id]&&u[f.inNode._id]&&Object.keys(u[f.inNode._id]).length>0&&u[f.inNode._id][f.nodeId]&&(t=u[f.inNode._id][f.nodeId].user._id),b(t,"users"));"Card"===f.inNode.type&&("chatGroup"!==c.a.getState().db.cards[f.inNode._id].type?e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideMudule),{},{db:"cards",id:f.inNode._id,module:"cardEdit",activeModule:"timeline",data:c.a.getState().db.cards[f.inNode._id]})):b(f.inNode._id,"cards"))}},a.a.createElement(Kn,{storie:f&&f.inNode&&f.inNode._id&&c.a.getState().db&&c.a.getState().db[g]&&c.a.getState().db[g][f.inNode._id]&&u[f.inNode._id]&&Object.keys(u[f.inNode._id]).length>0&&u[f.inNode._id][f.nodeId]?u[f.inNode._id][f.nodeId]:{},boxStyle:{width:"calc(100% - 10px) !important"},db:g})),"card"===f.module&&l[g]&&l[g][f.nodeId]&&a.a.createElement("div",{style:"chatGroup"===c.a.getState().db.cards[f.nodeId].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.nodeId].type&&b(f.nodeId,"cards")}},a.a.createElement(v,null),a.a.createElement(vn,{db:"cards",data:c.a.getState().db.cards[f.nodeId],expanded:!0,onlyOption:"chatGroup"===c.a.getState().db.cards[f.nodeId].type,onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.nodeId].type&&b(f.nodeId,"cards")}})),e.showTimeline&&l[g]&&l[g][f.inNode._id]&&a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:4,lg:4,xl:4},a.a.createElement("div",{style:"chatGroup"===c.a.getState().db.cards[f.inNode._id].type?{cursor:"pointer"}:{},onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.inNode._id].type&&b(f.inNode._id,"cards")}},a.a.createElement(v,null),a.a.createElement(vn,{db:"cards",data:c.a.getState().db.cards[f.inNode._id],expanded:!0,onlyOption:"chatGroup"===c.a.getState().db.cards[f.inNode._id].type,onClick:function(e){"chatGroup"===c.a.getState().db.cards[f.inNode._id].type&&b(f.inNode._id,"cards")}}))),a.a.createElement(Cn,{xs:12,sm:12,md:8,lg:8,xl:8},a.a.createElement("div",{style:{position:"relative",width:"100%",minHeight:"250px"}},a.a.createElement(Su,{nodeId:f.inNode._id,stories:f&&f.inNode&&f.inNode._id&&c.a.getState().db.cards[f.inNode._id]&&u[f.inNode._id]?u[f.inNode._id]:{},db:"cards"})))))})),Tu=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(k.d)("menuButtonColor",.8),"&:hover":{color:Object(k.d)("menuButtonColor",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"0px"},display:"flex",fontSize:"12px",fontWeight:"bold",alignItems:"center"},Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Object(k.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(f.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(f.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(k.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(k.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(k.d)("menuButtonColor"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"},logoImg:{width:"66%",marginTop:"15px",justifyContent:"center"},user:{zIndex:"150 !important"}}};function Fu(){Fu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var Du=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Tu)((function(e){var t=c.a.getState(),r=t.db,n=(t.session,t.chat),o=t.notifications,l=t.timeline,s=e.classes,u=a.a.useState(!1),f=Object(h.a)(u,2),m=f[0],g=f[1],b=a.a.useState(null),v=Object(h.a)(b,2),y=v[0],x=v[1],_=window.location.hash.split("/");_[0]=_[0].replace("#",""),a.a.useEffect((function(){m||g(!0)}),[o]);var O=function(){var t=Object(p.a)(Fu().mark((function t(r,a,o){var c,l=arguments;return Fu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=l.length>3&&void 0!==l[3]?l[3]:"users",!r||window.location.pathname===r&&a!==y||i.a.push(r),x(a),"chat"!==a||o?"chat"===a&&o?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},n),{},{open:!0,db:c,nodeId:o})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},n),{},{open:!1})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.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=[],S=[];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===S.indexOf(o[e].inNode._id)&&(E.push(e),S.push(o[e].inNode._id))})),r.myTasksMenuExpanded,a.a.createElement("div",null,a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{className:s.moduleTitle},Object(k.s)("$__notifications"))),a.a.createElement(Cn,{xs:12,sm:6,md:4,lg:4,xl:4},a.a.createElement("div",{className:s.moduleTitle},Object(k.s)("$__cardsUpdated")),w.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(Iu,{data:o[e],key:e})}))),a.a.createElement(Cn,{xs:12,sm:6,md:8,lg:8,xl:8},a.a.createElement("div",{className:s.moduleTitle},Object(k.s)("$__timelineUpdated")),E.map((function(e){if(!_[1]||_[1]&&("important"===_[1]||"favorite"===_[1]||"archive"===_[1]||"latest"===_[1]))return a.a.createElement(Iu,{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]&&l[o[e].inNode._id]?l[o[e].inNode._id]:{}})})))))}))),Nu={root:{position:"relative",width:"100%",backgroundColor:"".concat(Object(k.d)("color","0.1")," !important"),"& .MuiLinearProgress-indeterminate":{backgroundColor:"#FFFFFF !important"},"& .MuiLinearProgress-bar":{backgroundColor:"".concat(Object(k.d)("color")," !important")},"& .text":{position:"absolute",width:"40px",right:"-40px",top:"-9px",textAlign:"right",textSize:"11px",fontWeight:"bold",color:Object(k.d)("color")}},bar:{borderRadius:7}};var Pu=Object(me.a)(Nu)((function(e){var t=e.classes;return a.a.createElement("div",{className:t.root},a.a.createElement(Ir.a,null))})),Au=r(1880),$u={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:X.z[0]+"!important"},checkedIcon:{width:"20px",height:"20px",border:"1px solid rgba("+Object(X.r)(X.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},uncheckedIcon:{width:"0px",height:"0px",padding:"9px",border:"1px solid rgba("+Object(X.r)(X.b)+", .54)",borderRadius:"3px",display:"flex",justifyContent:"center",alignItems:"center"},disabledCheckboxAndRadio:{"& $checkedIcon,& $uncheckedIcon,& $radioChecked,& $radioUnchecked":{borderColor:X.b,opacity:"0.26",color:X.b}},label:{cursor:"pointer",paddingLeft:"0",color:X.q[3],fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",display:"inline-flex",transition:"0.3s ease all",letterSpacing:"unset"},labelHorizontal:{color:"rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.26)",cursor:"pointer",display:"inline-flex",fontSize:"12px",lineHeight:"1.428571429",fontWeight:"400",paddingTop:"22px",marginRight:"0"},labelError:{color:X.j[0]},radio:{color:X.z[0]+"!important"},radioChecked:{width:"16px",height:"16px",border:"1px solid "+X.z[0],borderRadius:"50%"},radioUnchecked:{width:"0px",height:"0px",padding:"7px",border:"1px solid rgba("+Object(X.r)(X.b)+", .54)",borderRadius:"50%"},inlineChecks:{marginTop:"8px"},iconCheckbox:{height:"116px",width:"116px",color:X.q[0],padding:"0",margin:"0 auto 20px","& > span:first-child":{borderWidth:"4px",borderStyle:"solid",borderColor:X.q[9],textAlign:"center",verticalAlign:"middle",borderRadius:"50%",color:"inherit",transition:"all 0.2s"},"&:hover":{color:X.D[0],"& > span:first-child":{borderColor:X.D[0]}}},iconCheckboxChecked:{color:X.D[0],"& > span:first-child":{borderColor:X.D[0]}},iconCheckboxIcon:{fontSize:"40px",lineHeight:"111px"},switchBase:{color:X.z[0]+"!important"},switchIcon:{boxShadow:"0 1px 3px 1px rgba("+Object(X.r)(X.b)+", 0.4)",color:X.O+" !important",border:"1px solid rgba("+Object(X.r)(X.b)+", .54)"},switchIconChecked:{borderColor:X.z[0],transform:"translateX(0px)!important"},switchBar:{width:"30px",height:"15px",backgroundColor:"rgb("+Object(X.r)(X.q[18])+")",borderRadius:"15px",opacity:"0.7!important"},switchChecked:{"& + $switchBar":{backgroundColor:"rgba("+Object(X.r)(X.z[0])+", 1) !important"},"& $switchIcon":{borderColor:X.z[0]}}},zu=Object(d.a)(Object(d.a)({},$u),{},{cardTitle:Object(d.a)(Object(d.a)({},X.d),{},{textAlign:"center"}),container:Object(d.a)(Object(d.a)({},X.e),{},{position:"relative",zIndex:"3"}),cardSignup:{borderRadius:"6px",boxShadow:"0 16px 24px 2px rgba("+Object(X.r)(X.b)+", 0.14), 0 6px 30px 5px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.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:X.q[6]},textFields:{margin:"15px 0"},checkboxLabelControl:{margin:"0"},checkboxLabel:{fontSize:"12px",marginLeft:"6px",color:"rgba("+Object(X.r)(X.b)+", 0.26)"}});function Mu(){Mu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Yu=Object(R.a)(zu);r(1006);function Bu(e){var t=e.draggableStyle,r=e.virtualStyle,n=e.isDragging,a=Object(d.a)(Object(d.a)({},r),t);return Object(d.a)(Object(d.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 Ru=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:Bu({draggableStyle:t.draggableProps.style,virtualStyle:n,isDragging:o}),className:"item ".concat(o?"is-dragging":""),ref:t.innerRef}),a.a.createElement(vn,{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)}}))},Gu=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(cr.b,{draggableId:s._id,index:n,key:s._id},(function(t){return a.a.createElement(Ru,{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(d.a)(Object(d.a)({},c.current),{},Object(f.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(d.a)(Object(d.a)({},l.current),{},Object(f.a)({},e,t)))}(s._id,e)}})})):null},u=r.items;if(e.nodeId&&e.searchs&&e.searchs[e.nodeId]){var p=e.searchs[e.nodeId];p.text&&void 0!==p.text&&null!==p.text&&""!==p.text&&(u=Array.from(u.filter((function(e){var t;return e.name.toLowerCase().indexOf(p.text.toLowerCase())>-1||(null===(t=e.description)||void 0===t?void 0:t.toLowerCase().indexOf(p.text.toLowerCase()))>-1})))),p.startDate&&void 0!==p.startDate&&null!==p.startDate&&""!==p.startDate&&(u=Array.from(u.filter((function(e){return parseInt(e.startDate)>=parseInt(p.startDate)})))),p.endDate&&void 0!==p.endDate&&null!==p.endDate&&""!==p.endDate&&(u=Array.from(u.filter((function(e){return parseInt(e.endDate)<=parseInt(p.endDate)})))),p.tags&&p.tags&&p.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 p.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&&p.status&&p.status[e.status]))})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&p.priority&&p.priority[e.priority]||p.priority.null&&!e.priority)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.complexity&&p.complexity[e.complexity]||p.complexity.null&&!e.complexity)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.risk&&p.risk[e.risk]||p.risk.null&&!e.risk)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.impact&&p.impact[e.impact]||p.impact.null&&!e.impact)})).map((function(e){return e})),p.users&&p.users.length>0&&(u=u.filter((function(e){return p.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(cr.c,{droppableId:r.id,mode:"virtual",renderClone:function(t,r,n){var o=u[n.source.index];return a.a.createElement(Ru,{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(ba.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(ga.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(d.a)(Object(d.a)({},e.style?e.style:{}),{},{height:"100%"}),outerRef:t.innerRef},s)}))}))})),Hu=a.a.memo((function(e){var t=e.column,r=e.index,n=(e.searchs,a.a.useState(!1)),o=Object(h.a)(n,2),i=o[0],l=(o[1],a.a.useState(!1)),s=Object(h.a)(l,2),u=s[0],p=(s[1],a.a.useState(!1)),f=Object(h.a)(p,2),m=f[0],g=f[1];a.a.useEffect((function(){var e=new ResizeObserver((function(){g(v.current.clientHeight)}));return e.observe(v.current),function(){return e.disconnect()}}),[v]);var b=c.a.getState().db.cards[t.id],v=a.a.useRef(),y=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){y+=parseFloat(e.value)})),a.a.createElement(cr.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:v},n.dragHandleProps),a.a.createElement(ua,{title:"".concat(t.name," (").concat(t.items.length,")"),icon:t.icon||null,color:Object(k.d)("menu"),style:{padding:"7px",width:"100%"},placeholder:Object(k.s)("$__columnName"),customButtons:[{name:Object(k.s)("$__columnSettings",1),icon:"more_horiz",color:Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:t.id,module:"columnEdit",activeModule:"columnEdit",data:c.a.getState().db.cards[t.id]}))},show:"hover"}]}),b&&b.description&&!i?a.a.createElement(Al.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&&y>0&&!u?a.a.createElement("div",{style:{position:"relative",width:"100%",color:"black",fontWeight:"bold",fontSize:12,padding:"0px 15px",paddingBottom:15}},"R$ ",y):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{clear:"both"}})),a.a.createElement(Gu,Object.assign({column:t,index:r},e,{discount:m||0})),a.a.createElement("div",{id:"AgileKanbanColumn_304",style:{position:"relative",float:"left",width:"100%",padding:"15px 7px"}},a.a.createElement(Be,{text:Object(k.s)("$__add","*"),icon:"add_box",iconColor:Object(k.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:t.id,rows:t.items.length}}))}})))}))})),Wu=Object(s.b)((function(e,t){return{searchs:e.searchs,cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(I.b)(C,e)}))(Hu);function Uu(){Uu=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function Vu(e,t,r){var n=Array.from(e),a=n.splice(t,1),o=Object(h.a)(a,1)[0];return n.splice(r,0,o),n}var qu=Object(s.b)((function(e,t){return{cards:e.db.cards,cardsExpanded:e.db.cardsExpanded}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Object(n.useState)(gr(e.nodeId,{deleted:!1},e.cards)),r=Object(h.a)(t,2),o=r[0],i=r[1],l=Object(n.useState)(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=Object(k.j)(),b=Object(yt.u)(e.nodeId);function v(){return(v=Object(p.a)(Uu().mark((function t(r){var n,a,i,l,s,u,p,h,m,g,b,v;return Uu().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=9;break}return a=Vu(o.columnOrder,r.source.index,r.destination.index),i={},a.map((function(e,t){i=Object(d.a)(Object(d.a)({},i),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e]),{},{step:"".concat(t)})))})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),i)})),JSON.stringify(a)!==JSON.stringify(o.columnOrder)&&pr(a,"step"),t.abrupt("return");case 9:if(r.source.droppableId!==r.destination.droppableId){t.next=18;break}return l=o.columns[r.source.droppableId],s=Vu(l.items,r.source.index,r.destination.index),u={},p=[],s.map((function(e,t){u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{order:"".concat(t+1)}))),-1===p.indexOf(e._id)&&p.push(e._id)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),u)})),pr(p,"order"),t.abrupt("return");case 18:h=o.columns[r.source.droppableId],m=h.items[r.source.index],g=c.a.getState().db.cards[r.destination.droppableId],b=c.a.getState().db.cards[h.items[r.source.index]._id],v=hr(e,(null===b||void 0===b?void 0:b._id)||null,(null===g||void 0===g?void 0:g._id)||null,(null===b||void 0===b||null===(n=b._createdBy)||void 0===n?void 0:n._id)||null),g.requireApproval?v=Object(d.a)(Object(d.a)({},v),{},{_requireApproval:!0}):!g.requireApproval&&m._requireApproval&&(v=Object(d.a)(Object(d.a)({},v),{},{_requireApproval:null})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},m._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[m._id]),v),{},{_parent:r.destination.droppableId})))}));case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}a.a.useEffect((function(){i(gr(e.nodeId,{deleted:!1}))}),[e.cards,e.nodeId,e.searchs]);var y=function(){var t=Object(p.a)(Uu().mark((function t(r){var n;return Uu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dr(r);case 2:(n=t.sent)&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.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(cr.a,{onDragEnd:function(e){return v.apply(this,arguments)},onDragStart:function(){}},a.a.createElement("div",{className:"app",style:{overflowY:"auto",height:"-webkit-fill-available",paddingTop:50}},a.a.createElement(cr.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(Wu,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(ua,{style:{width:"100%"},title:null,color:Object(k.d)("menu"),editable:!0,permitIcon:!0,onEdit:function(t){m(!1),y(Object(d.a)(Object(d.a)({},t),{},{_parent:e.nodeId,type:"step",step:String(o.columnOrder.length),checklist:!0}))},placeholder:Object(k.s)("$__columnName"),onCancel:function(){m(!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(E.a,{title:Object(k.s)("$__addColumn"),text:Object(k.s)("$__addColumn"),color:"lightgrey",textColor:"lightgrey",icon:"add_box",onClick:function(){m(!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(mu,{nodeId:e.nodeId,fields:["text","date","tags","status","priority","impact","risk","complexity","users"],showFilters:!0})))})),Xu={container:Object(d.a)(Object(d.a)({},X.l),{},{position:"relative",border:"0.5px solid ".concat(Object(k.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(k.d)("medium"),fontSize:"10px",textTransform:"uppercase"},"& .info":{marginTop:"-8px",color:Object(k.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(k.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 Ju,Ku,Zu=Object(me.a)(Xu)(Object(n.memo)((function(e){var t=e.data,r=c.a.getState().db,n=[],o=r.cards,i=function(e,t){if(!t.isDropAnimating)return Object(d.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(d.a)(Object(d.a)({},e),{},{clear:"both",transition:"all 0.1s ease",transform:"".concat(a," ").concat(""),border:"solid 3px ".concat(Object(k.d)("color")),backgroundColor:Object(k.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(cr.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(vn,{data:e.data,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 Qu,ed=w.default.div(Ju||(Ju=Object(u.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                ")})),td=w.default.div(Ku||(Ku=Object(u.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(k.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                "})),rd=Object(s.b)((function(e){return{searchs:e.searchs,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(lu)((function(e){var t=c.a.getState().session,r=e.classes,n=b()("".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 l=e.cards;o&&(l=Object(yt.r)(l,o));var s=String(t.dashboard.period).replace("$__last","");s=s.replace("Days","");var u=_()(new Date).tz("America/Sao_Paulo").subtract(parseInt(s),"d").format("YYYY-MM-DDT00:00"),p=_()(new Date).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59");e&&e.periodFilter&&(l=l.filter((function(e){if("completed"===e.status&&e.completed_at&&(e.completed_at.low&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=p&&_()(new Date(1e3*e.completed_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.completed_at&&!e.completed_at.low&&_()(new Date(1e3*e.completed_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=p&&_()(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&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=p&&_()(new Date(1e3*e.updated_at.low)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u||e.updated_at&&!e.updated_at.low&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT23:59")<=p&&_()(new Date(1e3*e.updated_at)).tz("America/Sao_Paulo").format("YYYY-MM-DDT00:00")>=u))return!0})).map((function(e){return e}))),e.showDeleted||c.a.getState().controls.deleted||(l=l.filter((function(e){return!e.deleted})).map((function(e){return e})));var h=r.cardList+" "+y()(Object(f.a)({},r.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1)),m=Object(k.s)(e.column.name,1),g={};return c.a.getState().db.cards[i[0]]&&c.a.getState().db.cards[i[0]].customColumns&&(g=JSON.parse(c.a.getState().db.cards[i[0]].customColumns)),g&&g[e.column.name.replace("$__","")]&&g[e.column.name.replace("$__","")].name&&(m=Object(k.s)(g[e.column.name.replace("$__","")].name,1)),a.a.createElement(cr.b,{draggableId:e.columnId?String(e.columnId):"NOT_ID_SENDED",index:e.index},(function(r){var n,o;return a.a.createElement(ed,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(ua,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(k.d)("menu"),style:{padding:"7px"}},i.length>0&&i[1]&&"overview"===i[1]&&c.a.getState().db.cards[i[0]]&&c.a.getState().db.cards[i[0]].planType&&"operational"===c.a.getState().db.cards[i[0]].planType&&c.a.getState().db.cards[i[0]]._users&&c.a.getState().db.cards[i[0]]._users[t._id]&&c.a.getState().db.cards[i[0]]._users[t._id].access&&parseInt(c.a.getState().db.cards[i[0]]._users[t._id].access)>3?{editable:!0,onEdit:function(t){Object(yt.P)(Object(d.a)(Object(d.a)({},e),{},{data:{_id:i[0]}}),{customColumns:JSON.stringify(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[i[0]]&&c.a.getState().db.cards[i[0]].customColumns?JSON.parse(c.a.getState().db.cards[i[0]].customColumns):{}),{},Object(f.a)({},e.column.name.replace("$__",""),t)))})},placeholder:Object(k.s)("$__columnName")}:{},{customButtons:[e.columnsSettings&&{name:"settings",icon:"more_horiz",color:Object(k.d)("color"),onClick:function(){return console.log("s")},show:"hover"}],periodFilter:!(!e||!e.periodFilter)}))),a.a.createElement(cr.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(td,Object.assign({className:h,ref:t.innerRef},t.droppableProps,{isDraggingOver:r.isDraggingOver,inLine:e.inLine},e),l.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){if(t)return a.a.createElement("div",{key:t._id||t.id?t._id:null},a.a.createElement(Zu,{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}))})),e.inLineAdd&&a.a.createElement("div",{style:{position:"relative",float:"left",width:"100%",padding:"7px"}},a.a.createElement(Be,{text:Object(k.s)("$__add","*"),icon:"add_box",iconColor:Object(k.d)("medium"),onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{_parent:e.selectedParent?e.selectedParent:i[0]?i[0]:null,rows:l.length,initialData:{type:e.typeAdd?e.typeAdd:e.columnId.length<36?e.columnId:null}}}))}})),t.placeholder,a.a.createElement("div",{style:{clear:"both"}}))})))}))})));function nd(){nd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ad=w.default.div(Qu||(Qu=Object(u.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                ")})),od=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db;a.a.useEffect((function(){}),[]);var r=function(){var r=Object(p.a)(nd().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v;return nd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=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,p=o.droppableId,h=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!==p||c.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,l),m.map((function(e,t){s[e]=Object(d.a)(Object(d.a)({},s[e]),{},{order:{low:t}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),s)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:m,sourceCards:[],columnName:"status"}),r.abrupt("return");case 21:h.splice(i.index,1),(b=Array.from(e.cards.filter((function(e){return e.status===p})).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,l),h.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),b.map((function(e,r){t.cards[e].order&&t.cards[e].order.low?t.cards[e].order.low=parseInt(r):t.cards[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(r))))})),v=Object(d.a)(Object(d.a)({},t),{},{cards:Object(d.a)(Object(d.a)({},t.cards),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},t.cards[l]),{},{status:p,completed_at:"completed"===p?{low:_()().tz("America/Sao_Paulo").unix("x")}:null,updated_at:{low:_()().tz("America/Sao_Paulo").unix("x")},order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},v)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"status",sourceCards:h});case 29:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),n=function(){var e=Object(p.a)(nd().mark((function e(t){return nd().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(p.a)(nd().mark((function e(t){return nd().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(cr.a,{onDragEnd:r,onDragStart:n,onDragUpdate:o},a.a.createElement(cr.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(ad,Object.assign({},e,{ref:t.innerRef}),c.a.getState().db.status.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(rd,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(d.a)(Object(d.a)({},e),{},{id:e._id})})),index:r,columnsSettings:!1,locked:!1,columnStyle:Object(d.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 id=Object(s.b)((function(e,t){return{db:e.db}}),(function(e){return Object(I.b)(C,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(mu,{fields:["text","date","tags","priority","unit","usersMode","users"],showFilters:!0}),a.a.createElement(ua,{title:null,icon:null,color:Object(k.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(d.a)(Object(d.a)({},c.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(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitlePosition:"ASC"===t.orderByTitlePosition?"DESC":"ASC"}))}}]})),a.a.createElement(od,{cards:o}))})),cd=r(1135),ld=r(1137),sd=r(1962),ud=r(1847);function dd(){dd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var pd,fd=Object(s.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r,n,o,l,s,u,f,m,g,b,v,y,x,O,w,j,S=c.a.getState(),L=S.db,C=S.session,I=a.a.useState(!1),T=Object(h.a)(I,2),F=T[0],D=T[1],N=a.a.useState(1),P=Object(h.a)(N,2),A=P[0],$=P[1],z=a.a.useState(1),M=Object(h.a)(z,2),Y=M[0],R=M[1],G=a.a.useState(1),H=Object(h.a)(G,2),W=H[0],U=H[1],V=a.a.useState({editor:!1,text:"",height:"auto"}),q=Object(h.a)(V,2),X=q[0],J=q[1],K=a.a.useState(!1),Z=Object(h.a)(K,2),Q=Z[0],ee=Z[1],te=a.a.useState({type:"comment",disabledSend:!1}),re=Object(h.a)(te,2),ne=re[0],ae=re[1],oe=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),ie=window.location.hash.split("/");ie[0]=ie[0].replace("#",""),36!==ie[0].length&&(ie[0]=null);var ce=Object(k.j)(),se=Object(yt.u)(ie[0]);a.a.useEffect((function(){F||(J(L.cards[ie[0]]&&L.cards[ie[0]].note?Object(d.a)(Object(d.a)({},X),{},{text:L.cards[ie[0]].note?L.cards[ie[0]].note:""}):Object(d.a)({},X)),D(!0))}));var ue=function(){var t=Object(p.a)(dd().mark((function t(r){return dd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!X.text&&!r){t.next=6;break}return t.next=3,Object(yt.H)(e,!1,Object(d.a)(Object(d.a)({},L.cards[ie[0]]),{},{note:r?null:X.text}));case 3:t.sent&&Object(k.c)({message:Object(k.s)("$__noteSaved",1),variant:null,persist:!1,horizontal:"right",confirm:null}),J({editor:!1,text:r?"":X.text,height:"auto"});case 6:ee(!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();if(!ie[0]||!ie[0]||!L.cards[ie[0]])return a.a.createElement(a.a.Fragment,null);var de=Object(yt.k)(ie[0]),pe={};(null===(t=L.cards[ie[0]])||void 0===t?void 0:t.customColumns)&&(pe=JSON.parse(L.cards[ie[0]].customColumns));var fe=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent===ie[0]&&"step"===c.a.getState().db.cards[e].type})).map((function(e,t){return c.a.getState().db.cards[e]}));return a.a.createElement("div",{style:{marginLeft:"-15px"}},a.a.createElement(kn,{style:{}},a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:6,style:{padding:0}},a.a.createElement("div",{style:{width:"100%"}},a.a.createElement($i,{style:{marginTop:"0"}},a.a.createElement(mt,{title:Object(k.s)("$__planResume",1),icon:"blur_on",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},moreButton:!0,optionsProps:{transparent:!0,btColor:Object(k.d)("colorText")},options:se&&parseInt(se)>3||ce.owner||ce.planAdmin||ce.planEdit||ce.planModerate?[{name:"$__edit",icon:"edit",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:ie[0],module:"cardEdit",activeModule:"cardEdit",data:L.cards[ie[0]]}))}}]:[],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Bi,null,a.a.createElement("div",{style:{width:"100%",color:Object(k.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(k.s)("$__name",1),":")," ",L.cards[ie[0]].name),a.a.createElement("div",{style:{width:"100%",color:Object(k.d)("menu")}},a.a.createElement("span",{style:{fontWeight:"bold"}},Object(k.s)("$__description",1),":")," ",L.cards[ie[0]].description),!L.cards[ie[0]].isTemplate&&L.cards[ie[0]]&&L.cards[ie[0]]._users&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%",marginTop:"15px",color:Object(k.d)("menu"),fontWeight:"bold"}},Object(k.s)("$__users","*"),":"),a.a.createElement(Po,{_id:ie[0],noLimit:!0,avatarSize:"33px",permission:!0})),"30b013a6-35bd-4b47-8e63-3a50a6e4b744"===C.account||"7806912b-4c7d-4f4f-b9e0-b93fc8f08776"===C.account?a.a.createElement(E.a,{color:Object(k.d)("menu"),icon:"monitoring",onClick:function(){i.a.push("sp#".concat(ie[0],"/statistics"))},size:"15px",title:"".concat(Object(k.s)("$__tagsStatistics")),text:"".concat(Object(k.s)("$__tagsStatistics"))}):a.a.createElement(a.a.Fragment,null)))),a.a.createElement("div",{style:{width:"100%"}},a.a.createElement("div",null,a.a.createElement($i,{style:{marginTop:"0"}},a.a.createElement(ua,{title:Object(k.s)("$__notes",1),icon:"note",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},customButtons:[].concat(Object(Se.a)(X.text&&!X.editor?[{title:"$__cleanNote",icon:"clear_all",onClick:function(){ue(!0)}},{title:"$__edit",icon:"edit",onClick:function(){J(Object(d.a)(Object(d.a)({},X),{},{editor:!0}))}}]:[]),[Q&&{title:"$__saveNote",icon:"save",onClick:function(){ue()}},X.editor&&{title:"$__cancel",icon:"cancel",onClick:function(){J(Object(d.a)(Object(d.a)({},X),{},{text:L.cards[ie[0]].note,editor:!1})),ee(!1)}}])}),a.a.createElement(Bi,{style:{display:"flex",justifyContent:"center"}},X.text||X.editor?X.editor?a.a.createElement(ud.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(k.s)("$__planNotePlaceholder"),onChange:function(e){ee(!0),J(Object(d.a)(Object(d.a)({},X),{},{text:e.target.value}))},onBlur:function(e){""!==e.target.value&&e.target.value!==L.cards[ie[0]].note||(ee(!1),J(Object(d.a)(Object(d.a)({},X),{},{editor:!1})))},autoFocus:!0,spellcheck:!1},X.text):a.a.createElement("div",{style:{fontSize:"16px",width:"100%"},onClick:function(){J(Object(d.a)(Object(d.a)({},X),{},{editor:!0}))},dangerouslySetInnerHTML:{__html:Object(k.p)(X.text)}}):a.a.createElement("div",{style:{display:"flex",alignItems:"center",userSelect:"none",cursor:"pointer"},onClick:function(){J(Object(d.a)(Object(d.a)({},X),{},{editor:!0}))}},a.a.createElement("div",{style:{padding:"7px",border:"dotted 1px rgba(0,0,0,0.2)",borderRadius:"7px"}},a.a.createElement(le.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(k.s)("$__addNote")))))))),a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:6},a.a.createElement("div",null,a.a.createElement($i,{style:{marginTop:"0",height:"500px"}},a.a.createElement(ua,{title:Object(k.s)("$__timeline",1),icon:"blur_on",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{name:"$__timeline",icon:"timeline",actionsSize:"22px",count:de.comment,onClick:function(){ae({type:"comment",disabledSend:!1})}},{name:"$__log",icon:"history",actionsSize:"22px",count:de.log,onClick:function(){ae({type:"log",disabledSend:!0})}},{name:"$__timer",icon:"timer",actionsSize:"22px",count:de.timer,onClick:function(){ae({type:"timer",disabledSend:!0})}},{name:"$__kpi",icon:"analytics",actionsSize:"22px",count:de.kpi,onClick:function(){ae({type:"kpi",disabledSend:!0})}}],actionButtonsStyle:{top:"-9px !important"}}),a.a.createElement(Bi,null,a.a.createElement(La,Object(d.a)({nodeId:ie[0],db:"cards",loadTimeline:!0},ne)))))),"operational"===L.cards[ie[0]].planType?a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,style:{maxHeight:300}},a.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(k.d)("menu"),fontWeight:"bold",fontSize:16}},fe.sort((function(e,t){return e.step-t.step})).map((function(e){return a.a.createElement("div",{key:e._id,style:{width:"".concat(100/fe.length,"%"),textAlign:"center"}},e.name)}))),a.a.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",alignItems:"center",color:Object(k.d)("menu"),fontWeight:"bold",fontSize:16}},fe.sort((function(e,t){return e.step-t.step})).map((function(e){var t=0,r=e,n=Object.keys(c.a.getState().db.cards).filter((function(t){return e&&e._id&&c.a.getState().db.cards[t]._parent===e._id&&!c.a.getState().db.cards[t].deleted&&c.a.getState().db.cards[t].value})).map((function(e){return c.a.getState().db.cards[e].value}))||[];return r.showSumValues&&n.length>0&&n.map((function(e){t+=parseFloat(e)})),a.a.createElement("div",{key:e._id,style:{width:"".concat(100/fe.length,"%"),textAlign:"center",fontSize:12}},t?"R$ ".concat(t):"")}))),a.a.createElement(ld.a,{data:fe.sort((function(e,t){return e.step-t.step})).map((function(e,t){return{id:e._id,value:Object.keys(c.a.getState().db.cards).filter((function(r){return!c.a.getState().db.cards[r].deleted&&(c.a.getState().db.cards[r]._parent===e._id||0===t&&c.a.getState().db.cards[r]._parent===ie[0]&&"step"!==c.a.getState().db.cards[r].type)})).length,label:e.name,name:e.name}})),direction:"horizontal",margin:{top:0,right:20,bottom:0,left:20},shapeBlending:.46,spacing:3,valueFormat:" > .0s",colors:{scheme:"reds"},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,a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12},a.a.createElement(kn,null,!L.cards[ie[0]]||""===L.cards[ie[0]].planType||"operational"!==L.cards[ie[0]].planType&&"flow"!==L.cards[ie[0]].planType?a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:Object(k.s)("$__matrix",1),icon:Ro.a,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,{style:{height:"300px",display:"flex"}},a.a.createElement(cd.a,{data:{name:"root",children:[{name:Object(k.s)("$__guidelines",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&L.cards[e].type.indexOf("guideline")>-1})).length},{name:Object(k.s)("$__strength",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"strength"===L.cards[e].type})).length},{name:Object(k.s)("$__weakness",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"weakness"===L.cards[e].type})).length},{name:Object(k.s)("$__opportunity",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"opportunity"===L.cards[e].type})).length},{name:Object(k.s)("$__threat",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"threat"===L.cards[e].type})).length}]},margin:{top:20,right:20,bottom:20,left:20},id:"name",colors:{scheme:"purpleRed_green"},colorBy:"id",childColor:{from:"color",modifiers:[["brighter",.4]]},padding:1,leavesOnly:!0,enableLabels:!0,label:"value",labelTextColor:"#FFFFFF",borderColor:{from:"color",modifiers:[["darker",.3]]},animate:!1})),a.a.createElement(Bi,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&(L.cards[e].type.indexOf("guideline")>-1||"strength"===L.cards[e].type||"weakness"===L.cards[e].type||"opportunity"===L.cards[e].type||"threat"===L.cards[e].type)})).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(le.a,{icon:Ro.a}),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__guidelines",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&L.cards[e].type.indexOf("guideline")>-1})).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(le.a,null,"arrow_upward"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__strength",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"strength"===L.cards[e].type})).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(le.a,null,"arrow_downward"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__weakness",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"weakness"===L.cards[e].type})).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(le.a,null,"trending_up"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__opportunity",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"opportunity"===L.cards[e].type})).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(le.a,null,"trending_down"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__threat",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"threat"===L.cards[e].type})).length))))):a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:(null===(r=pe)||void 0===r||null===(n=r.guidelines)||void 0===n?void 0:n.name)?pe.guidelines.name:Object(k.s)("$__guidelines",1),icon:(null===(o=pe)||void 0===o||null===(l=o.guidelines)||void 0===l?void 0:l.icon)?pe.guidelines.icon:Ro.a,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,{style:{height:"300px",display:"flex"}},a.a.createElement(Ii.a,{data:[].concat(Object(Se.a)(L.status.map((function(e,t){return{id:Object(k.s)(e.label,1),label:Object(k.s)(e.label,1),value:Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&!L.cards[t].deleted&&L.cards[t].type.indexOf("guideline")>-1&&L.cards[t].status&&L.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(k.s)("$__late",1),label:Object(k.s)("$__late",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&L.cards[e].type.indexOf("guideline")>-1&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(Se.a)(L.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,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Bi,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&L.cards[e].type.indexOf("guideline")>-1})).length)),L.status.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(le.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)(e.label,1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&!L.cards[t].deleted&&L.cards[t].type.indexOf("guideline")>-1&&L.cards[t].status&&L.cards[t].status===e.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(le.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__late",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&L.cards[e].type.indexOf("guideline")>-1&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:(null===(s=pe)||void 0===s||null===(u=s.objectives)||void 0===u?void 0:u.name)?pe.objectives.name:Object(k.s)("$__objectives",1),icon:(null===(f=pe)||void 0===f||null===(m=f.objectives)||void 0===m?void 0:m.icon)?pe.objectives.icon:"gps_fixed",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,{style:{height:"300px",display:"flex"}},a.a.createElement(Ii.a,{data:[].concat(Object(Se.a)(L.status.map((function(e,t){return{id:Object(k.s)(e.label,1),label:Object(k.s)(e.label,1),value:Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&!L.cards[t].checklist&&!L.cards[t].deleted&&"objective"===L.cards[t].type&&L.cards[t].status&&L.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(k.s)("$__late",1),label:Object(k.s)("$__late",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&"objective"===L.cards[e].type&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(Se.a)(L.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,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Bi,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&!L.cards[e].checklist&&"objective"===L.cards[e].type})).length)),L.status.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(le.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)(e.label,1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&"objective"===L.cards[t].type&&L.cards[t].status&&!L.cards[t].checklist&&L.cards[t].status===e.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(le.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__late",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&"objective"===L.cards[e].type&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:(null===(g=pe)||void 0===g||null===(b=g.goals)||void 0===b?void 0:b.name)?pe.goals.name:Object(k.s)("$__goals",1),icon:(null===(v=pe)||void 0===v||null===(y=v.goals)||void 0===y?void 0:y.icon)?pe.goals.icon:"flag",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,{style:{height:"300px",display:"flex"}},a.a.createElement(Ii.a,{data:[].concat(Object(Se.a)(L.status.map((function(e,t){return{id:Object(k.s)(e.label,1),label:Object(k.s)(e.label,1),value:Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&"goal"===L.cards[t].type&&!L.cards[t].checklist&&!L.cards[t].deleted&&L.cards[t].status&&L.cards[t].status===e.value})).length,color:e.color}}))),[{id:Object(k.s)("$__late",1),label:Object(k.s)("$__late",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&"goal"===L.cards[e].type&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(Se.a)(L.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,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Bi,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"goal"===L.cards[e].type})).length)),L.status.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(le.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)(e.label,1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&"goal"===L.cards[t].type&&!L.cards[t].checklist&&!L.cards[t].deleted&&L.cards[t].status&&L.cards[t].status===e.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(le.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__late",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].checklist&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&"goal"===L.cards[e].type&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length))))),a.a.createElement(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:(null===(x=pe)||void 0===x||null===(O=x.actions)||void 0===O?void 0:O.name)?pe.actions.name:Object(k.s)("$__actions",1),icon:(null===(w=pe)||void 0===w||null===(j=w.actions)||void 0===j?void 0:j.icon)?pe.actions.icon:"play_arrow",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,{style:{height:"300px",display:"flex"}},a.a.createElement(Ii.a,{data:[].concat(Object(Se.a)(L.status.map((function(e,t){return{id:Object(k.s)(e.label,1),label:Object(k.s)(e.label,1),value:Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&!L.cards[t].deleted&&L.cards[t].status&&L.cards[t].status===e.value&&("iniciative"===L.cards[t].type||"task"===L.cards[t].type||"meeting"===L.cards[t].type||"iniciative"===L.cards[t].type||"myTask"===L.cards[t].type)&&(!L.cards[t].checklist||L.cards[t].checklist&&L.cards[t].showCard)})).length,color:e.color}}))),[{id:Object(k.s)("$__late",1),label:Object(k.s)("$__late",1),value:Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&("iniciative"===L.cards[e].type||"task"===L.cards[e].type||"meeting"===L.cards[e].type||"iniciative"===L.cards[e].type||"myTask"===L.cards[e].type)&&(!L.cards[e].checklist||L.cards[e].checklist&&L.cards[e].showCard)&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length,color:"red"}]),colors:[].concat(Object(Se.a)(L.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,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},enableArcLinkLabels:!1})),a.a.createElement(Bi,null,a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&("iniciative"===L.cards[e].type||"task"===L.cards[e].type||"meeting"===L.cards[e].type||"iniciative"===L.cards[e].type||"myTask"===L.cards[e].type)&&(!L.cards[e].checklist||L.cards[e].checklist&&L.cards[e].showCard)})).length)),L.status.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(le.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)(e.label,1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(t){return L.cards[t]._planId===ie[0]&&!L.cards[t].deleted&&("iniciative"===L.cards[t].type||"task"===L.cards[t].type||"meeting"===L.cards[t].type||"iniciative"===L.cards[t].type||"myTask"===L.cards[t].type)&&(!L.cards[t].checklist||L.cards[t].checklist&&L.cards[t].showCard)&&L.cards[t].status&&L.cards[t].status===e.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(le.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__late",1))),a.a.createElement("div",null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&("iniciative"===L.cards[e].type||"task"===L.cards[e].type||"meeting"===L.cards[e].type||"iniciative"===L.cards[e].type||"myTask"===L.cards[e].type)&&(!L.cards[e].checklist||L.cards[e].checklist&&L.cards[e].showCard)&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length))))))))),a.a.createElement(kn,null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].startDate&&_()(new Date(1e3*L.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length>0&&a.a.createElement(Cn,{md:6,xs:12},a.a.createElement($i,null,a.a.createElement(mt,{title:Object(k.s)("$__nextActivities",1),icon:"pending_actions",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,null,a.a.createElement(kn,null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&L.cards[e].startDate&&_()(new Date(1e3*L.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).sort((function(e,t){var r=L.cards[e].completed_at&&L.cards[e].completed_at.low?parseInt(L.cards[e].completed_at.low):"string"===typeof L.cards[e].completed_at?L.cards[e].completed_at:0,n=L.cards[t].completed_at&&L.cards[t].completed_at.low?parseInt(L.cards[t].completed_at.low):"string"===typeof L.cards[t].completed_at?L.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(Y-1)&&t<7*Y)return a.a.createElement(vn,{db:"cards",key:e,data:L.cards[e],inLine:!0})})),Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].startDate&&_()(new Date(1e3*L.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(sd.a,{page:Y,count:Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].startDate&&_()(new Date(1e3*L.cards[e].startDate)).tz("America/Sao_Paulo").format()>=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){R(t)}})))))),Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length>0&&a.a.createElement(Cn,{md:6,xs:12},a.a.createElement($i,null,a.a.createElement(mt,{title:Object(k.s)("$__lateActivities",1),icon:"pending_actions",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,null,a.a.createElement(kn,null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&"completed"!==L.cards[e].status&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).sort((function(e,t){var r=L.cards[e].completed_at&&L.cards[e].completed_at.low?parseInt(L.cards[e].completed_at.low):"string"===typeof L.cards[e].completed_at?L.cards[e].completed_at:0,n=L.cards[t].completed_at&&L.cards[t].completed_at.low?parseInt(L.cards[t].completed_at.low):"string"===typeof L.cards[t].completed_at?L.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(W-1)&&t<7*W)return a.a.createElement(vn,{db:"cards",key:e,data:L.cards[e],inLine:!0})})),Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(sd.a,{page:W,count:Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"!==L.cards[e].status&&L.cards[e].endDate&&_()(new Date(1e3*L.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()(new Date(oe)).tz("America/Sao_Paulo").format()})).length/7),onChange:function(e,t){U(t)}})))))),Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"===L.cards[e].status})).length>0&&a.a.createElement(Cn,{md:6,xs:12},a.a.createElement($i,null,a.a.createElement(mt,{title:Object(k.s)("$__lastCompletedCards",1),icon:"pending_actions",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,null,a.a.createElement(kn,null,Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&(!L.cards[e].checklist||L.cards[e].checklist&&L.cards[e].showCard)&&"completed"===L.cards[e].status})).sort((function(e,t){var r=L.cards[e].completed_at&&L.cards[e].completed_at.low?parseInt(L.cards[e].completed_at.low):"string"===typeof L.cards[e].completed_at?L.cards[e].completed_at:0,n=L.cards[t].completed_at&&L.cards[t].completed_at.low?parseInt(L.cards[t].completed_at.low):"string"===typeof L.cards[t].completed_at?L.cards[t].completed_at:0;return r>n?-1:r<n?1:0})).map((function(e,t){if(t>=7*(A-1)&&t<7*A)return a.a.createElement(vn,{db:"cards",key:e,data:L.cards[e],inLine:!0})})),Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"===L.cards[e].status})).length/7)>1&&a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(sd.a,{page:A,count:Math.ceil(Object.keys(L.cards).filter((function(e){return L.cards[e]._planId===ie[0]&&"completed"===L.cards[e].status})).length/7),onChange:function(e,t){$(t)}})))))),Object.keys(L.cards).filter((function(e){if(L.cards[e]._planId===ie[0]&&L.cards[e]._users&&Object.keys(L.cards[e]._users).filter((function(t){return L.cards[e]._users[t].myDay&&_()(new Date(1e3*L.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===oe})).length>0)return!0})).length>0&&a.a.createElement(Cn,{md:6,xs:12},a.a.createElement($i,null,a.a.createElement(mt,{title:Object(k.s)("$__todayTasks",1),icon:"today",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Bi,null,a.a.createElement(kn,null,Object.keys(L.cards).filter((function(e){if(L.cards[e]._planId===ie[0]&&!L.cards[e].deleted&&L.cards[e]._users&&Object.keys(L.cards[e]._users).filter((function(t){return L.cards[e]._users[t].myDay&&_()(new Date(1e3*L.cards[e]._users[t].myDay)).tz("America/Sao_Paulo").format("YYYY/MM/DD")===oe})).length>0)return!0})).map((function(e){return a.a.createElement(vn,{db:"cards",key:e,data:L.cards[e]})})))))),a.a.createElement(Cn,{md:6,xs:12},a.a.createElement(B,null,a.a.createElement(Zi,{nodeId:ie[0]})))))})),hd=r(1131),md=function(e){var t=a.a.useState("horizontal"),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState("stacked"),c=Object(h.a)(i,2),l=c[0],s=c[1];return a.a.createElement(B,null,a.a.createElement("div",{style:{display:"flex"}},a.a.createElement(E.a,{color:Object(k.d)("lightgray"),icon:"work_history",onClick:function(){s((function(e){return"stacked"===e?"grouped":"stacked"}))},size:"15px",title:"".concat(Object(k.s)("$__changeGroupMode")),text:"".concat(Object(k.s)("$__changeGroupMode"))}),a.a.createElement(E.a,{color:Object(k.d)("lightgray"),icon:"work_history",onClick:function(){o((function(e){return"vertical"===e?"horizontal":"vertical"}))},size:"15px",title:"".concat(Object(k.s)("$__changeLayout")),text:"".concat(Object(k.s)("$__changeLayout"))})),a.a.createElement(hd.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 gd(){gd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var bd=Object(R.a)(Jr),vd=w.default.div(pd||(pd=Object(u.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(k.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(k.d)("menu")," !important;"):""})),yd=Object(s.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(I.b)(C,e)}))((function e(t){var r,o,l,s,u,m,g,b=bd(),v=c.a.getState(),y=v.db,x=v.session,O=t.data,w=a.a.useState(!1),j=Object(h.a)(w,2),S=j[0],L=j[1],C=a.a.useState(t.cardsExpanded),I=Object(h.a)(C,2),T=I[0],F=I[1],D=a.a.useState(!1),N=Object(h.a)(D,2),P=N[0],A=N[1],$=a.a.useState(!1),z=Object(h.a)($,2),M=(z[0],z[1]),Y=a.a.useState(!1),B=Object(h.a)(Y,2),R=B[0],G=B[1],H=a.a.useState(t.cardColorPicker?Object(yt.s)(O):{}),W=Object(h.a)(H,2),U=W[0],V=W[1],q=a.a.useState(!1),X=Object(h.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,S),Z&&Z.current&&Z.current.addEventListener("DOMNodeInserted",(function(){var e=Z.current.clientHeight;t.separator&&(e+=55),t.onResize(e,S)})),console.log(Z.current.event)}return function(){Z&&Z.current&&Z.current.event&&Z.current.removeEventListener("DOMNodeInserted")}}),[Z,S,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(yt.s)(O)),e=!1),function(){e=!1}}),[t.cards]),O==={}||!O)return a.a.createElement(a.a.Fragment,null);var ee=Object(k.j)(),te=Object(yt.u)(O._id);if(!O||!t.data||!t.data._id)return null;var re=function(){var e=Object(p.a)(gd().mark((function e(){var r,n,a;return gd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={},Object.keys(y.cards).filter((function(e){return y.cards[e]&&!y.cards[e].deleted&&(y.cards[e]._planId===Q[0]||y.cards[e]._parent===Q[0])})).map((function(e){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,y.cards[e]))})),n=Object(d.a)({},c.a.getState().db.cards),a=!O._selected,"swot"!==y.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object.keys(r).filter((function(e){return r[e]._id!==O._id&&r[e].type&&r[e].type===O.type})).map((function(e){r[e]._selected&&(r[e]._selected=!1)})),O.type.indexOf("guideline")>-1?Object.keys(r).map((function(e){r[e]._selected&&(r[e]._selected=!1)})):O.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)})):O.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(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)(Object(d.a)({},n),r),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),r[O._id]),{},{_selected:a})))})),"swot"===c.a.getState().db.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object(yt.I)(t),a&&"matrix"===c.a.getState().db.dataType.filter((function(e){return e.name===O.type}))[0].module&&Object(yt.J)(t,O._id);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=Object(p.a)(gd().mark((function e(){var r,n=arguments;return gd().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(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:t.db,id:O._id,module:"cardEdit",activeModule:r,data:O}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=Object(p.a)(gd().mark((function e(t){return gd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:parseInt(te)>2||ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate)?i.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(p.a)(gd().mark((function e(){return gd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmRestoreThis",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){Object(yt.G)(t,{_id:O._id})}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]&&!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})).length>0,ce=!t.noExpanded&&(S||!t.notGlobalExpanded&&!!(t.manualExpanded||t.expanded||O._expanded||t.cardsExpanded)),le=!!(ee&&(ee.owner||ee.plan&&(ee.planAdmin||ee.planModerate))||te>2);if(O&&O._users&&Object.keys(O._users).filter((function(e){return e===x._id})).length>0&&y.dataType.filter((function(e){return e.name===O.type})).length>0&&y.dataType.filter((function(e){return e.name===O.type}))[0].modules.indexOf("myDay")>-1?O._users[Object.keys(O._users).filter((function(e){return e===x._id}))[0]].myDay?{button:!0,date:O._users[Object.keys(O._users).filter((function(e){return e===x._id}))[0]].myDay}:{button:!0,date:null}:{button:!1,date:null},O&&O.private&&(!O._users||O._users&&!O._users[x._id]))return a.a.createElement(a.a.Fragment,null);if(P)return a.a.createElement(hn,{cardId:O._id,toTemplate:!O.isTemplate,onComplete:function(){A(!1)}});var se={title:(null===O||void 0===O?void 0:O.name)||Object(k.s)("$__new",1),icon:(null===O||void 0===O?void 0:O.icon)||O.type&&y&&y.dataType&&y.dataType.filter((function(e){return e.name===O.type}))[0]&&y.dataType.filter((function(e){return e.name===O.type}))[0].icon||"$__topic",iconTitle:"$__".concat(O.type)};if(O._planId&&(null===(o=c.a.getState().db.cards[O._planId])||void 0===o?void 0:o.customColumns)&&(O.type.indexOf("guideline")>-1||O.type.indexOf("objective")||O.type.indexOf("goal"))){var ue=JSON.parse(c.a.getState().db.cards[O._planId].customColumns),de=O.type.indexOf("guideline")>-1?"guideline":O.type;ue["".concat(de,"s")]&&(se=Object(d.a)(Object(d.a)(Object(d.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(vd,{ref:Z,separator:t.separator||!1,plan:!(!ce||"plan"!==O.type),isDragging:t.snapshot&&t.snapshot.isDragging||null,isDragDisable:O.isDragDisable||t.isDragDisable||!1,inLine:!("plan"===O.type||!t.inLine),className:t.noShadow?b.containerNoShadow:b.container,selectable:t.showSelected,selected:O._selected,priority:O.priority&&y.priority.filter((function(e){return String(e.value)===String(O.priority)})).length>0?y.priority.filter((function(e){return String(e.value)===String(O.priority)}))[0].color:null,locked:t.locked||!1,snapshot:t.snapshot||null,isCombining:!(!t.snapshot||!t.snapshot.combineTargetFor),onMouseOver:function(){M(!0)},onMouseLeave:function(){setTimeout((function(){M(!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"!==O.type?t.locked||ne():ae(O._id):t.onClick(),t.onOpen&&t.onOpen())},onContextMenu:function(e){}},("completed"===O.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(k.d)("menu"),padding:"7px 3px",color:"#FFFFFF",fontWeight:"bold",textAlign:"center"}},Object(k.s)("$__dropHereToLink")),a.a.createElement(mt,{private:!(!O.private&&!O.parentPrivate),unlockedPrivates:t.unlockedPrivates,setPrivate:function(e){var r=e?1:-1;e||0!==t.unlockedPrivates||(r=0),t.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:c.a.getState().controls.unlockedPrivates+r})),G(e),t.setPrivate&&t.setPrivate(e)},viewAllName:t.viewAllName,title:se.title,tooltipText:"".concat(O._parent&&c.a.getState().db.cards[O._parent]?"".concat(c.a.getState().db.cards[O._parent].name," / "):"").concat(se.title),searchText:(null===t||void 0===t?void 0:t.searchText)||null,icon:se.icon,iconTitle:se.iconTitle,color:Object(k.d)("medium"),editable:!(O.name||t.onlyOption&&!t.editable),_id:O._id,locked:!("link"!==O.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(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),{},{color:e})))}))}:null,onEdit:"completed"!==O.status&&te&&parseInt(te)>1||ee&&ee.plan&&(ee.owner||ee.planAdmin||ee.planEdit||ee.planModerate)?function(e){t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},O._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[O._id]),{},{name:e})))}))}:null,isExpanded:!t.noExpanded&&ce,noExpanding:t.expanded||c.a.getState().db.cardsExpanded||!1,onExpanding:function(){t.onExpand&&t.onExpand(!ce),t.expanded||c.a.getState().db.cardsExpanded||L((function(e){return!e}))}}),O&&(O._cardCode||O.value)?a.a.createElement("div",{style:{width:"100%",clear:"both",display:"flex",alignContent:"center",justifyContent:"space-between"}},O&&O._cardCode?a.a.createElement("div",{style:{paddingLeft:36,fontSize:11,marginTop:-9,color:"gray",display:"flex",alignItems:"center",whiteSpace:"nowrap"}},"# ",O._cardCode):a.a.createElement(a.a.Fragment,null),O&&O.value?a.a.createElement("div",{style:{width:"100%",textAlign:"right",fontSize:11,marginTop:-9,color:"black"}},"$ ",O.value):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null),(("insight"===O.type||"link"===O.type)&&O._createdBy&&y.users[O._createdBy._id]||O._createdBy&&O._createdBy.channel&&O._createdBy._id&&O._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(Ne.a,{title:O._createdBy.name||y.users[O._createdBy._id].name},a.a.createElement(Re.a,{alt:O._createdBy.name||y.users[O._createdBy._id].name,src:(null===(l=y.users[O._createdBy._id])||void 0===l?void 0:l.image)||null,size:"12px",style:{width:16,height:16}},(null===(s=O._createdBy)||void 0===s||null===(u=s.name)||void 0===u?void 0:u.substr(0,1))||y.users[O._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(k.d)("menu"),fontWeight:"bold"}},a.a.createElement("span",{style:{fontSize:10,color:"gray"}},Object(k.s)("$__createdBy","*")),": ",(null===(m=O._createdBy)||void 0===m||null===(g=m.name)||void 0===g?void 0:g.split(" ")[0])||y.users[O._createdBy._id].name.split(" ")[0]),a.a.createElement("div",null,_()(new Date).tz("America/Sao_Paulo").format("DD/MM/YYYY")===_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY")?"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("H:mm")):_()(new Date).tz("America/Sao_Paulo").format("YYYY")===_()(1e3*O.created_at).tz("America/Sao_Paulo").format("YYYY")?"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM H:mm")):"".concat(_()(1e3*O.created_at).tz("America/Sao_Paulo").format("DD/MM/YYYY H:mm"))))),O._kpiTimer&&Object.keys(O._kpiTimer).length>0&&0!==Object.keys(O._kpiTimer).filter((function(e){return O._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(ar,{data:O})),!t.noExpanded&&ce&&(!O.private||O.private&&(R||c.a.getState().controls.lockPrivate))?a.a.createElement(a.a.Fragment,null,a.a.createElement(rn,Object.assign({},t,{private:!!O.private,expanded:!0,onClick:function(e){},Resume:!0})),a.a.createElement("div",null,t.searchText&&O.description&&a.a.createElement("div",{className:b.description},Object(k.b)(O.description,t.searchText)))):ce?a.a.createElement(a.a.Fragment,null,a.a.createElement(ir,null)):a.a.createElement(a.a.Fragment,null),O.isTemplate?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"}},"completed"!==O.status&&(O.startDate&&_()(O.startDate).isValid()||O.endDate&&_()(O.endDate).isValid())?a.a.createElement("div",{style:Object(d.a)({position:"relative",display:"flex",width:"100%"},ce?{height:"45px"}:{})},a.a.createElement("div",{className:O.endDate&&_()(new Date(1e3*O.endDate)).tz("America/Sao_Paulo").format("YYYY-MM-DD")<_()().format("YYYY-MM-DD")&&"completed"!==O.status?b.lateDates:b.dates},O.startDate&&_()(O.startDate).isValid()&&a.a.createElement("div",{className:b.dateInfo},a.a.createElement(ze.a,{overlap:"rectangular",className:b.dateIco,icon:"insert_invitation",title:"$__startDate",size:"14px",disabled:!0}),new Date(1e3*O.startDate)instanceof Date&&!isNaN(new Date(1e3*O.startDate))?_()(new Date(1e3*O.startDate)).tz("America/Sao_Paulo").format("DD/MM/YYYY"):_()(O.startDate).tz("America/Sao_Paulo").format("DD/MM/YYYY")),O.endDate&&_()(O.endDate).isValid()?a.a.createElement("div",{className:b.dateInfo},a.a.createElement(ze.a,{overlap:"rectangular",className:b.dateIco,icon:"event_available",title:"$__endDate",size:"14px",disabled:!0}),new Date(1e3*O.endDate)instanceof Date&&!isNaN(new Date(1e3*O.endDate))?_()(new Date(1e3*O.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)),O._tags&&O._tags.filter((function(e){return e.value})).length>0?a.a.createElement("div",{style:t.showTags||ce?{marginBottom:33}:{}},a.a.createElement(qe.a,{options:O._tags,expanded:!!(t.showTags||ce&&"plan"!==O.type&&"link"!==O.type&&"insight"!==O.type)})):a.a.createElement(a.a.Fragment,null),O._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(ze.a,{overlap:"rectangular",className:b.indicatorsIcon,icon:"history",color:"lightgrey",size:"25px",title:t.noShowRecurrenceCard?"".concat(Object(k.s)("$__recurrence")).concat(O.recurrenceCreatedDate?": ".concat(_()(O.recurrenceCreatedDate).format("DD/MM/YYYY")):""):a.a.createElement("div",{style:{maxWidth:"280px"}},Object(k.s)("$__recurrentActivityFrom"),":",a.a.createElement(e,{db:"cards",data:y.cards[O._recurrenceId],Avatar:!0,ignoreList:!0,onlyOption:!0}))}),O.recurrenceCreatedDate?_()(O.recurrenceCreatedDate).format("DD/MM/YYYY"):""),O._users&&Object.keys(O._users).filter((function(e){return null!==String(e)})).length>0&&(!O._users[x._id]||O._users[x._id]&&Object.keys(O._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(gt,{_id:O._id,data:O,permission:le,transparent:!0,myDay:!0,limit:3})))),a.a.createElement("div",{style:{clear:"both"}})):a.a.createElement(a.a.Fragment,null)),O.isTemplate&&a.a.createElement("div",{style:{position:"relative",width:"100%",clear:"both",padding:"7px",backgroundColor:Object(k.d)("menu"),marginTop:"7px",cursor:"pointer"},onClick:function(e){e.stopPropagation(),A(!0)}},a.a.createElement(Be,{text:Object(k.s)("$__useThisTemplate","*"),icon:"auto_awesome",iconColor:"#FFFFFF",textColor:"#FFFFFF"})),"completed"===O.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(k.s)("$__completeDate"),":",Object(k.k)(O.completed_at||O.updated_at))),"plan"!==O.type&&O.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(E.a,{title:Object(k.s)("$__restoreThis",1),text:Object(k.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 xd(e){var t=e.data,r=c.a.getState().db,n=e.statusFilter,o=e.search,i=(e.startDate,e.totalTimes),l=a.a.useState({}),s=Object(h.a)(l,2),u=s[0],p=s[1],m=a.a.useState("time"),g=Object(h.a)(m,2),b=g[0],v=g[1];return console.log(o),a.a.createElement(a.a.Fragment,null,a.a.createElement(ua,{title:"TOP TAGS ".concat(i?"- (".concat(Object(k.l)(i),")"):""),color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__orderBy".concat(b),icon:"sort",color:"#FFFFFF",onClick:function(){v((function(e){return"time"===e?"count":"time"}))}}]}),a.a.createElement(Bi,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 l,s,h,m,g,b=r.tag.filter((function(t){return t.value===e}))[0],v=t[e].timesByUser,y=t[e].TotalCards||0;return g=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===b||void 0===b?void 0:b.color)||""),borderBottom:"none",borderRadius:5,padding:"3px 5px",width:"100%",alignItems:"center",justifyContent:"space-between",display:"flex"}},a.a.createElement("div",{style:{}},b.label," (",y,")"),a.a.createElement("div",{style:{display:"flex"}},"00:00:00"!==g?a.a.createElement(E.a,{color:u.toptags&&u.toptags[e]&&"timesheet"!==(null===(l=u.toptags[e])||void 0===l?void 0:l.view)?Object(k.d)("lightgray"):Object(k.d)("menu"),icon:"work_history",onClick:function(){p(Object(d.a)(Object(d.a)({},u),{},{toptags:Object(d.a)(Object(d.a)({},u.toptags||{}),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"timesheet"})))}))},size:"15px",title:"".concat(Object(k.s)("$__workedHours"),": ").concat(g),text:"".concat(Object(k.s)("$__workedHours"),": ").concat(g)}):a.a.createElement(a.a.Fragment,null),a.a.createElement(E.a,{color:u.toptags&&u.toptags[e]&&"activities"===(null===(s=u.toptags[e])||void 0===s?void 0:s.view)?Object(k.d)("menu"):Object(k.d)("lightgray"),icon:"list_alt",onClick:function(){p(Object(d.a)(Object(d.a)({},u),{},{toptags:Object(d.a)(Object(d.a)({},u.toptags||{}),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},u.toptags&&u.toptags[e]||{}),{},{view:"activities"})))}))},size:"15px",title:Object(k.s)("$__viewActivities","*"),text:Object(k.s)("$__viewActivities","*")}))),a.a.createElement("div",{style:{border:"solid 1px #d6d6d6",padding:5,marginTop:-10,paddingTop:15,borderTop:"none",marginLeft:10}},"00:00:00"!==g&&(u.toptags&&u.toptags[e]&&"timesheet"===(null===(h=u.toptags[e])||void 0===h?void 0:h.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(v).filter((function(e){return v[e]})).sort((function(e,t){return v[e]>v[t]?-1:v[e]<v[t]?1:0})).map((function(e){var t=c.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(Re.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(k.d)("menu"),width:"33%",minWidth:"150px"}},t.name)),a.a.createElement("div",{style:{marginLeft:"10px",fontWeight:"bold",color:Object(k.d)("menu")}},Object(k.l)(v[e])))}))):a.a.createElement(a.a.Fragment,null),u.toptags&&u.toptags[e]&&"activities"===(null===(m=u.toptags[e])||void 0===m?void 0:m.view)?a.a.createElement("div",null,Object.keys(t[e]).map((function(e){var t=Object(yt.t)(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(k.k)(r.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(k.k)(r.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*o.endDate).format("YYYY-MM-DD")||"completed"!==n&&Object(k.k)(r.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*o.startDate).format("YYYY-MM-DD")&&Object(k.k)(r.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*o.endDate).format("YYYY-MM-DD"))})).sort((function(e,t){var a="completed"===n?Object(k.k)(r.cards[e].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(k.k)(r.cards[e].updated_at,"YYYY-MM-DD HH:MM:ss"),o="completed"===n?Object(k.k)(r.cards[t].completed_at,"YYYY-MM-DD HH:MM:ss"):Object(k.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(yd,{db:"cards",data:c.a.getState().db.cards[e],noShadow:!0,resume:!0}))}))}))):a.a.createElement(a.a.Fragment,null)))}))))}function _d(e){var t,r=e.type,n=e.text,o=e.tags,i=(e.cards,e.statusFilter,e.search,e.tagsChartMount),l=c.a.getState().db,s=a.a.useState(!0),u=Object(h.a)(s,2);u[0],u[1];a.a.useEffect((function(){}),[]);var p=window.location.hash.split("/");p[0]=p[0].replace("#",""),36!==p[0].length&&(p[0]=null);var m={};return(null===(t=l.cards[p[0]])||void 0===t?void 0:t.customColumns)&&(m=JSON.parse(l.cards[p[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(Cn,{xs:12,sm:6,md:6,lg:3,style:{zIndex:0}},a.a.createElement($i,null,a.a.createElement(mt,{title:m[r]&&m[r].name?m[r].name:Object(k.s)("$__".concat(r),1),color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement(Wi,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={};l.status.map((function(e){n=Object(d.a)(Object(d.a)({},n),{},Object(f.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(k.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 Od(){Od=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var wd=Object(s.b)((function(e){return{cards:e.db.cards,tags:e.db.tags,searchs:e.searchs,timelines:e.timelines}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(!0),n=Object(h.a)(r,2),o=(n[0],n[1]);_()().tz("America/Sao_Paulo").format("YYYY/MM/DD");a.a.useEffect((function(){i()}),[]);var i=function(){var t=Object(p.a)(Od().mark((function t(){return Od().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"StrategyAndPlans/Dashboard/Widgers/timeSheet/init()"}),{ids:[l[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)}}(),l=window.location.hash.split("/");l[0]=l[0].replace("#",""),36!==l[0].length&&(l[0]=null);var s=Object(yt.t)(l[0]),u={guidelines:{},objectives:{},goals:{},actions:{}},m={};Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===l[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(d.a)(Object(d.a)({},u),{},{guidelines:Object(d.a)(Object(d.a)({},u.guidelines||{}),{},Object(f.a)({},t.value,Object(d.a)({},t)))}),m=Object(d.a)(Object(d.a)({},m),{},{guidelines:Object(d.a)(Object(d.a)({},(null===(r=m)||void 0===r?void 0:r.guidelines)||{}),{},Object(f.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===l[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(d.a)(Object(d.a)({},u),{},{objectives:Object(d.a)(Object(d.a)({},u.objectives||{}),{},Object(f.a)({},t.value,Object(d.a)({},t)))}),m=Object(d.a)(Object(d.a)({},m),{},{objectives:Object(d.a)(Object(d.a)({},(null===(r=m)||void 0===r?void 0:r.objectives)||{}),{},Object(f.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===l[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(d.a)(Object(d.a)({},u),{},{goals:Object(d.a)(Object(d.a)({},u.goals||{}),{},Object(f.a)({},t.value,Object(d.a)({},t)))}),m=Object(d.a)(Object(d.a)({},m),{},{goals:Object(d.a)(Object(d.a)({},(null===(r=m)||void 0===r?void 0:r.goals)||{}),{},Object(f.a)({},e,!0))})}))})),Object.keys(t.cards).filter((function(e){return(s[e]||t.cards[e]._parent===l[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(d.a)(Object(d.a)({},u),{},{actions:Object(d.a)(Object(d.a)({},u.actions||{}),{},Object(f.a)({},t.value,Object(d.a)({},t)))}),m=Object(d.a)(Object(d.a)({},m),{},{actions:Object(d.a)(Object(d.a)({},(null===(r=m)||void 0===r?void 0:r.actions)||{}),{},Object(f.a)({},e,!0))})}))}));var g={},b=[],v=[],y=[],x={};Object.keys(m).map((function(e){x=Object(d.a)(Object(d.a)({},x),m[e])}));var O=new Date,w=new Date,j=_()(O).unix("X");O=O.toISOString().split("T")[0],w.setDate(w.getDate()-30);var E=_()(w).unix("X");w=w.toISOString().split("T")[0];var S=e.searchs["tagsStatistics_".concat(l[0])]||{text:"#4",startDate:E,endDate:j},L=new Date(1e3*S.startDate||S.startDate),C=new Date(1e3*S.endDate||S.endDate),I="completed";S&&S.status&&Object.keys(S.status).length>0&&Object.keys(S.status).map((function(e){S.status[e]&&(I=e)}));for(var T=function(){var e=L.toISOString().split("T")[0],r={};Object.keys(s).filter((function(r){return t.cards[r].status===I&&Object(k.k)(t.cards[r]["completed"===I?"completed_at":"updated_at"],"YYYY-MM-DD")===e})).map((function(e){var n=t.cards[e],a=Object(yt.t)(e);Object.keys(a).filter((function(e){return"completed"===I&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*S.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&&(!S.text||S.text&&e.label.indexOf(S.text)>-1)})).map((function(e){var t;({}),r=Object(d.a)(Object(d.a)({},r),{},(t={},Object(f.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(f.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===y.indexOf(e.label)&&y.push(e.label)})),n._tags&&n._tags.filter((function(e){return e.value})).length>0&&n._tags.filter((function(e){return e.value&&(!S.text||S.text&&e.label.indexOf(S.text)>-1)})).map((function(e){var t;r=Object(d.a)(Object(d.a)({},r),{},(t={},Object(f.a)(t,"".concat(e.label),r["".concat(e.label)]+1||1),Object(f.a)(t,"".concat(e.label,"Color"),e.color||null),t)),-1===y.indexOf(e.label)&&y.push(e.label)}))}))})),Object.keys(r).length>0&&v.push(Object(d.a)({date:e},r)),F=L.setDate(L.getDate()+1),L=new Date(F)};L<=C;){var F;T()}Object.keys(s).filter((function(e){return t.cards[e].status===I&&("completed"===I&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD"))})).map((function(e){var r=Object(yt.t)(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(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD"))})).map((function(r){t.cards[e]._tags.map((function(e){var n,a,o,i;g=Object(d.a)(Object(d.a)({},g),{},Object(f.a)({},e.value,Object(d.a)(Object(d.a)({},g[e.value]||{}),{},Object(f.a)({},r,{date:"completed"===I?Object(k.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(k.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(d.a)(Object(d.a)({},g),{},Object(f.a)({},e.value,Object(d.a)(Object(d.a)({},g[e.value]||{}),{},Object(f.a)({},r,{date:"completed"===I?Object(k.k)(t.cards[r].completed_at,"YYYY-MM-DD"):Object(k.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(d.a)(Object(d.a)({},n),{},Object(f.a)({},"".concat(g[e][t].date," "),n["".concat(g[e][t].date," ")]+1||1)),a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},e,a[e]+1||1))})),Object.keys(n).map((function(e){r.push({x:e,y:n[e]})}));for(var o=new Date(w),i=function(){var e=o.toISOString().split("T")[0];0===r.filter((function(t){return t.x===e})).length&&r.push({x:e,y:0}),c=o.setDate(o.getDate()+1),o=new Date(c)};o<=new Date(O);){var c;i()}t.tag.filter((function(t){return t.value===e})).length>0&&(b=[].concat(Object(Se.a)(b),[{id:t.tag.filter((function(t){return t.value===e})).map((function(e){return e}))[0].label,data:Array.from(Object(Se.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(c.a.getState().timeline&&c.a.getState().timeline[e]){var r=c.a.getState().timeline[e];Object.keys(r).filter((function(e){return"timer"===r[e].type&&r[e].ini>=S.startDate&&r[e].fin<=S.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(d.a)(Object(d.a)({},a),{},Object(f.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(d.a)(Object(d.a)({},a),{},Object(f.a)({},e._id,a[e._id]+o||o))})):a=Object(d.a)(Object(d.a)({},a),{},Object(f.a)({},r[e].user._id,a[r[e].user._id]+o||o))}))}var i=Object(yt.t)(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(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].completed_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD")||"completed"!==I&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")>=_()(1e3*S.startDate).format("YYYY-MM-DD")&&Object(k.k)(t.cards[e].updated_at,"YYYY-MM-DD")<=_()(1e3*S.endDate).format("YYYY-MM-DD"))})).length})),D+=n,g[e]=Object(d.a)(Object(d.a)({},g[e]),{},{times:Object(k.l)(n),timesInt:n,TotalCards:o,timesByUser:a})})),a.a.createElement(B,null,a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12},a.a.createElement(mu,{nodeId:"tagsStatistics_".concat(l[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(Cn,{xs:12,sm:12,md:12,lg:12,style:{minHeight:300,height:35*v.length}},a.a.createElement(md,{data:v,keys:y}))),a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12},a.a.createElement($i,null,a.a.createElement(xd,{data:g,statusFilter:I,startDate:E,search:S,totalTimes:D})))),a.a.createElement(kn,null,a.a.createElement(_d,{tagsChartMount:g,tags:u.guidelines,cards:m.guidelines,type:"guidelines",text:"#1"}),a.a.createElement(_d,{tagsChartMount:g,tags:u.objectives,cards:m.objectives,type:"objectives",text:"#2"}),a.a.createElement(_d,{tagsChartMount:g,tags:u.goals,cards:m.goals,type:"goals",text:"#3"}),a.a.createElement(_d,{tagsChartMount:g,tags:u.actions,cards:m.actions,type:"actions",text:"#4"})))}));var jd,Ed=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(El)((function(){var e=c.a.getState(),t=e.db,r=e.search,n=a.a.useState(0),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(25),u=Object(h.a)(s,2),d=u[0],p=u[1],f=window.location.hash.split("/");f[0]=f[0].replace("#","");var m={};return m=36===f[0].length?(m=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})):(m=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(m).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(k.s)("$__page")," ",i+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(m).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.a,{component:"div",count:Object.keys(m).length,page:i,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(k.s)("$__insightsPerPage")}))),a.a.createElement(kn,null,Object.keys(m).map((function(e,t){if(t<=(i+1)*d&&t>=i*d)return a.a.createElement(Cn,{key:m[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,{db:"cards",data:m[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(m).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(k.s)("$__page")," ",i+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(m).length/d),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.a,{component:"div",count:Object.keys(m).length,page:i,onChangePage:function(e,t){l(t)},rowsPerPage:d,onChangeRowsPerPage:function(e){p(parseInt(e.target.value,10))},labelRowsPerPage:Object(k.s)("$__insightsPerPage")}))))}))),kd=r(1852),Sd=r(1959),Ld=r(1960),Cd=r(1958),Id=r(640),Td=Object(R.a)({avatar:{backgroundColor:Id.a[100],color:Id.a[600]}});function Fd(e){Td();var t=e.open,r=(e.selectedValue,e.onClose);return a.a.createElement(jt.a,{onClose:function(){r()},"aria-labelledby":"simple-dialog-title",open:t},e&&e.title&&a.a.createElement(Cd.a,{id:"simple-dialog-title"},e.title),a.a.createElement(U.a,null,e.options.map((function(e,t){return a.a.createElement(kd.a,{button:!0,onClick:function(){e.onClick&&e.onClick(),r()},key:t},a.a.createElement(Sd.a,null,a.a.createElement(le.a,{icon:e.icon})),a.a.createElement(Ld.a,{primary:Object(k.s)(e.name,1)}))}))))}function Dd(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(null),c=Object(h.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Be,{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(k.d)("medium"),onClick:function(){o(!0)}}),a.a.createElement(Fd,{selectedValue:l,open:n,onClose:function(){var e;o(!1),s(e)},options:e.options}))}function Nd(){Nd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Pd,Ad=w.default.div(jd||(jd=Object(u.a)(["\n                    background-color:none;\n                    "]))),$d=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(e.defaultName?e.defaultName:""),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),36!==y[0].length&&(y[0]=null);var x=function(){var t=Object(p.a)(Nd().mark((function t(){var r;return Nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=c.a.getState().functions.socket).emit("data",{module:"cards",method:"post",action:"add"},{_parent:y[0],planId:y[0]&&36===y[0].length?y[0]:null,name:s,type:e.cardType,status:"notStarted"},function(){var e=Object(p.a)(Nd().mark((function e(t){return Nd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.emit("card.UPD",{cardId:t.id,cardData:Object(d.a)(Object(d.a)({},t.data),{},{_parent:y[0],_timeline:Object(f.a)({},t.log._id,Object(d.a)(Object(d.a)({},t.log),{},{_parent:[t.id]})),_users:Object(f.a)({},n._id,{name:c.a.getState().db.users[n._id].name?c.a.getState().db.users[n._id].name:null,displayName:c.a.getState().db.users[n._id].displayName?c.a.getState().db.users[n._id].displayName:null,image:c.a.getState().db.users[n._id].image?c.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(p.a)(Nd().mark((function t(n){var a,i,l,s,u;return Nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,i=n.source,l=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,l),Y.a.put("cards/reorder",{cards:s}),u={},s.map((function(e,t){return(u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},e,r.cards[e])))[e].order||(u[e].order.low=t),u[e].order.low=t,!0})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.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(p.a)(Nd().mark((function e(t){return Nd().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(p.a)(Nd().mark((function e(t){return Nd().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(cr.a,{onDragEnd:_,onDragStart:O,onDragUpdate:w},a.a.createElement(cr.c,{droppableId:"Drop_".concat(e.cardType||""),type:"column",direction:"vertical"},(function(t,n){return a.a.createElement(Ad,Object.assign({},t.droppableProps,{isDraggingOver:n.isDraggingOver,ref:t.innerRef}),e.cards.map((function(e,t){return a.a.createElement(cr.b,{draggableId:e,index:t,key:e},(function(t,n){return a.a.createElement("div",Object.assign({},t.draggableProps,t.dragHandleProps,{ref:t.innerRef}),a.a.createElement(vn,{isDragging:n.isDragging&&!n.isDropAnimating,snapshot:n,data:r.cards[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(Be,{text:Object(k.s)("$__add","*"),icon:"add_box",iconColor:Object(k.d)("medium"),onClick:function(){v(!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(Ce,{label:Object(k.s)("$__nameOfCard"),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){u(e.target.value)},onBlur:function(e){""===e.target.value&&v(!b)},onKeyDown:function(e){13===e.keyCode&&s&&x(),27===e.keyCode&&(v(!b),u(""))}},autoFocus:!0,value:s,placeholder:Object(k.s)("$__titleOfCard_placeholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return x()}},a.a.createElement(le.a,{color:"green",icon:"save",title:Object(k.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){v(!b),u("")}},a.a.createElement(le.a,{color:Object(k.d)("medium"),icon:"cancel",title:Object(k.s)("$__cancel","*"),size:e.actionsSize||"25px"}))))))}));function zd(){zd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Md=w.default.div(Pd||(Pd=Object(u.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                ")})),Yd=Object(s.b)((function(e){return{store:{cards:e.db.cards}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1];a.a.useEffect((function(){o||(i(!0),Object(yt.J)(e))}));var l=function(){var r=Object(p.a)(zd().mark((function r(n){var a,o,i,l,s,u,p,h,m,g,b,v,y;return zd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=c.a.getState().functions.socket,o=n.destination,i=n.source,l=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,p=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(h=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),h.splice(o.index,0,l),m={},h.map((function(e,r){m[e]=Object(d.a)(Object(d.a)({},t.cards[e]),{},{order:{low:r}})})),g=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t.cards),m)}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},g)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:h,columnName:"type",sourceCards:[]}),r.abrupt("return");case 21:p.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,l),v=Object(d.a)({},t.cards),p.map((function(e,t){v=Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),b.map((function(e,t){v=Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},v[e]?v[e]:{}),{},{order:{low:t}})))})),y=Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},v),{},Object(f.a)({},l,Object(d.a)(Object(d.a)({},v[l]),{},{type:u,order:{low:o.index}})))}),e.reduxFunction("ASYNC","SET_DB",Object(d.a)({},y)),a.emit("data",{module:"cards",method:"put",action:"inColumn"},{node:l,source:i.droppableId,destination:o.droppableId,destinationCards:b,columnName:"type",sourceCards:p});case 31:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}();return a.a.createElement(cr.a,{onDragEnd:l},a.a.createElement(cr.c,{droppableId:"ALL-COLUMNS-STATUS",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal")},(function(r){return a.a.createElement(Md,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(rd,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(d.a)(Object(d.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 Bd,Rd=Object(s.b)((function(e,t){return{cards:e.db.cards,hidePrivate:e.controls.hidePrivate}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=c.a.getState().db,n=r.dataType,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=r.cards,p=window.location.hash.split("/");p[0]=p[0].replace("#",""),p[0]&&36!==p[0].length&&(p[0]=null),a.a.useEffect((function(){l||(s(!0),j())}));var m={};Object.keys(r.cards).filter((function(e){return r.cards[e]&&!r.cards[e].deleted&&(r.cards[e]._planId===p[0]||r.cards[e]._parent===p[0])})).map((function(e){m=Object(d.a)(Object(d.a)({},m),{},Object(f.a)({},e,r.cards[e]))}));var g,b=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&m[e].type.indexOf("guideline")>-1&&m[e]._parent===p[0]}))[0]||null,v=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&"objective"===m[e].type}))[0]||null,y=Object.keys(m).filter((function(e){return!0===m[e]._selected&&m[e].type&&"goal"===m[e].type}))[0]||null,x=Object.keys(m).filter((function(e){return"guidelineR"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),_=Object.keys(m).filter((function(e){return"guidelineC"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),O=Object.keys(m).filter((function(e){return"guidelineE"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),w=Object.keys(m).filter((function(e){return"guidelineD"===m[e].type&&m[e]._parent===p[0]&&!m[e].deleted})).sort((function(e,t){return m[e].order&&String(m[e].order.low)&&m[t].order&&String(m[t].order.low)&&parseInt(m[e].order.low)>parseInt(m[t].order.low)?1:-1})),j=function(){var t=Object(d.a)({},c.a.getState().db.cards);Object.keys(m).map((function(e){m[e]&&m[e]._selected&&(m[e]._selected=!1)})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},t),m)}))};y?g=Object.keys(m).filter((function(e){return m[e]._parent===y&&!m[e].checklist})):v?g=Object.keys(m).filter((function(e){return m[e]._parent===v&&!m[e].checklist})):b&&(g=Object.keys(m).filter((function(e){return m[e]._parent===b&&!m[e].checklist})));var E=Object.keys(m).filter((function(e){return m[e]._parent===p[0]})),S=m&&Object.keys(m).filter((function(e){return m[e]&&m[e]._selected&&m[e].type&&m[e].type.indexOf("guideline")>-1}));return a.a.createElement("div",{style:{width:"inherit"}},!v&&a.a.createElement(a.a.Fragment,null,a.a.createElement(G.a,{smDown:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",marginRight:"14px",padding:"7px",background:Object(k.d)("ColumnTitleColor"),color:Object(k.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(k.s)("$__internalAspects",1)),a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(50% - 7px)",padding:"7px",background:Object(k.d)("ColumnTitleColor"),color:Object(k.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(k.s)("$__externalAspects",1))),a.a.createElement(G.a,{smUp:!0},a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 7px)",padding:"7px",background:Object(k.d)("ColumnTitleColor"),color:Object(k.d)("colorText"),fontSize:"16px",fontWeight:"bold",marginBottom:"15px",textAlign:"center"}},Object(k.s)("$__s.W.O.T","*"))),a.a.createElement(Yd,{cards:E.map((function(e){return m[e]})),showSelected:Object.keys(m).filter((function(e){return!0===m[e]._selected})).length>0,lockColumns:S.length>0&&"guidelineD"===m[S[0]].type?["strength","threat"]:S.length>0&&"guidelineR"===m[S[0]].type?["strength","opportunity"]:S.length>0&&"guidelineE"===m[S[0]].type?["weakness","threat"]:S.length>0&&"guidelineC"===m[S[0]].type?["weakness","opportunity"]:null,columnStyle:{minWidth:"calc(25% - 14px)"},showOrder:!0,inLineAdd:!0})),a.a.createElement(kn,null,a.a.createElement("div",{style:{position:"relative",float:"left",width:"calc(100% - 28px)",marginRight:"14px",marginLeft:"14px",padding:"7px",background:Object(k.d)("ColumnTitleColor"),color:Object(k.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(le.a,{icon:Ro.a,color:Object(k.d)("textColor"),size:25}),a.a.createElement("span",{style:{marginLeft:15}},b?Object(k.s)("$__planning",1):"MATRIX SWOT"))),b?a.a.createElement(a.a.Fragment,null,a.a.createElement(Cn,{md:3,sm:12,xs:12},a.a.createElement("div",null,a.a.createElement(ua,{title:"MATRIX SWOT",icon:n.filter((function(e){return"matrix"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&u[b]&&u[b].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(vn,{data:u[b],db:"cards",selectOption:!0,expanded:!0}),a.a.createElement(Be,{icon:"undo",text:Object(k.s)("$__backToMatrix","*"),onClick:function(){j("guideline")}})),v&&a.a.createElement("div",null,a.a.createElement(ua,{title:Object(k.s)("$__objective",1),icon:n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),e.hidePrivate&&u[v]&&u[v].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(vn,{data:u[v],db:"cards",selectOption:!0,expanded:!0})),y&&a.a.createElement("div",null,a.a.createElement(ua,{title:Object(k.s)("$__goal",1),icon:n.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},customButtons:[{title:"$__new",icon:"add_box",color:Object(k.d)("menu"),onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"goal"===e.name}))[0].iniModule,db:"cards",data:{type:"goal",_parent:v,status:"notStarted"}}))}}]}),e.hidePrivate&&u[y]&&u[y].private?a.a.createElement(a.a.Fragment,null):a.a.createElement(vn,{data:u[y],db:"cards",selectOption:!0,expanded:!0}))),a.a.createElement(Cn,{md:9,sm:12,xs:12},a.a.createElement(ua,{title:v&&!y?Object(k.s)("$__goals",1):v?Object(k.s)("$__actions",1):Object(k.s)("$__objectives",1),icon:v&&!y?n.filter((function(e){return"goal"===e.name}))[0].icon:v?"view_column":n.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"},actionButtonsStyle:{position:"absolute",top:0,bottom:0,display:"flex",itemAligns:"center"},customButtons:[y?{component:a.a.createElement(Dd,{iconColor:Object(k.d)("color"),options:n.filter((function(e){return"agile"===e.module})).map((function(t){return{icon:t.icon,name:Object(k.s)("$__".concat(t.name),1),onClick:function(){return e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",db:"cards",data:{type:t.name,_parent:y,status:"notStarted"}}))}}}))})}:{title:"$__new",icon:"add_box",color:Object(k.d)("color"),actionsSize:"22px",show:!0,onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:n.filter((function(e){return"objective"===e.name}))[0].iniModule,db:"cards",data:v?{type:"goal",_parent:v,status:"notStarted"}:{type:"objective",_parent:b,status:"notStarted"}}))}}]}),a.a.createElement(od,{cards:(null===(t=g)||void 0===t?void 0:t.map((function(e){return m[e]})))||[],viewButton:!0}))):a.a.createElement(Cn,{md:12},a.a.createElement(kn,{style:{paddingBottom:"33px"}},a.a.createElement(Cn,{md:3,sm:12,xs:12},a.a.createElement(ua,{title:Object(k.s)("$__guidelineR",1),icon:n.filter((function(e){return"guidelineR"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.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(k.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(k.s)("$__guidelineRtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(k.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(k.s)("$__guidelineRdetails",1))),a.a.createElement($d,{cards:x,cardType:"guidelineR"})),a.a.createElement(Cn,{md:3,sm:12,xs:12},a.a.createElement(ua,{title:Object(k.s)("$__guidelineD",1),icon:n.filter((function(e){return"guidelineD"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.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(k.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(k.s)("$__guidelineDtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(k.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(k.s)("$__guidelineDdetails",1))),a.a.createElement($d,{cards:w,cardType:"guidelineD"})),a.a.createElement(Cn,{md:3,sm:12,xs:12},a.a.createElement(ua,{title:Object(k.s)("$__guidelineC",1),icon:n.filter((function(e){return"guidelineC"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.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(k.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(k.s)("$__guidelineCtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(k.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(k.s)("$__guidelineCdetails",1))),a.a.createElement($d,{cards:_,cardType:"guidelineC"})),a.a.createElement(Cn,{md:3,sm:12,xs:12},a.a.createElement(ua,{title:Object(k.s)("$__guidelineE",1),icon:n.filter((function(e){return"guidelineE"===e.name}))[0].icon,color:Object(k.d)("colorText"),style:{background:Object(k.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(k.d)("menu"),fontWeight:"bold",paddingBottom:"7px",borderBottom:"solid 1px #e4e4e4",textAlign:"center"}},Object(k.s)("$__guidelineEtypes",1)),a.a.createElement("div",{style:{position:"relative",width:"100%",color:Object(k.d)("medium"),fontSize:"14px",padding:"7px",textAlign:"center"}},Object(k.s)("$__guidelineEdetails",1))),a.a.createElement($d,{cards:O,cardType:"guidelineE"}))))))}));function Gd(){Gd=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Hd=w.default.div(Bd||(Bd=Object(u.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                ")})),Wd=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=r.dataType,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState({}),g=Object(h.a)(m,2),b=g[0],v=g[1];a.a.useEffect((function(){}),[]);var y=window.location.hash.split("/");y[0]=y[0].replace("#",""),36!==y[0].length&&(y[0]=null);var x={},_=[],O=function e(t){-1===_.indexOf(t)&&_.push(t),Object.keys(c.a.getState().db.cards).filter((function(e){return c.a.getState().db.cards[e]._parent&&!c.a.getState().db.cards[e].checklist&&c.a.getState().db.cards[e]._parent===t&&-1===_.indexOf(e)})).map((function(t){e(t),_.push(t)}))},w=function e(t){-1===_.indexOf(_)&&_.push(t),Object.keys(c.a.getState().db.cards).filter((function(e){return(e===t||c.a.getState().db.cards[t]._parent===e)&&!c.a.getState().db.cards[e].checklist&&-1===_.indexOf(e)})).map((function(t){c.a.getState().db.cards[t]&&c.a.getState().db.cards[t]._parent&&e(c.a.getState().db.cards[t]._parent),_.push(t)}))};Object.keys(r.cards).filter((function(t){var a=Object(yt.k)(t);if(r.cards[t]&&(!r.cards[t].private||r.cards[t].private&&r.cards[t]._users[n._id])&&(r.cards[t]._planId===y[0]||r.cards[t]._parent===y[0])&&(e.showCompleted||!e.showCompleted&&"completed"!==r.cards[t].status)&&(!e.onlyUnReaded||e.onlyUnReaded&&a.total>0))return!0})).map((function(e){x=Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},e,r.cards[e]))}));var j=Object.keys(x).filter((function(e){return x[e]&&x[e].type&&!0===x[e]._selected&&x[e].type.indexOf("guideline")>-1})).length>0?Object.keys(x).filter((function(e){return x[e]&&x[e].type&&!0===x[e]._selected&&x[e].type.indexOf("guideline")>-1}))[0]:null;j&&(O(j),w(j));var S=Object.keys(x).filter((function(e){return x[e]&&!0===x[e]._selected&&"objective"===x[e].type})).length>0?Object.keys(x).filter((function(e){return x[e]&&!0===x[e]._selected&&"objective"===x[e].type}))[0]:null;S&&(O(S),w(S));var L=Object.keys(x).filter((function(e){return!0===x[e]._selected&&"goal"===x[e].type})).length>0?Object.keys(x).filter((function(e){return!0===x[e]._selected&&"goal"===x[e].type}))[0]:null;L&&(O(L),w(L));var C=Object.keys(x).filter((function(e){return!0===x[e]._selected&&!x[e].checklist&&"plan"!==x[e].type&&"objective"!==x[e].type&&"goal"!==x[e].type&&"feed"!==x[e].type&&"link"!==x[e].type&&"insight"!==x[e].type&&"link"!==x[e].type&&"chatGroup"!==x[e].type&&-1===x[e].type.indexOf("guideline")&&o.filter((function(t){return t.name===x[e].type})).length>0&&"swot"!==o.filter((function(t){return t.name===x[e].type}))[0].module})).length>0?Object.keys(x).filter((function(e){if(!0===x[e]._selected&&!x[e].checklist&&"plan"!==x[e].type&&"objective"!==x[e].type&&"goal"!==x[e].type&&"feed"!==x[e].type&&"link"!==x[e].type&&"insight"!==x[e].type&&"link"!==x[e].type&&"chatGroup"!==x[e].type&&-1===x[e].type.indexOf("guideline")&&o.filter((function(t){return t.name===x[e].type})).length>0&&"swot"!==o.filter((function(t){return t.name===x[e].type}))[0].module)return!0}))[0]:null;C&&(O(C),w(C));var I=[{value:"guidelines",type:"guideline",label:"$__guidelines",icon:"alt_route",viewButton:!0,selectedParent:null},{value:"objectives",type:"objective",label:"$__objectives",icon:o.filter((function(e){return"objective"===e.name}))[0].icon,viewButton:!0,selectedParent:j},{value:"goals",type:"goal",label:"$__goals",icon:o.filter((function(e){return"goal"===e.name}))[0].icon,viewButton:!0,selectedParent:S||j},{value:"actions",type:"iniciative",label:"$__actions",icon:"double_arrow",viewButton:!0,selectedParent:L||S||j}],T={};T.guidelines=Object.keys(x).filter((function(e){return(x[e]._parent===y[0]||x[e]._planId===y[0])&&x[e].type&&x[e].type.indexOf("guideline")>-1&&(0===_.length||_.length>0&&_.indexOf(e)>-1)}))||null,T.objectives=Object.keys(x).filter((function(e){return x[e].type&&"objective"===x[e].type&&(0===_.length||_.length>0&&_.indexOf(e)>-1)}))||null,T.objectives=Object.keys(x).filter((function(e){return"objective"===x[e].type&&!x[e].checklist&&(0===_.length||_.length>0&&_.indexOf(e)>-1)})),T.objectives2=Object.keys(x).filter((function(e){if(!S&&"objective"===x[e].type&&x[e]._parent!==j&&!x[e].checklist&&T.objectives.indexOf(x[e]._parent)>-1&&(0===_.length||_.length>0&&_.indexOf(e)>-1))return!0})),T.objectives2.map((function(e){-1===T.objectives.indexOf(e)&&T.objectives.push(e)})),T.goals=Object.keys(x).filter((function(e){return x[e].type&&"goal"===x[e].type&&(0===_.length||_.length>0&&_.indexOf(e)>-1)}))||null,T.goals2=Object.keys(x).filter((function(e){return"goal"===x[e].type&&!x[e].checklist&&T.goals.indexOf(x[e]._parent)>-1&&(0===_.length||_.length>0&&_.indexOf(e)>-1)})),T.goals2.map((function(e){-1===T.goals.indexOf(e)&&T.goals.push(e)})),T.actions=Object.keys(x).filter((function(e){return x[e].type&&!x[e].checklist&&"plan"!==x[e].type&&"objective"!==x[e].type&&"goal"!==x[e].type&&"feed"!==x[e].type&&"link"!==x[e].type&&"insight"!==x[e].type&&"link"!==x[e].type&&"chatGroup"!==x[e].type&&-1===x[e].type.indexOf("guideline")&&o.filter((function(t){return t.name===x[e].type})).length>0&&"swot"!==o.filter((function(t){return t.name===x[e].type}))[0].module&&(0===_.length||_.length>0&&_.indexOf(e)>-1)}))||null,T.guidelines=T.guidelines.map((function(e){return x[e]})),T.objectives=T.objectives.map((function(e){return x[e]})),T.goals=T.goals.map((function(e){return x[e]})),T.actions=T.actions.map((function(e){return x[e]}));var F=function(){var t=Object(p.a)(Gd().mark((function t(n){var a,o,i,l,s,p,h,m,g,b,y,_,O;return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=n.destination,o=n.source,i=n.draggableId,r.cards,!n.combine){t.next=5;break}return Object(k.c)({message:"".concat(Object(k.s)("$__confirmLink",1),": ").concat(c.a.getState().db.cards[i].name," >>> ").concat(c.a.getState().db.cards[n.combine.draggableId]?c.a.getState().db.cards[n.combine.draggableId].name:""),variant:"warning",persist:!0,horizontal:"right",confirm:function(){Object(yt.z)(e,{cardId:i,cardToLink:n.combine.draggableId})}}),t.abrupt("return");case 5:if(a){t.next=7;break}return t.abrupt("return",!1);case 7:if(a.droppableId!==o.droppableId||a.id!==o.index){t.next=9;break}return t.abrupt("return",!1);case 9:if(l=o.droppableId,s=a.droppableId,p=Array.from(Object.keys(x).filter((function(e){return x[e].status===l})).sort((function(e,t){return x[e].order&&x[t].order&&String(x[e].order.low)&&String(x[t].order.low)&&parseInt(x[e].order.low)<parseInt(x[t].order.low)?-1:1})).map((function(e){return e._id}))),l!==s||!c.a.getState().db.orderByTitle){t.next=14;break}return t.abrupt("return");case 14:if(l!==s||c.a.getState().db.orderByTitle){t.next=31;break}return h=c.a.getState().functions.socket,m="iniciative"===l?"action":l,(g=Array.from(T["".concat(m,"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(o.index,1),t.next=21,setTimeout(500);case 21:return g.splice(a.index,0,i),t.next=24,setTimeout(500);case 24:return h.emit("data",{module:"cards",method:"put",action:"reorder"},{cards:g}),b=Object(d.a)({},c.a.getState().db.cards),t.next=28,new Promise((function(e,t){g.map((function(t,r){b=Object(d.a)(Object(d.a)({},b),{},Object(f.a)({},t,Object(d.a)(Object(d.a)({},b[t]),{},{order:"".concat(r+1)}))),r+1===g.length&&e(!0)}))}));case 28:return t.sent&&e.reduxFunction("IMMEDIATE","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),b)})),t.abrupt("return");case 31:if(p.splice(o.index,1),(y=Array.from(Object.keys(x).filter((function(e){return e.status===s})).sort((function(e,t){return x[e].order&&x[t].order&&String(x[e].order.low)&&String(x[t].order.low)&&parseInt(x[e].order.low)<parseInt(x[t].order.low)?-1:1})).map((function(e){return e._id})))).splice(a.index,0,i),p.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(d.a)(Object(d.a)({},r.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(t))))})),y.map((function(e,t){r.cards[e].order&&r.cards[e].order.low?r.cards[e].order.low=parseInt(t):r.cards[e]=Object(d.a)(Object(d.a)({},r.cards[e]),{},Object(f.a)({},"order",Object(f.a)({},"low",parseInt(t))))})),_=Object(yt.t)(i),O={_id:i,type:a.droppableId,_childrens:_,_objectives:T.objectives.filter((function(e){return _[e._id]})).map((function(e){return e})),_goals:T.goals.filter((function(e){return _[e._id]})).map((function(e){return e}))},"goal"!==r.cards[i].type||"guideline"!==a.droppableId){t.next=42;break}return Object(k.c)({message:Object(k.s)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheObjectiveColumn",1),variant:"error",persist:!1,horizontal:"center"}),v({}),t.abrupt("return");case 42:if(-1!==r.cards[i].type.indexOf("guideline")||"objective"===r.cards[i].type||"goal"===r.cards[i].type||"guideline"!==a.droppableId&&"objective"!==a.droppableId){t.next=46;break}return Object(k.c)({message:Object(k.s)("$__YouCannotMoveThisItemToThisColumnMoveFirstToTheGoalsColumn",1),variant:"error",persist:!1,horizontal:"center"}),v({}),t.abrupt("return");case 46:r.cards[i].type.indexOf("guideline")>-1&&"guideline"!==r.cards[i].type?Object(k.c)({message:Object(k.s)("$__youCantMoveGuidelineWithSwotLinked",1),variant:"error",persist:!1,horizontal:"center"}):"guideline"===r.cards[i].type&&"guideline"!==a.droppableId&&(T.objectives.filter((function(e){return e._parent===i})).length>0||T.goals.filter((function(e){return e._parent===i})).length>0)||r.cards[i].type.indexOf("objective")>-1&&"guideline"!==a.droppableId&&"objective"!==a.droppableId&&T.goals.filter((function(e){return e._parent===i})).length>0?(v(O),u(!0)):Object(k.c)({message:"".concat(Object(k.s)("$__confirmTransformIn",1),": ").concat(Object(k.s)("$__".concat(a.droppableId))),variant:"warning",persist:!0,horizontal:"right",confirm:function(){D(O),r.cards[r.cards[i]._parent].type.indexOf(a.droppableId)>-1&&Object(yt.z)(e,{cardId:i,cardToLink:r.cards[r.cards[i]._parent]._parent})},cancel:function(){v({})}});case 47:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=Object(p.a)(Gd().mark((function t(r){var n;return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r,b&&b._id&&(n=b),t.next=4,Object(yt.O)(e,n);case 4:e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},n._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[n._id]),{},{type:n.type})))})),v({});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=function(){var t=Object(p.a)(Gd().mark((function t(r){var n;return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="goals"===r?b._goals:b._objectives,T[r].filter((function(e){return b._childrens[e._id]})).map(function(){var t=Object(p.a)(Gd().mark((function t(a,o){return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.filter((function(e){return e._id===a._id})).map((function(e){e.type="goals"===r?"task":"goal"})),t.next=3,Object(yt.O)(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)}}()),v(Object(d.a)(Object(d.a)({},b),"goals"===r?{_goals:n}:{_objectives:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),P=function(){var t=Object(p.a)(Gd().mark((function t(){return Gd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(yt.O)(e,{_id:b._id,type:b.type});case 2:u(!1),v({});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(cr.a,{onDragEnd:F},a.a.createElement(cr.c,{droppableId:"ALL-COLUMNS-TYPE",type:"column",direction:"".concat(e.inLine?"vertical":"horizontal"),isDropDisabled:!0},(function(t){return a.a.createElement(Hd,Object.assign({},e,{ref:t.innerRef}),I.map((function(t,r){var n={name:t.label,icon:t.icon,cards:[],emptyHide:!1};return a.a.createElement(du,Object.assign({},e,{key:t.value,columnId:t.type,isDropDisabled:!0,column:n,cards:T&&T[t.value]?T[t.value]:[],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(jt.a,{fullWidth:!0,"aria-labelledby":"simple-dialog-title",open:s},a.a.createElement("div",{style:{position:"relative",marginLeft:"10px",marginTop:"5px",width:"calc(100% - 10px)"}},a.a.createElement(mt,{title:Object(k.s)("$__attention",1),icon:"label",onCancel:function(){u(!1),v({})}})),a.a.createElement("div",{style:{color:"#CCCCCC",padding:"15px"}},b._childrens&&!b._skipGoals&&b._goals.length>0&&b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.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(k.s)("$__YouHaveLinkedGoals"),a.a.createElement("p",{style:{color:"red"}},Object(k.s)("$__ThisActionCanOnlyBeUndoneManually"))),b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.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(vn,{db:"cards",data:t,noShadow:!0}),a.a.createElement(q.a,{onClick:function(){Object(yt.O)(e,{_id:t._id,type:"task"})}},a.a.createElement(le.a,{icon:"change_circle",color:Object(k.d)("menu"),title:Object(k.s)("$__transformInTask")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__skipAll"),text:Object(k.s)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){v(Object(d.a)(Object(d.a)({},b),{},{_skipGoals:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__changeAllInTasks"),text:Object(k.s)("$__changeAllInTasks"),icon:"change_circle",size:"25px",onClick:function(){N("goals"),v(Object(d.a)(Object(d.a)({},b),{},{_skipGoals:!0}))}})))),b._childrens&&!b._skipObjectives&&b._objectives.length>0&&b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.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(k.s)("$__YouHaveLinkedObjectives"),a.a.createElement("p",{style:{color:"red"}},Object(k.s)("$__ThisActionCanOnlyBeUndoneManually"))),b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).sort((function(e,t){return c.a.getState().db.orderByTitle&&"ASC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()<t.name.toLowerCase().trim()||c.a.getState().db.orderByTitle&&"DESC"===c.a.getState().db.orderByTitlePosition&&e.name.toLowerCase().trim()>t.name.toLowerCase().trim()?-1:c.a.getState().db.orderByTitle?0:!c.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(vn,{db:"cards",data:t,noShadow:!0}),a.a.createElement(q.a,{onClick:function(){Object(yt.O)(e,{_id:t._id,type:"goal"})}},a.a.createElement(le.a,{icon:"change_circle",color:Object(k.d)("menu"),title:Object(k.s)("$__transformInGoal")})))})),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__skipAll"),text:Object(k.s)("$__skipAll"),color:"lightgrey",icon:"skip_next",size:"25px",onClick:function(){v(Object(d.a)(Object(d.a)({},b),{},{_skipObjectives:!0}))}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__changeAllInGoal"),text:Object(k.s)("$__changeAllInGoal"),icon:"change_circle",size:"25px",onClick:function(){N("objectives"),v(Object(d.a)(Object(d.a)({},b),{},{_skipObjectives:!0}))}}))),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),icon:"cancel",size:"25px",onClick:function(){u(!1),v({})}}))),(b&&b._childrens&&Object.keys(b._childrens).length>0&&0===b._goals.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length&&0===b._objectives.filter((function(e){return c.a.getState().db.cards[e._id]&&c.a.getState().db.cards[e._id].type===e.type})).length||(b._skipGoals&&b._goals.length>0||b&&b._goals&&0===b._goals.length)&&(b._skipObjectives&&b._objectives.length>0||b&&b._objectives&&0===b._objectives.length))&&a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{style:{color:"red"}},Object(k.s)("$__clickInSaveToFinishMigration")),a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__cancel"),text:Object(k.s)("$__cancel"),color:"lightgrey",icon:"close",size:"25px",onClick:function(){u(!1),v({})}}),a.a.createElement("div",{style:{marginLeft:"15px"}},a.a.createElement(E.a,{shadow:!0,title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),icon:"done_all",size:"25px",onClick:function(){P()}})))))))}));function Ud(){Ud=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Vd=Object(s.b)((function(e){return{groupByColor:e.db.groupByColor,orderByTitle:e.db.orderByTitle,orderByTitlePosition:e.db.orderByTitlePosition}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().db,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!0),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState(!1),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),S=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(d.a)(Object(d.a)({},c.a.getState().controls),{},{deleted:!1}))}}),[]),a.a.useEffect((function(){_&&I()}),[_]);var I=function(){var t=Object(p.a)(Ud().mark((function t(){var r;return Ud().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(st.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(yt.k)(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(yt.k)(e);T+=t.total})),a.a.createElement("div",null,a.a.createElement(Cn,{md:12,sm:12,xs:12},a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},a.a.createElement(mu,{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(at,{text:Object(k.s)("$__options"),icon:"settings",horizontalButton:!0,size:"21px",color:"lightgray",btColor:"lightgray",options:[{name:"ASC"===t.orderByTitlePosition?Object(k.s)("$__orderByAsc"):Object(k.s)("$__orderByDesc"),icon:"ASC"===t.orderByTitlePosition?"text_rotation_down":"text_rotate_up",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitlePosition:"ASC"===c.a.getState().db.orderByTitlePosition?"DESC":"ASC"}))}},{name:t.orderByTitle?Object(k.s)("$__manualOrder"):Object(k.s)("$__orderByName"),icon:t.orderByTitle?"drag_handle":"format_list_numbered_rtl",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{orderByTitle:!c.a.getState().db.orderByTitle}))}},{name:u?Object(k.s)("$__hideCatenationColors"):Object(k.s)("$__showCatenationColors"),icon:"palette",color:u?"lightGray":Object(k.d)("menu"),onClick:function(){f((function(e){return!e}))}},{name:Object(k.s)("$__groupByColor"),icon:"gradient",color:t.groupByColor?Object(k.d)("menu"):"lightGray",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{groupByColor:!t.groupByColor}))}}]}),a.a.createElement("div",{style:{marginLeft:"7px",display:"flex",alignItems:"center"}},a.a.createElement(E.a,{title:o?Object(k.s)("$__hideCompleted","*"):Object(k.s)("$__showCompleted","*"),text:o?Object(k.s)("$__hideCompleted","*"):Object(k.s)("$__showCompleted","*"),color:o?Object(k.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(E.a,{title:b?Object(k.s)("$__hideUnreaded","*"):Object(k.s)("$__showUnreaded","*"),text:b?Object(k.s)("$__hideUnreaded","*"):Object(k.s)("$__showUnreaded","*"),color:b?Object(k.d)("menu"):"lightGray",icon:b?"toggle_on":"toggle_off",onClick:function(){v((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(E.a,{title:c.a.getState().controls.deleted?Object(k.s)("$__hideDeleted"):Object(k.s)("$__showDeleted"),color:c.a.getState().controls.deleted?"red":"lightgray",load:S,icon:"recycling",onClick:function(){O((function(e){return!e})),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{deleted:!_}))},size:"21px",style:{padding:"0px !important"}})))))),a.a.createElement(Cn,{md:12,style:{marginLeft:"-30px"}},a.a.createElement(Wd,{nodeId:C[0]||null,showCompleted:o,showColors:u,onlyUnReaded:b,styles:{discountHeight:140}})))}));var qd=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(El)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=t.search,o=a.a.useState(0),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(25),d=Object(h.a)(u,2),p=d[0],f=d[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=(g[0],g[1],window.location.hash.split("/"));b[0]=b[0].replace("#","");var v={};return v=36===b[0].length?(v=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})):(v=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(v).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(k.s)("$__page")," ",l+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(v).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.a,{component:"div",count:Object.keys(v).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(k.s)("$__cardsPerPage")}))),a.a.createElement(kn,null,Object.keys(v).map((function(e,t){if(t<=(l+1)*p&&t>=l*p)return a.a.createElement(Cn,{key:v[e]._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,{db:"cards",data:v[e],expanded:!0,Avatar:!0,Resume:!0}))}))),Object.keys(v).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(k.s)("$__page")," ",l+1," ",Object(k.s)("$__of")," ",Math.ceil(Object.keys(v).length/p),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(ul.a,{component:"div",count:Object.keys(v).length,page:l,onChangePage:function(e,t){s(t)},rowsPerPage:p,onChangeRowsPerPage:function(e){f(parseInt(e.target.value,10))},labelRowsPerPage:Object(k.s)("$__cardsPerPage")}))))}))),Xd=r(625),Jd=r.n(Xd);var Kd=Object(s.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=Object(k.j)(),i=e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),l=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]})),l&&(l.text&&(u=u.filter((function(e){return!!(e&&e.name&&e.name.toLowerCase().indexOf(l.text.toLowerCase())>-1)})).map((function(e){return e}))),u=(u=u.filter((function(e){return!!(e&&e.status&&l&&l.status&&l.status[e.status]||!e.status&&l&&l.status&&l.status.notStarted)})).map((function(e){return e}))).filter((function(e){return!!(e&&e.priority&&l.priority[e.priority]||l.priority.null&&!e.priority)})).map((function(e){return e})),l&&l.users&&l.users.length>0&&(u=u.filter((function(e){var t=!1;if(l.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){l.users.indexOf(e)>-1&&(t=!0)})),t})).map((function(e){return e}))),l&&l.clients&&l.clients.length>0&&(u=u.filter((function(e){return l.clients.indexOf("ALL")>-1&&!e.client||(!!(e.client&&l.clients.indexOf(e.client)>-1)||void 0)})).map((function(e){return e}))),l&&l.tags&&l.tags.length>0&&(u=u.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return l.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})))),a.a.createElement(kn,{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(Cn,{key:e._id,xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,(t={db:"cards",data:e},Object(f.a)(t,"db","cards"),Object(f.a)(t,"Avatar",!0),Object(f.a)(t,"expanded",!0),Object(f.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",{src:Jd.a})))}))),Zd=r(648),Qd=r.n(Zd),ep=r(649),tp=r.n(ep);function rp(){rp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var np=function(e){var t=c.a.getState().db.users,r=c.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]._parent===e.id})).length>0&&a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:{width:"100%"}},Object(k.s)("$__users",1),":"),a.a.createElement(wt.a,{max:12},Object.keys(t).filter((function(r){return t[r]&&t[r]._parent===e.id})).map((function(e,r){return a.a.createElement(Ne.a,{title:t[e].name,key:e},a.a.createElement(Re.a,{alt:t[e].name,src:t[e].image||null,style:{width:"23px",height:"23px"}},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(vn,{data:e,db:"cards",Avatar:!1,expanded:!1,ignoreList:!0,notGlobalExpanded:!0}))}))))},ap=Object(s.b)((function(e){return{usersStatus:e.usersStatus,users:e.db.users}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(fo)((function(e){var t,r,n=e.data,o=(e.classes,c.a.getState()),l=o.db,s=o.session,u=(o.usersStatus,a.a.useState(!1)),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(null),y=Object(h.a)(v,2),x=y[0],O=y[1];_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),a.a.useEffect((function(){g||(b(!0),w())}));var w=function(){var e=Object(p.a)(rp().mark((function e(){return rp().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=[],S={};return Object.keys(l.cards).filter((function(e){return!!(l.cards[e]&&"chatGroup"!==l.cards[e].type&&"link"!==l.cards[e].type&&"insight"!==l.cards[e].type&&l.cards[e]._users&&Object.keys(l.cards[e]._users).length>0&&1===Object.keys(l.cards[e]._users).filter((function(e){return e===n._id})).length)})).map((function(e){if(l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0]&&l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module&&"swot"!==l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module||l.cards[e]&&l.cards[e].type&&l.dataType.filter((function(t){return t.name===l.cards[e].type})).length>0&&"swot"===l.dataType.filter((function(t){return t.name===l.cards[e].type}))[0].module){var t,r;if(l.cards[e]&&l.cards[e].status&&"completed"!==l.cards[e].status)S=Object(d.a)(Object(d.a)({},S),{},(t={},Object(f.a)(t,l.cards[e].status,S&&S[l.cards[e].status]?S[l.cards[e].status]+1:1),Object(f.a)(t,"total",S.total?S.total+1:1),Object(f.a)(t,"late",l.cards[e].endDate&&_()(new Date(1e3*l.cards[e].endDate)).tz("America/Sao_Paulo").format()<=_()().tz("America/Sao_Paulo").format()?S.late?S.late+1:1:S.late?S.late:0),t));else S=Object(d.a)(Object(d.a)({},S),{},(r={},Object(f.a)(r,"completed",S&&S.completed?S.completed+1:1),Object(f.a)(r,"total",S.total?S.total+1:1),r));E[l.cards[e].type]=E[l.cards[e].type]?E[l.cards[e].type]+1:1}else E.swot=null==E.swot?1:E.swot+1})),E=[],S={},e.expanded?a.a.createElement("div",{style:Object(d.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(k.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(le.a,{color:Object(k.d)("color"),icon:"close",onClick:function(){i.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(k.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(k.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?tp.a:Qd.a),onError:function(e){O(null)},onLoad:function(e){O("".concat(n.image?n.image:n.type&&"user"!==n.type?tp.a:Qd.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(k.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(k.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(k.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(k.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(le.a,{size:"16px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(le.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(k.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&&c.a.getState().db.users[n._parent]&&!c.a.getState().db.users[n._parent].independentAccount)&&a.a.createElement("div",{style:{float:"right",display:"flex",alignItems:"center",marginRight:"7px"}},a.a.createElement(le.a,{color:Object(k.d)("color"),icon:"create",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},l.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(d.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(le.a,{color:Object(k.d)("color"),icon:"contacts",onClick:function(){i.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(le.a,{color:Object(k.d)("color"),icon:"badge",onClick:function(){i.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(k.d)("color")),zIndex:"5 !important",position:"absolute",backgroundColor:"".concat(Object(k.d)("color"))},src:"".concat(n.image?n.image:n.type&&"user"!==n.type?tp.a:Qd.a),onError:function(e){},onLoad:function(e){O("".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(k.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(k.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(k.d)("color")),zIndex:"5 !important",position:"absolute",background:Object(k.d)("AvatarBackground"),display:"flex",alignItems:"center",justifyContent:"center"}},n.type&&"user"!==n.type?a.a.createElement(le.a,{size:"33px",color:"rgba(250,250,250,0.77)"},"business"):a.a.createElement(le.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(k.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(le.a,{color:Object(k.d)("medium"),size:"12px"},"supervisor_account"),a.a.createElement("span",null,Object(k.s)("$__supervisorAccount"))):a.a.createElement(a.a.Fragment,null,a.a.createElement(le.a,{color:Object(k.d)("medium"),size:"12px"},"supervised_user_circle"),a.a.createElement("span",null,Object(k.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(k.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(k.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(k.d)("mediumText"),paddingLeft:"94px",marginTop:"15px"}},Object(k.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(np,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(ze.a,{overlap:"rectangular",key:t,style:{padding:3},icon:l.dataType.filter((function(t){return t.name===e}))[0].icon,title:Object(k.s)("$__".concat(e),1),size:"16px",count:E[e],disabled:!0}):null}))):a.a.createElement(a.a.Fragment,null),"user"===n.type&&S&&S.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(k.s)("$__openActivities")),a.a.createElement("h3",null,a.a.createElement("small",null,Object(k.s)("$__total",1),": ",S.total)),l.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(le.a,{color:e.color},e.icon),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)(e.label,1))),a.a.createElement("div",null,S[e.value]?S[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(le.a,{color:"red"},"assignment_late"),a.a.createElement("span",{style:{marginLeft:"15px"}},Object(k.s)("$__late",1))),a.a.createElement("div",null,S.late)))):a.a.createElement(a.a.Fragment,null),!e.resume&&a.a.createElement(qe.a,{options:n.tags,showOptions:!1}),e.resume&&a.a.createElement("div",null,a.a.createElement(On,{overlap:"circular",anchorOrigin:{vertical:"top",horizontal:"left"},userId:n._id},a.a.createElement(le.a,{size:"27px"},"chat")))))})));var op=function(e){var t=c.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(Cn,{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(ap,{data:t,expanded:!1,noActions:!0,style:{height:"calc(100% - 34px)",margin:0},completed:!!e.completed}))})))},ip=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(Cn,{key:"".concat(e._id,"_").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(vn,{data:e,db:"cards",Avatar:!0,expanded:!0,ignoreList:!0}))})))},cp=Object(s.b)((function(e){return{cards:e.db.cards,users:e.db.users,searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=e.nodeId?e.nodeId:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString(),i=e.searchs&&e.searchs[o]?e.searchs[o]:null,l=Object(k.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=l&&!l.owner&&!l.planAdmin&&!l.planEdit&&!l.planRead&&!l.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||c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.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||c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.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(ua,{title:Object(k.s)("$__myFavoritePlans",1),icon:"favorite",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(ip,{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(ua,{title:Object(k.s)("$__myFavoritePrivatePlans",1),icon:"private_connectivity",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(ip,{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(ua,{title:Object(k.s)("$__customerPlanning",1),icon:"business",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(op,{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(ua,{title:Object(k.s)("$__accountPlanning",1),icon:"work",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(ip,{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(ua,{title:Object(k.s)("$__consultingPlanning",1),icon:"work",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(ip,{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(ua,{title:Object(k.s)("$__privatePlanning",1),icon:"private_connectivity",color:Object(k.d)("menu")}),a.a.createElement(kn,null,a.a.createElement(ip,{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",{src:Jd.a})))}));var lp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.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:b()("".concat(window.location.pathname,"-").concat(window.location.hash)).toString();window.location.hash.split("/")[0].replace("#","")||i.a.push("sp#tab/home");var o=!0;return r[0]&&36===r[0].length&&!c.a.getState().db.cards[r[0]]&&(o=!1),r[0]&&36===r[0].length&&c.a.getState().db.cards[r[0]]&&!c.a.getState().db.cards[r[0]].isTemplate&&c.a.getState().db.cards[r[0]]._users&&!c.a.getState().db.cards[r[0]]._users[t._id]&&c.a.getState().db.cards[r[0]]._account&&c.a.getState().db.cards[r[0]]._account!==b()(t.account).toString()&&(o=!1),Object(yt.C)(r[0])&&(o=Object(yt.C)(r[0])),o?36===r[0].length&&c.a.getState().db.cards[r[0].replace("#","")]&&r[1]&&"board"===r[1]?a.a.createElement(qu,{nodeId:r[0]||null}):a.a.createElement("div",{style:{height:"-webkit-fill-available"}},a.a.createElement(_l,null),yf.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(mu,{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(cp,null)):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&"completed"===r[1]?a.a.createElement(a.a.Fragment,null,a.a.createElement(cp,{completed:!0})):(!r[0]||r[0]&&36!==r[0].replace("#","").length)&&a.a.createElement(Kd,null),36===r[0].length&&c.a.getState().db.cards[r[0].replace("#","")]?a.a.createElement(a.a.Fragment,null,r[1]&&"matrix"===r[1]&&a.a.createElement(Rd,null),r[1]&&("actions"===r[1]||"guidelines"===r[1]||"objectives"===r[1]||"goals"===r[1])&&a.a.createElement(id,{type:r[1]}),r[1]&&"dashboard"===r[1]&&a.a.createElement(fd,null),r[1]&&"statistics"===r[1]&&a.a.createElement(wd,null),r[1]&&"overview"===r[1]&&a.a.createElement(Vd,null),r[1]&&"bright-and-connected"===r[1]&&a.a.createElement(a.a.Fragment,null,a.a.createElement(as,null)),r[1]&&"insight-boards"===r[1]&&a.a.createElement(Ed,null),r[1]&&"radar"===r[1]&&a.a.createElement(qd,null),r[1]&&"library"===r[1]&&a.a.createElement(Gs,null),r[1]&&"planningBoard"===r[1]&&a.a.createElement("iframe",{style:{position:"absolute",width:"calc(100% - 30px)",height:"100%",border:"none"},src:"https://miro.com/app/live-embed/".concat(c.a.getState().db.cards[r[0]].miroBoard,"=/?embedAutoplay=true&moveToViewport=-23165,-5837,13803,7546")})):a.a.createElement(a.a.Fragment,null)):(i.a.push("/deniedAccess"),a.a.createElement(a.a.Fragment,null))})));function sp(){sp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var up=Object(s.b)((function(e){return{store:{db:{cards:e.db.cards,tag:e.db.tag}},hidePrivate:e.controls.hidePrivate,searchs:e.searchs}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){var t=a.a.useState(null),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState([]),g=Object(h.a)(m,2),b=g[0],v=g[1],y=a.a.useState([]),x=Object(h.a)(y,2),_=x[0],O=x[1],w=a.a.useState(!1),j=Object(h.a)(w,2),S=j[0],L=j[1],C=c.a.getState().session,I=e.store.db,T=c.a.getState().db.dataType,F=Object(k.j)();a.a.useEffect((function(){return function(){}}),[]),a.a.useEffect((function(){N(),S&&D()}),[S]),a.a.useEffect((function(){_.length>0&&_[0]!==n&&(L(!1),o(_[0]));var e=setTimeout((function(){return N()}),400);return function(){return clearTimeout(e)}}),[I.cards,I.tag,_]),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(_)&&O(e)})),a.a.useEffect((function(){var e=setTimeout((function(){return N()}),400);return function(){return clearTimeout(e)}}),[I.cards,I.tag]);var D=function(){console.log(_[0]),Object(st.b)(e,{cardLoad:"tags",idRel:_[0],adminView:!0})},N=function(){var t=Object(p.a)(sp().mark((function t(){var r,n;return sp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new Promise((function(e,t){e(Object.keys(I.cards).filter((function(e){return I.cards&&I.cards[e]&&!I.cards[e].deleted&&(!S&&C&&C._id&&I.cards[e]&&I.cards[e]._users&&I.cards[e]._users[C._id]||S&&(F.owner||F&&F.plan&&F.planAdmin))&&_&&_.length>0&&_[0]&&I.tag&&I.tag.filter((function(e){return e.value===_[0]||e.parent===_[0]})).length>0&&I.cards&&I.cards[e]._tags&&I.cards[e]._tags.filter((function(e){return e.value===_[0]||I.tag.filter((function(t){return t.parent===_[0]&&e.value===t.value})).length>0})).length>0&&(!I.cards[e].private||C&&C._id&&I.cards[e].private&&I.cards[e]._users&&I.cards[e]._users[C._id])})))})),t.next=3,r.then((function(e){return e}));case 3:(n=t.sent)&&(v(n),u(!1),e.onFinish&&e.onFinish());case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),P=b.map((function(e){return I.cards[e]}));if(e.searchs&&e.searchs.tagsView){var A=e.searchs.tagsView;A.text&&void 0!==A.text&&null!==A.text&&""!==A.text&&(P=Array.from(P.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&&(P=Array.from(P.filter((function(e){return parseInt(e.startDate)>=parseInt(A.startDate)})))),A.endDate&&void 0!==A.endDate&&null!==A.endDate&&""!==A.endDate&&(P=Array.from(P.filter((function(e){return parseInt(e.endDate)<=parseInt(A.endDate)})))),A.tags&&A.tags&&A.tags.filter((function(e){return e.value})).length>0&&(P=Array.from(P.filter((function(e){return e._tags&&e._tags.length>0&&e._tags.filter((function(e){var t=!1;return A.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})))),P=(P=(P=(P=(P=P.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&&(P=P.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.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(Tr,null)),I.tag.filter((function(e){return e.value===_[0]})).length>0?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement("div",{style:Object(d.a)({position:"relative",padding:"5px 10px",borderRadius:"8px",width:"fit-content",display:"flex",alignItems:"center"},I.tag.filter((function(e){return e.value===_[0]})).length>0&&I.tag.filter((function(e){return e.value===_[0]}))[0].color?{backgroundColor:I.tag.filter((function(e){return e.value===_[0]}))[0].color,color:I.tag.filter((function(e){return e.value===_[0]}))[0].color?Object(k.r)(I.tag.filter((function(e){return e.value===_[0]}))[0].color,!0):Object(k.d)("menu")}:{})},a.a.createElement(le.a,{size:"22px",color:I.tag.filter((function(e){return e.value===_[0]}))[0].color?Object(k.r)(I.tag.filter((function(e){return e.value===_[0]}))[0].color,!0):Object(k.d)("menu"),icon:"tag"}),a.a.createElement("span",{style:{marginLeft:"7px"}},I.tag.filter((function(e){return e.value===_[0]}))[0].label)),F&&F.plan&&F.planAdmin&&F.user&&F.userAdmin?a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(k.s)("$__adminMode"),text:Object(k.s)("$__adminMode"),color:S?Object(k.d)("menu"):"lightgrey",textColor:S?Object(k.d)("menu"):"lightgrey",icon:"manage_accounts",onClick:function(){L((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(kn,null,$.filter((function(t){return I.cards[t].type.indexOf("plan")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__plans",1),icon:T.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(k.d)("menu"),filterText:e.text,style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(t){return"plan"===I.cards[t].type&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name<I.cards[t].name?-1:I.cards[e].name>I.cards[t].name?1:0})).map((function(t,r){return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,{db:"cards",data:I.cards[t],showConnectedIn:!0,showTags:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),$.filter((function(t){return I.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__guidelines",1),icon:T.filter((function(e){return"guideline"===e.name}))[0].icon,color:Object(k.d)("menu"),style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(t){return I.cards[t].type.indexOf("guideline")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),$.filter((function(t){return I.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__objectives",1),icon:T.filter((function(e){return"objective"===e.name}))[0].icon,color:Object(k.d)("menu"),style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(t){return I.cards[t].type.indexOf("objective")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),$.filter((function(t){return I.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__goals",1),icon:T.filter((function(e){return"goal"===e.name}))[0].icon,color:Object(k.d)("menu"),style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(t){return I.cards[t].type.indexOf("goal")>-1&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){var n;return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,(n={db:"cards",data:I.cards[t]},Object(f.a)(n,"db","cards"),Object(f.a)(n,"showConnectedIn",!0),Object(f.a)(n,"searchText",e.text),Object(f.a)(n,"expanded",!0),Object(f.a)(n,"onAction",e.onAction?function(){e.onAction()}:null),n)))})))),$.filter((function(t){return T.filter((function(e){return e.name===I.cards[t].type})).length>0&&T.filter((function(e){return e.name===I.cards[t].type}))[0]&&"objective"!==I.cards[t].type&&"goal"!==I.cards[t].type&&"plan"!==I.cards[t].type&&"chatGroup"!==I.cards[t].type&&"link"!==I.cards[t].type&&"insight"!==I.cards[t].type&&-1===I.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__actions",1),icon:"double_arrow",color:Object(k.d)("menu"),style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(t){return T.filter((function(e){return e.name===I.cards[t].type})).length>0&&T.filter((function(e){return e.name===I.cards[t].type}))[0]&&"objective"!==I.cards[t].type&&"goal"!==I.cards[t].type&&"plan"!==I.cards[t].type&&"chatGroup"!==I.cards[t].type&&"link"!==I.cards[t].type&&"insight"!==I.cards[t].type&&-1===I.cards[t].type.indexOf("guideline")&&(!e.hidePrivate||e.hidePrivate&&!I.cards[t].private)})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,{db:"cards",data:I.cards[t],showConnectedIn:!0,searchText:e.text,expanded:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))),$.filter((function(e){return"insight"===I.cards[e].type||"link"===I.cards[e].type})).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:"BRIGHT & CONNECTED",icon:en.a,color:Object(k.d)("menu"),style:{padding:"7px"}}),a.a.createElement(kn,null,$.filter((function(e){return"insight"===I.cards[e].type||"link"===I.cards[e].type})).sort((function(e,t){return I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?-1:I.cards[e].name.toLowerCase()<I.cards[t].name.toLowerCase()?1:0})).map((function(t,r){return a.a.createElement(Cn,{key:t,xs:12,sm:6,md:4,lg:4,xl:3},a.a.createElement(vn,{db:"cards",data:I.cards[t],showConnectedIn:!0,expanded:!0,Avatar:!0,Resume:!0,onAction:e.onAction?function(){e.onAction()}:null}))})))))))})));var dp=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){return a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"calc(100vh - 115px)"}},e.provisorio||"N\xe3o Autorizado")})),pp={root:{}};var fp=r(805),hp=function(e){var t,r=e.handleData,o=Object(n.useState)(!1),i=Object(h.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)([]),u=Object(h.a)(s,2),p=(u[0],u[1]),m=Object(n.useState)(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=Object(n.useState)(null),x=Object(h.a)(y,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){v(!0);var t=new FileReader;t.onload=function(e){var t=e.target.result,n=fp.a(t,{type:"binary"}),a=n.SheetNames[0],o=n.Sheets[a],i=fp.b.sheet_to_json(o);setTimeout((function(){v(!1),r(i)}),0),p(i)},e instanceof File?(t.readAsBinaryString(e),O(e)):(t.readAsBinaryString(e.target.files[0]),O(e.target.files[0]))},S=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:S,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(d.a)(Object(d.a)({},w.labelFileUpload),w.labelFileUploadDragActive):w.labelFileUpload},a.a.createElement("div",null,_?a.a.createElement("p",null,Object(k.s)("$__youSendedArchive"),' "',_.name,'"'):a.a.createElement("p",null,Object(k.s)("$__putAnArchive")),b&&a.a.createElement(je,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(f.a)(t,"border","none"),Object(f.a)(t,"borderRadius","5px"),Object(f.a)(t,"padding"," 10px 20px"),t),type:"button",value:Object(k.s)("$__search..."),onClick:function(){document.getElementById("selectedFile").click()}}))),c&&a.a.createElement("div",{style:w.dragFileElement,onDragEnter:S,onDragLeave:S,onDragOver:S,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]))}}))},mp=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,p=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(d.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(d.a)(Object(d.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(d.a)(Object(d.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(le.a,{style:{color:"green",alignSelf:"center"}},"done")):a.a.createElement("div",null,a.a.createElement(Al.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||p&&0===r&&!Object.keys(h).length?a.a.createElement(da.a,null):0===r&&!1===o&&Object.keys(h).length||!1===o&&Object.keys(h).length>=r&&0!==r||s?a.a.createElement(le.a,{style:{color:"red",alignSelf:"center"}},"warning"):void 0))))))},gp=["children","className"],bp=Object(R.a)({grid:{padding:"0 15px"}});function vp(e){var t=bp(),r=e.children,n=e.className,o=Object(V.a)(e,gp);return a.a.createElement(wn.a,Object.assign({item:!0},o,{className:t.grid+" "+n}),r)}var yp=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(d.a)(Object(d.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(vp,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex",padding:"0px"}},a.a.createElement(le.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(vp,{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(vp,{item:!0,xs:12,style:{justifyContent:"center",display:"flex",marginTop:"30px"}},a.a.createElement(s,{handleEvent:t,name:Object(k.s)("$__back"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",backgroundColor:"none",color:"black"}})))))};function xp(){xp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var _p=function(e){var t=e.dataUser,r=e.resetComponent,o=Object(n.useState)(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Object(n.useState)(t),m=Object(h.a)(u,2),g=m[0],b=m[1],v=Object(n.useState)({}),y=Object(h.a)(v,2),x=y[0],_=y[1],O=Object(n.useState)([]),w=Object(h.a)(O,2),j=w[0],E=w[1],S=Object(n.useState)(!1),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.createRef(),F=Object(n.useState)([]),D=Object(h.a)(F,2),N=D[0],P=D[1],A=Object(n.useState)({}),$=Object(h.a)(A,2),z=$[0],M=$[1],R=Object(n.useState)(!1),G=Object(h.a)(R,2),H=G[0],W=G[1];Object(n.useEffect)((function(){if(t.length>0){var e=t,r=["nomecompleto","nomedeexibi\xe7\xe3o","email","departamento/grupo","ramal","observa\xe7\xf5es","celular"];e=(e=(e=Object(Se.a)(new Set(t.flatMap((function(e){return Object.keys(e)}))))).map((function(e){return e.toLowerCase()}))).filter((function(e){return r.includes(e)})),P(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(Se.a)(t),[e])}))},V=function(e,t,r){var n=Object(Se.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(d.a)(Object(d.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(h.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(Se.a)(t),[parseInt(r)])},Object.fromEntries(Object.entries(r).map((function(e,t){var r=Object(h.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(h.a)(t,2),a=(n[0],n[1]);return e[r]=a,e}),{}),M(e),_({})}var r,n}()}}),[x]);var X=function(){var t=Object(p.a)(xp().mark((function t(){var r,n,a,o,i,l,u,p=arguments;return xp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=p.length>0&&void 0!==p[0]?p[0]:0,e.onAdding&&e.onAdding(!0),!(g.length>0)){t.next=31;break}return I(!1),n=Object(k.t)(g[r].email),t.next=7,At(g[r].email);case 7:if(!(a=t.sent)){t.next=31;break}if(!(i=Object(d.a)(Object(d.a)({},x),{},Object(f.a)({},r,Object(d.a)(Object(d.a)(Object(d.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(k.s)("$__emailAlreadyInUse")}),(null===(o=g[r])||void 0===o?void 0:o.nomecompleto.split("").length)<3&&{sended:!1,nameError:Object(k.s)("$__minimalNameField")}),!n&&{sended:!1,emailErrorInv:Object(k.s)("$__invalidEmail")}))))[r].sended){t.next=28;break}return l={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"]&&c.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})).length>0&&(l.groups=Array.from(c.a.getState().db.userGroup.filter((function(e){return e.label===g[r]["departamento/grupo"]})))),t.prev=13,t.next=16,Y.a.post("user/addImport",l);case 16:(u=t.sent)&&(Y.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(k.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(k.s)("$__completeName");break;case"nomedeexibi\xe7\xe3o":t=Object(k.s)("$__showName");break;case"email":t=Object(k.s)("$__email");break;case"departamento/grupo":t=Object(k.s)("$__department/group");break;case"ramal":t=Object(k.s)("$__branchLine");break;case"observa\xe7\xf5es":t=Object(k.s)("$__observation");break;case"celular":t=Object(k.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(B,null,a.a.createElement(vp,{item:!0,xs:12,style:{justifyContent:"center",padding:"0px 4px 0px",position:"re\xe7ative"}},l&&a.a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",zIndex:"99"}}),0===g.length&&a.a.createElement(yp,{message:Object(k.s)("$__finalMsgUserImportConcluded"),title:Object(k.s)("$__concluded"),icon:"done",color:"green",resetComponent:r}),H?a.a.createElement(yp,{message:Object(k.s)("$__finalMsgUserImportError"),title:Object(k.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(d.a)(Object(d.a)({},J),{},{width:"80px",border:"1px solid #ebebeb",flex:"none",justifyContent:"center",display:"flex"})},a.a.createElement("p",{style:{alignSelf:"center",padding:"0px"}},Object(k.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(d.a)(Object(d.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(k.s)("$__stats"))))),g.length>0&&a.a.createElement(ba.a,null,(function(e){var t=e.height,r=e.width;return a.a.createElement(ga.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(mp,{selected:!(!j||!j.includes(n)),column:N,handleDataChange:function(e,t,r){return V(e,t,r)},handleCheckboxChange:U,style:o,add:l,data:r,data1:x,dataError:z[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(vp,{item:!0,xs:12,style:{borderTop:"1px solid #ebebeb",display:"flex",justifyContent:"right",marginTop:"10px"}},!H&&!l&&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(k.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(k.s)("$__add"),color:"red",style:{width:"120px",height:"30px",marginTop:"25px",marginBottom:"25px",marginRight:"30px",backgroundColor:"none",color:"black"}})," ")))},Op=r(1114),wp=r.n(Op),jp=r(1115),Ep=r.n(jp),kp=Object(s.b)((function(e){return{importUsers:e.controls.importUsers}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Object(n.useState)([]),r=Object(h.a)(t,2),o=r[0],i=r[1],l=Object(n.useState)(!1),s=Object(h.a)(l,2),u=(s[0],s[1]),p=Object(n.useState)(!1),f=Object(h.a)(p,2),m=f[0],g=f[1],b={padding:"5px 10px"},v={borderBottom:"1px solid #dddddd"},y={padding:"5px 25px",fontWeight:"bold",backgroundColor:"#f2f2f2"};return Object(n.useEffect)((function(){o.length>0&&u(!0)}),[o]),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(kn,{style:{maxWidth:"1400px",backgroundColor:"#ffffff",borderRadius:"5px",border:"2px solid #dedede",position:"relative",margin:"auto"}},a.a.createElement(Cn,{item:!0,xs:12,style:{borderBottom:"1px solid #ebebeb",justifyContent:"center",display:"flex"}},o.length>0&&!m&&a.a.createElement(le.a,{onClick:function(){return i([])},style:{alignSelf:"left",color:Object(k.d)("menu"),left:"25px",top:"25px",position:"absolute"},size:"30px"},"arrow_back"),!m&&a.a.createElement(le.a,{onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{importUsers:!1}))},style:{alignSelf:"left",color:Object(k.d)("menu"),right:"25px",top:"25px",position:"absolute"},size:"30px"},"close"),a.a.createElement(le.a,{style:{alignSelf:"center",color:Object(k.d)("menu")},size:"30px"},"download"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",width:"240px",color:Object(k.d)("menu")}},Object(k.s)("$__importUsers"))),!o.length>0?a.a.createElement(a.a.Fragment,null," ",a.a.createElement(Cn,{item:!0,xs:6,style:{}},a.a.createElement(Cn,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(le.a,{style:{alignSelf:"center",color:Object(k.d)("menu")},size:"30px"},"task"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"10px"}},Object(k.s)("$__beforeImportUser"))),a.a.createElement(Cn,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginBottom:"10px"}},Object(k.s)("$__importUsersDescp"),a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(k.s)("$__email"),'" '),Object(k.s)("$__and")," ",a.a.createElement("span",{style:{fontWeight:"bold"}},'"',Object(k.s)("$__completeName"),'"'),"."),a.a.createElement("a",{href:wp.a,style:{fontSize:"17px"},target:"_blank",download:"Arquivo-Amostra"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(k.s)("$__clickToDownloadXLSX")))),a.a.createElement(Cn,{item:!0,xs:12},a.a.createElement("p",{style:{alignSelf:"center",marginTop:"10px"}},Object(k.s)("$__importUsersSecondDescp")),a.a.createElement("a",{href:Ep.a,style:{fontSize:"16px"},target:"_blank",download:"Arquivo-Amostra-Completo"},a.a.createElement("p",{style:{color:"#478cd2",fontWeight:"bold"}},Object(k.s)("$__clickToDownloadXLSXOptions")))),a.a.createElement(Cn,{item:!0,xs:12,style:{display:"flex"}},a.a.createElement(le.a,{style:{alignSelf:"center",color:Object(k.d)("menu")},size:"30px"},"checklist"),a.a.createElement("p",{style:{padding:"7px",marginTop:"20px",fontSize:"20px",marginBottom:"20px",color:Object(k.d)("menu")}},Object(k.s)("$__fieldOptions"))),a.a.createElement(Cn,{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:v},a.a.createElement("th",{style:b},Object(k.s)("$__phone")),a.a.createElement("td",{style:y}," ",Object(k.s)("$__phoneDescpImportUsers"))),a.a.createElement("tr",{style:v},a.a.createElement("th",{style:b},Object(k.s)("$__branchLine")),a.a.createElement("td",{style:y},Object(k.s)("$__branchLineDescp"))),a.a.createElement("tr",{style:v},a.a.createElement("th",{style:b},Object(k.s)("$__observation")),a.a.createElement("td",{style:y},Object(k.s)("$__observationImportDescp"))),a.a.createElement("tr",{style:v},a.a.createElement("th",{style:b},Object(k.s)("$__department/group")),a.a.createElement("td",{style:y},Object(k.s)("$__department/groupDescp"))),a.a.createElement("tr",{style:v},a.a.createElement("th",{style:b},Object(k.s)("$__showName")),a.a.createElement("td",{style:y}," ",Object(k.s)("$__showNameDescp"))))))),a.a.createElement(Cn,{item:!0,xs:6,style:{border:"1px solid #ebebeb",display:"flex",justifyContent:"center"}},a.a.createElement(hp,{handleData:function(e){var t=e.reduce((function(e,t){var r=Object.entries(t).reduce((function(e,t){var r=Object(h.a)(t,2),n=r[0],a=r[1];return e[n.toLowerCase().replace(/\s/g,"")]=a.toString().trim(),e}),{});return[].concat(Object(Se.a)(e),[r])}),[]);i(t)}}))):a.a.createElement(_p,{dataUser:o,resetComponent:function(){i([]),g(!1)},onAdding:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];g(e)}}))):a.a.createElement(a.a.Fragment,null)}));var Sp=Object(s.b)((function(e){return{users:e.db.users,page:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(pp)((function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],d=(s[1],a.a.useState(!1)),p=Object(h.a)(d,2),f=p[0],m=(p[1],c.a.getState()),g=m.db,b=m.session,v=m.search,y=g.users,x=Object(k.j)();!function(){var e=c.a.getState().db.users;c.a.getState().session.maxUsers&&c.a.getState().session.maxUsers.low,Object.keys(e).filter((function(t){if(!e[t].deleted&&"user"===e[t].type&&(!e[t]._parent||e[t]._parent&&e[e[t]._parent]))return!0})).length}(),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),JSON.stringify(e)!==JSON.stringify(n)&&o(e)}));var _=Object.keys(y).filter((function(e){return!y[e].deleted})).map((function(e){return y[e]}));v.text&&(_=_.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(v.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"users"===n[1]&&(_=_.filter((function(e){return"user"===e.type&&!e._parent})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&(_=_.filter((function(e){return"user"!==e.type})).map((function(e){return e}))),v.users&&v.users.userGroup.length>0&&(_=_.filter((function(e){return e.groups.filter((function(e){return e.value===v.users.userGroup[0].value})).length>0})).map((function(e){return e}))),v.tags.length>0&&(_=_.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return v.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),v.userGroups.length>0&&(_=_.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return v.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e})));var O=Object.keys(y).map((function(e){return y[e]}));if(v.text&&(O=O.filter((function(e){return!!(e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.name&&e.name.toLowerCase().indexOf(v.text.toLowerCase())>-1||e.email&&e.email.toLowerCase().indexOf(v.text.toLowerCase())>-1)})).map((function(e){return e}))),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&(O=O.filter((function(e){return"user"===e.type&&e._parent===n[2]})).map((function(e){return e}))),v.users&&v.users.userGroup.length>0&&(O=O.filter((function(e){return e.groups.filter((function(e){return e.value===v.users.userGroup[0].value})).length>0})).map((function(e){return e}))),v.tags.length>0&&(O=O.filter((function(e){return e.tags&&e.tags.length>0&&e.tags.filter((function(e){var t=!1;return v.tags.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),v.userGroups.length>0&&(O=O.filter((function(e){return e.groups&&e.groups.length>0&&e.groups.filter((function(e){var t=!1;return v.userGroups.map((function(r){r.value===e.value&&(t=!0)})),t})).length>0})).map((function(e){return e}))),x&&!x.owner&&!x.user)return a.a.createElement(dp,null);window.location.hash.split("/")[0].replace("#","")||i.a.push("c#tab/units");var w=function(e,t){return!!(c.a.getState().db.users[t]&&c.a.getState().db.users[t].groups&&c.a.getState().db.users[t].groups.length>0&&c.a.getState().db.users[t].groups.filter((function(t){return t.value===e.value})).length>0&&(!u&&(!c.a.getState().db.users[t]._parent||c.a.getState().db.users[t]._parent===b.account)||u&&c.a.getState().db.users[t]._parent&&c.a.getState().db.users[t]._parent!==b.account)&&(!f&&!c.a.getState().db.users[t].deleted||f&&c.a.getState().db.users[t].deleted))};return a.a.createElement("div",null,console.log(n[1]),a.a.createElement(_l,null),a.a.createElement("div",null,a.a.createElement(jl,null),a.a.createElement(kn,null,"tab"===n[0]&&"departments"===n[1]?a.a.createElement("div",null,a.a.createElement("div",null,c.a.getState().db.userGroup.filter((function(e){if(Object.keys(c.a.getState().db.users).filter((function(t){return w(e,t)})).length>0)return!0})).map((function(e){var t=Object.keys(c.a.getState().db.users).filter((function(t){return w(e,t)}));return a.a.createElement("div",{key:e.value,style:{width:"100%",padding:7,marginBottom:77}},a.a.createElement(ua,Object.assign({title:e.label,icon:e.icon||null,color:Object(k.d)("menu"),style:{padding:"7px"}},x&&(x.userAdmin||x.userModerate)?{iconOnEditable:!0,editable:!0,onEdit:function(e){console.log(e)},placeholder:Object(k.s)("$__groupName")}:{})),a.a.createElement(kn,null,t.sort((function(e,t){var r=c.a.getState().db.users[e].name.toLowerCase(),n=c.a.getState().db.users[t].name.toLowerCase();return r<n?-1:r<n?1:0})).map((function(t){return a.a.createElement(Cn,{key:"".concat(e.value,"_").concat(t),xs:12,sm:6,md:4,lg:4,xl:3,style:{minWidth:"300px"}},a.a.createElement(ap,{data:c.a.getState().db.users[t]}))}))))})))):a.a.createElement(a.a.Fragment,null,_.sort((function(e,t){return e&&e.name&&e.name<t.name||y&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return!n[2]||n[2]&&e._id===n[2]?a.a.createElement(Cn,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3,style:{minWidth:"300px"}},a.a.createElement(ap,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]])})):!n[2]&&a.a.createElement(Cn,{key:e._id,xs:12,sm:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:6,md:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:4,lg:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3,xl:n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]]?12:3},a.a.createElement(ap,{data:e,expanded:!!(n[1]&&n[2]&&"units"===n[1]&&36===n[2].length&&g.users[n[2]])}))})),"tab"===n[0]&&"units"===n[1]&&n[2]&&36===n[2].length&&O.filter((function(e){return!e.deleted})).sort((function(e,t){return e&&e.name&&e.name<t.name||y&&e&&e.name&&e.name<t.name?-1:1})).map((function(e,t){return a.a.createElement(Cn,{key:"".concat(e._id,"-").concat(t),xs:12,sm:6,md:4,lg:3,xl:2},a.a.createElement(ap,{data:e}))}))))),a.a.createElement(kp,null))}))),Lp=Object(R.a)({clearfix:{"&:after,&:before":{display:"table",content:'" "'},"&:after":{clear:"both"}}});function Cp(){var e=Lp();return a.a.createElement("div",{className:e.clearfix})}var Ip={cardIcon:{"&$warningCardHeader,&$successCardHeader,&$dangerCardHeader,&$infoCardHeader,&$primaryCardHeader,&$roseCardHeader,&$customCardHeader":{borderRadius:"3px",backgroundColor:X.q[0],padding:"7px",marginTop:"-20px",marginRight:"15px",float:"left"}},warningCardHeader:X.M,successCardHeader:X.F,dangerCardHeader:X.i,infoCardHeader:X.t,primaryCardHeader:X.y,roseCardHeader:X.C,customCardHeader:{}};Object(R.a)(Ip);var Tp={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(X.r)(X.b)+", 0.56), 0 4px 25px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.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(X.r)(X.b)+", 0.56), 0 4px 25px 0px rgba("+Object(X.r)(X.b)+", 0.12), 0 8px 10px -5px rgba("+Object(X.r)(X.b)+", 0.2)","&$cardAvatarPlain":{marginTop:"0"}},cardAvatarTestimonialFooter:{marginBottom:"-50px",marginTop:"10px"}},Fp=["children","className","plain","profile","testimonial","testimonialFooter"],Dp=Object(R.a)(Tp);function Np(e){var t,r=Dp(),n=e.children,o=e.className,i=e.plain,c=e.profile,l=e.testimonial,s=e.testimonialFooter,u=Object(V.a)(e,Fp),d=y()((t={},Object(f.a)(t,r.cardAvatar,!0),Object(f.a)(t,r.cardAvatarProfile,c),Object(f.a)(t,r.cardAvatarPlain,i),Object(f.a)(t,r.cardAvatarTestimonial,l),Object(f.a)(t,r.cardAvatarTestimonialFooter,s),Object(f.a)(t,o,void 0!==o),t));return a.a.createElement("div",Object.assign({className:d},u),n)}var Pp={cardTitle:X.d,cardIconTitle:Object(d.a)(Object(d.a)({},X.d),{},{marginTop:"15px",marginBottom:0,"& small":{fontSize:"80%",fontWeight:"400"}}),cardCategory:{marginTop:"10px",color:X.q[0]+" !important",textAlign:"center"},description:{color:X.q[0]},updateProfileButton:{float:"right"}},Ap=Object(R.a)(Pp);Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=Ap();return a.a.createElement("div",{style:{position:"relative",width:"calc(100% - 7px)"}},a.a.createElement(kn,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(Cn,{xs:12,sm:12,md:8},a.a.createElement($i,null,a.a.createElement(Bi,null,a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:5},a.a.createElement(eu,{labelText:"Company (disabled)",id:"company-disabled",formControlProps:{fullWidth:!0},inputProps:{disabled:!0}})),a.a.createElement(Cn,{xs:12,sm:12,md:3},a.a.createElement(eu,{labelText:"Username",id:"username",formControlProps:{fullWidth:!0}})),a.a.createElement(Cn,{xs:12,sm:12,md:4},a.a.createElement(eu,{labelText:"Email address",id:"email-address",formControlProps:{fullWidth:!0}}))),a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:6},a.a.createElement(eu,{labelText:"First Name",id:"first-name",formControlProps:{fullWidth:!0}})),a.a.createElement(Cn,{xs:12,sm:12,md:6},a.a.createElement(eu,{labelText:"Last Name",id:"last-name",formControlProps:{fullWidth:!0}}))),a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:4},a.a.createElement(eu,{labelText:"City",id:"city",formControlProps:{fullWidth:!0}})),a.a.createElement(Cn,{xs:12,sm:12,md:4},a.a.createElement(eu,{labelText:"Country",id:"country",formControlProps:{fullWidth:!0}})),a.a.createElement(Cn,{xs:12,sm:12,md:4},a.a.createElement(eu,{labelText:"Postal Code",id:"postal-code",formControlProps:{fullWidth:!0}}))),a.a.createElement(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:12},a.a.createElement(Xs.a,{style:{color:"#AAAAAA"}},"About me"),a.a.createElement(eu,{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(Q,{color:"rose",className:t.updateProfileButton},"Update Profile"),a.a.createElement(Cp,null)))),a.a.createElement(Cn,{xs:12,sm:12,md:4},a.a.createElement($i,{db:"cards",profile:!0},a.a.createElement(Np,{profile:!0},a.a.createElement("a",{href:"#pablo",onClick:function(e){return e.preventDefault()}})),a.a.createElement(Bi,{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(Q,{color:"rose",round:!0},"Follow"))))))}));var $p=r(1116);r(1009);var zp=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){c.a.getState().functions.socket;var t=a.a.useState({cvc:"",expiry:"",focus:"",name:"",number:""}),r=Object(h.a)(t,2),n=r[0],o=r[1];return Object(k.j)(),a.a.createElement("div",null,a.a.createElement($p.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(k.s)("$__paymentPreffer")),a.a.createElement("div",{style:{borderRadius:15,background:Object(k.d)("ColumnTitleColor"),color:"#FFFFFF",boxShadow:"0 0 3px 7px rgba(0,0,0,0.03)",padding:15}}),a.a.createElement(Ce,{id:"sideModule_user_displayName",label:Object(k.s)("$__displayName",1),variant:Object(k.d)("fieldVariant"),name:"number",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_comfy_ind"})),onChange:function(e){o(Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},"number",e.target.value)))}},value:n&&n.number?n.number:"",placeholder:Object(k.s)("$__cardNumber",1)})),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(k.s)("$__forceChangePassword")),a.a.createElement(wr,{checked:!!(n&&n._access&&n._access.user),onChange:function(e){},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__forceChangePasswordDescription")))})));function Mp(){Mp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Yp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=function(){var e=Object(p.a)(Mp().mark((function e(){return Mp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c.a.getState().functions.socket.emit("data",{module:"galaxPay",method:"post",action:"integration"},{action:"reqData",accountData:c.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(zp,null),a.a.createElement("div",{style:{padding:15,backgroundColor:"black"},onClick:function(){t()}},"TEST"))})));function Bp(){Bp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Rp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.session,n=(t.functions,t.db,a.a.useState({})),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(h.a)(s,2),d=(u[0],u[1],a.a.useState(!1)),f=Object(h.a)(d,2),m=f[0],g=f[1],b=a.a.useState(!0),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){_()}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return function(){clearTimeout(e)}}),[e.history]);var _=function(){var e=Object(p.a)(Bp().mark((function e(){var t,r,n,a,o,i=arguments;return Bp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>0&&void 0!==i[0]&&i[0],n=r,e.next=4,kt.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}l({secretKey:"Bearer ".concat(a.data.token)}),e.next=13;break;case 9:return e.next=11,Y.a.post("/api/token");case 11:(o=e.sent)&&l({secretKey:"Bearer ".concat(o.data.token)});case 13:x(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(kn,null,a.a.createElement(Cn,{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(B,null,y?a.a.createElement(Tr,null):a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word",marginTop:50}},a.a.createElement("legend",null,Object(k.s)("$__authorizationToken")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(Ce,{label:Object(k.s)("$__authorizationToken",1),variant:Object(k.d)("fieldVariant"),name:"secretKey",InputLabelProps:{shrink:!0},InputProps:{multiline:!0,minRows:3,autoComplete:"new-password",type:m?"text":"password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement("div",{style:{cursor:"pointer",marginRight:7},onClick:function(){navigator.clipboard.writeText(i.secretKey)}},a.a.createElement(le.a,{icon:"content_copy"})),a.a.createElement(le.a,{icon:m?"visibility_off":"visibility",onClick:function(){g((function(e){return!e}))}}))},value:"".concat(i&&i.secretKey?i.secretKey:""),placeholder:Object(k.s)("$__secretKey",1),autoFocus:!0,disabled:!0})),a.a.createElement("i",null,Object(k.s)("$__secretKeyDescription"))),a.a.createElement("div",{style:{display:"none",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(k.s)("$__newToken"),text:Object(k.s)("$__newToken"),color:"green",icon:"refresh",size:"25px",onClick:function(){Object(k.c)({message:Object(k.s)("$__confirmApiTokenRevokeAndRecreate",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){}})}})))))))}))),Gp=r(335),Hp=r(100),Wp=r(336),Up=r.n(Wp),Vp=r(337),qp=r.n(Vp);r(1738);function Xp(){Xp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var Jp=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.session,n=(t.db,a.a.useState({})),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState(r.GlobalData?r.GlobalData:{}),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState({historyEditor:null}),v=Object(h.a)(b,2),y=v[0],x=v[1];a.a.useEffect((function(){l(r.GlobalData?r.GlobalData:{}),g(r.GlobalData?r.GlobalData:{});var e=Hp.EditorState.createEmpty(),t=Hp.EditorState.createEmpty(),n=Hp.EditorState.createEmpty(),a=Hp.EditorState.createEmpty(),o=Hp.EditorState.createEmpty(),i=Hp.EditorState.createEmpty();r.GlobalData.history&&(e=qp()("<div>".concat(r.GlobalData.history,"</div>")),e=Hp.ContentState.createFromBlockArray(e.contentBlocks),e=Hp.EditorState.createWithContent(e)),r.GlobalData.strategicStatement&&(o=qp()("<div>".concat(r.GlobalData.strategicStatement,"</div>")),o=Hp.ContentState.createFromBlockArray(o.contentBlocks),o=Hp.EditorState.createWithContent(o)),r.GlobalData.values&&(i=qp()("<div>".concat(r.GlobalData.values,"</div>")),i=Hp.ContentState.createFromBlockArray(i.contentBlocks),i=Hp.EditorState.createWithContent(i)),r.GlobalData.vocation&&(t=qp()("<div>".concat(r.GlobalData.vocation,"</div>")),t=Hp.ContentState.createFromBlockArray(t.contentBlocks),t=Hp.EditorState.createWithContent(t)),r.GlobalData.legacy&&(n=qp()("<div>".concat(r.GlobalData.legacy,"</div>")),n=Hp.ContentState.createFromBlockArray(n.contentBlocks),n=Hp.EditorState.createWithContent(n)),r.GlobalData.message&&(a=qp()("<div>".concat(r.GlobalData.message,"</div>")),a=Hp.ContentState.createFromBlockArray(a.contentBlocks),a=Hp.EditorState.createWithContent(a)),x({history:e,vocation:t,legacy:n,message:a,values:i,strategicStatement:o})}),[]);var _=function(){var t=Object(p.a)(Xp().mark((function t(){var r;return Xp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(i).map((function(e){!i[e]||m[e]&&JSON.stringify({a:i[e]})===JSON.stringify({a:m[e]})||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,i[e]&&"string"===typeof i[e]?i[e].trim():i[e])))}));try{c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))})),l(Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)),g(Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r))}catch(n){console.log(n)}case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return a.a.createElement("div",null,a.a.createElement(kn,{style:{marginTop:15}},a.a.createElement(Cn,{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(k.s)("$__adminMessage")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.message,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{message:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{message:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Cn,{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(k.s)("$__strategicStatement")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.strategicStatement,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{strategicStatement:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{strategicStatement:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Cn,{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(k.s)("$__vocation")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.vocation,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{vocation:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{vocation:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Cn,{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(k.s)("$__history")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.history,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{history:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{history:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Cn,{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(k.s)("$__values")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.values,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{values:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{values:e}))},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}})))),a.a.createElement(Cn,{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(k.s)("$__legacy")),a.a.createElement(B,null,a.a.createElement(Gp.Editor,{toolbar:{options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],inline:{inDropdown:!1,options:["bold","italic"]}},editorState:y.legacy,onEditorStateChange:function(e){l(Object(d.a)(Object(d.a)({},i),{},{legacy:Up()(Object(Hp.convertToRaw)(e.getCurrentContent()))})),x(Object(d.a)(Object(d.a)({},y),{},{legacy:e}))},style:{minHeight:150},hashtag:{separator:" ",trigger:"#"},editorStyle:{minHeight:150}}))))),JSON.stringify(i)!==JSON.stringify(m)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){_()}})):a.a.createElement(a.a.Fragment,null))}));function Kp(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(k.d)("ColumnTitleColor")),borderRadius:3,boxShadow:"0 0 0 2px rgba(0,0,0,0.05)"}}))}var Zp=r(626);function Qp(){Qp=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var ef=Object(s.b)((function(e){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){e.classes;var t=c.a.getState(),r=t.db,n=t.session,o=(r.users,r.dataType,a.a.useState(n.GlobalData?n.GlobalData:{})),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(n.GlobalData?n.GlobalData:{}),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!Object(k.t)(l&&l.email?l.email:"")),y=Object(h.a)(v,2),x=(y[0],y[1],a.a.useState(!1)),_=Object(h.a)(x,2),O=(_[0],_[1],Object(k.j)()),w=function(){var t=Object(p.a)(Qp().mark((function t(){var r,a,o,i;return Qp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},Object.keys(l).map((function(e){if("file"===e)a=l[e];else if("document"===e){var t=!1;11===l[e].length&&Zp.b.isValid(l[e])&&(t=!0),14===l[e].length&&Zp.a.isValid(l[e])&&(t=!0),t?r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e])):Object(k.c)({message:"".concat(Object(k.s)("$__".concat(e)),": ").concat(Object(k.s)("$__invalidDocument")),variant:"warning",persist:!1,horizontal:"right",confirm:null})}else!l[e]||g[e]&&JSON.stringify({a:l[e]})===JSON.stringify({a:g[e]})?l[e]||"_id"===e||Object(k.c)({message:"".concat(Object(k.s)("$__".concat(e)),": ").concat(Object(k.s)("$__cantBeEmpty")),variant:"warning",persist:!1,horizontal:"right",confirm:null}):r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e]))})),t.prev=2,o=c.a.getState().functions.socket,!a){t.next=10;break}return t.next=7,Object(St.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(d.a)(Object(d.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(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)})),b(Object(d.a)(Object(d.a)({},c.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(l._id===n._id||O&&O.user&&(O.userAdmin||O.userEdit))&&!0,l.independentAccount&&!1,a.a.createElement("div",null,a.a.createElement("div",{id:"sideModule_user_foto"},a.a.createElement(dn,{maxWidthOrHeight:600,img:l&&l.image?l.image:null,onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{file:t}))},avatar:!0,avatarIcon:"business"})),a.a.createElement(Ce,{id:"sideModule_user_fullName",label:Object(k.s)("$__fullCompanyName",1),variant:Object(k.d)("fieldVariant"),name:"fullName",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"business"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{fullName:e.target.value}))},onBlur:function(e){if(l&&!l.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(d.a)(Object(d.a)({},l),{},{fullName:t}))}}},value:l&&l.fullName?l.fullName:"",placeholder:Object(k.s)("$__fullName",1),autoFocus:!0,disabled:!0}),a.a.createElement(Ce,{id:"sideModule_user_displayName",label:Object(k.s)("$__displayName",1),variant:Object(k.d)("fieldVariant"),name:"name",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{name:e.target.value}))}},value:l&&l.name?l.name:"",placeholder:Object(k.s)("$__displayName",1),disabled:!0}),a.a.createElement(Ce,{id:"customURL",label:Object(k.s)("$__customURL",1),variant:Object(k.d)("fieldVariant"),name:"customURL",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement("span",{style:{color:"gray",fontSize:12}},".machen.ai")),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{customURL:e.target.value.trim()}))},onBlur:function(e){l&&!l.fullName&&s(Object(d.a)(Object(d.a)({},l),{},{customURL:e.target.value.trim()}))}},value:l&&l.customURL?l.customURL:"",placeholder:Object(k.s)("$__customURL",1),autoFocus:!0}),a.a.createElement(Ce,{id:"__documentCPForCNPJ",label:Object(k.s)("$__documentCPForCNPJ",1),variant:Object(k.d)("fieldVariant"),name:"document",InputProps:{autoComplete:"new-password",multiline:!0,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"view_comfy_ind"})),onChange:function(e){s(Object(d.a)(Object(d.a)({},l),{},{document:e.target.value}))}},value:l&&l.document?l.document:"",placeholder:Object(k.s)("$__displayName",1),disabled:!!g.document}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__accountResponsible")),a.a.createElement(B,null,a.a.createElement(Qt,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:l.accountResponsible?[l.accountResponsible]:null,onSelect:function(e){s(Object(d.a)(Object(d.a)({},l),{},{accountResponsible:e[0]}))}}))),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__invoiceResponsible")),a.a.createElement(B,null,a.a.createElement(Qt,{includeMe:!0,admins:!0,avatarSize:"33px",permission:!0,noLimit:!0,selected:l.invoiceResponsible?[l.invoiceResponsible]:null,onSelect:function(e){s(Object(d.a)(Object(d.a)({},l),{},{invoiceResponsible:e[0]}))}}))),a.a.createElement("ul",{style:{color:Object(k.d)("color")}},a.a.createElement("li",null,Object(k.s)("$__createdAt"),": ",Object(k.k)(l.created_at)),l.expire_at?a.a.createElement("li",{style:{color:Object(k.d)("menu")}},Object(k.s)("$__expireDate"),": ",Object(k.k)(l.expire_at)):a.a.createElement(a.a.Fragment,null)),JSON.stringify(l)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){w()}})):a.a.createElement(a.a.Fragment,null))})));function tf(){tf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var rf=Object(s.b)((function(e,t){return{session:e.session}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ua)((function(e){e.classes;var t=c.a.getState(),r=t.session,n=(t.functions,t.db),o=a.a.useState(r.GlobalData?r.GlobalData:{}),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(r.GlobalData?r.GlobalData:{}),m=Object(h.a)(u,2),g=m[0],b=(m[1],function(){var t=Object(p.a)(tf().mark((function t(){var r;return tf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r={},Object.keys(l).map((function(e){!l[e]||g[e]&&JSON.stringify({a:l[e]})===JSON.stringify({a:g[e]})||(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,l[e]&&"string"===typeof l[e]?l[e].trim():l[e])))})),!r.requireExpirePassword&&r.expiresIn&&(r.expiresIn=null);try{c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},r,(function(t){t.error?console.log("companyDataError",t.error):e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{GlobalData:Object(d.a)(Object(d.a)({},c.a.getState().session.GlobalData),r)}))}))}catch(n){console.log(n)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());return a.a.createElement("div",null,a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(k.s)("$__2FactorTokenRequired")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(wr,{checked:!(!l||!l.requireToken),onChange:function(e){var t=Object(d.a)(Object(d.a)({},l),{},{requireToken:!l.requireToken});l.requireToken&&delete t.requireToken,s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__required")),a.a.createElement("i",null,Object(k.s)("$__2FactorTokenRequiredDescription"))),a.a.createElement("fieldset",{style:{wordBreak:"break-word"}},a.a.createElement("legend",null,Object(k.s)("$__forceChangePassword")),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"flex",alignItems:"center"}},a.a.createElement(wr,{checked:!(!l||!l.requireExpirePassword),onChange:function(e){var t=Object(d.a)(Object(d.a)({},l),{},{requireExpirePassword:!l.requireExpirePassword});l.requireExpirePassword&&(delete t.requireExpirePassword,l.passwordExpire&&delete t.passwordExpire),s(t)},name:"checkedA",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__required")),a.a.createElement("i",null,Object(k.s)("$__forceChangePasswordDescription")),l.requireExpirePassword?a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__sessionDuration",1)),a.a.createElement(Ta,{id:"combo-box-demo",options:n.passwordExpire,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(l.passwordExpire)}))[0]:n.passwordExpire[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__expiresIn",1),variant:Object(k.d)("fieldVariant"),value:l&&l.passwordExpire&&n.passwordExpire?n.passwordExpire.filter((function(e){return String(e.value)===String(l.passwordExpire)}))[0]:n.passwordExpire.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{passwordExpire:t.value}))}})):a.a.createElement(a.a.Fragment,null)),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__language",1)),a.a.createElement(Ta,{id:"combo-box-demo",options:n.languages,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(l.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(l.language)}))[0]:n.languages[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__language",1),variant:Object(k.d)("fieldVariant"),value:l&&l.language&&n.languages&&n.languages.filter((function(e){return String(e.value)===String(l.language)})).length>0?n.languages.filter((function(e){return String(e.value)===String(l.language)}))[0]:n.languages[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{language:t.value}))}})),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__sessionExpire",1)),a.a.createElement(Ta,{id:"combo-box-demo",options:n.expiresIn,getOptionLabel:function(e){return Object(k.s)(e.label,1)},style:{width:"100%"},name:"status",disableClearable:!0,value:l&&l.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(l.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0],renderInput:function(e){return a.a.createElement(Ce,Object.assign({},e,{label:Object(k.s)("$__expiresIn",1),variant:Object(k.d)("fieldVariant"),value:l&&l.expiresIn&&n.expiresIn?n.expiresIn.filter((function(e){return String(e.value)===String(l.expiresIn)}))[0]:n.expiresIn.filter((function(e){return!e.value}))[0]}))},onChange:function(e,t){s(Object(d.a)(Object(d.a)({},l),{},{expiresIn:t.value}))}})),JSON.stringify(l)!==JSON.stringify(g)?a.a.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){b()}})):a.a.createElement(a.a.Fragment,null))}))),nf=Object(R.a)({list:{position:"relative",listStyleType:"disclosure-closed","& li":{marginBottom:3}},item:{display:"flex",alignItems:"center"}});var af=Object(s.b)((function(e,t){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.functions,n=(t.session,r.socket,e.planDetails),o=e.data,l=nf(),s=(Object(k.j)(),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("#tab/subscriptionUpgrade")}},Object(k.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(k.s)("$__subscription"),": ",a.a.createElement("span",{style:{fontWeight:"bold"}},Object(k.s)(n.label))),a.a.createElement("ul",{className:l.list},a.a.createElement("li",null,Object(k.s)("$__adminLimit",1),": ",o&&o.customAdminsLimit?o.customAdminsLimit:n.settings.admins),a.a.createElement("li",null,Object(k.s)("$__storageSpace",1),": ",o&&o.customStorageSpace?Object(k.a)(o.customStorageSpace):Object(k.a)(n.settings.space)),a.a.createElement("li",null,Object(k.s)("$__BrightAndConnected",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:l.item},Object(k.s)("$__feed",1),": ",n.settings.brightAndConnected.feed?a.a.createElement(le.a,{icon:"check",color:Object(k.d)("color"),size:18}):s),n.settings.brightAndConnected.feed?a.a.createElement("li",{className:l.item},Object(k.s)("$__feedDays",1),":",n.settings.brightAndConnected.feedDays?"".concat(n.settings.brightAndConnected.feedDays," ").concat(Object(k.s)("$__days")):Object(k.s)("$__unlimited")):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:l.item},Object(k.s)("$__radarLimit",1),": ",n.settings.brightAndConnected.radarLimit?n.settings.brightAndConnected.radarLimit:Object(k.s)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(k.s)("$__insights",1),": ",n.settings.brightAndConnected.insight?a.a.createElement(le.a,{icon:"check",color:Object(k.d)("color"),size:18}):s))),a.a.createElement("li",null,Object(k.s)("$__plannings",1),":",a.a.createElement("ul",{style:{position:"relative",paddingLeft:10,listStyleType:"disc"}},a.a.createElement("li",{className:l.item},Object(k.s)("$__limit",1),": ",n.settings.plan.limit?n.settings.brightAndConnected.radarLimit:Object(k.s)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(k.s)("$__clientPlannings",1),": ",n.settings.plan.planClient?a.a.createElement(le.a,{icon:"check",color:Object(k.d)("color"),size:18}):s),n.settings.plan.planClient?a.a.createElement("li",{className:l.item},Object(k.s)("$__clientUserAdmins",1),": ",n.settings.plan.clientAdmin?n.settings.plan.clientAdmin:s):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{className:l.item},Object(k.s)("$__externalPlanning",1),": ",n.settings.plan.machenPlan?a.a.createElement(le.a,{icon:"check",color:Object(k.d)("color"),size:18}):s),a.a.createElement("li",{className:l.item},Object(k.s)("$__professionalTemplates",1),": ",n.settings.plan.templates?a.a.createElement(le.a,{icon:"check",color:Object(k.d)("color"),size:18}):s),a.a.createElement("li",{className:l.item},Object(k.s)("$__guidelineLimit",1),": ",n.settings.plan.guidelineLimit?n.settings.plan.guidelineLimit:Object(k.s)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(k.s)("$__feedLimit",1),": ",n.settings.plan.feedLimit?n.settings.plan.feedLimit:Object(k.s)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(k.s)("$__radarLimit",1),": ",n.settings.plan.radarLimit?n.settings.plan.radarLimit:Object(k.s)("$__unlimited")),a.a.createElement("li",{className:l.item},Object(k.s)("$__insightLimit",1),": ",n.settings.plan.insightLimit?n.settings.plan.insightLimit:Object(k.s)("$__unlimited")))),a.a.createElement("a",{href:"https://machen.ai/#planos",target:"_blank",style:{fontWeight:"bold",color:Object(k.d)("menu"),marginTop:33}},Object(k.s)("$__viewMoreDetails")))))}));function of(){of=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var cf=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,e)}))(Object(n.memo)((function(e){var t=c.a.getState(),r=t.session,n=t.db,o=a.a.useState(0),l=Object(h.a)(o,2),s=l[0],u=l[1];a.a.useEffect((function(){}),[]),a.a.useEffect((function(){var e=setTimeout((function(){document.getElementById("mainPannel").scrollTo(0,0)}),100);return f(),function(){clearTimeout(e)}}),[e.history]);var d=window.location.hash.split("/");d[0]=d[0].replace("#",""),window.location.hash.split("/")[0].replace("#","")||i.a.push("sp#tab/home"),d[0]&&36===d[0].length&&!c.a.getState().db.cards[d[0]]&&i.a.push("/deniedAccess");var f=function(){var e=Object(p.a)(of().mark((function e(){var t;return of().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kt.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)}}(),m=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&&(m=n.plans[r.GlobalData.plan].settings.space,g=n.plans[r.GlobalData.plan]);var b=s*(100/parseInt(m));return a.a.createElement("div",null,a.a.createElement(kn,{style:{marginBottom:15,backgroundColor:"#FFFFFF",borderRadius:2,boxShadow:"0px 0px 7px 5px rgba(0,0,0,0.03)"}},a.a.createElement(Cn,{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(k.d)("AvatarBackground")}},a.a.createElement(le.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(k.d)("menu"),fontWeight:"bolder",marginTop:7}},Object(k.s)("$__subscriptionPlan","*"),": ",Object(k.s)(g.label,"*")),a.a.createElement("div",{style:{width:"100%",color:"mediumgray",fontSize:12,fontWeight:"bold"}},Object(k.s)("$__adminLimit",1),": ",g.settings.admins),a.a.createElement("a",{href:"#",style:{position:"relative",top:"-7px",color:Object(k.d)("color"),fontSize:10,fontWeight:"bold"}},Object(k.s)("$__viewContract"))))),a.a.createElement(Cn,{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(k.d)("AvatarBackground")}},a.a.createElement(le.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(k.d)("menu"),fontWeight:"bolder"}},Object(k.s)("$__usedStorage","*"),a.a.createElement("span",{style:{marginLeft:15,color:"red",fontSize:11,cursor:"pointer"},onClick:function(){i.a.push("#tab/subscriptionUpgrade")}},Object(k.s)("$__upgradeSubscription"))),a.a.createElement(Kp,{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(k.s)("$__used",1),": ",Object(k.a)(s))," ",a.a.createElement("span",{style:{color:"lightgray",fontSize:11}},Object(k.s)("$__of")," ",Object(k.s)("$__accountSpace",1),": ",Object(k.a)(m))))))),a.a.createElement(kn,{style:{}},a.a.createElement(Cn,{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(B,null,a.a.createElement(ef,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(Cn,{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(B,null,a.a.createElement(rf,{data:r&&r.GlobalData?r.GlobalData:{}})))),a.a.createElement(Cn,{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(k.s)("$__subscriptionDetails"),a.a.createElement(B,null,a.a.createElement(af,{data:r&&r.GlobalData?r.GlobalData:{},planDetails:g}))))))}))),lf=r(172),sf=r.n(lf),uf=r(1122),df=(r(1061),r(1062),["onSelect"]),pf=function(e){var t=e.onSelect,r=Object(V.a)(e,df);return a.a.createElement(lf.Panel,Object.assign({},r,{onChange:function(e){t(e.color,e.alpha/100)},animation:"slide-up"}))};var ff=function(e){var t,r,o=Object(n.useState)(!1),i=Object(h.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(uf.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(k.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(pf,null))};function hf(){hf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var mf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Ra)((function(e){var t=c.a.getState().session,r=t.custom,n=a.a.useState(t.custom||{}),o=Object(h.a)(n,2),i=o[0],l=o[1],s=a.a.useState({}),u=Object(h.a)(s,2),m=u[0],g=u[1],b=a.a.useState({}),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(null),O=Object(h.a)(_,2),w=O[0],j=O[1],S=a.a.useState(null),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),D=F[0],N=F[1],P=a.a.useState(!1),A=Object(h.a)(P,2),$=A[0],z=A[1],M=Object(k.j)();a.a.useEffect((function(){g(t.custom||{})}),[]),a.a.useEffect((function(){D&&setTimeout((function(){N(!1)}),500)}),[D]);var Y=function(t){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{custom:Object(d.a)(Object(d.a)({},c.a.getState().session.custom),{},Object(f.a)({},t.name,t.value))})),x(Object(d.a)(Object(d.a)({},y),{},Object(f.a)({},t.name,t.value))),l(Object(d.a)(Object(d.a)({},i),{},Object(f.a)({},t.name,t.value)))},R=function(){var t=Object(p.a)(hf().mark((function t(){return hf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l(m),x({}),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{custom:m}));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var e=Object(p.a)(hf().mark((function e(){var n,a,o;return hf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z(!0),n=Object(d.a)(Object(d.a)({},(null===r||void 0===r?void 0:r.custom)?JSON.parse(null===r||void 0===r?void 0:r.custom):{}),y),l(n),g(n),e.prev=4,!w){e.next=11;break}return e.next=8,Object(St.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(St.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(d.a)(Object(d.a)({},n),{},{customLogo:a})),C&&(n=Object(d.a)(Object(d.a)({},n),{},{loginBackground:o})),c.a.getState().functions.socket.emit("data",{module:"account",method:"post",action:"save"},{custom:JSON.stringify(n)},(function(e){z(!1),x({})}))),e.next=27;break;case 24:e.prev=24,e.t2=e.catch(4),console.log(e.t2);case 27:case"end":return e.stop()}}),e,null,[[4,24]])})));return function(){return e.apply(this,arguments)}}();return(i._id===t._id||M&&M.user&&(M.userAdmin||M.userEdit))&&!0,i.independentAccount&&!1,a.a.createElement(kn,null,a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__logo")),a.a.createElement(dn,{maxWidthOrHeight:600,img:r.customLogo,onChange:function(e,t){j(t),Y({name:"customLogo",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".png",checkOrientation:!0})))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__loginBackground")),a.a.createElement(dn,{maxWidthOrHeight:2e3,img:r.loginBackground,onChange:function(e,t){I(t),Y({name:"loginBackground",value:e})},transparent:!0,ignoreAspect:!0,noGuides:!0,viewMode:0,accept:".jpg, .jpeg",checkOrientation:!0})))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__backgroundColumnsTitle")),a.a.createElement(mt,{title:Object(k.s)("$__backgroundColumnsTitle",1),icon:"gradient",color:Object(k.d)("colorText"),style:{background:Object(k.d)("ColumnTitleColor"),padding:"7px"}}),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(ff,{value:{css:r.ColumnTitleColor},onChange:function(e){Y({name:"ColumnTitleColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.colorText||null,mode:"RGB",onChange:function(e){Y({name:"colorText",value:e.color})}}),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__text")))))))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__menu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(ff,{value:{css:r.menuColor},onChange:function(e){Y({name:"menuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.menuButtonColor,mode:"RGB",onChange:function(e){Y({name:"menuButtonColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__menuText"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.active,mode:"RGB",onChange:function(e){Y({name:"active",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__menuActiveText"))))))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__submenu")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(ff,{value:{css:r.subMenuColor},onChange:function(e){Y({name:"subMenuColor",value:e.css})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__background"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColor,mode:"RGB",onChange:function(e){Y({name:"subMenuTextColor",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__menuTextIconColor"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.subMenuTextColorActive,mode:"RGB",onChange:function(e){Y({name:"subMenuTextColorActive",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__subMenuActiveText"))))))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__complement")),a.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexFlow:"wrap"}},a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(ff,{value:{css:r.linearProgress},onChange:function(e){Y({name:"linearProgress",value:e.css})}})),a.a.createElement(Tr,{customColor:r.linearProgress}),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__progress"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.color,mode:"RGB",onChange:function(e){Y({name:"color",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__borderColor"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.menu,mode:"RGB",onChange:function(e){Y({name:"menu",value:e.color})}})),a.a.createElement("div",{style:{marginRight:7,fontWeight:"bold",color:Object(k.d)("menu")}},Object(k.s)("$__primaryText"))))))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(k.s)("$__cardImageCover"),a.a.createElement(ff,{value:{css:r.AvatarBackground},onChange:function(e){Y({name:"AvatarBackground",value:e.css})},type:"radial"}),a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.avatarIconColor,mode:"RGB",onChange:function(e){Y({name:"avatarIconColor",value:e.color})}})),a.a.createElement(ir,{backgroundColor:r.AvatarBackground,avatarIconColor:r.avatarIconColor,responsive:!0})))),a.a.createElement(Cn,{md:4},a.a.createElement(tt.a,{style:{marginTop:15,padding:7}},a.a.createElement("fieldset",null,a.a.createElement("legend",{style:{display:"flex",alignItems:"center"}},Object(k.s)("$__fields")),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.line,mode:"RGB",onChange:function(e){Y({name:"line",value:e.color}),N(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__line"))),a.a.createElement("div",{style:Object(f.a)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},"justifyContent","space-between")},a.a.createElement(B,null,a.a.createElement(sf.a,{enableAlpha:!1,animation:"slide-up",color:r.medium,mode:"RGB",onChange:function(e){Y({name:"medium",value:e.color}),N(!0)}})),a.a.createElement("div",{style:{marginRight:7}},Object(k.s)("$__inputAdorment"))),D?a.a.createElement(Ce,{label:Object(k.s)("$__field",1),variant:r.fieldVariant,name:"field",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"format_color_fill"}))}}):a.a.createElement(Ce,{label:Object(k.s)("$__field",1),variant:r.fieldVariant,name:"field",InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"format_color_fill",color:r.medium}))}})))),JSON.stringify(i)!==JSON.stringify(m)?a.a.createElement("div",{style:{position:"fixed",bottom:50,right:50,display:"flex",justifyContent:"flex-end"}},a.a.createElement("div",null,a.a.createElement(E.a,{title:Object(k.s)("$__reset"),text:Object(k.s)("$__reset"),color:"red",icon:"format_color_reset",size:"25px",onClick:function(){R()},load:$})),a.a.createElement("div",{style:{marginLeft:15}},a.a.createElement(E.a,{title:Object(k.s)("$__save"),text:Object(k.s)("$__save"),color:"green",icon:"save",size:"25px",onClick:function(){G()},load:$}))):a.a.createElement(a.a.Fragment,null))})));var gf=Object(s.b)((function(e){return{history:e.db.history}}),(function(e){return Object(I.b)(C,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("#","")||i.a.push("acc#tab/resume"),a.a.createElement("div",null,t[1]&&"resume"===t[1]?a.a.createElement(B,null,a.a.createElement(cf,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"profile"===t[1]?a.a.createElement(B,null,a.a.createElement(Jp,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"whiteLabel"===t[1]?a.a.createElement(B,null,a.a.createElement(mf,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"integrations"===t[1]?a.a.createElement(B,null,a.a.createElement(Rp,null)):a.a.createElement(a.a.Fragment,null),t[1]&&"invoicing"===t[1]?a.a.createElement(B,null,a.a.createElement(Yp,null)):a.a.createElement(a.a.Fragment,null))}))),bf=Object(R.a)(Ys);var vf=Object(R.a)(Ys);var yf=[{path:"/d",name:"DASHBOARD",alias:"Dashboard",icon:"dashboard",component:Ms,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:en.a,component:as,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:Ts.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:Sp,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:"/sp",name:"Strategy & Plans",alias:"plan",icon:"view_comfy",component:lp,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:Ro.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:Ts.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:gu,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:up,icon:"turned_in",show:!0,auth:!0,search:!0,subMenu:!0,permission:1},{path:"/plataformAdministrator",name:"BackOffice",alias:"BackOffice",icon:"business",component:xl,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:wu,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:Du,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(h.a)(r,2),o=n[0],c=n[1],l=el();t.get("token")&&36===t.get("token").length||i.a.push("/");var s=function(){var r=Object(p.a)(Qc().mark((function r(){var n;return Qc().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Y.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(){i.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(k.s)("$__invalidRequest",1)," | ").concat(Object(k.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(kn,null,a.a.createElement(Cn,{xl:4,lg:4,md:4,sm:12,xs:12},a.a.createElement("form",null,a.a.createElement($i,{db:"cards",login:!0},a.a.createElement(Wi,{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(k.s)("$__createPassword",1))),a.a.createElement(Bi,null,a.a.createElement(Wa,{onConfirmed:function(e){c(Object(d.a)(Object(d.a)({},o),{},{password:e}))}})),a.a.createElement(Kc,{className:l.justifyContentCenter},o&&o.password&&a.a.createElement(Q,{style:{color:"rgba(15,18,35,1)"},simple:!0,size:"lg",block:!0,onClick:function(){return s()}},Object(k.s)("$__save","*"))))))))},show:!0,auth:!1},{path:"/login",name:"Login Page",mini:"L",component:au,show:!0,auth:!1},{path:"/register",name:"Register Page",mini:"R",component:function(e){var t=a.a.useState([]),r=Object(h.a)(t,2),n=r[0],o=r[1],c=a.a.useState(!1),l=Object(h.a)(c,2),s=l[0],u=l[1],d=a.a.useState("Cristofer Odair"),f=Object(h.a)(d,2),m=f[0],g=f[1],b=a.a.useState("cristofer.odair@outlook.com.br"),v=Object(h.a)(b,2),y=v[0],x=v[1],_=a.a.useState(!1),O=Object(h.a)(_,2),w=(O[0],O[1],a.a.useState(!1)),j=Object(h.a)(w,2),E=j[0],S=j[1],L=a.a.useState(""),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(""),D=Object(h.a)(F,2),N=D[0],P=D[1],A=a.a.useState(!1),$=Object(h.a)(A,2),z=$[0],M=$[1],B=a.a.useState(!1),R=Object(h.a)(B,2),G=R[0],H=R[1],W=a.a.useState(0),U=Object(h.a)(W,2),V=U[0],q=U[1],X=a.a.useState(null),J=Object(h.a)(X,2),K=J[0],Z=J[1],ee=function(e,t){var r=n.indexOf(e),a=Object(Se.a)(n);-1===r?a.push(e):a.splice(r,1),o(a)},te=Yu(),re=function(){var e=Object(p.a)(Mu().mark((function e(t){return Mu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),!Object(k.t)(t)){e.next=8;break}return e.next=4,zt(t);case 4:e.sent?(T(Object(k.s)("$__emailAlreadyExists",1)),x(""),S(!1)):(T(null),S(!0),Rt(m,t)),e.next=10;break;case 8:T(Object(k.s)("$__invalidEmail",1)),x("");case 10:u(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=Object(p.a)(Mu().mark((function e(){return Mu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(N.length>=6)){e.next=9;break}return u(!0),e.next=4,Yt(N,y);case 4:e.sent?(H(!0),M(!1)):M(!0),u(!1),e.next=10;break;case 9:M(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var t=Object(p.a)(Mu().mark((function t(){var r;return Mu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),t.prev=1,t.next=4,Y.a.post("user/register-final-step/",{name:m,email:y,token:N,password:K,login:!0});case 4:(r=t.sent)&&(localStorage.setItem("TOKEN",r.data.token),e.callback&&setTimeout((function(){i.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:te.container,style:{overflow:"auto"}},a.a.createElement("div",{style:{display:"flex",justifyContent:"center",overflow:"auto"}},a.a.createElement(Cn,{xs:12,sm:10,md:6},a.a.createElement($i,{db:"cards",className:te.cardSignup},a.a.createElement("h2",{className:te.cardTitle},Object(k.s)("$__register",1)),a.a.createElement(Bi,null,a.a.createElement("div",null,a.a.createElement(Ce,{className:te.textFields,label:Object(k.s)("$__fullName",1),variant:"standard",name:Object(k.s)("$__fullName",1),InputLabelProps:{shrink:!0},InputProps:{endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{className:te.inputAdornmentIcon},"account_box")),autoComplete:"new-password",onChange:function(e){g(e.target.value)}},value:m||"Cristofer Odair",disabled:E}),a.a.createElement(Ce,{label:Object(k.s)("$__email",1),variant:Object(k.d)("fieldVariant"),name:"email",type:"email",helperText:I,InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:!I&&y&&Object(k.t)(y)?"":"invalid",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"alternate_email"})),onChange:function(e){S(!1),T(null),x(e.target.value)},onBlur:function(){var e=Object(p.a)(Mu().mark((function e(t){return Mu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:re(t.target.value);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},value:y,placeholder:"email@domain.com",disabled:E}),!E&&a.a.createElement(Be,{icon:"navigate_next",text:Object(k.s)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){re(y)}}),E&&y&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Ce,{label:Object(k.s)("$__emailToken",1),variant:Object(k.d)("fieldVariant"),helperText:Object(k.s)(z?"registerEmailTokenError":"registerEmailTokenDescription"),type:"password",name:"emailToken",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",className:z?"invalid":"",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"keyboard"})),onChange:function(e){T(null),P(e.target.value)}},value:N,placeholder:"****"}),a.a.createElement(Be,{icon:"reply_all",text:Object(k.s)("$__resendCode","*"),reverse:!0,style:{float:"right"},onClick:function(){Rt(m,y)}}),!G&&a.a.createElement(Be,{icon:"navigate_next",text:Object(k.s)("$__continue","*"),reverse:!0,style:{float:"right"},onClick:function(){ne()}})),E&&G&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Wa,{onConfirmed:function(e){Z(e)}}),a.a.createElement(Au.a,{open:V,onClose:function(){return q(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",{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===V?"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(Q,{round:!0,color:"custom_color",onClick:function(){return q(0)}},"J\xe1 li"))))),a.a.createElement(Xi.a,{classes:{root:te.checkboxLabelControl,label:te.checkboxLabel},control:a.a.createElement(To.a,{tabIndex:-1,onClick:function(){return ee(1)},checkedIcon:a.a.createElement("div",{className:te.checkedIcon},a.a.createElement(le.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:te.uncheckedIcon},a.a.createElement(le.a,{size:"16px",color:"red"},"remove")),classes:{checked:te.checked,root:te.checkRoot}}),label:a.a.createElement("span",null,Object(k.s)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return q(1)},style:{color:"blue"}},Object(k.s)("$__privacyPolicy")),".")}),a.a.createElement(Xi.a,{classes:{root:te.checkboxLabelControl,label:te.checkboxLabel},control:a.a.createElement(To.a,{tabIndex:-1,onClick:function(){return ee(2)},checkedIcon:a.a.createElement("div",{className:te.checkedIcon},a.a.createElement(le.a,{size:"16px"},"check")),icon:a.a.createElement("div",{className:te.uncheckedIcon},a.a.createElement(le.a,{size:"16px",color:"red"},"remove")),classes:{checked:te.checked,root:te.checkRoot}}),label:a.a.createElement("span",null,Object(k.s)("$__iAgreeToThe",1)," ",a.a.createElement("span",{onClick:function(){return q(2)},style:{color:"blue"}},Object(k.s)("$__servicesTerms")),".")}),a.a.createElement("div",{className:te.center},n.indexOf(1)>-1&&K&&a.a.createElement(Q,{round:!0,color:"custom_color",onClick:function(){return ae()}},Object(k.s)("$__completeRegistration")))))),s&&a.a.createElement("div",{style:{position:"absolute",bottom:"0px",width:"100%"}},a.a.createElement(Pu,null))))))},show:!0,auth:!1},{path:"/error-page",name:"Error Page",mini:"E",component:function(){var e=Bs();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(kn,null,a.a.createElement(Cn,{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=ou();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(kn,null,a.a.createElement(Cn,{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=iu();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(kn,null,a.a.createElement(Cn,{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:ms,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:gf,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:Gs,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=bf();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(kn,null,a.a.createElement(Cn,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(k.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(k.d)("menu")}},"Voc\xea j\xe1 utilizou o n\xfamero de usu\xe1rios contratados"),a.a.createElement("h4",{className:e.description,style:{color:Object(k.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=vf();return a.a.createElement("div",{className:e.contentCenter},a.a.createElement(kn,null,a.a.createElement(Cn,{md:12},a.a.createElement("h1",{className:e.title,style:{color:Object(k.d)("color")}},"\\o/"),a.a.createElement("h2",{className:e.subTitle,style:{color:Object(k.d)("menu")}},Object(k.s)("$__accessDenied","*")),a.a.createElement("h4",{className:e.description,style:{color:Object(k.d)("menu")}},Object(k.s)("$__accessDeniedDescription","*")))))},icon:"upgrade",show:!0,auth:!0,permission:1,hashId:!1}],xf=function(e){return Object(d.a)(Object(d.a)({},X.l),{},{menu:{position:"relative",borderRight:Object(k.d)("color"),display:"flex",flexDirection:"column",alignItems:"center"},menuExpanded:{position:"relative",borderRight:Object(k.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(k.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"12px 12px 12px 20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(k.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function _f(){_f=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Of=function(e){var t=c.a.getState().db,r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=Object(k.j)(),o=r[0]&&36===r[0].length&&t.cards[r[0]]&&"plan"===t.cards[r[0]].type?Object(yt.u)(r[0]):null,l=r&&r.length>0&&36===r[0].length&&t.cards[r[0]]&&t.cards[r[0]].image?t.cards[r[0]].image:He.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(d.a)(Object(d.a)({name:t.cards[e].name},t.cards[e].image?{avatar:t.cards[e].image}:{icon:"view_comfy"}),{},{onClick:function(){i.a.push("sp#".concat(t.cards[e]._id,"/dashboard"))}}))})),a.a.createElement(Al.a,{title:a.a.createElement(a.a.Fragment,null,t.cards[r[0]].name)},a.a.createElement("div",{style:Object(d.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(d.a)(Object(d.a)({},c.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(l,'")'),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(at,{text:t.cards[r[0]].name,icon:"change_circle",transparent:!0,maxWidth:"200px",options:s})))))},wf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.search,o=t.session,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=Object(R.a)(xf)(),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(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!1,adminView:!1})})),function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.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(k.j)(),S=(w[0]&&36===w[0].length&&r.cards[w[0]]&&"plan"===r.cards[w[0]].type&&Object(yt.u)(w[0]),function(t){f(t);var r=c.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(d.a)(Object(d.a)({},c.a.getState().db),{},{cardsExpanded:t,cards:r}))}),L=function(){var t=Object(p.a)(_f().mark((function t(r){var n;return _f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(!0),c.a.getState().session.cards.adminViewLoader){t.next=8;break}return t.next=4,Object(st.a)(e,null,!0);case 4:n=t.sent,(c.a.getState().session.cards.adminViewLoader||n)&&(v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!c.a.getState().session.cards.adminView})}))),t.next=10;break;case 8:v(!1),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.a.getState().session),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().session.cards),{},{adminViewLoader:!0,adminView:!c.a.getState().session.cards.adminView})}));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(e){i.a.push(e)};return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:O?y.menuExpanded:y.menu},a.a.createElement("div",{className:O?y.buttonExpanded:y.button},a.a.createElement(Be,{icon:O?"menu_open":"read_more",text:O?Object(k.s)("$__collapsingMenu",1):null,title:O?null:Object(k.s)("$__expandingMenu",1),iconColor:Object(k.d)("subMenuTextColor"),textColor:Object(k.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?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_collapseCards"},a.a.createElement(Be,{text:O?Object(k.s)("$__collapseCards",1):null,textColor:Object(k.d)("subMenuTextColor"),title:O?null:Object(k.s)("$__collapseCards",1),icon:"close_fullscreen",iconColor:Object(k.d)("subMenuTextColor"),onClick:function(){S(!1)},size:"21px"})):a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_expandingCards"},a.a.createElement(Be,{text:O?Object(k.s)("$__expandingCards",1):null,textColor:Object(k.d)("subMenuTextColor"),title:O?null:Object(k.s)("$__expandingCards",1),icon:"open_in_full",iconColor:Object(k.d)("subMenuTextColor"),onClick:function(){S(!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?y.buttonExpanded:y.button,style:{display:"flex"}},b?a.a.createElement(he.a,{size:25,style:{margin:"auto",display:"flex"}}):a.a.createElement(Be,{text:O?Object(k.s)("$__adminViewDescription",1):null,title:O?null:Object(k.s)("$__adminViewDescription",1),textColor:c.a.getState().session.cards.adminView?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),iconColor:c.a.getState().session.cards.adminView?Object(k.d)("color"):Object(k.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?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_setAdminView"},a.a.createElement(Be,{text:O?Object(k.s)("$__viewInColumns",1):null,textColor:r.viewList?Object(k.d)("subMenuTextColor"):Object(k.d)("color"),iconColor:r.viewList?Object(k.d)("subMenuTextColor"):Object(k.d)("color"),title:O?null:Object(k.s)("$__viewInColumns",1),icon:"view_column",onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{viewList:!1}))},size:"21px"})),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_options_viewInList"},a.a.createElement(Be,{text:O?Object(k.s)("$__viewInList",1):null,title:O?null:Object(k.s)("$__viewInList",1),icon:"list",iconColor:r.viewList?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),textColor:r.viewList?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),onClick:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{viewList:!0}))},size:"21px"}))),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:y.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(Of,Object.assign({expanded:O},e))),yf.filter((function(e){return e.path===_})).length>0&&yf.filter((function(e){return e.path===_}))[0].tabs&&yf.filter((function(e){return e.path===_}))[0].tabs.length>0&&(yf.filter((function(e){return e.path===_}))[0].hashId&&w[0]&&36===w[0].length||!yf.filter((function(e){return e.path===_}))[0].hashId)&&a.a.createElement(a.a.Fragment,null,yf.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?y.buttonExpanded:y.button,key:t,id:"sideBar_subMenu_plan_".concat(e.alias)},a.a.createElement(Be,{text:O?"matrix"===e.alias?"MATRIX SWOT":Object(k.s)("$__".concat(e.alias),1):null,title:O?null:"matrix"===e.alias?"MATRIX SWOT":Object(k.s)("$__".concat(e.alias),1),icon:e.icon,iconColor:w[1]===e.path?Object(k.d)("subMenuTextColorActive"):Object(k.d)("subMenuTextColor"),textColor:w[1]===e.path?Object(k.d)("subMenuTextColorActive"):Object(k.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?y.buttonExpanded:y.button,id:"sideBar_subMenu_plan_miroBoard"},a.a.createElement(Be,{text:O?Object(k.s)("$__planningBoard",1):null,title:O?null:Object(k.s)("$__planningBoard",1),icon:"developer_board",iconColor:"planningBoard"===w[1]?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),textColor:"planningBoard"===w[1]?Object(k.d)("color"):Object(k.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:y.separator}),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_lastTasks"},a.a.createElement(Be,{text:O?Object(k.s)("$__lateTasks",1):null,title:O?null:Object(k.s)("$__lateTasks",1),icon:"event_busy",iconColor:"late"===w[1]?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),textColor:"late"===w[1]?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),onClick:function(){i.a.push("t#tab/lateTasks")},size:"21px"})),a.a.createElement("div",{className:O?y.buttonExpanded:y.button,id:"sideBar_subMenu_nextTasks"},a.a.createElement(Be,{text:O?Object(k.s)("$__nextTasks",1):null,title:O?null:Object(k.s)("$__nextTasks",1),icon:"date_range",iconColor:"nextTasks"===w[1]?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),textColor:"nextTasks"===w[1]?Object(k.d)("color"):Object(k.d)("subMenuTextColor"),onClick:function(){i.a.push("t#tab/nextTasks")},size:"21px"}))))))})),jf=r(572);function Ef(){Ef=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var kf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(Object(me.a)(Tu)((function(e){var t=e.classes,r=a.a.useState(!1),n=Object(h.a)(r,2),o=n[0],l=(n[1],a.a.useState(null)),s=Object(h.a)(l,2),u=s[0],f=s[1],m=window.location.hash.split("/");m[0]=m[0].replace("#","");var g=function(){var t=Object(p.a)(Ef().mark((function t(r,n){return Ef().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"tags"===n||e.setSubMenuExpanded(o),!r||window.location.pathname===r&&n!==u||i.a.push(r),"chat"===n?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!0})):(f(n),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.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(B,{info:{path:"components/Sidebar/Index"}},a.a.createElement("div",{className:t.root},a.a.createElement("div",{className:t.bar,style:{background:Object(k.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(k.d)("menuButtonColor"),alignItems:"center"}},a.a.createElement("div",{style:{backgroundImage:'url("'.concat(Object(k.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(le.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:en.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__StrategyAndPlans"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__activities"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__library"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"turned_in",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__tags"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"event",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__calendar"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.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:c.a.getState().chat.open?t.itemButtomActive:t.itemButtom,onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!c.a.getState().chat.open}))},style:{color:Object(k.d)("menuButtonColor")}},a.a.createElement(Vc,null,a.a.createElement(le.a,{icon:"chat",color:"parent",title:"$__chat",size:"21px",style:{marginBottom:"0px",marginRight:"7px"}})),Object(k.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(k.d)("menuButtonColor")}},a.a.createElement(le.a,{icon:"help_outline",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__support"),size:"21px",style:{marginBottom:"0px",marginRight:"7px"}}),Object(k.s)("$__support","*")))),"myDay"!==u&&"timer"!==u&&"chat"!==u&&("/t"===window.location.pathname||"/sp"===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(k.d)("subMenuColor"),borderRight:"4px solid ".concat(Object(k.d)("color"))}},a.a.createElement(wf,{hashs:m,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(Uc,{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:",jf.version))))})));var Sf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().chat;return a.a.createElement("div",{id:"chatNotificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(q.a,{"aria-haspopup":"true",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},t),{},{open:!t.open}))}},a.a.createElement(Vc,null,a.a.createElement(le.a,{icon:"chat_bubble_outline",color:"parent",title:"$__chat"}))))}));var Lf=Object(s.b)((function(e){return{store:e}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=(t.timeline,t.session),o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useRef(null),d=_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),p=(Object(k.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&&_()(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(q.a,{ref:u,"aria-controls":l?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:f.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(le.a,{icon:"hourglass_empty",color:"parent",title:"$__myDay"}))),f.length>0&&a.a.createElement(rt.a,{open:l,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(Ze.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.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(k.s)("$__myDay")),a.a.createElement(kr,{noChecklist:!0,noDelete:!0,showCard:!0,myDay:!0,db:"cards"})))))})))}));var Cf=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState([]),d=Object(h.a)(u,2),p=d[0],f=d[1],m=a.a.useRef(null);a.a.useEffect((function(){var e=Object.keys(c.a.getState().db.cards).filter((function(e){if(r.cards[e]&&!r.cards[e].deleted&&!r.cards[e].checklist&&"chatGroup"!==r.cards[e].type&&"completed"!==r.cards[e].status&&r.cards[e]._parent&&c.a.getState().db.cards[c.a.getState().db.cards[e]._parent]&&c.a.getState().db.cards[c.a.getState().db.cards[e]._parent].requireApproval&&(c.a.getState().db.cards[e]._users[n._id]&&c.a.getState().db.cards[e]._users[n._id].approvalResponsible||0===Object.keys(c.a.getState().db.cards[e]._users).filter((function(t){return c.a.getState().db.cards[e]._users[t].approvalResponsible})).length&&c.a.getState().db.cards[e]._users[n._id]))return!0})).map((function(e){return r.cards[e]}));JSON.stringify(e)!==JSON.stringify(p)&&f(e),0===e.length&&s(!1)}),[e.cards]);var g=function(e){m.current&&m.current.contains(e.target)||s(!1)};return 0===p.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"notificationsApprovalBt",style:{zIndex:"100 !important"}},a.a.createElement(q.a,{ref:m,"aria-controls":l?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){s((function(e){return!e}))}},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:null===p||void 0===p?void 0:p.filter((function(e){return"completed"!==e.status})).length,color:"secondary"},a.a.createElement(le.a,{icon:"approval",color:"parent",title:"$__forApproval"}))),p.length>0&&a.a.createElement(rt.a,{open:l,anchorEl:m.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"400px"}},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Ze.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom",padding:11}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:g},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(k.s)("$__attention",1),": ",a.a.createElement("span",{style:{color:Object(k.d)("menu")}},Object(k.s)("$__thisActivityRequireApproval",1))),p.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(vn,{db:"cards",data:e,onlyOption:!0}),a.a.createElement(yo,{nodeId:e._id}))}))))))})))})),If=Object(R.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 Tf=Object(s.b)((function(e){return{cards:e.db.cards,users:e.db.users,timeline:e.timeline}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.timeline,n=t.functions,o=t.session,i=n.socket,l=e.data,s=e.type,u=a.a.useState(!1),p=Object(h.a)(u,2),m=p[0],g=p[1],b=If();a.a.useEffect((function(){return function(){}}),[]);var v="cards";l&&l.cardId&&c.a.getState().db.users[l.cardId]&&(v="users");var y=function(){var t=Object(yt.k)(l.cardId);e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(d.a)(Object(d.a)({},c.a.getState().notifications),{},{total:c.a.getState().notifications.total-t.total})),Pr(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:l.cardId,db:"cards",type:"all"===s||"mentions"===s||"completed"===s||"deleted"===s?"all":s},(function(){})),c.a.getState().db&&c.a.getState().db.cards&&c.a.getState().db.cards[l.cardId]&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),{},Object(f.a)({},l.cardId,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[l.cardId]),{},{_notifications:{comment:0,kpi:0,timer:0,log:0}})))})),e.onRead&&setTimeout((function(){e.onRead()}),1e3)},x=Object.keys(r[l.cardId]).filter((function(e){var t;return"all"===s||"deleted"===s&&(null===(t=c.a.getState().db.cards[l.cardId])||void 0===t?void 0:t.deleted)||"deleted"!==s&&c.a.getState().db.cards[l.cardId]&&!c.a.getState().db.cards[l.cardId].deleted&&("comment"===s&&Object.keys(r[l.cardId]).filter((function(t){var n;return"comment"===(null===(n=r[l.cardId][e])||void 0===n?void 0:n.type)&&!r[l.cardId][e].deleted})).length>0||"log"===s&&Object.keys(r[l.cardId]).filter((function(t){var n;return"log"===(null===(n=r[l.cardId][e])||void 0===n?void 0:n.type)&&!r[l.cardId][e].deleted})).length>0||"mentions"===s&&Object.keys(r[l.cardId]).filter((function(t){var n,a;return(null===(n=r[l.cardId][e])||void 0===n||null===(a=n.message)||void 0===a?void 0:a.indexOf(o._id))>-1&&!r[l.cardId][e].deleted})).length>0||"completed"===s&&"completed"===c.a.getState().db.cards[l.cardId].status)})).filter((function(e){return o&&o._id&&r[l.cardId]&&r[l.cardId][e]&&!r[l.cardId][e].deleted&&r[l.cardId][e].user&&r[l.cardId][e].user._id&&r[l.cardId][e].user._id!==o._id&&(!r[l.cardId][e].readedBy||r[l.cardId][e].readedBy&&!r[l.cardId][e].readedBy[o._id])}));return a.a.createElement("div",{className:l.readed?b.Readed:b.unReaded,style:{width:"100%",overflow:"auto"}},l.cardId&&c.a.getState().db.cards[l.cardId]&&a.a.createElement("div",{style:c.a.getState().db.cards[l.cardId]&&"chatGroup"===c.a.getState().db.cards[l.cardId].type?{cursor:"pointer"}:{}},a.a.createElement(vn,{setPrivate:function(e){g(e)},db:"cards",data:c.a.getState().db.cards[l.cardId],onlyOption:!(!c.a.getState().db.cards[l.cardId]||"chatGroup"!==c.a.getState().db.cards[l.cardId].type),onOpen:e.onClick||null})),x.length>0&&(!c.a.getState().db.cards[l.cardId].private||c.a.getState().db.cards[l.cardId].private&&(c.a.getState().controls.lockPrivate||m))?a.a.createElement(a.a.Fragment,null,x.sort((function(e,t){return parseInt(r[l.cardId][e].created_at)>parseInt(r[l.cardId][t].created_at)?-1:parseInt(r[l.cardId][e].created_at)<parseInt(r[l.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(Kn,{storie:Object(d.a)(Object(d.a)({},c.a.getState().timeline&&c.a.getState().timeline[l.cardId]&&c.a.getState().timeline[l.cardId][t]?c.a.getState().timeline[l.cardId][t]:{}),{},{idRel:t}),boxStyle:{width:"calc(100% - 10px) !important",maxWidth:"285px"},db:v,noReactions:!0,noReply:!0,openLightBox:function(r){e.reduxFunction("ASYNC","LIGHTBOX",{open:!0,files:c.a.getState().timeline[l.cardId][t].files?c.a.getState().timeline[l.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(E.a,{title:Object(k.s)("$__open",1),text:Object(k.s)("$__open",1),color:Object(k.d)("color"),icon:"launch",onClick:function(){e.onClick&&e.onClick(),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{db:"cards",id:l.cardId,module:"cardEdit",activeModule:"cardEdit",data:c.a.getState().db.cards[l.cardId]})),y()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}),a.a.createElement(E.a,{title:Object(k.s)("$__markAsRead",1),text:Object(k.s)("$__markAsRead",1),color:Object(k.d)("color"),icon:"mark_chat_read",onClick:function(){y()},size:"13px",textSize:"13px",style:{padding:"0px !important"}}))):a.a.createElement(a.a.Fragment,null))}))):a.a.createElement(a.a.Fragment,null))}));function Ff(){Ff=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Df=Object(s.b)((function(e){return{notifications:e.notifications,timeline:e.timeline,session:e.session,cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.notifications,n=t.session,o=t.timeline,i=t.functions.socket,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(!1),b=Object(h.a)(g,2),v=(b[0],b[1]),y=a.a.useState(7),x=Object(h.a)(y,2),_=x[0],O=(x[1],a.a.useState(!1)),w=Object(h.a)(O,2),j=w[0],S=w[1],L=a.a.useState("comment"),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useRef();a.a.useEffect((function(){return u||(m(!0),D()),function(){m(!1)}}),[]),a.a.useEffect((function(){}),[e.timeline,e.notifications,e.cards]);var D=function(){var t=Object(p.a)(Ff().mark((function t(){var r,n,a,o,i,l,s,u,p,h=arguments;return Ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=h.length>0&&void 0!==h[0]?h[0]:0,h.length>1&&void 0!==h[1]?h[1]:0,n=h.length>2&&void 0!==h[2]&&h[2],A<(a=r)&&(a=0),!n){t.next=9;break}t.t0={data:[]},t.next=12;break;case 9:return t.next=11,kt.a.post("/M_UnReadedList",{skip:a,limit:9999999999});case 11:t.t0=t.sent;case 12:if(o=t.t0,i=0,l=0,s=0,t.prev=16,!(n||o&&o.data&&o.data.length>0)){t.next=29;break}return u=Object(d.a)({},c.a.getState().timeline),p=[],t.next=22,new Promise((function(e,t){o.data.map((function(t,r){i=t.total,p.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(d.a)(Object(d.a)({},t),{},Object(f.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(d.a)(Object(d.a)({},r),{},Object(f.a)({},e.type,Object(d.a)(Object(d.a)({},r[e.type]),{},Object(f.a)({},e._id,e))))})),parseInt(l)<parseInt(e.data.created_at)&&(l=parseInt(e.data.created_at)),(0===s||s>parseInt(e.data.created_at))&&(s=parseInt(e.data.created_at)),u=Object(d.a)(Object(d.a)({},u),{},Object(f.a)({},e.nodeId,Object(d.a)(Object(d.a)({},u&&u[e.nodeId]?u[e.nodeId]:{}),{},Object(f.a)({},e.data._id,Object(d.a)(Object(d.a)(Object(d.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:l,firstNotification:s}),e.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),u)),Object(st.c)(e,p),v(!1),t.next=30;break;case 29:v(!1);case 30:t.next=35;break;case 32:t.prev=32,t.t1=t.catch(16),console.log(t.t1);case 35:v(!1);case 36:case"end":return t.stop()}}),t,null,[[16,32]])})));return function(){return t.apply(this,arguments)}}(),N=function(){var t=Object(p.a)(Ff().mark((function t(){return Ff().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(k.c)({message:Object(k.s)("$__confirmClearAllNotifications",1),variant:"warning",persist:!1,horizontal:"right",confirm:function(){S(!1);var t=Object(d.a)({},c.a.getState().timeline);Object.keys(t).map((function(e){t&&t[e]&&Object.keys(t[e]).filter((function(r){return c.a.getState().db.cards[e]&&"chatGroup"!==c.a.getState().db.cards[e].type&&(!t[e][r].readedBy||t[e][r].readedBy&&!t[e][r].readedBy[n._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{i.emit("data",{module:"notifications",method:"put",action:"readedAll"},{})}catch(r){console.log(r)}}});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),P=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||F.current&&F.current.contains(e.target)||setTimeout((function(){S(!1)}),100)},A=0,$={comment:0,log:0,mentions:0,deleted:0,kpi:0,timer:0,completed:0};if(Object.keys(c.a.getState().db.cards).filter((function(e){var t=c.a.getState().db.cards[e];if("chatGroup"!==t.type&&"step"!==t.type&&t._users&&t._users[n._id]&&o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).length>0)return!0})).map((function(e,t){o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o[e]&&o[e][t]&&!o[e][t].deleted&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).map((function(r){var a,i,l,s;(null===(a=c.a.getState().db.cards[e])||void 0===a?void 0:a.deleted)&&($.deleted=$.deleted+1),"completed"===(null===(i=c.a.getState().db.cards[e])||void 0===i?void 0:i.status)&&($.completed=$.completed+1),(null===(l=o[e][r])||void 0===l||null===(s=l.message)||void 0===s?void 0:s.indexOf(n._id))>-1&&c.a.getState().db.cards[e]&&!c.a.getState().db.cards[e].deleted&&($.mentions=$.mentions+1,console.log(o[e][r],c.a.getState().db.cards[e])),$[o[e][r].type]=parseInt($[o[e][r].type])+1,t<=_&&1,A+=1}))})),r.total>A&&(A=r.total),0===A&&j&&S(!1),0===A)return a.a.createElement(a.a.Fragment,null);var z=I;return"comment"!==z||$.comment||(z="mentions"),"mentions"!==z||$.mentions||(z="log"),"log"!==z||$.log||(z="completed"),"completed"!==z||$.completed||(z="deleted"),"deleted"!==z||$.deleted||(z="all"),a.a.createElement("div",{id:"notificationsBt",style:{zIndex:"100 !important"}},a.a.createElement(q.a,{ref:F,"aria-controls":j?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){S((function(e){return!e}))}},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:A,color:"secondary"},a.a.createElement(le.a,{icon:0===A?"notifications_none":"notifications_active",color:"parent",title:"$__notifications"}))),a.a.createElement(rt.a,{open:j,anchorEl:F.current,transition:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Ze.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:P},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(k.d)("color"),fontWeight:"bold"}},a.a.createElement("div",null,Object(k.s)("$__notifications"))),a.a.createElement("ul",{style:{listStyle:"none",padding:0}},$.comment?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__timeline","*"),text:Object(k.s)("$__timeline","*"),color:"comment"===z?Object(k.d)("menu"):"lightGray",icon:"timeline",onClick:function(){T("comment")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:$.comment})):a.a.createElement(a.a.Fragment,null),$.mentions?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__mentioned","*"),text:Object(k.s)("$__mentioned","*"),color:"mentions"===z?Object(k.d)("menu"):"lightGray",icon:"person_pin_circle",onClick:function(){T("mentions")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:$.mentions})):a.a.createElement(a.a.Fragment,null),$.log?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__update","*"),text:Object(k.s)("$__update","*"),color:"log"===z?Object(k.d)("menu"):"lightGray",icon:"update",onClick:function(){T("log")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:$.log})):a.a.createElement(a.a.Fragment,null),$.completed?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__completed","*"),text:Object(k.s)("$__completed","*"),color:"completed"===z?Object(k.d)("menu"):"lightGray",icon:"verified",onClick:function(){T("completed")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:$.completed})):a.a.createElement(a.a.Fragment,null),$.deleted?a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__deletedItems","*"),text:Object(k.s)("$__deletedItems","*"),color:"deleted"===z?Object(k.d)("menu"):"lightGray",icon:"delete_sweep",onClick:function(){T("deleted")},size:"22px",style:{padding:"0px 3px !important",width:"100%"},transparent:!0,badgeContent:$.deleted})):a.a.createElement(a.a.Fragment,null),a.a.createElement("li",{style:{padding:"15px 0px"}},a.a.createElement(E.a,{title:Object(k.s)("$__all","*"),text:Object(k.s)("$__all","*"),color:"all"===z?Object(k.d)("menu"):"lightGray",icon:"all_inbox",onClick:function(){T("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(E.a,{title:Object(k.s)("$__clearNotifications",1),text:Object(k.s)("$__clearNotifications",1),color:Object(k.d)("color"),icon:"clear_all",onClick:function(){N()},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(c.a.getState().db.cards).filter((function(e){var t=c.a.getState().db.cards[e];if("chatGroup"!==t.type&&t._users&&t._users[n._id]&&o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).length>0)return!0})).filter((function(e){var t;return"all"===z||"deleted"===z&&(null===(t=c.a.getState().db.cards[e])||void 0===t?void 0:t.deleted)||"deleted"!==z&&c.a.getState().db.cards[e]&&!c.a.getState().db.cards[e].deleted&&("comment"===z&&Object.keys(o[e]).filter((function(t){var r;return"comment"===(null===(r=o[e][t])||void 0===r?void 0:r.type)})).length>0||"log"===z&&Object.keys(o[e]).filter((function(t){var r;return"log"===(null===(r=o[e][t])||void 0===r?void 0:r.type)})).length>0||"kpi"===z&&Object.keys(o[e]).filter((function(t){var r;return"kpi"===(null===(r=o[e][t])||void 0===r?void 0:r.type)})).length>0||"timer"===z&&Object.keys(o[e]).filter((function(t){var r;return"timer"===(null===(r=o[e][t])||void 0===r?void 0:r.type)})).length>0||"mentions"===z&&Object.keys(o[e]).filter((function(t){var r,a;return(null===(r=o[e][t])||void 0===r||null===(a=r.message)||void 0===a?void 0:a.indexOf(n._id))>-1})).length>0||"completed"===z&&"completed"===c.a.getState().db.cards[e].status)})).sort((function(e,t){var r=0,a=0;return o[e]&&Object.keys(o[e]).filter((function(t){return n&&n._id&&o&&o[e]&&o[e][t]&&o[e][t].user&&o[e][t].user._id&&o[e][t].user._id!==n._id&&(!o[e][t].readedBy||o[e][t].readedBy&&!o[e][t].readedBy[n._id])})).map((function(t){parseInt(o[e][t].created_at)>r&&(r=parseInt(o[e][t].created_at))})),o[t]&&Object.keys(o[t]).filter((function(e){return o[t][e].user._id!==n._id&&(!o[t][e].readedBy||o[t][e].readedBy&&!o[t][e].readedBy[n._id])})).map((function(e){parseInt(o[t][e].created_at)>r&&(a=parseInt(o[t][e].created_at))})),r>a?-1:r<a?1:0})).map((function(e,t){return a.a.createElement("div",{key:"".concat(e)},a.a.createElement(Tf,{type:z,data:{cardId:e},onClick:function(){S(!1)}}))}))))))))})))})),Nf=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(le.a,{size:"35px",style:{alignSelf:"center",marginRight:"10px",color:"#001836"}},"view_comfy"),r),a.a.createElement("div",{id:"getElements_40"},a.a.createElement(le.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(le.a,{style:{alignSelf:"center",height:"25px",cursor:"pointer",position:"absolute",width:"25px",left:"20px",top:"18px",color:"grey"},onClick:t,size:"30px"},"arrow_back")))},Pf=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(h.a)(l,2),u=s[0],p=s[1],f=u?"rgba(0, 0, 0,0.05)":"white";return a.a.createElement("button",{id:c,onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)},onClick:r,disabled:i,style:Object(d.a)(Object(d.a)({},o),{},{minWidth:"160px",height:"45px",cursor:"pointer",border:"1px solid #d1d1cf",fontWeight:"bolder",backgroundColor:f})},t)},Af=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)},$f=function(e){var t=e.children,r=e.widthSize,o=e.id,i=Object(n.useState)({top:"10%",resize:"0.9"}),c=Object(h.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)},zf=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(le.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))},Mf=function(e){var t=e.item,r=e.index,o=e.handleItemClick,i=e.selectedPlan,c=Object(n.useState)(null),l=Object(h.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(le.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(k.s)(t.label)))},Yf=[{label:"$__strategic",value:null,gif:"https://machen.ai/img/PlanType/gif.gif",description:"$__planStrategicDescription",icon:Ro.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"}],Bf=function(e){var t=e.handleNextScreen,r=e.handleName,o=e.handleClose,i=Object(n.useState)(!0),c=Object(h.a)(i,2),l=c[0],s=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(Nf,{prev:!1,name:Object(k.s)("$__insertThePlanName"),handleClose:o}),a.a.createElement(kn,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(Cn,{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(k.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(k.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(Cn,{item:!0,xs:12,style:{marginTop:"45px"}},a.a.createElement(Pf,{handleEvent:t,id:"intro_45",name:Object(k.s)("$__next"),disabled:l,style:{width:"40%",marginLeft:"30%",marginBottom:"45px",border:"2px solid #ebebeb"}}))))};function Rf(){Rf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Gf=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t=e.handleClose,r=c.a.getState().session,o=Object(n.useState)(Yf[0]),l=Object(h.a)(o,2),s=l[0],u=l[1],f=Object(n.useState)({intro:!0,type:!1,article:!1}),m=Object(h.a)(f,2),g=m[0],b=m[1],v=Object(n.useState)(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=function(e,t){u(Object(d.a)(Object(d.a)(Object(d.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"}},Yf.map((function(e,t){return a.a.createElement(Mf,{key:e.id,item:e,index:t,handleItemClick:O,selectedPlan:s})})))},j=function(){var n=Object(p.a)(Rf().mark((function n(){var a,o;return Rf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return _(!0),a=Object(M.a)(),n.next=4,ys({_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(M.a)(),n.next=9,ys({_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(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:o});case 13:n.sent&&(i.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(Af,null,g.intro&&a.a.createElement(a.a.Fragment,null,a.a.createElement($f,{id:"Plantype_67",widthSize:"700px"},a.a.createElement(Bf,{handleNextScreen:function(){return b(Object(d.a)(Object(d.a)({},g),{},{intro:!1,type:!0}))},handleName:function(e){u(Object(d.a)(Object(d.a)({},s),{},{name:e}))},handleClose:t}))),a.a.createElement($f,null,g.type&&a.a.createElement("div",{id:"Plantype_672"},a.a.createElement(Nf,{prev:!0,name:Object(k.s)("$__selectPlanType"),handlePrevScreen:function(){return b(Object(d.a)(Object(d.a)({},g),{},{type:!1,intro:!0}))},handleClose:t}),a.a.createElement(kn,{container:!0,spacing:0,style:{width:"92%",marginLeft:"4%"}},a.a.createElement(Cn,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",overflow:"hidden"}},a.a.createElement(Cn,{item:!0,xs:5,style:{marginBottom:"10px",marginTop:"10px"}},a.a.createElement(w,{style:{transition:"0.7s"}})),a.a.createElement(Cn,{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",{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(zf,{tittle:s.type,text:Object(k.s)(s.description?s.description:Yf[0].description,1)}))),a.a.createElement(Cn,{item:!0,xs:12},x?a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"center"}},a.a.createElement(je,null)):a.a.createElement(Pf,{id:"Plantype_110",name:Object(k.s)("$__create"),handleEvent:function(){j()},style:{width:"50%",marginLeft:"25%",marginTop:"35px",marginBottom:"45px",border:"2px solid #ebebeb"}}))),"  ")))}));var Hf=Object(s.b)((function(e){return{users:e.users}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState(!1),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],p=a.a.useRef(null),f=c.a.getState().db,m=(f.users,Object(k.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 v=window.location.pathname.replace("/","").toLowerCase(),y=f.dataType.filter((function(e){if(("sp"===v||!e.hash&&!b||e.hash&&b)&&e.view&&Object.keys(e.view).filter((function(e){return e===v})).length>0&&(!e.view[v].pages||g[1]&&e.view[v].pages.indexOf(g[1])>-1||!g[1]&&e.view[v].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(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:t.iniModule,db:t.db,data:Object(d.a)({type:t.name,_parent:g[0]&&f.cards[g[0]]?g[0]:null},"user"===t.data.type?{}:Object(d.a)({status:"notStarted"},r?{isTemplate:!0}:{}))}))};function _(e){"Tab"===e.key&&(e.preventDefault(),u(!1))}return g&&g[1]&&"users"===g[1]&&m.user&&m.userAdmin&&y.push({name:"importUsers",icon:"import_contacts",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{importUsers:!0}))}}),0===y.length?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{id:"QuickAddBt"},a.a.createElement(q.a,{ref:p,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){1!==y.length||"plan"!==y[0].name?1===y.length?x(y[0],!(!g[1]||"template"!==g[1])):y.length>1&&u((function(e){return!e})):o(!0)}},a.a.createElement(le.a,{usePropagation:!0,size:"27px",color:Object(k.d)("menu")},"add_box")),n&&a.a.createElement(Gf,{handleClose:function(){return o(!1)}}),a.a.createElement(rt.a,{open:s,anchorEl:p.current,role:void 0,transition:!0,disablePortal:!0},(function(e){var t=e.TransitionProps,r=e.placement;return a.a.createElement(Ze.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:function(e){var t;t=e,p.current&&p.current.contains(t.target)||u(!1)}},a.a.createElement(et.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:_},y.sort((function(e,t){return e.name>t.name?-1:0})).map((function(e,t){return a.a.createElement(Qe.a,{key:t,style:{color:Object(k.d)("menu")},onClick:function(){e.onClick?e.onClick():x(e),u(!1)}},a.a.createElement(le.a,{icon:e.icon,style:{margin:"none !important"},color:Object(k.d)("menu")}),a.a.createElement("span",{style:{marginLeft:"7px"}},Object(k.s)("$__".concat(e.name),1)))}))))))})))}));function Wf(){Wf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Uf=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.timeline,o=t.session,i=(t.chat,a.a.useState(!1)),l=Object(h.a)(i,2),s=(l[0],l[1]),u=a.a.useState(!1),d=Object(h.a)(u,2),f=d[0],m=d[1],g=a.a.useState({}),b=Object(h.a)(g,2),v=b[0],y=b[1],x=a.a.useState("users"),O=Object(h.a)(x,2),w=O[0],j=O[1],E=a.a.useRef(null);_()().tz("America/Sao_Paulo").format("YYYY/MM/DD"),Object(k.j)(),a.a.useEffect((function(){s(!0),S()}),[n]);var S=function(){var e=Object(p.a)(Wf().mark((function e(){var t;return Wf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Mr(),y(t),v.total>0&&0===v.users&&j("groups"),"groups"===w&&v.total>0&&0===v.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)||m(!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(q.a,{ref:E,"aria-controls":f?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:function(){m((function(e){return!e}))}},a.a.createElement(Je.a,{badgeContent:C.length,color:"secondary",overlap:"rectangular"},a.a.createElement(le.a,{icon:"timer",color:"parent",title:"$__timersInProgress"}))),C.length>0&&a.a.createElement(rt.a,{open:f,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(Ze.a,Object.assign({},t,{style:{transformOrigin:"bottom"===r?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.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(k.s)("$__timersInProgress")),C.map((function(e,t){return a.a.createElement(vn,{db:"cards",key:t,data:e,notGlobalExpanded:!0,viewTimer:!0})}))))))})))}));function Vf(){Vf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var qf=Object(s.b)((function(e,t){return{cards:e.db.cards}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useState([]),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],S=w[1],L=a.a.useState("all"),C=Object(h.a)(L,2),I=C[0],T=C[1],F=c.a.getState(),D=F.db,N=F.session,P=Object(k.j)(),A=window.location.hash.split("/");A[0]=A[0].replace("#",""),a.a.useEffect((function(){return function(){}}),[]),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),S(!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),S(!j),_(!0),t=setTimeout((function(){return $()}),500)),function(){return clearTimeout(t)}}),[e.deleted]);var $=function(){var t=Object(p.a)(Vf().mark((function t(){var r;return Vf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(e,{search:e.text,ignoreLoader:!0,deleted:e.deleted,completed:e.completed,cardLoad:"search"});case 2:(r=t.sent)&&setTimeout((function(){z(r)}),1e3);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=Object(p.a)(Vf().mark((function t(r){var n,a,o,i;return Vf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.a.getState().db.users[N._id]||{},a=Object(d.a)(Object(d.a)({},c.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))&&((P.owner||P.planAdmin)&&("plan"!==a[t].type||"plan"===a[t].type&&Object(yt.C)(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(kn,null,a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Tr,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(E.a,{title:Object(k.s)("$__allResults","*"),text:Object(k.s)("$__allResults","*"),color:"all"===I?Object(k.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(E.a,{title:Object(k.s)("".concat(e.label),"*"),text:Object(k.s)("".concat(e.label),"*"),color:I===e.value?Object(k.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(k.d)("menu",1):Object(k.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(kn,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(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)(t.label,1),icon:t.icon,color:Object(k.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(Cn,{key:t,md:12,style:{minWidth:"300px"}},a.a.createElement(vn,{data:D.cards[t],db:"cards",showConnectedIn:!0,searchText:e.text,expanded:!1,onAction:function(){e.onAction()}}))}))))})))))))})));function Xf(){Xf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Jf=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=c.a.getState(),n=r.timeline,o=r.functions.socket,i=c.a.getState().db,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=s[1],g=a.a.useState(e.data),b=Object(h.a)(g,2),v=b[0],y=b[1],x=v.name.split("."),O=x[x.length-1],w=a.a.useState(!1),j=Object(h.a)(w,2),E=j[0],S=j[1],L=a.a.useState(x[0]),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState(x[0]),D=Object(h.a)(F,2),N=D[0],P=D[1];a.a.useEffect((function(){N||P(!0)}),[e.data]),"blob"===v.name&&(v.name="".concat(Object(k.s)("$__coverImage","*"),".jpg"),O="jpg");var A="attachment";c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(O.toLowerCase())>-1})).length>0&&(A=c.a.getState().db.fileExtensions.filter((function(e){return e.ext.indexOf(O.toLowerCase())>-1}))[0].icon||"https://machen.azureedge.net/".concat(v.file));var $=function(){var e=Object(p.a)(Xf().mark((function e(t){return Xf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{o.emit("data",{module:"node",method:"put",action:"update"},Object(d.a)({_id:v._id},t),Object(p.a)(Xf().mark((function e(){return Xf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(Object(d.a)(Object(d.a)({},v),t)),S(!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)}}(),z=Object(d.a)({},i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]?n[v.cardId][v.timelineId]:v.message);return z&&!z.message&&(z=Object(d.a)(Object(d.a)({},z),{},{message:Object(k.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 A&&-1===A.indexOf("https")&&-1===A.indexOf("svg")?a.a.createElement(le.a,{icon:A,size:"33px"}):a.a.createElement("img",{src:A,width:"100%",style:{width:"auto",height:"auto",maxHeight:"77%"},onError:function(e){return e.target.src=A}})),a.a.createElement("div",{style:{marginLeft:"7px",width:"calc(100% - 80px)",maxWidth:"calc(100% - 80px)",minWidth:"150px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},Object(k.b)(v.name,e.searchText)),i.users[v.createdBy]&&a.a.createElement("div",{style:{position:"absolute",right:"10px",top:"7px",zIndex:"10"}},a.a.createElement(wt.a,{max:7},a.a.createElement(Ne.a,{title:i.users[v.createdBy].displayName?i.users[v.createdBy].displayName:i.users[v.createdBy].name},a.a.createElement(bi,{alt:i.users[v.createdBy].displayName?i.users[v.createdBy].displayName:i.users[v.createdBy].name,src:"".concat(i.users[v.createdBy].image),style:{width:"15px",height:"15px"}},i.users[v.createdBy].name.substr(0,1)))))),e.showParent&&(v.timelineId||v.message)&&(i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]||v.message)&&a.a.createElement("div",{style:{width:"100%",marginBottom:"33px"}},a.a.createElement(Kn,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:z,db:"cards",nodeId:v.cardId}),a.a.createElement("div",{style:{clear:"both"}})),e.showParent&&v.cardId&&i.cards[v.cardId]&&a.a.createElement("div",{style:{width:"100%",top:"33px"}},a.a.createElement(vn,{db:"cards",data:i.cards[v.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(k.d)("color")),alignItems:"center",display:"flex",color:Object(k.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(){S(!0)}},E?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(Ce,{label:Object(k.s)("$__taskTitle"),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",onChange:function(e){T(e.target.value)},onBlur:function(e){""===e.target.value&&S(!E)},onKeyDown:function(e){13===e.keyCode&&I&&$({name:"".concat(I,".").concat(O)}),27===e.keyCode&&(S(!E),T())}},autoFocus:!0,value:I,placeholder:Object(k.s)("$__taskTitlePlaceholder")})),a.a.createElement("div",{style:{display:"flex"}},a.a.createElement("div",{onClick:function(){return $({name:"".concat(I,".").concat(O)})}},a.a.createElement(le.a,{color:"green",icon:"save",title:Object(k.s)("$__save","*"),size:e.actionsSize||"25px"})),a.a.createElement("div",{onClick:function(){S(!E),T("")}},a.a.createElement(le.a,{color:Object(k.d)("medium"),icon:"cancel",title:Object(k.s)("$__cancel","*"),size:e.actionsSize||"25px"}))))):a.a.createElement("div",{style:{width:"100%"}},v.in&&v.in.name&&a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},"User"===v.in.db?a.a.createElement(Ne.a,{title:v.in.name},a.a.createElement(bi,{alt:v.in.name,src:v.in.image,style:{width:"15px",height:"15px"}},v.in.name)):a.a.createElement(a.a.Fragment,null),a.a.createElement(mt,{title:v.in.name,icon:"User"===v.in.db?null:v.in.type&&i&&i.dataType&&i.dataType.filter((function(e){return e.name===v.in.type}))[0]&&i.dataType.filter((function(e){return e.name===v.in.type}))[0].icon||"$__topic",color:Object(k.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:(t={position:"relative",float:"left",width:"33px",height:"33px",marginRight:"7px",alignItems:"center"},Object(f.a)(t,"height","50px"),Object(f.a)(t,"display","flex"),Object(f.a)(t,"justifyContent","center"),t)},"string"===typeof A&&-1===A.indexOf("https")&&-1===A.indexOf("svg")?a.a.createElement(le.a,{icon:A,size:"33px"}):a.a.createElement("div",{style:{position:"absolute",width:"33px",height:"33px",margin:"7px",borderRadius:"50%",overflow:"hidden",backgroundImage:'url("'.concat(A,'")'),backgroundPosition:"center center",backgroundSize:"cover"}})),v.name),v.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(bi,{alt:v.createdBy.name,src:v.createdBy.image,style:{width:"15px",height:"15px"}},v.createdBy.name),a.a.createElement("span",{style:{marginLeft:3}},v.createdBy.name," - (",Object(k.k)(v.created_at),")")))),a.a.createElement("div",{style:{width:"130px",textAlign:"center",borderRight:"solid 1.5px ".concat(Object(k.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",fontSize:"12px"}},_()(new Date(1e3*v.created_at)).format("DD/MM/YYYY HH:mm")),a.a.createElement("div",{style:{width:"130px",borderRight:"solid 1.5px ".concat(Object(k.d)("color")),alignItems:"center",justifyContent:"center",display:"flex",overflow:"visible"}},i.users[v.createdBy]&&a.a.createElement(Ne.a,{title:i.users[v.createdBy].name},a.a.createElement(a.a.Fragment,null,a.a.createElement(bi,{size:"sm",src:"".concat(i.users[v.createdBy].image)},i.users[v.createdBy].name.substr(0,1))))),a.a.createElement("div",{style:{width:"300px",textAlign:"left",borderRight:"solid 1.5px ".concat(Object(k.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(Ne.a,{title:Object(k.s)("$__showFile")},a.a.createElement(le.a,{onClick:e.openLightBox?function(){e.openLightBox()}:null},"pageview")),(v.timelineId||v.message)&&a.a.createElement(Ne.a,{title:Object(k.s)("$__viewMessage")},a.a.createElement(le.a,{size:"20px",onClick:function(){m(!u)}},"feedback")))))),(v.timelineId||v.message)&&u&&(i.cards[v.cardId]&&n[v.cardId]&&n[v.cardId][v.timelineId]||v.message)&&a.a.createElement("div",{style:{width:"100%"}},a.a.createElement(Kn,{openLightBox:function(t){e.openLightBox&&e.openLightBox(t)},storie:z,db:"cards",nodeId:v.cardId})))}));function Kf(){Kf=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Zf=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){var t=a.a.useState(""),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],m=a.a.useState([]),g=Object(h.a)(m,2),b=g[0],v=g[1],y=c.a.getState(),x=y.db,_=y.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(p.a)(Kf().mark((function t(){var r,n;return Kf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kt.a.get("/Files_Search/?text=".concat(e.text));case 2:(r=t.sent)&&r.data&&(console.log(r.data),n=Object(d.a)({},b),r.data.map((function(e){n=Object(d.a)(Object(d.a)({},n),{},Object(f.a)({},e.file._id,Object(d.a)(Object(d.a)(Object(d.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),v(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(Tr,null)),a.a.createElement(kn,null,Object.keys(b).length>0&&a.a.createElement(Cn,{xs:12,sm:12,md:12,lg:12,xl:12},a.a.createElement(ua,{title:Object(k.s)("$__files",1),icon:O.filter((function(e){return"plan"===e.name}))[0].icon,color:Object(k.d)("menu"),filterText:e.text,style:{padding:"7px"}}),Object.keys(b).map((function(t,r){return w.push(b[t]),a.a.createElement(Cn,{key:t,md:12},a.a.createElement(Jf,{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()}}))}))))))}))),Qf=r(1123),eh=r.n(Qf),th=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 rh(){rh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var nh=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))(eh()(th)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=c.a.getState().functions.socket,i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=l[1],f=a.a.useRef(null),m=function(e){f.current&&f.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&&f.current.focus(),b.current=s}),[s]);var v=function(){var e=Object(p.a)(rh().mark((function e(){return rh().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)}}(),y=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:y.component},a.a.createElement("div",{className:y.selectedName,onClick:function(e){u((function(e){return!e}))}},a.a.createElement("div",{ref:f,className:y.selectedNameText,style:{color:Object(k.d)("light")||"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center"}},a.a.createElement(Al.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(k.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(le.a,{icon:"user",color:Object(k.d)("menu")})))))),a.a.createElement("div",{style:{zIndex:10}},a.a.createElement(rt.a,{open:s,anchorEl:f.current,role:void 0,transition:!0,disablePortal:!0},(function(t){var o=t.TransitionProps,i=t.placement;return a.a.createElement(Ze.a,Object.assign({},o,{style:{transformOrigin:"bottom"===i?"center top":"center bottom"}}),a.a.createElement(tt.a,null,a.a.createElement(Ke.a,{onClickAway:m},a.a.createElement(et.a,{autoFocusItem:s,id:"menu-list-grow",onKeyDown:g},a.a.createElement(Qe.a,{onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},r.sideModule),{},{id:n._id,activeModule:"userEdit",db:"users",data:Object(d.a)({type:"user"},r.users[n._id])}))}},Object(k.s)("$__myProfile",1)),a.a.createElement(Qe.a,{onClick:function(){return v()}},Object(k.s)("$__logout",1))))))})))):null})));var ah=Object(s.b)((function(e){return{controls:e.controls,chatNotifications:e.chat.notifications}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_a)((function(e){var t=c.a.getState(),r=t.db,n=t.session,o=t.chat,l=a.a.useState(""),s=Object(h.a)(l,2),u=s[0],p=s[1],f=a.a.useState(0),m=Object(h.a)(f,2),g=m[0],b=m[1],v=a.a.useState(0),y=Object(h.a)(v,2),x=y[0],_=y[1],O=a.a.useState(!1),w=Object(h.a)(O,2),j=w[0],S=w[1],L=a.a.useState(!1),C=Object(h.a)(L,2),I=C[0],T=C[1],F=a.a.useState("asset"),D=Object(h.a)(F,2),N=D[0],P=D[1],A=a.a.useState(!1),$=Object(h.a)(A,2),z=$[0],M=($[1],Object(k.j)()),Y=a.a.useState({title:null,icon:null,sTitle:null,sIcon:null}),R=Object(h.a)(Y,2),G=R[0],H=R[1],W=a.a.useRef(null),U=window.location.hash.split("/");U[0]=U[0].replace("#",""),a.a.useEffect((function(){return V(),function(){}}),[e]);var V=function(){var e={};yf.filter((function(e){return e.path===window.location.pathname})).length>0&&(e=yf.filter((function(e){return e.path===window.location.pathname}))[0]);var t=Object(k.s)("$__".concat(e.alias),1),n=e.icon,a="";"plan"===e.alias&&U[0]&&r.cards[U[0]]&&(t="".concat(Object(k.s)("$__".concat(e.alias),1),": ").concat(r.cards[U[0]].name)),e.tabs&&e.tabs.length>0&&e.tabs.filter((function(e){return e.path===U[1]})).length>0&&(a=Object(k.s)("$__".concat(e.tabs.filter((function(e){return e.path===U[1]}))[0].alias),1),n=e.tabs.filter((function(e){return e.path===U[1]}))[0].icon),H({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(kn,null,a.a.createElement(Cn,{xs:10,sm:4,md:4,lg:4,xl:4,style:{display:"flex",alignItems:"center"},id:"top_menuHideShow"},!e.expanded&&a.a.createElement(q.a,{style:{width:"50px"},onClick:function(){e.menuExpand()}},a.a.createElement(le.a,{icon:"menu",title:"$__showMenu",size:"27px",color:Object(k.d)("menu")})),a.a.createElement("div",{id:"top_pageTitle",style:{color:Object(k.d)("menu"),marginLeft:"22px",fontSize:"12px",fontWeight:"bold"}},G.sTitle?"".concat(G.title," - ").concat("matrix"===G.sTitle.toLowerCase()?"MATRIX SWOT":G.sTitle):G.title)),a.a.createElement(B,null,a.a.createElement(Cn,{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(Ce,{ref:W,label:Object(k.s)("$__search",1),variant:Object(k.d)("fieldVariant"),name:"name",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:""!==u?a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"close",onClick:function(){p(""),S(!1),T(!1)}})):null,onChange:function(e){p(e.target.value),S(!0),T(!0)}},value:u,placeholder:Object(k.s)("$__searchInMachen")}),""!==u&&u.length>1&&a.a.createElement(Ke.a,{onClickAway:function(){p(""),S(!1),T(!1)}},a.a.createElement(rt.a,{open:!!u,anchorEl:W.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(Ze.a,Object.assign({},t,{style:{transformOrigin:"center bottom",zIndex:"3",maxHeight:"calc(100vh - 177px)",overflowY:"auto"}}),a.a.createElement(tt.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(E.a,{title:Object(k.s)("$__asset","*"),text:Object(k.s)("$__asset","*"),color:"asset"===N?Object(k.d)("menu"):"lightGray",icon:"play_circle_outline",onClick:function(){P("asset"),S(!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(E.a,{title:Object(k.s)("$__completed","*"),text:Object(k.s)("$__completed","*"),color:"completed"===N?Object(k.d)("menu"):"lightGray",icon:"verified",onClick:function(){P("completed"),S(!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(E.a,{title:Object(k.s)("$__deleted","*"),text:Object(k.s)("$__deleted","*"),color:"deleted"===N?Object(k.d)("menu"):"lightGray",icon:"delete_forever",onClick:function(){P("deleted"),S(!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(k.s)("$__noResultsFound")),u?a.a.createElement(a.a.Fragment,null,a.a.createElement(B,null,a.a.createElement(qf,{text:u||"",onFinish:function(e){b(e),S(!1)},onAction:function(){p(""),S(!1),b(0),_(0)},completed:"completed"===N,deleted:"deleted"===N,adminView:z})),a.a.createElement(B,null,a.a.createElement(Zf,{text:u||"",onFinish:function(e){_(e),T(!1)},onAction:function(){p(""),b(0),_(0)}}))):a.a.createElement(a.a.Fragment,null))))})))))),a.a.createElement(Cn,{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(B,null,a.a.createElement(Hf,{hashs:U}))),a.a.createElement(B,null,a.a.createElement(Sf,null)),a.a.createElement("div",{id:"top_notifications"},a.a.createElement(B,null,a.a.createElement(Df,{loader:!(!e.loaders||!e.loaders.notifications)}))),a.a.createElement("div",{id:"top_timers"},a.a.createElement(B,null,a.a.createElement(Uf,null))),a.a.createElement("div",{id:"top_requireApproval"},a.a.createElement(B,null,a.a.createElement(Cf,null))),a.a.createElement("div",{id:"top_myDay"},a.a.createElement(B,null,a.a.createElement(Lf,null))),a.a.createElement("div",{id:"top_moreOptions"},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:c.a.getState().controls.unlockedPrivates,color:"secondary"},a.a.createElement(at,{transparent:!0,count:50,size:"27px",icon:"settings",title:Object(k.s)("$__settings"),btColor:"lightgray",options:[].concat(Object(Se.a)(M&&M.user&&(M.userAdmin||M.userModerate)?[{name:"$__usersAndContacts",icon:"account_box",onClick:function(){i.a.push("c#tab/users")}},{name:"$__customersCompaniesAndDivisions",icon:"business",onClick:function(){i.a.push("c#tab/units")}}]:[]),[{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(){i.a.push("plataformAdministrator")},show:"hover"}],Object(Se.a)(c.a.getState().controls.hidePrivate?[]:[{name:Object(k.s)(c.a.getState().controls.lockPrivate?"$__lockMyPrivateActivities":"$__unlockMyPrivateActivities",1),icon:c.a.getState().controls.lockPrivate?"private_connectivity":"lock_open",color:c.a.getState().controls.lockPrivate?"lightgray":null,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{lockPrivate:!c.a.getState().controls.lockPrivate},c.a.getState().controls.lockPrivate?{}:{unlockedPrivates:0}))},show:"hover"}]),[{name:Object(k.s)(c.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),icon:c.a.getState().chat.notifications?"notifications_active":"notifications_off",color:c.a.getState().chat.notifications?"green":"lightgray",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},o),{},{notifications:!c.a.getState().chat.notifications}))},show:"hover"}],Object(Se.a)(c.a.getState().controls.unlockedPrivates>0?[{name:Object(k.s)("$__lockMyPrivateActivities",1),icon:"private_connectivity",color:"red",count:c.a.getState().controls.unlockedPrivates,onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().controls),{},{unlockedPrivates:0,lockPrivate:!1}))},show:"hover"}]:[]),Object(Se.a)(c.a.getState().session&&c.a.getState().session._access&&c.a.getState().session._access.masterAdmin>0?[{name:Object(k.s)("$__accountSettings",1),icon:"settings_applications",color:"lightgray",onClick:function(){i.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(nh,null)))))}))),oh=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(k.d)("color",.33)},userActiveExtended:Object(f.a)({display:"inherit",height:"37px",alignItems:"center",justifyContent:"center",backgroundColor:Object(k.d)("color",.33)},"justifyContent","left"),name:{position:"absolute",top:"5px",left:"36px",right:"0px",height:"30px",border:"1px solid ".concat(Object(k.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",fontWeight:"bold",fontSize:"14px",color:Object(k.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(k.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(k.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(k.d)("color",.2)),backgroundColor:"#FFFFFF",borderRadius:"5px",display:"flex",fontWeight:"bold",alignItems:"center",paddingLeft:"22px",paddingTop:"3px",fontSize:"12px",color:Object(k.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(k.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",color:Object(k.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(k.d)("color",.2)),borderRadius:"0 0 5px 5px",display:"flex",alignItems:"center",paddingLeft:"16px",fontSize:"14px",fontWeight:"bold",color:Object(k.d)("color"),backgroundColor:"#FFFFFF",boxShadow:"0px 3px 7px 1px rgba(0,0,0,0.05)","& ul":{fontSize:"12px"}}}};var ih=Object(s.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(I.b)(C,e)}))(Object(me.a)(oh)((function(e){var t=e.classes,r=e.store,n=r.chat,o=r.session,i=r.timeline,l=r.usersStatus,s=!!e.expanded,u=Object(k.j)(),p=Object(d.a)({},c.a.getState().db.users),h={};p=(p=Object.keys(p).filter((function(e){return e!==o._id&&"user"===p[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(d.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(Se.a)(r),Object(Se.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?(h=Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},t._id,Object(d.a)(Object(d.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(c.a.getState().db.cards).filter((function(t){return"chatGroup"===c.a.getState().db.cards[t].type&&!c.a.getState().db.cards[t].deleted&&(c.a.getState().db.cards[t]._users&&c.a.getState().db.cards[t]._users[o._id]||!c.a.getState().db.cards[t].private&&e.store.adminView&&u&&(u.owner||u.admin))})).map((function(e){return c.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}))),h=e&&e._id&&t&&t.length>0&&i[e._id]&&i[e._id][t[0]]&&i[e._id][t[0]].created_at?Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{type:"group",_lastMessage:i[e._id][t[0]]}))):Object(d.a)(Object(d.a)({},h),{},Object(f.a)({},e._id,Object(d.a)(Object(d.a)({},c.a.getState().db.cards[e._id]),{},{type:"group"})))}));var g=Object.keys(h).filter((function(t){return(!c.a.getState().db.cards[t]||c.a.getState().db.cards[t]&&!c.a.getState().db.cards[t].deleted)&&(!e.find||""===e.find||e.find&&(h[t].name.toLowerCase().indexOf(e.find.toLowerCase())>-1||h[t]._parent&&c.a.getState().db.users[h[t]._parent]&&c.a.getState().db.users[h[t]._parent].name&&c.a.getState().db.users[h[t]._parent].name.toLowerCase().indexOf(e.find.toLowerCase())>-1))&&(s||!s&&h[t]&&h[t]._lastMessage)&&(!e.onLine||e.onLine&&l.users&&l.users[t])})).sort((function(e,t){var r=h[e]._lastMessage&&String(h[e]._lastMessage.created_at)?Math.ceil(h[e]._lastMessage.created_at):0,n=h[t]._lastMessage&&String(h[t]._lastMessage.created_at)?Math.ceil(h[t]._lastMessage.created_at):0;return s?h[e].name.toLowerCase()<h[t].name.toLowerCase()?-1:h[e].name.toLowerCase()>h[t].name.toLowerCase()?1:0:r>n?-1:r<n?1:0})).map((function(e,t){var r=h[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(d.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(Al.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(Je.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{width:"37px",display:"flex",alignItems:"center"}},a.a.createElement(On,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement(Re.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(Je.a,{overlap:"rectangular",badgeContent:c.countMessages,color:"secondary",style:{display:"flex",alignItems:"center",padding:0,width:"80%",marginTop:"16px"}},a.a.createElement(On,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:c._id},a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{style:Object(d.a)(Object(d.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(k.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(ba.a,{style:{width:"100%",height:"100%"}},(function(e){var t=e.height;e.width;return a.a.createElement(ga.a,{height:t,itemCount:g.length,itemSize:55,width:s?295:58,itemData:g,style:{height:"100%"}},b)}))}))),ch=function(e){return Object(d.a)(Object(d.a)({},X.l),{},{menu:{position:"absolute",borderRight:Object(k.d)("color"),background:Object(k.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(k.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(k.d)("color"),alignItems:"center",width:"-webkit-fill-available"},buttonColorExpanded:{position:"relative",float:"left",padding:"12px",display:"flex",backgroundColor:Object(k.d)("color"),alignItems:"center",width:"100%"},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};function lh(){lh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var sh=Object(s.b)((function(){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().chat,r=a.a.useState("chats"),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(""),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(!1),g=Object(h.a)(m,2),b=g[0],v=g[1],y=Object(R.a)(ch)(),x=window.location.hash.split("/");x[0]=x[0].replace("#",""),a.a.useEffect((function(){i("chats"),v(e.expanded)}),[e.expanded]);var _=function(){var r=Object(p.a)(lh().mark((function r(n,a){var o;return lh().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=c.a.getState().db.cards[n]?"cards":"users",f(""),c.a.getState().db[o]&&c.a.getState().db[o][n]&&!c.a.getState().db[o][n]._loadTimeline?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},t),{},{db:a,nodeId:n,loading:"users"!==a})):e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.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?y.menuExpanded:y.menu,style:{paddingTop:5}},b&&("internalGroups"===o||"externalGroups"===o)&&a.a.createElement("div",{className:b?y.buttonColorExpanded:y.buttonColor,style:{marginTop:"-15px"}},a.a.createElement(Be,{text:b?Object(k.s)("$__newGroup","*"):null,title:b?null:Object(k.s)("$__newGroup","*"),icon:"add_box",iconColor:"#FFFFFF",textColor:"#FFFFFF",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))}})),a.a.createElement("div",{className:y.button,style:{display:"flex",height:"46px",marginBottom:"7px",width:"100%"}},b?a.a.createElement("div",{className:y.textField,style:{width:"100%"}},a.a.createElement(Ce,{className:y.noLabelLight,label:Object(k.s)("$__search","*"),variant:"standard",autoFocus:!0,value:u,InputProps:{endAdornment:a.a.createElement(Et.a,{position:"start"},a.a.createElement(le.a,{color:Object(k.d)("colorText")},"search")),onChange:function(e){f(e.target.value)}}})):a.a.createElement(Be,{title:b?null:Object(k.s)("$__search","*"),icon:"search",iconColor:Object(k.d)("colorText"),textColor:Object(k.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(ih,{expanded:b,openChat:function(e){return _(e,"cards")},find:u,onLine:e.onLine}))))}));var uh=Object(s.b)((function(e){return{}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState({}),n=Object(h.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(k.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(c.a.getState().db.cards[e.nodeId]._users[t].name)n=c.a.getState().db.cards[e.nodeId]._users[t].name;else if(c.a.getState().db.cards[e.nodeId]._users[t].name){var o=c.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(Ne.a,{title:n,key:t},a.a.createElement(Re.a,{style:{width:22,height:22,border:"none"},alt:n,src:c.a.getState().db.cards[e.nodeId]._users[t].image||null},n.substr(0,1)))})),a.a.createElement("span",{style:{marginLeft:7}},Object(k.s)("$__typing"),"...")):a.a.createElement(a.a.Fragment,null)})),dh=r(474),ph=r.n(dh);r(1823);function fh(){fh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var hh=Object(s.b)((function(e){return{usersStatus:e.usersStatus.users,chat:e.chat,socket:e.functions.socket}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=c.a.getState().session,o=Object(n.useState)(""),i=Object(h.a)(o,2),l=i[0],s=i[1],u=Object(n.useState)(""),f=Object(h.a)(u,2),m=f[0],g=f[1],b=Object(n.useState)(),v=Object(h.a)(b,2),y=v[0],x=v[1],_=Object(n.useState)(!1),O=Object(h.a)(_,2),w=O[0],j=O[1],S=Object(n.useState)(!1),L=Object(h.a)(S,2),C=L[0],I=L[1],T=Object(n.useState)(""),F=Object(h.a)(T,2),D=F[0],N=F[1],P=Object(n.useState)(),A=Object(h.a)(P,2),$=A[0],z=A[1],M=Object(n.useState)(!1),Y=Object(h.a)(M,2),B=Y[0],R=Y[1],G=Object(n.useState)(!1),H=Object(h.a)(G,2),W=H[0],U=H[1],V=Object(n.useState)(""),X=Object(h.a)(V,2),J=X[0],K=X[1],Z=Object(n.useState)({}),Q=Object(h.a)(Z,2),ee=Q[0],te=Q[1],re=Object(n.useRef)(),ne=Object(n.useRef)(),ae=Object(n.useRef)();new ph.a({initiator:!0,stream:y}),new ph.a,Object(n.useEffect)((function(){c.a.getState().functions.socket.on("callToUser",(function(e){j(!0),te({name:e.name,image:e.image}),N(e.from),g(e.from),K(e.name||""),z(e.signal)}))}),[null===(t=e.socket)||void 0===t?void 0:t.id]),Object(n.useEffect)((function(){c.a.getState().functions.socket.on("cancelCallToUser",(function(e){(null===e||void 0===e?void 0:e.to)===l&&oe()}))}),[D,l]),Object(n.useEffect)((function(){var t,n;(null===(t=e.usersStatus[r._id])||void 0===t?void 0:t.socketId)&&s(e.usersStatus[r._id].socketId),e.nodeId&&(null===(n=e.usersStatus[e.nodeId])||void 0===n?void 0:n.socketId)&&g(e.usersStatus[e.nodeId].socketId)}),[JSON.stringify(e.usersStatus),e.nodeId]);var oe=function(){j(!0),te({}),N(""),K(""),z(),U(!0),x(!0),x(),j(!1),I(!1),N(""),z(),g(""),U(!1),K(""),y&&y.getTracks()&&y.getTracks().forEach((function(e){return e.stop()})),(null===ae||void 0===ae?void 0:ae.current)&&ae.current.destroy()},ie=function(e){c.a.getState().functions.socket.emit("cancelCallToUser",{to:e,from:l}),oe()},ce=function(){var e=Object(p.a)(fh().mark((function e(){return fh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then((function(e){x(e),re.current.srcObject=e,I(!0),R(!0);var t=c.a.getState().functions.socket,r=new ph.a({initiator:!1,trickle:!1,stream:e});r.on("signal",(function(e){t.emit("answerCall",{signal:e,to:D})})),r.on("stream",(function(e){ne.current.srcObject=e})),r.signal($),ae.current=r}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return a.a.createElement(a.a.Fragment,null,C||!w||B?a.a.createElement(a.a.Fragment,null):a.a.createElement("div",{className:"caller"},a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(Re.a,{alt:ee.name,src:ee.image||uc.a}),a.a.createElement("div",{style:{marginLeft:15}},ee.name||"NOME")),a.a.createElement("h1",{className:"callerEffect"},J," is calling..."),a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(q.a,{variant:"contained",color:"primary",onClick:ce},Object(k.s)("$__answer","*")),a.a.createElement(q.a,{variant:"contained",color:"secondary",onClick:function(){ie(m)},style:{marginLeft:7}},Object(k.s)("$__decline","*")))),!C&&e.nodeId?a.a.createElement(a.a.Fragment,null,a.a.createElement(E.a,{id:"chat_call",title:Object(k.s)("$__call","*"),color:"#FFFFFF",icon:"video_call",onClick:function(){var t;t=m,navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then((function(n){x(n),re.current.srcObject=n;var a=c.a.getState().functions.socket,o=new ph.a({initiator:!0,trickle:!1,stream:n});o.on("signal",(function(e){a.emit("callToUser",{userToCall:t,signalData:e,from:l,name:J,image:r.image||{}}),I(!0)})),o.on("stream",(function(e){ne.current.srcObject=e})),a.on("callAccepted",(function(e){R(!0),o.signal(e)})),ae.current=o,e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{callId:t}))}))},size:"25px",transparent:!0})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{className:"container",style:Object(d.a)({},C?{}:{display:"none"})},a.a.createElement("div",{className:"video-container"},a.a.createElement("div",{className:"video-from"},B&&!W?a.a.createElement("video",{playsInline:!0,ref:ne,autoPlay:!0,style:{width:"800px"}}):a.a.createElement(a.a.Fragment,null)),a.a.createElement("div",{className:"video-me"},y&&a.a.createElement("video",{playsInline:!0,muted:!0,ref:re,autoPlay:!0,style:{width:"150px"}})),a.a.createElement(q.a,{variant:"contained",color:"secondary",onClick:function(){ie(m)}},Object(k.s)("$__endCall","*")))))})),mh=r(1124),gh=r.n(mh),bh=function(e){return Object(d.a)(Object(d.a)({},X.l),{},{menu:{position:"relative",borderRight:Object(k.d)("color")},menuExpanded:{position:"relative",borderRight:Object(k.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(k.d)("color")},buttonColorExpanded:{position:"relative",float:"left",width:"calc(100% + 20px)",padding:"20px",marginLeft:"-12px",display:"flex",backgroundColor:Object(k.d)("color")},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.d)("medium",.5)),marginTop:"15px",marginBottom:"0px",height:"1px"}})};var vh=Object(s.b)((function(e){return{usersStatus:e.usersStatus&&e.usersStatus?e.usersStatus:{}}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState().session,r=a.a.useState(e.usersStatus),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,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(E.a,{id:"chat_menu",title:"".concat(Object(k.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(k.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(k.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 yh(){yh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var xh=Object(s.b)((function(e){var t=e.chat;return{nodeId:t.nodeId,chatOpen:t.open,notifications:t.notifications}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(bh)((function(e){var t=e.classes,r=e.nodeId,n=e.chatOpen,o=a.a.useState(!1),i=Object(h.a)(o,2),l=i[0],s=i[1],u=a.a.useState(!1),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=y[1],O=new Audio(gh.a),w=Object(k.j)();a.a.useEffect((function(){(function(){var t=Object(p.a)(yh().mark((function t(){var r,n;return yh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=c.a.getState().functions.socket).on("timeline.COMMENT",function(){var t=Object(p.a)(yh().mark((function t(r){var n,o,i,l,s;return yh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"users"===r.db&&r.idRel===c.a.getState().session._id&&r.comment&&"comment"===r.comment.type&&r.comment.user&&r.comment.user._id&&!c.a.getState().db.users[r.comment.user._id]&&Ct(e,r.comment.user._id),("users"===r.db||"users"!==r.db&&"comment"===r.comment.type&&c.a.getState().db.cards[r.idRel]&&"chatGroup"===c.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!==c.a.getState().session._id&&j(n)),$r(e,r),c.a.getState().chat.notifications&&(r.comment.idRel===c.a.getState().session._id||c.a.getState().db.users[r.comment.idRel]||c.a.getState().db.cards[r.comment.idRel]&&"chatGroup"===c.a.getState().db.cards[r.comment.idRel].type&&c.a.getState().db.cards[r.comment.idRel]._users[c.a.getState().session._id])&&c.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)!==c.a.getState().session._id&&O.play(),r.comment.nodeId=r.node,l=Object(d.a)(Object(d.a)({},r.comment),{},{nodeId:r.comment._parent,idRel:r.node}),r.comment.idRel!==c.a.getState().session._id||c.a.getState().chat.open||((s=new Notification("".concat(r.comment.user.name," ").concat(Object(k.s)("$__sendedANewMessage",1)),{body:r.comment.message?r.comment.message:Object(k.s)("$__".concat(r.comment.type),1)})).onclick=function(e){e.preventDefault(),window.focus(),s.close()},Object(k.c)({message:Object(k.s)("$__newMessage",1),content:a.a.createElement("div",{style:{display:"flex",cursor:"pointer",backgroundColor:"#none"},onClick:function(e){S(l.user._id,"users"),e.stopPropagation()}},a.a.createElement(Kn,{storie:l,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(d.a)(Object(d.a)({},n),{},Object(f.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=c.a.getState(),n=(r.timeline,r.session),a=c.a.getState().timeline[t.idRel]&&c.a.getState().timeline[t.idRel][t.id]?t.idRel:n._id;c.a.getState().timeline&&c.a.getState().timeline[a]&&c.a.getState().timeline[a][t.id]&&e.reduxFunction("ASYNC","SET_TIMELINE",Object(d.a)(Object(d.a)({},c.a.getState().timeline),{},Object(f.a)({},a,Object(d.a)(Object(d.a)({},c.a.getState().timeline[a]),{},Object(f.a)({},t.id,Object(d.a)(Object(d.a)({},c.a.getState().timeline[a][t.id]),{},{deleted:!0},t.deletedReason?{deletedReason:t.deletedReason}:{}))))))}));case 6: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;zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},S=function(){var t=Object(p.a)(yh().mark((function t(r,n){return yh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.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||!c.a.getState()||!(c.a.getState().lightBox&&c.a.getState().lightBox.open||c.a.getState().sideModule&&c.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(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!1}))}};if(!n)return a.a.createElement(a.a.Fragment,null);var C=r&&c.a.getState().db.cards&&c.a.getState().db.cards[r]?"cards":"users",I=c.a.getState().db[C][r]?c.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(Ke.a,{onClickAway:function(){L()}},a.a.createElement("div",{style:Object(d.a)(Object(d.a)(Object(d.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(k.d)("ColumnTitleColor"),display:"flex",alignItems:"center"}},a.a.createElement("div",{style:{position:"absolute",left:13}},a.a.createElement(E.a,{id:"chat_menu",title:Object(k.s)("$__menu","*"),color:Object(k.d)("colorText"),icon:"menu",onClick:function(){s((function(e){return!e})),l&&_(!1)},size:"25px",transparent:!0})),l?a.a.createElement("div",{style:{position:"absolute",left:45,color:Object(k.d)("colorText")}},a.a.createElement(E.a,{id:"addGroup",title:Object(k.s)("$__createChatGroup","*"),icon:"add_circle_outline",onClick:function(){L(!0),e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:"new",activeModule:"cardEdit",db:"cards",data:{type:"chatGroup",status:"inProgress"}}))},size:"25px",transparent:!0,color:Object(k.d)("colorText")})):a.a.createElement(a.a.Fragment,null),l?a.a.createElement("div",{style:{position:"absolute",left:80}},a.a.createElement(vh,{onClick:function(e){_(e)}})):a.a.createElement(a.a.Fragment,null),a.a.createElement("div",{style:{position:"absolute",left:l?320:53,right:80,color:Object(k.d)("colorText"),fontSize:"12px",fontWeight:"bold"}},r&&I?a.a.createElement("div",{style:{display:"flex",alignItems:"center"}},a.a.createElement(On,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},userId:r},a.a.createElement(Re.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"}},c.a.getState().usersStatus&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[r]&&"away"===c.a.getState().usersStatus.users[r].status&&c.a.getState().usersStatus.users[r].updatedAt?"(".concat(Object(k.s)("$__lastSeeTime"),": ").concat(Object(k.k)(c.a.getState().usersStatus.users[r].updatedAt),")"):"")),r&&c.a.getState().db.cards[r]&&"chatGroup"===c.a.getState().db.cards[r].type&&c.a.getState().db.cards[r]._users&&Object.keys(c.a.getState().db.cards[r]._users).length>0&&a.a.createElement("div",{classes:t.avatarGroup,style:{marginLeft:15}},a.a.createElement(wt.a,{max:150},Object.keys(c.a.getState().db.cards[r]._users).length>0&&Object.keys(c.a.getState().db.cards[r]._users).map((function(e,t){var n="";if(c.a.getState().db.cards[r]._users[e].name)n=c.a.getState().db.cards[r]._users[e].name;else if(c.a.getState().db.cards[r]._users[e].name){var o=c.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(Ne.a,{title:n,key:t},a.a.createElement(Re.a,{style:{width:22,height:22,border:"none"},alt:n,src:c.a.getState().db.cards[r]._users[e].image||null},n.substr(0,1)));if(17===t){var i=Object.keys(c.a.getState().db.cards[r]._users).length-17;return a.a.createElement(Ne.a,{title:a.a.createElement("ul",{style:{listingStyle:"none",padding:0}},Object.keys(c.a.getState().db.cards[r]._users).map((function(e,t){if(t>16&&c.a.getState().db.cards[r]._users[e]&&c.a.getState().db.cards[r]._users[e].name)return a.a.createElement("li",null,c.a.getState().db.cards[r]._users[e].name)}))),key:t},a.a.createElement(Re.a,{style:{width:22,height:22,border:"none"},alt:"+".concat(i)},a.a.createElement("span",{style:{fontSize:10}},"+".concat(i))))}})))),a.a.createElement(uh,{nodeId:r})):a.a.createElement("div",null,Object(k.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"===c.a.getState().session._id?a.a.createElement(hh,{nodeId:r}):a.a.createElement(a.a.Fragment,null),a.a.createElement(E.a,{id:"chat_files",title:Object(k.s)("$__files","*"),color:Object(k.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(E.a,{id:"chat_settings",title:Object(k.s)(c.a.getState().chat.notifications?"$__chatNotificationsActive":"$__chatNotificationsOff",1),color:Object(k.d)("colorText"),icon:c.a.getState().chat.notifications?"notifications_active":"notifications_off",onClick:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{notifications:!c.a.getState().chat.notifications}))},size:"25px",transparent:!0}),r&&c.a.getState().db.cards[r]&&"chatGroup"===c.a.getState().db.cards[r].type&&c.a.getState().db.cards[r]._users&&c.a.getState().db.cards[r]._users[c.a.getState().session._id]&&(parseInt(c.a.getState().db.cards[r]._users[c.a.getState().session._id].access)>4||w&&w.user&&w.plan&&w.userAdmin&&w.planAdmin)&&a.a.createElement(E.a,{id:"chat_settings",title:Object(k.s)("$__preffers","*"),color:Object(k.d)("colorText"),icon:"settings",onClick:function(){e.reduxFunction("ASYNC","SET_MODULE",Object(d.a)(Object(d.a)({},c.a.getState().sideModule),{},{id:r,activeModule:"cardEdit",db:"cards",data:Object(d.a)({},c.a.getState().db.cards[r]?c.a.getState().db.cards[r]:{})})),L(!0)},size:"25px",transparent:!0}),a.a.createElement(E.a,{id:"chat615_closeButton",title:Object(k.s)("$__close","*"),color:Object(k.d)("colorText"),icon:"close",onClick:function(){L(!0),_(!1)},size:"25px",transparent:!0}))),a.a.createElement("div",{style:Object(d.a)({position:"absolute",top:40,left:0,bottom:0,backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(k.d)("color")),padding:"7px"},l?{width:"311px"}:{width:"60px"})},a.a.createElement(sh,{closeButton:function(){e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},c.a.getState().chat),{},{open:!1})),_(!1)},chat:!0,subMenuExpanded:function(e){s(e),_(!1)},expanded:l,onLine:x})),a.a.createElement("div",{style:{position:"absolute",left:l?312:55,top:40,right:g&&r?333:0,bottom:0,backgroundColor:"white"}},r?a.a.createElement(La,{types:["comment"],nodeId:r,db:c.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(wi,{nodeId:r,dark:!1})):a.a.createElement(a.a.Fragment,null)))))}))),_h=function(e){var t,r;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(k.d)("menu"),position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:100},item:{height:"66px",alignItems:"center",width:"100%",display:"flex"},itemButtom:(t={padding:"7px",color:Object(k.d)("color",.8),"&:hover":{color:Object(k.d)("color",1),backgroundColor:"rgba(255,255,255,0.1)",borderRadius:"7px"},display:"flex",alignItems:"center"},Object(f.a)(t,"alignItems","center"),Object(f.a)(t,"cursor","pointer"),t),itemButtomActive:{width:"100%",padding:"7px",color:Object(k.d)("color",1),backgroundColor:"rgba(255,255,255,0.2)",borderRadius:"7px",display:"flex",alignItems:"center",cursor:"pointer"},themeExample:(r={},Object(f.a)(r,e.breakpoints.up("md"),{left:"auto !important",right:"0 !important"}),Object(f.a)(r,e.breakpoints.down("sm"),{left:"0  !important",right:"auto !important"}),r),module:{position:"fixed",top:"0px",left:"147px",width:"70px",height:"100vh",backgroundColor:"rgba(246,246,246,1)",borderRight:"solid 4px ".concat(Object(k.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(k.d)("color")),padding:"7px",overflowX:"auto"},moduleTitle:{width:"100%",height:"30px",fontSize:"18px",color:Object(k.d)("color"),fontWeight:"bold",paddingLeft:"7px",marginTop:"15px"},sidebarWrapperWithPerfectScrollbar:{},separator:{position:"relative",float:"left",width:"100%",padding:"7px",borderTop:"1px solid ".concat(Object(k.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 Oh(){Oh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var wh=Object(s.b)((function(e,t){return{store:e,ownProps:t}}),(function(e){return Object(I.b)(C,e)}))(Object(me.a)(_h)((function(e){var t=c.a.getState(),r=t.chat,n=t.notifications,o=e.classes,l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],f=s[1],m=a.a.useState(null),g=Object(h.a)(m,2),b=g[0],v=g[1],y=window.location.hash.split("/");y[0]=y[0].replace("#",""),a.a.useEffect((function(){u||f(!0)}),[n]);var x=function(){var t=Object(p.a)(Oh().mark((function t(n,a,o){var c,l=arguments;return Oh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c=l.length>3&&void 0!==l[3]?l[3]:"users",!n||window.location.pathname===n&&a!==b||i.a.push(n),"chat"===a?e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!0,db:c,nodeId:o})):(v(a),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!1}))),e.menuExpand&&e.menuExpand();case 4:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),_=Mr();return e.expanded?a.a.createElement("div",{className:o.root},a.a.createElement("div",{className:o.bar},a.a.createElement("div",{className:o.topLogo,id:"sideBar_logoMini"},a.a.createElement("img",{src:re.a,alt:"logo",className:o.logoImg,style:{width:"111px",marginLeft:"15px"}}),a.a.createElement(E.a,{title:Object(k.s)("$__hideMenu",1),color:Object(k.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:o.item,id:"sideBar_button_dashboard"},a.a.createElement("div",{className:"/d"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/d","dashboard")}},a.a.createElement(le.a,{icon:"dashboard",badgeColor:"primary",color:"parent",badgeVisible:!0,title:"$__dashboard",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(k.s)("$__dashboard","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_chat"},a.a.createElement("div",{className:r.open?o.itemButtomActive:o.itemButtom,onClick:function(){e.menuExpand&&e.menuExpand(),e.reduxFunction("ASYNC","SET_CHAT",Object(d.a)(Object(d.a)({},r),{},{open:!r.open}))}},a.a.createElement(Je.a,{overlap:"rectangular",badgeContent:_&&_.total?_.total:0,color:"secondary"},a.a.createElement(le.a,{icon:"chat",color:"parent",title:"$__chat",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}})),Object(k.s)("$__chat","*"))),a.a.createElement("div",{className:o.separator}),a.a.createElement("div",{className:o.item,id:"sideBar_button_StrategyAndPlans"},a.a.createElement("div",{className:"/sp"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/sp","StrategyAndPlans")}},a.a.createElement(le.a,{icon:"view_comfy",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__StrategyAndPlans"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(k.s)("$__StrategyAndPlans","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_myTasks"},a.a.createElement("div",{className:"/t"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/t","myTasks")}},a.a.createElement(le.a,{icon:"task",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__mytasks"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(k.s)("$__mytasks","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_library"},a.a.createElement("div",{className:"/library"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/library","library")}},a.a.createElement(le.a,{icon:"folder",badgeColor:"primary",color:"parent",badgeVisible:!0,title:Object(k.s)("$__library"),size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),Object(k.s)("$__library","*"))),a.a.createElement("div",{className:o.item,id:"sideBar_button_brightandconnected"},a.a.createElement("div",{className:"/bright-and-connected"===window.location.pathname?o.itemButtomActive:o.itemButtom,onClick:function(){x("/bright-and-connected","bright-and-connected")}},a.a.createElement(le.a,{icon:en.a,badgeColor:"primary",color:"parent",badgeVisible:!0,title:"BRIGHT & CONNECTED",size:"27px",style:{marginBottom:"7px",marginRight:"15px"}}),"BRIGHT & CONNECTED"))))):a.a.createElement("div",{className:o.rootHide},a.a.createElement("div",{className:o.mainButton,id:"sideBar_logoMini"},a.a.createElement("img",{src:re.a,alt:"logo",className:o.logoImg,style:{width:"111px",marginLeft:"15px"},onClick:function(){e.menuExpand()}}),a.a.createElement(E.a,{title:Object(k.s)("$__showMenu",1),color:Object(k.d)("menu"),icon:"menu",onClick:e.menuExpand?function(){e.menuExpand()}:null,transparent:!0})))})));var jh=Object(s.b)((function(e){return{card:e.card}}),(function(e){return Object(I.b)(C,e)}))((function(e){return console.log("AQUI PRECISA SER CRIADO O PAINEL DE MODELOS DE FLUXOS"),a.a.createElement(jt.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(mt,{title:Object(k.s)("$__".concat(e.card.action),1),icon:"label",onCancel:function(){e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)}))}})))}));r(764);function Eh(){Eh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var kh=Object(s.b)((function(e){return{board:e.controls.board}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=c.a.getState(),r=t.db,n=t.session;a.a.useEffect((function(){o()}),[e.board]);var o=function(){var t=Object(p.a)(Eh().mark((function t(){return Eh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(st.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 l=r.cards[e.board],s=l._parent?r.cards[l._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(k.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(k.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(mt,{title:"".concat((null===u||void 0===u?void 0:u.name)||Object(k.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(k.d)("textColor"),backClick:function(t){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{board:u._id}))}}),a.a.createElement("div",{style:{marginTop:-5}},a.a.createElement(le.a,{icon:"navigate_next",color:Object(k.d)("textColor")}))),a.a.createElement("div",null,a.a.createElement(mt,{title:"".concat((null===l||void 0===l?void 0:l.name)||Object(k.s)("$__undefinedName",1)," "),searchText:(null===e||void 0===e?void 0:e.searchText)||null,icon:(null===l||void 0===l?void 0:l.icon)||l.type&&r&&r.dataType&&r.dataType.filter((function(e){return e.name===l.type}))[0]&&r.dataType.filter((function(e){return e.name===l.type}))[0].icon||"$__topic",iconTitle:"$__".concat(l.type),color:Object(k.d)("textColor")}))),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(E.a,{id:"close_kanban",title:Object(k.s)("$__close","*"),color:Object(k.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.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(B,null,a.a.createElement(qu,{nodeId:e.board}))))))}));function Sh(){Sh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Lh=Object(s.b)((function(e){return{toCopyMove:e.controls.toCopyMove}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=a.a.useState({}),r=Object(h.a)(t,2),n=r[0],o=r[1],i=a.a.useState(!1),l=Object(h.a)(i,2),s=l[0],u=(l[1],a.a.useState((null===n||void 0===n?void 0:n.name)||"")),m=Object(h.a)(u,2),g=m[0],b=m[1],v=a.a.useState(!1),y=Object(h.a)(v,2),x=y[0],_=(y[1],a.a.useState({})),O=Object(h.a)(_,2),w=O[0],j=O[1],S=a.a.useState(!1),L=Object(h.a)(S,2),C=L[0],I=L[1],T=a.a.useState(!1),F=Object(h.a)(T,2),D=F[0],N=F[1],P=a.a.useState({}),A=Object(h.a)(P,2),$=A[0],z=A[1],M=a.a.useState([]),Y=Object(h.a)(M,2);if(Y[0],Y[1],a.a.useEffect((function(){return e.toCopyMove&&c.a.getState().db.cards[e.toCopyMove]?(o(c.a.getState().db.cards[e.toCopyMove]),b("".concat(c.a.getState().db.cards[e.toCopyMove].name," (").concat(Object(k.s)("$__copy","*"),")")||!1)):(o({}),b("")),function(){o({}),b("")}}),[e.toCopyMove]),"{}"===JSON.stringify(n)||!n)return a.a.createElement(a.a.Fragment,null);var B=function(){var t=Object(p.a)(Sh().mark((function t(){var r,a;return Sh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return N(!0),r={},Object.keys(n).map((function(e){-1===e.indexOf("_")&&"created_at"!==e&&"updated_at"!==e&&(r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,n[e])))})),r=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({},n),r),{},{idRel:w&&w._id?w._id:n._parent?n._parent:null,name:g},x?{isModel:!0}:{}),{},{status:"notStarted"}),Object.keys(r).map((function(e){0===e.indexOf("_")&&delete r[e],"string"!==typeof r[e]&&"boolean"!==typeof r[e]&&delete r[e]})),t.prev=5,t.next=8,Object(yt.H)(e,!0,r,r.idRel);case 8:if(!(a=t.sent)||!a._id){t.next=14;break}return t.next=12,Object(yt.j)(e,n._id,a._id,$);case 12:t.sent&&setTimeout(Object(p.a)(Sh().mark((function t(){return Sh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:a._id});case 2:return t.next=4,Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:n._id});case 4:z({}),I(!1),N(!1),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}));case 8:case"end":return t.stop()}}),t)}))),1e3);case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(5),console.log("ERROR",t.t0);case 19:case"end":return t.stop()}}),t,null,[[5,16]])})));return function(){return t.apply(this,arguments)}}(),R=["guideline","guidelineD","guidelineR","guidelineC","guidelineE","objective","goal"];return a.a.createElement(Au.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description"},a.a.createElement(Ke.a,{onClickAway:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.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(k.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(k.d)("color")}},Object(k.s)("$__duplicate")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5}},a.a.createElement(E.a,{id:"close_duplicate",title:Object(k.s)("$__close","*"),color:Object(k.d)("color"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},C?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(di,{onSelect:function(e){j(e)},ignoreTypes:["chatGroup"]})):a.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},a.a.createElement(E.a,{title:Object(k.s)("$__selectTarget",1),text:Object(k.s)("$__selectTarget",1),color:Object(k.d)("menu"),icon:"assistant_navigation",onClick:function(){I(!0)},size:"14px",textSize:"14px"})),a.a.createElement("div",{style:{position:"relative",width:"100%",display:"grid"}},s?a.a.createElement(a.a.Fragment,null,w&&w.type&&R.indexOf(w.type)>-1&&(w.type.indexOf(n.type)>-1||n.type.indexOf(w.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(k.s)("$__youAreMove"),": ",Object(k.s)("$__".concat(w.type))," ",Object(k.s)("$__for"),": ",Object(k.s)("$__".concat(w.type)),".",Object(k.s)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null)):a.a.createElement(a.a.Fragment,null,w&&w.type&&R.indexOf(w.type)>-1&&(w.type.indexOf(n.type)>-1||n.type.indexOf(w.type)>-1)?a.a.createElement("div",{style:{color:"red",fontSize:12,marginBottom:15,textTransform:"uppercase",textAlign:"center"}},Object(k.s)("$__youAreDuplicating"),": ",Object(k.s)("$__".concat(w.type))," ",Object(k.s)("$__for"),": ",Object(k.s)("$__".concat(w.type)),".",Object(k.s)("$__thisWillBeTurnedIntoAnActivity")):a.a.createElement(a.a.Fragment,null),a.a.createElement(Ce,{label:Object(k.s)("$__copyAs",1),variant:Object(k.d)("fieldVariant"),name:"copyAs",InputLabelProps:{shrink:!0},InputProps:{autoComplete:"new-password",endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"clear",onClick:function(){b(n.name)}})),onChange:function(e){b(e.target.value)}},value:g,placeholder:Object(k.s)("$__copyAs_placeholder",1)}),a.a.createElement("fieldset",null,a.a.createElement("legend",null,Object(k.s)("$__options")),a.a.createElement("div",null,a.a.createElement(wr,{checked:!!$.copyUsers,onClick:function(e){z(Object(d.a)(Object(d.a)({},$),{},{copyUsers:!$.copyUsers}))},name:"copyUsers",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__copyUsersAccess")),a.a.createElement("div",null,a.a.createElement(wr,{checked:!!$.copyTimeline,onClick:function(e){z(Object(d.a)(Object(d.a)({},$),{},{copyTimeline:!$.copyTimeline}))},name:"copyTimeline",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__copyTimelineIfExists")),a.a.createElement("div",null,a.a.createElement(wr,{checked:!!$.copyTags,onClick:function(e){z(Object(d.a)(Object(d.a)({},$),{},{copyTags:!$.copyTags}))},name:"copyTags",inputProps:{"aria-label":"secondary checkbox"}}),Object(k.s)("$__copyTagsIfExists")))),D?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(Tr,null)):a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(E.a,{title:Object(k.s)("$__cancel",1),text:Object(k.s)("$__cancel",1),color:"lightgray",icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{toCopyMove:null}))},size:"12px",textSize:"12px"}),a.a.createElement(E.a,{title:Object(k.s)("$__duplicateAllLinkedItems",1),text:Object(k.s)("$__duplicateAllLinkedItems",1),color:Object(k.d)("menu"),icon:"dynamic_feed",onClick:function(){B(!0)},size:"12px",textSize:"12px",transparent:!0}))))))))}));function Ch(){Ch=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var Ih=Object(s.b)((function(e){return{addCard:e.controls.addCard}}),(function(e){return Object(I.b)(C,e)}))((function(e){var t=[],r=a.a.useState({}),n=Object(h.a)(r,2),o=n[0],i=n[1],l=a.a.useState(!1),s=Object(h.a)(l,2),u=s[0],m=(s[1],a.a.useState(!1)),g=Object(h.a)(m,2),b=g[0],v=(g[1],a.a.useState(!1)),y=Object(h.a)(v,2),x=y[0],O=y[1],w=a.a.useState(!1),j=Object(h.a)(w,2),S=j[0],L=j[1];if(a.a.useEffect((function(){return"{}"!==JSON.stringify(e.addCard)&&e.addCard._parent&&c.a.getState().db.cards[e.addCard._parent]?i(c.a.getState().db.cards[e.addCard._parent]):(i({}),L(!1),O(!1)),function(){i({}),L(!1),O(!1)}}),[e.addCard]),o.automationUsers&&"doNotChange"!==o.automationUsers&&"remove"!==o.automationUsers&&o._users&&Object.keys(o._users).length>0){var C=c.a.getState().db.users[c.a.getState().session._id]||{},I=Object(d.a)(Object(d.a)({},"add"===o.automationUsers?Object(f.a)({},C._id,{_id:C._id,name:C.name,image:C.image||null}):{}),o._users);Object.keys(I).sort((function(e,t){return I[e].isResponsible?-1:1})).map((function(e,r){-1===t.indexOf(e)&&t.push(e)}))}var T=a.a.useState(t.length>0?t:[c.a.getState().session._id]),F=Object(h.a)(T,2),D=F[0],N=F[1],P=a.a.createRef(),A=a.a.createRef(),$=a.a.createRef(),z=a.a.createRef({}),M=function(){var t=Object(p.a)(Ch().mark((function t(r){var n,a,i,l,s,u,p;return Ch().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(!0),z&&(!z.current||z.current&&!z.current.loading)&&(z.current=Object(d.a)(Object(d.a)({},z.current),{},{loading:!0}),u=Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)(Object(d.a)({name:P.current.value,_parent:o._id,myDay:!!(e.myDay||(null===(n=e.initialData)||void 0===n?void 0:n.myDay)||(null===(a=e.addCard)||void 0===a?void 0:a.myDay)),type:(null===(i=e.addCard)||void 0===i||null===(l=i.initialData)||void 0===l?void 0:l.type)||e.type||"task",status:e.status?e.status:"notStarted",users:D},r?{checklist:!0}:{}),A&&A.current&&A.current.value?{description:A.current.value}:{}),$&&$.current&&$.current.getValue()?{value:$.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&&(u=Object(d.a)(Object(d.a)({},u),{},{startDate:_()("".concat(_()().format("YYYY-MM-DD")," 00:00:00")).unix("X"),endDate:_()("".concat(_()().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&&(u=Object(d.a)(Object(d.a)({},u),{},{status:o.automationStatus||"notStarted"},o.automationStatus&&"completed"===o.automationStatus?{completed_at:_()().unix("x")}:{})),(p=ys(u,(null===(s=e.addCard)||void 0===s?void 0:s.rows)||0,e))&&(e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),p)})),e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}})))),z.current=Object(d.a)(Object(d.a)({},z.current),{},{loading:!1});case 3: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(Au.a,{open:!0,onClose:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.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(k.d)("ColumnTitleColor")}},a.a.createElement("div",{style:{fontSize:"14px",color:Object(k.d)("colorText")}},o.shortCutTitle?o.shortCutTitle:Object(k.s)("$__new")),a.a.createElement("div",{style:{position:"absolute",right:5,top:5,display:"flex",alignItems:"center"}},a.a.createElement(E.a,{id:"assistant_navigation",title:Object(k.s)("$__selectTarget","*"),color:Object(k.d)("colorText"),icon:"assistant_navigation",onClick:function(){O((function(e){return!e}))},size:"20px",transparent:!0}),a.a.createElement(E.a,{id:"close_addCard",title:Object(k.s)("$__close","*"),color:Object(k.d)("colorText"),icon:"close",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))},size:"25px",transparent:!0}))),a.a.createElement("div",{style:{position:"relative",padding:"9px"}},x?a.a.createElement("div",{style:{position:"relative",float:"left",width:"370px",marginBottom:"15px"}},a.a.createElement(di,{onSelect:function(e){i(c.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% - 50px)"}},a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3}},o.shortCutTitle?o.shortCutTitle:e.placeHolder?e.placeHolder:Object(k.s)(e.checklist&&!e.myDay?"$__newSimpleTask":"$__newSubActivity")),e.explain?a.a.createElement("div",{style:{position:"relative",width:"100%",padding:3,color:Object(k.d)("menu")}},e.explain):a.a.createElement(a.a.Fragment,null),a.a.createElement(bs.a,{ref:P,style:{width:"100%",padding:7,border:"none",borderBottom:"solid 1px ".concat(Object(k.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&&P.current&&P.current.value&&0===P.current.value.trim().length?(t.preventDefault(),void(P.current.value="")):void(27===a&&e.onCancel&&e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))):(t.preventDefault(),void(P.current&&P.current.value&&P.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||b)&&a.a.createElement(Ce,{inputRef:A,label:Object(k.s)("$__description",1),variant:Object(k.d)("fieldVariant"),name:"description",InputProps:{autoComplete:"new-password",multiline:!0,minRows:3,endAdornment:a.a.createElement(Et.a,{position:"end"},a.a.createElement(le.a,{icon:"description",color:"lightgray"}))},placeholder:Object(k.s)("$__description",1)}),(o.requireValue||u)&&a.a.createElement(ko,{label:Object(k.s)("$__value",1),variant:"standard",currencySymbol:"$",outputFormat:"string",inputRef:$,ref:$}),!o.showInPanel&&a.a.createElement(Qt,{includeMe:!0,defineResponsible:!0,avatarSize:"23px",permission:!0,data:o,noLimit:!0,multiple:!0,onSelect:function(e){N(e)},selected:D,transparent:!0})),S?a.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:40}},a.a.createElement(Tr,null)):a.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:33}},a.a.createElement(E.a,{id:"addModal_cancelButton",title:Object(k.s)("$__cancel",1),text:e.placeHolder||Object(k.s)("$__cancel",1),color:Object(k.d)("medium"),icon:"cancel",onClick:function(){e.reduxFunction("ASYNC","SET_CONTROL",Object(d.a)(Object(d.a)({},c.a.getState().control),{},{addCard:{}}))},size:"25px"}),a.a.createElement("div",{id:"addCard_441"},a.a.createElement(E.a,{id:"sideModule_saveButton",title:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(k.s)("$__save",1),text:o.shortCutButtonToAdd?o.shortCutButtonToAdd:e.placeHolder||Object(k.s)("$__save",1),color:"green",icon:"save",onClick:function(){var t,r;!P.current.value||P.current.value&&""===P.current.value.trim()?P.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)})),Th=[{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}],Fh=[{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}],Dh=[{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}],Nh=r(1132),Ph=Object(s.b)(null,(function(e){return Object(I.b)(C,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(k.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(k.s)("$__endTourDesc"))),a.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},a.a.createElement("button",{onClick:function(){e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},c.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(k.s)("$__letsStart")))))})),Ah=function(e){var t=e.handleStart,r=e.handleEnd,o=Object(n.useState)(!1),i=Object(h.a)(o,2),c=i[0],l=i[1],s=Object(n.useState)(!1),u=Object(h.a)(s,2),p=u[0],m=u[1],g=Object(f.a)({width:"90%",height:"50px",backgroundColor:Object(k.d)("menu"),color:Object(k.d)("color"),fontWeight:"bold",borderRadius:"5px",border:"none",filter:c?"brightness(0.90)":"brightness(1)",marginRight:"10px",cursor:"pointer"},"border","1px solid grey"),b=Object(d.a)(Object(d.a)({},g),{},{backgroundColor:"white",filter:p?"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(k.s)("$__tourTitleIntro")),a.a.createElement("p",{style:{width:"240px",fontWeight:"bolder",textAlign:"center",fontSize:"19px",marginBottom:"30px"}},Object(k.s)("$__tourIntro")),a.a.createElement("button",{onMouseEnter:function(){l(!0)},onMouseLeave:function(){l(!1)},onClick:t,style:g},Object(k.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(k.s)("$__or"))),a.a.createElement("button",{onMouseEnter:function(){m(!0)},onMouseLeave:function(){m(!1)},onClick:r,style:b},a.a.createElement("p",{style:{marginTop:"10px"}},Object(k.s)("$__skipTour","*"))))))},$h=(r(1829),function(e){Object(m.a)(e);var t=c.a.getState().session,r=Object(n.useState)([]),o=Object(h.a)(r,2),i=o[0],l=o[1],s=Object(n.useState)(!0),u=Object(h.a)(s,2),p=u[0],f=u[1],g=Object(n.useState)([]),b=Object(h.a)(g,2),v=b[0],y=b[1],x=Object(n.useState)(0),_=Object(h.a)(x,2),O=_[0],w=_[1],j=Object(n.useState)(!1),E=Object(h.a)(j,2),S=E[0],L=E[1],C=Object(n.useState)(!0),I=Object(h.a)(C,2),T=I[0],F=I[1],D=Object(n.useState)(!0),N=Object(h.a)(D,2),P=N[0],A=N[1],$=Object(n.useState)(0),z=Object(h.a)($,2),M=z[0],B=z[1],R=Object(n.useState)(!1),G=Object(h.a)(R,2),H=G[0],W=G[1],U=Object(n.useState)(""),V=Object(h.a)(U,2),q=V[0],X=V[1],J=Object(n.useState)("mask"),K=Object(h.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?(l(Fh),L(!0)):r?(l(Dh),L(!0)):l(Th)}),[]);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(k.s)(n,1)),void 0!==t&&t.map((function(e,t){return a.a.createElement("div",{key:t},console.log(e,Object(k.s)(e)),a.a.createElement("h1",{style:{fontSize:"18px",display:"flex",fontWeight:"bolder",marginTop:"25px",color:"grey"}},Object(k.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),l(Fh),clearInterval(e)):r&&(w(0),l(Dh),clearInterval(e))}),200)};function ae(e){"undefined"!==typeof e.show||"undefined"!==typeof e.fake?f(!1):(f(!0),B(0)),"undefined"!==typeof e.maskValue&&B(e.maskValue),"undefined"!==typeof e.click&&A(!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),Y.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&&y(function(e,t,r){var n={padding:"10px 20px",boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px",backgroundColor:Object(k.d)("menu"),color:Object(k.d)("color"),borderRadius:"5px",border:"none",marginRight:"10px",cursor:"pointer",position:"absolute",right:"20px",bottom:"20px"},o=Object(d.a)(Object(d.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(k.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(k.s)("$__next")," "),a.a.createElement("button",{onClick:function(){return oe()},style:o},a.a.createElement("p",{style:{borderBottom:"1px solid black",marginTop:"20px"}},Object(k.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,p,O))}}),[i,p,O,Z]),ee.current.disabledTour?a.a.createElement(a.a.Fragment,null):a.a.createElement(a.a.Fragment,null,S?a.a.createElement(Nh.a,{maskClassName:Z,disableFocusLock:!0,rounded:5,update:q,disableDotsNavigation:!0,showNavigation:!1,showNumber:!1,disableInteraction:P,closeWithMask:!1,goToStep:O,steps:v,isOpen:T,showButtons:!1,maskSpace:M,onRequestClose:function(){return oe()}}):a.a.createElement(Ah,{handleEnd:function(){L(!0),oe()},handleStart:function(){return L(!0)}}),H&&a.a.createElement(Ph,{handleEnd:function(){oe(),W(!1)}}))});function zh(){zh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var Mh,Yh=function(){var e=Object(p.a)(zh().mark((function e(t,r){var n,a,o;return zh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=c.a.getState(),a=n.db,o="cards",a.cards[r._id]?o="cards":a.users[r._id]&&(o="users"),c.a.getState().db&&c.a.getState().db[o]&&c.a.getState().db[o][r._id]&&t.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},Object(f.a)({},o,Object(d.a)(Object(d.a)({},c.a.getState().db[o]),{},Object(f.a)({},r._id,Object(d.a)(Object(d.a)({},c.a.getState().db[o][r._id]),r))))));case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Bh=r(1134),Rh=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(d.a)(Object(d.a)({},X.f),{},{height:"-webkit-fill-available",overflowY:"auto"}),map:{marginTop:"0px"},mainPanelSidebarMini:Object(f.a)({},e.breakpoints.up("md"),{width:"calc(100% - 0px)"})}},Gh=function(e){return{wrapper:{height:"auto",minHeight:"100vh",position:"relative",top:"0"},fullPage:{position:"relative",minHeight:"100vh",display:"flex !important",margin:"0",border:"0",color:X.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(X.r)(X.b)+", 0.22)"},"&:before,&:after":{display:"block",content:'""',position:"absolute",width:"100%",height:"100%",top:"0",left:"0",zIndex:"2"}}}};r(1830);function Hh(){Hh=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}r(201).config();var Wh=Object(w.default)(O.a)(Mh||(Mh=Object(u.a)(["\n&&&.Toastify__toast-container {\n  min-width:407px !important;\n  z-index:33333;\n}\n.Toastify__toast {\n  z - index:33333;\n  }\n.Toastify__toast-body {\n  z - index:33333;\n  }\n.Toastify__progress-bar { }\n"]))),Uh=Object(s.b)(null,(function(e){return Object(I.b)(C,e)}))((function(e){var t,r=Object.assign({},(Object(m.a)(e),e)),n=c.a.getState().session,o=a.a.useState({}),s=Object(h.a)(o,2),u=s[0],g=s[1],v=a.a.useState(!1),x=Object(h.a)(v,2),O=x[0],w=x[1],E=a.a.useState(!1),S=Object(h.a)(E,2),C=S[0],I=S[1],T=a.a.useState(!0),D=Object(h.a)(T,2),N=D[0],P=D[1],A=a.a.useState(!1),$=Object(h.a)(A,2),z=$[0],M=($[1],a.a.useState(!1)),Y=Object(h.a)(M,2),H=Y[0],W=Y[1],U=a.a.useState(!0),V=Object(h.a)(U,2),q=V[0],X=V[1],J=a.a.useState(!1),K=Object(h.a)(J,2),Z=K[0],Q=K[1],ee=a.a.useState(null),te=Object(h.a)(ee,2),re=te[0],ne=te[1],oe=Object(R.a)(O?Rh:Gh),ie=a.a.useRef({}),se=(a.a.useRef({}),oe()),ue=a.a.createRef(),de=se.mainPanel+" "+y()((t={},Object(f.a)(t,se.mainPanelSidebarMini,!0),Object(f.a)(t,se.mainPanelWithPerfectScrollbar,navigator.platform.indexOf("Win")>-1),t)),pe=a.a.createRef(),fe=a.a.createRef();a.a.useEffect((function(){fe.current={offline:!1};var t=function(){var t=Object(p.a)(Hh().mark((function t(r){var a;return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,kt.a.post("/WhiteLabel",{url:r});case 2:(a=t.sent)&&((null===a||void 0===a?void 0:a.data)&&(g(a.data),e.reduxFunction("ASYNC","SET_SESSION",Object(d.a)(Object(d.a)({},n),{},{custom:Object(d.a)(Object(d.a)({},n.custom),a.data)}))),be());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):be(),ne(Se(yf))}),[]),a.a.useEffect((function(){var t=window.location.hash.split("/");t[0]=t[0].replace("#",""),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{history:"".concat(window.location.pathname).concat(window.location.hash)})),xe(t)})),a.a.useEffect((function(){var e=window.location.hash.split("/");e[0]=e[0].replace("#",""),O&&(xe(e),ye(),he(!0),ne(Se(yf)))}),[O]);var he=function(){var e=Object(p.a)(Hh().mark((function e(t){var r,n,a,o;return Hh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fe.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(){be(!0)}),36e4),window.addEventListener("blur",(function(){clearInterval(n),clearInterval(o),n=0,r=_()().tz("America/Sao_Paulo").unix("X"),a=setTimeout((function(){ge("away")}),6e4)})),window.addEventListener("focus",function(){var e=Object(p.a)(Hh().mark((function e(t){var i;return Hh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(null===fe||void 0===fe||null===(i=fe.current)||void 0===i?void 0:i.offline)||(be(!0),clearInterval(o),o=setInterval((function(){be(!0)}),36e4),clearTimeout(a),n||(n=setInterval((function(){1}),1e3)),ge("online"),r&&_()().tz("America/Sao_Paulo").unix("X")-r>30&&me());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)}}(),me=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",newUpdates:!0,lastDate:t})},ge=function(){var e=Object(p.a)(Hh().mark((function e(t){return Hh().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:("online"===t&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[n._id]&&"online"!==c.a.getState().usersStatus.users[n._id].status||"away"===t&&c.a.getState().usersStatus.users&&c.a.getState().usersStatus.users[n._id]&&"away"!==c.a.getState().usersStatus.users[n._id].status)&&c.a.getState().functions.socket.emit("socketStatus",{socketStatus:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),be=function(){var t=Object(p.a)(Hh().mark((function t(r){var a,o,l,s,p,h,m,g,b,v,y,x,_,j,E,k,S,L,C,I,T,F,D,A,$,z=arguments;return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=z.length>1&&void 0!==z[1]?z[1]:0,!fe.current||fe.current.offline){t.next=75;break}if(r){t.next=50;break}return t.prev=3,t.next=6,kt.a.post("/VerifySession");case 6:return o=t.sent,l=o&&o.data&&o.data.user&&o.data.user.language?{locale:o.data.user.language}:{all:!0},"#tab/languages"===window.location.hash&&(l={all:!0}),t.next=11,kt.a.post("/M_Languages_V3",l);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(d.a)(Object(d.a)({},r),{},Object(f.a)({},t.alias.name.toLowerCase(),{alias:t.alias.name.toLowerCase(),locales:t.locales})),n+1===s.data.length&&e(r)}))}));case 15:if(p=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(d.a)(Object(d.a)({},o.data.user),(null===o||void 0===o||null===(h=o.data)||void 0===h||null===(m=h.user)||void 0===m||null===(g=m.GlobalData)||void 0===g?void 0:g.custom)?{custom:Object(d.a)(Object(d.a)(Object(d.a)({},n.custom),JSON.parse(null===o||void 0===o||null===(b=o.data)||void 0===b||null===(v=b.user)||void 0===v||null===(y=v.GlobalData)||void 0===y?void 0:y.custom)),{},{custom:null===o||void 0===o||null===(x=o.data)||void 0===x||null===(_=x.user)||void 0===_||null===(j=_.GlobalData)||void 0===j?void 0:j.custom},u)}:{})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)({},o.data.users?o.data.users:{})})),!p||!o){t.next=36;break}if(e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},p)),(!O||O&&JSON.stringify(O)!==JSON.stringify(o.data.user))&&JSON.stringify(O)!=JSON.stringify(o.data.user)&&w(Object(d.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!==yf.filter((function(e){return e.auth&&e.path===window.location.pathname})).length||i.a.push("/d#tab/resume"),we(),ve(),t.abrupt("return",!0);case 36:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},p)),w(!1);case 38:t.next=42;break;case 40:e.reduxFunction("ASYNC","SET_LANGUAGE",Object(d.a)({},p)),N&&P(!1);case 42:t.next=48;break;case 44:t.prev=44,t.t0=t.catch(3),console.log(t.t0),5===a?(W(!0),O&&w(!1),N&&P(!1),setTimeout((function(){window.open("/login","_self")}),6e4)):be(r,a+1);case 48:t.next=73;break;case 50:return t.prev=50,t.next=53,kt.a.post("/VerifySession",{ignoreUsers:!0});case 53:if(E=t.sent,k=c.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(d.a)(Object(d.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(d.a)(Object(d.a)(Object(d.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===(A=D.user)||void 0===A||null===($=A.GlobalData)||void 0===$?void 0:$.custom},u)}:{})),c.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(){be(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)}}(),ve=function(){var t=Object(p.a)(Hh().mark((function t(){var r,n;return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return It(e),t.prev=1,t.next=4,kt.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(d.a)(Object(d.a)({},c.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,kt.a.get("/M_User_Group_List");case 16:(n=t.sent)&&n.data&&e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.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(p.a)(Hh().mark((function t(){return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(st.b)(e,{cardLoad:"chat"});case 2:return t.next=4,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.a.getState().session._id],db:"users",type:"comment",ini:!0,limit:1});case 4:return t.next=6,zr(Object(d.a)(Object(d.a)({},e),{},{fnIdentification:"Layouts/Index/loadData()-Users"}),{ids:[c.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)}}(),xe=function(){var t=Object(p.a)(Hh().mark((function t(r){var n=arguments;return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.length>1&&void 0!==n[1]&&n[1],!(O&&"/"!==window.location.pathname&&"/login"!==window.location.pathname&&e&&e.reduxFunction)){t.next=22;break}if(!ie||!ie.current||ie.current.initialLoader){t.next=14;break}return ie.current={initialLoader:!0},t.next=6,Object(st.b)(e,{cardLoad:"myDay"});case 6:return t.next=8,Object(st.b)(Object(d.a)({},e),{cardLoad:"plans"});case 8:return t.next=10,Object(st.b)(Object(d.a)({},e),{cardLoad:"chat",ignoreLoader:!0});case 10:return t.next=12,Object(st.b)(Object(d.a)({},e),{cardLoad:"steps"});case 12:return t.next=14,Object(st.b)(Object(d.a)({},e),{cardLoad:"approval",ignoreLoader:!0});case 14:return t.next=16,Object(st.d)(e);case 16:if(!t.sent){t.next=20;break}return P(!1),t.abrupt("return",!0);case 20:t.next=23;break;case 22:return t.abrupt("return",!0);case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Oe=function(){},we=function(){var t=Object(p.a)(Hh().mark((function t(){var r;return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Bh.a)("https://ws.machen.ai",{transports:["websocket","polling"],auth:{token:localStorage.getItem("TOKEN")}});case 2:return(r=t.sent)&&(Ce(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)}}(),je=function(){var e=Object(p.a)(Hh().mark((function e(t){return Hh().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(k.c)(Object(d.a)({},t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Se=function t(r){var n=O;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(l.b,{path:r.path,component:function(){return a.a.createElement(i,null)},key:o,expanded:q,subMenu:!!e.subMenu})}}))},Le=function(){var t=Object(p.a)(Hh().mark((function t(r){return Hh().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)}}(),Ce=function(t){t.on("global",(function(e){"version"===e.fn&&Object(k.c)({message:Object(k.s)("$__appNewVersionAvaiable",1),hideiconvariant:!0,variant:"info",persist:!0,horizontal:"right",confirm:function(){window.location.reload()}}),"logout"===e.fn&&Le(),"reload"===e.fn&&window.location.reload()})),t.on("SWOT.UPD",(function(t){Object(yt.m)(Object(d.a)(Object(d.a)({},e),{},{store:c.a.getState(),_sessionId:n._id}),t)})),t.on("copy.LOAD",(function(t){Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"childrens",idRel:t._id})})),t.on("card.ADD",(function(t){t._id&&Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"card",idRel:t._id})})),t.on("card.UPD",(function(t){Object(yt.l)(e,t)})),t.on("card.MYDAY",(function(t){Object(yt.B)(e,t)})),t.on("card.TIMER",(function(t){t&&t.type&&"stop"===t.type&&(console.log("card.TIMER",t),Object(yt.n)(e,t))})),t.on("card.UPDATE",(function(t){Object(yt.o)(e,t)})),t.on("card.ACCESS_UPD",function(){var t=Object(p.a)(Hh().mark((function t(r){return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(yt.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(yt.a)(e,t)})),t.on("card.ACCESS_REMOVE",(function(t){Object(yt.b)(e,t)})),t.on("card.REORDER",(function(t){Object(yt.E)(e,t)})),t.on("card.DELETE",(function(t){Object(yt.p)(e,t,!0)})),t.on("card.unlinkChildrens",(function(t){Object(yt.M)(e,t)})),t.on("kanban.REORDER",(function(t){!function(e,t){var r=Object(d.a)({},c.a.getState().db.cards);t.cards&&t.cards.length>0&&t.cards.map((function(e,t){r=Object(d.a)(Object(d.a)({},r),{},Object(f.a)({},e,Object(d.a)(Object(d.a)({},r[e]),{},{step:"".concat(t+1)})))})),e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{cards:Object(d.a)(Object(d.a)({},c.a.getState().db.cards),r)}))}(e,t)})),t.on("unlinkChildrens",(function(t){Object(yt.M)(e,t)})),t.on("card.changePlanId",(function(t){var r=window.location.hash.split("/");r[0]=r[0].replace("#","");var n=c.a.getState().sessionLoads.cards.load,a=b()("".concat(JSON.stringify({idRel:r[0],cardLoad:"plan"}))).toString();r[0]===t.planId||Object.keys(n).length>0&&n[a]?Object(st.b)(Object(d.a)(Object(d.a)({},e),{},{ignoreLoader:!0}),{cardLoad:"plan",idRel:t.cardId,force:!0}):Object(yt.g)(e,t)})),t.on("node.UPDATE",(function(t){Yh(e,t)})),t.on("column.UPD",(function(t){Object(yt.R)(e,t)})),t.on("column.DELETE",(function(t){Object(yt.q)(e,t)})),t.on("column.REORDER",(function(t){Object(yt.F)(e,t)})),t.on("column.CARDS",(function(t){Object(yt.h)(e,t)})),t.on("user.UPD",(function(t){Dt(e,t)})),t.on("user.CONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(d.a)(Object(d.a)({},c.a.getState().usersStatus.users),{},Object(f.a)({},t.user,Object(d.a)(Object(d.a)({},t),{},{status:t.status,updatedAt:t.updatedAt})))})})),t.on("user.DISCONNECT",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",{users:Object(d.a)(Object(d.a)({},c.a.getState().usersStatus.users),{},Object(f.a)({},t.user,null))})})),t.on("users.STATUS",(function(t){e.reduxFunction("ASYNC","SET_USERS_STATUS",Object(d.a)(Object(d.a)({},c.a.getState().usersStatus),{},{users:Object(d.a)({},t.users)}))})),t.on("user.ACCESS",(function(t){Dt(e,t)})),t.on("userGroup.UPD",(function(t){Ac(e,t)})),t.on("feed.ADD",(function(t){!function(e,t){var r=Object(f.a)({},t._id,Object(d.a)(Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[t._id]&&c.a.getState().db.feeds[t._id].feed?{feed:c.a.getState().db.feeds[t._id].feed}:{}),t.data),{},{_parent:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds&&c.a.getState().db.feeds[t._id]&&c.a.getState().db.feeds[t._id]._parent?c.a.getState().db.feeds[t._id]._parent:{}),{},Object(f.a)({},t._parent,Object(d.a)({},t.rel)))}));e.reduxFunction("ASYNC","SET_DB",Object(d.a)(Object(d.a)({},c.a.getState().db),{},{feeds:Object(d.a)(Object(d.a)({},c.a.getState().db.feeds),r)}))}(e,t)})),t.on("language.UPD",(function(t){Object(k.n)(e,t)})),t.on("tag.UPD",(function(t){Ac(e,t)})),t.on("tag.DEL",(function(t){zc(e,t,!0)})),t.on("tag.UNLINK",(function(t){Bc(e,t,!0)})),t.on("logout",(function(e){e.user===c.a.getState().session._id&&Le()})),t.on("notifications.ADD",function(){var t=Object(p.a)(Hh().mark((function t(r){return Hh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.a.getState().session._id===r.userId&&r.notify&&e.reduxFunction("ASYNC","SET_NOTIFICATIONS",Object(d.a)(Object(d.a)({},c.a.getState().notifications),{},Object(f.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(d.a)(Object(d.a)({},c.a.getState().db),{},{users:Object(d.a)(Object(d.a)({},c.a.getState().db.users),{},Object(f.a)({},t.user,Object(d.a)(Object(d.a)({},c.a.getState().db.users[t.user]),{},{chatStatus:t.status})))}))})),t.on("chat.READED",(function(t){(c.a.getState().db.cards[t.id]||c.a.getState().db.users[t.id]||c.a.getState().db.users[t.readedBy])&&Pr(e,t)})),t.on("chat.INTERACT",(function(t){Ar(e,t),c.a.getState().db.cards[t.id]||c.a.getState().db.users[t.id]||c.a.getState().db.users[t.readedBy]}));var r=setTimeout((function(){}),5e3);t.on("disconnect",(function(){fe.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===fe||void 0===fe||null===(e=fe.current)||void 0===e?void 0:e.offline)&&(fe.current={offline:!1},me()),be(!0),clearTimeout(r),I(!1)}))};return N||!re?a.a.createElement("div",{style:{position:"fixed",top:"0px",bottom:"0px",left:"0px",right:"0px"}},a.a.createElement(Ee,null)):(H&&"/offline-detect"!==window.location.pathname&&i.a.push("offline-detect"),z&&"/maintenance-mode"!==window.location.pathname&&i.a.push("maintenance-mode"),z||H||"/maintenance-mode"!==window.location.pathname&&"/offline-detect"!==window.location.pathname||i.a.push("login"),a.a.createElement("div",{style:Object(d.a)({position:"fixed",top:"0px",bottom:"0px",left:O&&q?"calc(198px + ".concat(Z?"264px":"0px",")"):"0px",right:"0px"},O?{}:{overflow:"auto"}),onContextMenu:function(){}},O?a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:se.wrapper},a.a.createElement(B,{info:{path:"layouts/index",component:"Sidebar"}},a.a.createElement(G.a,{xsDown:!0},q&&a.a.createElement(kf,Object.assign({routes:yf,handleDrawerToggle:Oe,menuExpand:function(){X((function(e){return!e}))},setSubMenuExpanded:function(e){Q(e)},subMenuExpanded:Z},r)))),a.a.createElement(B,null,a.a.createElement(G.a,{smUp:!0},a.a.createElement(wh,Object.assign({routes:yf,handleDrawerToggle:Oe,menuExpand:function(){X((function(e){return!e}))},setSubMenuExpanded:function(e){Q(e)},subMenuExpanded:Z,expanded:q},r)))),a.a.createElement("div",{className:de,ref:pe,id:"mainPannel"},a.a.createElement("div",{className:se.container},a.a.createElement(B,null,a.a.createElement(l.d,null,re,a.a.createElement(l.a,{from:"/",to:"/d#tab/resume"}))))),a.a.createElement(B,null,a.a.createElement(kh,null)),a.a.createElement(B,null,a.a.createElement(jc,null))),a.a.createElement(G.a,{smDown:!0},a.a.createElement(ah,{menuExpand:function(){X((function(e){return!e}))},expanded:q})),a.a.createElement(B,null,a.a.createElement(_e,null)),a.a.createElement(ke,null),a.a.createElement(B,null,a.a.createElement(F,null)),a.a.createElement(B,null,a.a.createElement(j.a,{open:C,className:se.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(le.a,{color:"ColumnTitleColor",size:"77px"},"cloud_off")),a.a.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"15px"}},Object(k.s)("$__noInternetConnection","*"))))),a.a.createElement("div",null),a.a.createElement(B,null,a.a.createElement(xh,{expanded:q,subMenuExpanded:Z})),a.a.createElement(B,null,a.a.createElement(jh,null)),a.a.createElement(B,null,a.a.createElement(Ih,null)),a.a.createElement(B,null,a.a.createElement(Lh,null)),a.a.createElement(B,null,a.a.createElement(L,null)),a.a.createElement(B,null,a.a.createElement($h,null)),a.a.createElement(hh,null)):a.a.createElement("div",null,!z&&a.a.createElement(ae,r),a.a.createElement("div",{className:se.wrapper,ref:ue},a.a.createElement("div",{className:se.fullPage,style:{backgroundImage:'url("'.concat((null===u||void 0===u?void 0:u.loginBackground)?u.loginBackground:Object(k.d)("loginBackground"),'")')}},a.a.createElement(B,null,a.a.createElement(l.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(l.b,{path:t.path,component:function(){return a.a.createElement(n,{callback:function(e){je(e)}})},key:r}):void 0);var n}))}(yf),a.a.createElement(l.a,{from:"*",to:H?"/offline-detect":z?"/maintenance-mode":"/login"}))),a.a.createElement(B,null,a.a.createElement(ce,{white:!0}))))),a.a.createElement(B,null,a.a.createElement(Wh,{pauseOnFocusLoss:!0}))))})),Vh=(r(1832),function(e){var t=e.store,r=e.history;return a.a.createElement(s.a,{store:t},a.a.createElement(l.c,{history:r},a.a.createElement(l.b,{exact:!0,patch:"/:params",component:Uh})))});r(201).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(Vh,{store:c.a,history:i.a}),document.getElementById("root"))},22:function(e,t,r){"use strict";r.d(t,"l",(function(){return T})),r.d(t,"P",(function(){return ie})),r.d(t,"r",(function(){return fe})),r.d(t,"a",(function(){return V})),r.d(t,"b",(function(){return q})),r.d(t,"c",(function(){return U})),r.d(t,"d",(function(){return G})),r.d(t,"e",(function(){return H})),r.d(t,"f",(function(){return le})),r.d(t,"g",(function(){return W})),r.d(t,"h",(function(){return M})),r.d(t,"i",(function(){return Z})),r.d(t,"j",(function(){return ne})),r.d(t,"k",(function(){return se})),r.d(t,"m",(function(){return I})),r.d(t,"n",(function(){return F})),r.d(t,"o",(function(){return D})),r.d(t,"p",(function(){return L})),r.d(t,"q",(function(){return A})),r.d(t,"s",(function(){return K})),r.d(t,"t",(function(){return ae})),r.d(t,"u",(function(){return ee})),r.d(t,"v",(function(){return te})),r.d(t,"w",(function(){return O})),r.d(t,"x",(function(){return x})),r.d(t,"y",(function(){return _})),r.d(t,"z",(function(){return Q})),r.d(t,"A",(function(){return Y})),r.d(t,"B",(function(){return B})),r.d(t,"C",(function(){return ue})),r.d(t,"D",(function(){return de})),r.d(t,"E",(function(){return $})),r.d(t,"F",(function(){return z})),r.d(t,"G",(function(){return S})),r.d(t,"H",(function(){return y})),r.d(t,"I",(function(){return w})),r.d(t,"J",(function(){return N})),r.d(t,"K",(function(){return pe})),r.d(t,"L",(function(){return R})),r.d(t,"M",(function(){return J})),r.d(t,"N",(function(){return X})),r.d(t,"O",(function(){return E})),r.d(t,"Q",(function(){return oe})),r.d(t,"R",(function(){return P})),r.d(t,"S",(function(){return re}));var n=r(31),a=r(7),o=r(2),i=r(8),c=r(3),l=r(68),s=r.n(l),u=r(30),d=r(39),p=r(160),f=r(10),h=r.n(f),m=r(53),g=r(563),b=r(1);r(1878);function v(){v=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,o)&&(m=b);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),E(r),d}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var y=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,a,i,l,s,u,d,p,f=arguments;return v().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)(v().mark((function e(t,r){var n;return v().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)(v().mark((function e(t,r){var n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket,e.next=3,u.a.put("timer/stop",{idRel:r});case 3:if(!(n=e.sent)){e.next=6;break}return e.abrupt("return",n.data);case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket,e.next=3,u.a.delete("timer/run/".concat(n),{idRel:r});case 3:if(i=e.sent,(l=c.a.getState().db.cards[r]._kpiTimer)[n]&&delete l[n],!i){e.next=9;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 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,i;return v().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){if((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)return!0}))[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)(v().mark((function e(t,r,n){var l,s,u,d,p,f,m,g,b=arguments;return v().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),c.a.getState().db.dataType,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)(v().mark((function e(u,m){return v().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)(v().mark((function e(i){return v().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=9,m;case 9:return g=e.sent,e.abrupt("return",g);case 11:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),E=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var l,s,u;return v().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)(v().mark((function e(r){var n,i;return v().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)(v().mark((function e(t,r){return v().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)(v().mark((function e(n){return v().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)(v().mark((function e(t,r,n){var a,o,l,s=arguments;return v().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)(v().mark((function e(n){return v().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=ae(t.cardId);Object.keys(a).map((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)(v().mark((function e(t,r){var n,l,s;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,new Promise(function(){var e=Object(i.a)(v().mark((function e(a,o){var i,l,s,u;return v().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.map((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})).map((function(e){e.count=e.count+1}))})),l._tags&&l._tags.map((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})).map((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)(v().mark((function e(t,r){return v().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)(v().mark((function e(t,r){var n,i,l,s,u,d;return v().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])})).map((function(e){d=Object(o.a)(Object(o.a)({},d),{},Object(a.a)({},e,i.cards[e]))})),Object.keys(d).map((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.map((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)}}(),P=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)},A=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.map((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)})))},z=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})))})))}))}},M=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)(v().mark((function e(t,r,n){var i,l;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=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?l:null}),l=h()().tz("America/Sao_Paulo").unix("x"),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,i))})))}));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)(v().mark((function e(t,r){return v().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)(v().mark((function e(t,r,n){var i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h()().unix("x"),Y(t,r,n),t&&t.store&&c.a.getState().functions&&c.a.getState().functions.socket,c.a.getState().functions.socket;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 4:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),G=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),H=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().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 W(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)}}(),W=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().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)(v().mark((function e(t,a){var i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r.cardId);case 2:(i=e.sent)&&i.length>0?i.map((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)}}(),U=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,i,l,s;return v().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).map((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).map((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)}}(),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]);r._users[t.userId]&&delete r._users[t.userId],e.reduxFunction("ASYNC","SET_DB",Object(o.a)(Object(o.a)({},c.a.getState().db),{},{cards:Object(o.a)(Object(o.a)({},c.a.getState().db.cards),{},Object(a.a)({},t.cardId,Object(o.a)({},r)))}))},q=function(e,t){if(!c.a.getState().db.cards[t.cardId])return!0;var r=Object(o.a)({},c.a.getState().db.cards[t.cardId]);t.userIds&&t.userIds.length>0&&t.userIds.map((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)))}))},X=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{u.a.put("cards/unlinkChildrens",{cardId:r.cardId,planId:r._planId})}catch(t){console.log(t)}return e.abrupt("return",!0);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),J=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().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)})).map((function(e){n[e]._parent=r.planId})),r.cards&&r.cards.length>0&&r.cards.map((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)}}(),K=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}},Z=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{}},Q=function(){var e=Object(i.a)(v().mark((function e(t,r){return v().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)(v().mark((function e(t){return v().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)}}(),ee=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},te=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})).map((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})).map((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})).map((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})).map((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).map((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])&&(Object.keys(u.cards[p._planId]._users).map((function(e){})),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).map((function(e){0===h.filter((function(t){return t._id===e})).length&&h.push(f[e])})),h}return f},re=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)},ne=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var a,o,c,l=arguments;return v().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)(v().mark((function e(t,o){return v().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)}}(),ae=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)(v().mark((function t(r,a){var i;return v().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},oe=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,l,s,u;return v().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)(v().mark((function e(){return v().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)}}(),ie=function(){var e=Object(i.a)(v().mark((function e(t,r){var n,i,l,s;return v().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)}}(),ce=function(){var e=Object(i.a)(v().mark((function e(t){var r,n,a,o,l,s=arguments;return v().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.map(function(){var n=Object(i.a)(v().mark((function n(a,i){var c;return v().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ce(a,r,t);case 2:c=n.sent,-1===o.indexOf(a)&&o.push(a),c&&c.length>0?c.map((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)}}(),le=function(){var e=Object(i.a)(v().mark((function e(t,r,n){var a,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r,n);case 2:a=e.sent,i=c.a.getState().db.cards,a&&a.length>0&&a.map((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)}}(),se=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})).map((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){if(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]))return!0})).length:0,a+=parseInt(n[t])):(n[t]=parseInt(n[t]),a+=parseInt(n[t]))})),Object(o.a)(Object(o.a)({},n),{},{total:a})},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]._users&&!n.cards[e]._users[r._id]&&n.cards[e]._account&&n.cards[e]._account!==s()(r.account).toString())},de=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())},pe=function(){var e=Object(i.a)(v().mark((function e(t,r){var n;return v().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(){ie(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&le(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"}):(ie(Object(o.a)(Object(o.a)({},t),{},{data:{_id:r._id}}),{status:"completed"===r.status?"inProgress":"completed"}),n&&parseInt(n.data)>0&&le(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)}}(),fe=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){if(e&&e._users&&Object.keys(e._users).filter((function(e){return t.users.indexOf(e)>-1})).length>0)return!0})).map((function(e){return e}))),t.units&&t.units.length>0&&(r=t.units.indexOf("all")>-1?r.filter((function(e){if(!e._planId||e._planId&&n.cards[e._planId]&&!n.cards[e._planId].client)return!0})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){if(n.cards[e].client&&t.units.indexOf(n.cards[e].client)>-1)return!0})).map((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){if(!e._planId||e._planId&&n.cards[e._planId]&&!n.cards[e._planId].client)return!0})).map((function(e){return e})):r.filter((function(e){var r=!1;return Object.keys(n.cards).filter((function(e){if(n.cards[e].client&&t.groups.indexOf(n.cards[e].client)>-1)return!0})).map((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){if(t.plans.indexOf(e._planId)>-1)return!0})).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.map((function(t){t.value===e.value&&(r=!0)})),r})).length>0})).map((function(e){return e})))),r}},260:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n,a=r(7),o={tags:[],userGroups:[],users:{userGroup:[],selected:{}},units:{userGroup:[],selected:{}},clients:{userGroup:[],selected:{}},groups:{userGroup:[],selected:{}},plans:{userGroup:[],selected:{}},sideModuleWindow:!1,clearFilter:!1,text:"",cards:(n={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}},Object(a.a)(n,"priority",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"risk",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"complexity",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"impact",{all:!0,null:!0,normal:!0,low:!0,medium:!0,high:!0}),Object(a.a)(n,"kpiType",[]),Object(a.a)(n,"iniKpiValue",null),Object(a.a)(n,"endKpiValue",null),n)}},279:function(e,t,r){"use strict";var n=r(2),a=r(8),o=r(6),i=r(0),c=r.n(i),l=r(1130),s=r(1851),u=r(18),d=r(1141),p=r(817),f=r(1140),h=r(475),m=r(1),g=r(30);function b(){b=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(S([])));v&&v!==t&&r.call(v,o)&&(m=v);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),E(r),d}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}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],v=c.a.useState(e.color?e.color:"rgba(200,200,200,1)"),y=Object(o.a)(v,2),x=y[0],_=y[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"}})))))})))}},287:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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(12),a=r(1138),o=r(1071),i=r(32),c=r(31),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={open:!1,nodeId:null,activeChats:[],activeModule:"users",groups:{},notifications:!0},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,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)({},p):e},h={timelines:{},unreadeds:{},drafts:{}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,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)({},h):e},g=r(764),b=r(563),v={},y=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},x={},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;return"SET_LANGUAGE"===t.action&&t.value?t.value:e},O={open:!1,miro:!1,files:[],file:0},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,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)({},O):e},j={total:0,lastNotification:0,firstNotification:0},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,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},k={fullScreen:!0,visible:!0,callBack:null,autoSave:!1,cards:!0},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;return"preLoader"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},L=r(260),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L.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?L.a:e},I=r(378),T=r.n(I),F=r(1077),D=r.n(F),N={custom:{ColumnTitleColor:"linear-gradient(90deg, rgba(67,18,102,1) 0%, rgba(90,35,130,1) 100%)",customLogo:T.a,loginBackground:D.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},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,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},A={cards:{load:{}},timeline:{load:{}}},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A,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},z={module:null,activeModule:"cardEdit",reqSave:!1,window:!1,id:null,data:{}},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,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)({},z):e},Y={},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,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},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_LOADER"===t.action&&t.value?Object(l.a)(Object(l.a)({},e),t.value):e},H={cards:{},timeline:{}},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H,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},U={users:{}},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U,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},q={typing:{}},X=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,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)({},q):e},J={},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=arguments.length>1?arguments[1]:void 0;return"SET_SEARCH"===t.action&&t.value?Object(l.a)({},t.value):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_OVERVIEW_NAV"===t.action&&t.value?Object(l.a)({},t.value):e},ee=r(418);function te(){te=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),c=new E(a||[]);return n(i,"_invoke",{value:_(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var d={};function p(){}function f(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==t&&r.call(b,o)&&(m=b);var v=h.prototype=p.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function _(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return S()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=h,n(v,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,c,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(v),l(v,c,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),j(r),d}},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;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var re=te().mark(oe),ne=te().mark(ie);function ae(e){return e.next&&e.next(),!0}function oe(e){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(ee.c)({type:e.action,value:e.value});case 2:return t.next=4,Object(ee.b)(ae,e);case 4:case"end":return t.stop()}}),re)}function ie(){return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ee.a)([Object(ee.e)("ASYNC",oe),Object(ee.d)("IMMEDIATE",oe)]);case 2:case"end":return e.stop()}}),ne)}var ce=Object(a.a)(),le=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,chat:f,chatTyping:X,chats:m,controls:g.a,db:b.a,functions:y,languages:_,lightBox:w,notifications:E,overviewNav:Q,preLoader:S,search:C,searchs:K,session:P,sessionLoads:$,sideModule:M,timeline:B,timelineLoader:G,toLoad:W,usersStatus:V}),Object(n.a)(ce,Object(o.routerMiddleware)(i.a)));ce.run(ie);t.a=le},30:function(e,t,r){"use strict";var n=r(8),a=r(330),o=r.n(a);r(32);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.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(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(S([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(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&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,p):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),p},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),E(r),p}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}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},32:function(e,t,r){"use strict";var n=r(214),a=Object(n.a)();t.a=a},378:function(e,t,r){e.exports=r.p+"static/media/logoMachen.c1ab9af8.svg"},381: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="},39:function(e,t,r){"use strict";var n=r(8),a=r(330),o=r.n(a);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.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(C){s=function(e,t,r){return e[t]=r}}function u(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=u;var p={};function f(){}function h(){}function m(){}var g={};s(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(S([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(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&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=d(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=s(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),s(y,l,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,p):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),p},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),E(r),p}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}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 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},5: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 v})),r.d(t,"K",(function(){return y})),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 P})),r.d(t,"M",(function(){return A})),r.d(t,"F",(function(){return $})),r.d(t,"i",(function(){return z})),r.d(t,"t",(function(){return M})),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",v="#FFF",y="#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)"},P={boxShadow:"0 4px 20px 0 rgba("+a(b)+",.14), 0 7px 10px -5px rgba("+a(m[0])+",.4)"},A=Object(n.a)({background:"linear-gradient(60deg, "+d[1]+", "+d[2]+")"},D),$=Object(n.a)({background:"linear-gradient(60deg, "+f[1]+", "+f[2]+")"},F),z=Object(n.a)({background:"linear-gradient(60deg, "+p[1]+", "+p[2]+")"},N),M=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]+")"},P),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"})})},53: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(68),c=r.n(i),l=r(10),s=r.n(l),u=r(3),d=r(39);function p(){p=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(C){l=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),c=new k(a||[]);return n(i,"_invoke",{value:O(e,r,c)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=s;var d={};function f(){}function h(){}function m(){}var g={};l(g,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(S([])));v&&v!==t&&r.call(v,o)&&(g=v);var y=m.prototype=f.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var a;n(this,"_invoke",{value:function(n,o){function i(){return new t((function(a,i){!function n(a,o,i,c){var l=u(e[a],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}(n,o,a,i)}))}return a=a?a.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function j(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=m,n(y,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:h,configurable:!0}),h.displayName=l(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),l(y,c,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.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}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,d):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),d},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),E(r),d}},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;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}var f=function(){var e=Object(o.a)(p().mark((function e(t,r){var i,l,s,f,m,g,b,v,y,x,_,O,w,j,E,k,S,L,C,I,T,F,D,N,P,A,$,z,M,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,v=r.completed,y=void 0!==v&&v,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,P=r.skip,A=void 0===P?0:P,$=r.startDate,z=void 0===$?null:$,M=r.endDate,Y=void 0===M?null:M,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:y,archived:j,templates:k,status:x,allStatus:L,limit:N,skip:A,startDate:z,endDate:Y},y?{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)({},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}:{}),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("/sp"!==window.location.pathname||36===n[0].length||"completed"!==n[1]){e.next=14;break}return e.next=13,f(t,{cardLoad:"plans",completed:!0,completedDays:r});case 13:a(!0);case 14:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=18;break}return e.next=17,f(t,{cardLoad:"templates",templates:!0});case 17:a(!0);case 18:if("/sp"!==window.location.pathname||36===n[0].length||"admin"!==n[1]){e.next=22;break}return e.next=21,f(t,{cardLoad:"plans",adminView:!0});case 21:a(!0);case 22:if("/sp"!==window.location.pathname||36===n[0].length||"deleted"!==n[1]){e.next=26;break}return e.next=25,f(t,{cardLoad:"plans",deleted:!0});case 25:a(!0);case 26:if("/d"!==window.location.pathname&&"/login"!==window.location.pathname&&"/"!==window.location.pathname||"dayTasks"===n[1]){e.next=34;break}return e.next=29,f(t,{cardLoad:"dashboard"});case 29:return e.next=31,f(t,{cardLoad:"showIn"});case 31:return e.next=33,f(t,{cardLoad:"channel"});case 33:a(!0);case 34:if("/d"!==window.location.pathname||"dayTasks"!==n[1]){e.next=38;break}return e.next=37,f(t,{adminView:!0,cardLoad:"myDay"});case 37:a(!0);case 38:if("/d"!==window.location.pathname||"ourTasks"!==n[1]){e.next=42;break}return e.next=41,f(t,{adminView:!0,cardLoad:"myDay"});case 41:a(!0);case 42:if("/sp"!==window.location.pathname||!n[0]||36!==n[0].length){e.next=48;break}return e.next=45,f(t,{idRel:n[0],cardLoad:"plan"});case 45:return e.next=47,f(t,{idRel:n[0],cardLoad:"plan",completed:!0});case 47:a(!0);case 48:if("/sp"===window.location.pathname&&36!==n[0].length&&a(!0),"/sp"!==window.location.pathname||36===n[0].length||"archived"!==n[1]){e.next=52;break}return e.next=52,f(t,{cardLoad:"plans",archived:!0});case 52:if("/sp"!==window.location.pathname||36===n[0].length||"templates"!==n[1]){e.next=55;break}return e.next=55,f(t,{cardLoad:"templates"});case 55: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=60;break}return e.next=59,f(t,{cardLoad:"plans"});case 59:a(!0);case 60:if("/calendar"!==window.location.pathname){e.next=64;break}return e.next=63,f(t,{cardLoad:"calendar",startDate:null,endDate:null});case 63:a(!0);case 64:if("/p"!==window.location.pathname&&"/acc"!==window.location.pathname||a(!0),"/bright-and-connected"!==window.location.pathname){e.next=73;break}if("tab"!==n[0]||"radar"!==n[1]){e.next=69;break}return e.next=69,f(t,{cardLoad:"links",limit:9,skip:0});case 69:if("tab"!==n[0]||"insight-boards"!==n[1]){e.next=72;break}return e.next=72,f(t,{cardLoad:"insights",limit:9,skip:0});case 72:a(!0);case 73:if("/c"!==window.location.pathname){e.next=78;break}if("tab"!==n[0]||"users"===n[1]){e.next=77;break}return e.next=77,f(t,{cardLoad:"plans"});case 77:a(!0);case 78:if("/t"!==window.location.pathname){e.next=99;break}if(n[1]&&(!n[1]||"myTasks"!==n[1])){e.next=85;break}return e.next=82,f(t,{cardLoad:"myResponsible"});case 82:return e.next=84,f(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 84:a(!0);case 85:if(!n[1]||"myDay"!==n[1]&&"ourDay"!==n[1]){e.next=89;break}return e.next=88,f(t,{cardLoad:"myDay",completed:!0,completedDays:r});case 88:a(!0);case 89:if(!n[1]||"myTasks"===n[1]||"myDay"===n[1]){e.next=99;break}return e.next=92,f(t,{cardLoad:"in"});case 92:return e.next=94,f(t,{cardLoad:"in",completed:!0,completedDays:r});case 94:return e.next=96,f(t,{cardLoad:"myResponsible"});case 96:return e.next=98,f(t,{cardLoad:"myResponsible",completed:!0,completedDays:r});case 98:a(!0);case 99:if("/tags"!==window.location.pathname){e.next=104;break}if(36!==n[0].length&&!u.a.getState().searchs.tagsView){e.next=103;break}return e.next=103,f(t,{cardLoad:"tags",idRel:n[0],searchParams:u.a.getState().searchs.tagsView});case 103:a(!0);case 104:"/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 108: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)}}()},563:function(e,t,r){"use strict";var n=r(2),a=r(7),o=r(777),i=r.n(o),c=r(778),l=r.n(c),s=r(779),u=r.n(s),d=r(780),p=r.n(d),f=r(1072),h=r.n(f),m=r(1073),g=r.n(m),b=r(1074),v=r.n(b),y=r(1075),x=r.n(y),_=r(129),O=r.n(_),w=r(1076),j=r.n(w),E=r(125),k=r.n(E),S=r(572),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:v.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","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}},572:function(e){e.exports=JSON.parse('{"name":"machen","version":"3.1.179","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/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.24.0","moment-timezone":"^0.5.31","node-sass":"^4.13.1","nouislider":"14.0.2","npm":"^7.24.2","pdf-lib":"^1.16.0","perfect-scrollbar":"1.4.0","rc-color-picker":"^1.2.6","react":"^18.2.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-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.3","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","simple-peer":"^9.11.1","socket.io-client":"^4.4.1","styled-components":"^5.2.0","utf-8-validate":"^5.0.9","utf8":"^3.0.0","uuid":"^8.3.2","xlsx":"^0.18.5"},"scripts":{"start":"react-scripts start","build":"react-scripts build && gulp licenses","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 && 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-config-prettier":"6.0.0","eslint-plugin-prettier":"3.1.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":[]}}')},590:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(18),i=r(14),c=(r(32),r(3),r(12)),l=r(13),s=r(475),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.k)(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}))}))},591:function(e,t,r){var n=r(313),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"}}}},592:function(e,t,r){"use strict";var n,a=r(7),o=r(2),i=r(5),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},619: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="},625:function(e,t,r){e.exports=r.p+"static/media/strategy-pt.625a0c5b.png"},647:function(e,t,r){e.exports=r.p+"static/media/userCover.49044f68.jpg"},697:function(e,t,r){},699:function(e,t,r){},764: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}},777:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},778:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},779:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},780:function(e,t,r){var n=r(64);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(0)),o=(0,n(r(122)).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},781:function(e,t,r){e.exports=r.p+"static/media/machen.b9c661d3.svg"},79:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(2),a=r(6),o=r(0),i=r.n(o),c=r(814),l=r(813),s=r(475),u=r(26),d=r(815),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=i.a.useState(e.tooltipprops&&e.tooltipprops.open?e.tooltipprops.open:(!e.tooltipprops||"false"!==String(e.tooltipprops.open))&&void 0),m=Object(a.a)(u,2),g=m[0],b=m[1];return i.a.useEffect((function(){e&&e.tooltipprops&&e.tooltipprops.open&&!g&&b(!0),e&&e.tooltipprops&&g&&"false"===String(e.tooltipprops.open)&&b(!1)})),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:g,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)}))))}},993:function(e,t,r){}},[[1189,1,2]]]);
//# sourceMappingURL=main.7ede8fd0.chunk.js.map